drm/amd/display: Null ptr check for set_sdr_white_level
authorKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Tue, 10 Jul 2018 20:04:05 +0000 (16:04 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Jul 2018 21:11:51 +0000 (16:11 -0500)
[Why&How]
Cursor boosting can only be done on DCN+
Check for nullptr since DCE doesn't implement it.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Sivapiriyan Kumarasamy <Sivapiriyan.Kumarasamy@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c

index 4717330..fdcc8ab 100644 (file)
@@ -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)