[PATCH 09/10] drm/amd/display: Null ptr check for set_sdr_white_level

sunpeng.li at amd.com sunpeng.li at amd.com
Thu Jul 12 18:17:39 UTC 2018


From: Krunoslav Kovac <Krunoslav.Kovac at amd.com>

[Why&How]
Cursor boosting can only be done on DCN+
Check for nullptr since DCE doesn't implement it.

Change-Id: Ifd191103f58214038355c41ccd89fc9cf4a95b3e
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac at amd.com>
Reviewed-by: Sivapiriyan Kumarasamy <Sivapiriyan.Kumarasamy at amd.com>
Acked-by: Leo Li <sunpeng.li at amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 4717330..fdcc8ab 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -214,7 +214,8 @@ bool dc_stream_set_cursor_attributes(
 		}
 
 		core_dc->hwss.set_cursor_attribute(pipe_ctx);
-		core_dc->hwss.set_cursor_sdr_white_level(pipe_ctx);
+		if (core_dc->hwss.set_cursor_sdr_white_level)
+			core_dc->hwss.set_cursor_sdr_white_level(pipe_ctx);
 	}
 
 	if (pipe_to_program)
-- 
2.7.4



More information about the amd-gfx mailing list