OSDN Git Service

drm/amd/display: Varibright add null check
authorSivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>
Sat, 24 Feb 2018 00:01:07 +0000 (19:01 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Mar 2018 20:08:42 +0000 (15:08 -0500)
Add null check for stream update

Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 40a65cb..e72fdb5 100644 (file)
@@ -1363,7 +1363,7 @@ static void commit_planes_for_stream(struct dc *dc,
                        dc->hwss.apply_ctx_for_surface(
                                        dc, pipe_ctx->stream, stream_status->plane_count, context);
 
-                       if (stream_update->abm_level && pipe_ctx->stream_res.abm) {
+                       if (stream_update && stream_update->abm_level && pipe_ctx->stream_res.abm) {
                                if (pipe_ctx->stream_res.tg->funcs->is_blanked) {
                                        // if otg funcs defined check if blanked before programming
                                        if (!pipe_ctx->stream_res.tg->funcs->is_blanked(pipe_ctx->stream_res.tg))