Skip to content

Commit 389c6b3

Browse files
charliu-AMDENGalexdeucher
authored andcommitted
drm/amd/display: add NULL pointer check
[why] check dmub_Srv exist or not before accessing dmub. Acked-by: Stylon Wang <[email protected]> Signed-off-by: Charlene Liu <[email protected]> Reviewed-by: Zhan Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3ffb193 commit 389c6b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_stream.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ static void program_cursor_attributes(
276276
}
277277

278278
dc->hwss.set_cursor_attribute(pipe_ctx);
279-
280-
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
279+
if (dc->ctx->dmub_srv)
280+
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
281281
if (dc->hwss.set_cursor_sdr_white_level)
282282
dc->hwss.set_cursor_sdr_white_level(pipe_ctx);
283283
}
@@ -396,8 +396,8 @@ static void program_cursor_position(
396396
}
397397

398398
dc->hwss.set_cursor_position(pipe_ctx);
399-
400-
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
399+
if (dc->ctx->dmub_srv)
400+
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
401401
}
402402

403403
if (pipe_to_program)

0 commit comments

Comments
 (0)