Commit 389c6b3e authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher

drm/amd/display: add NULL pointer check

[why]
check dmub_Srv exist or not before accessing dmub.
Acked-by: default avatarStylon Wang <stylon.wang@amd.com>
Signed-off-by: default avatarCharlene Liu <charlene.liu@amd.com>
Reviewed-by: default avatarZhan Liu <Zhan.Liu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3ffb1939
......@@ -276,8 +276,8 @@ static void program_cursor_attributes(
}
dc->hwss.set_cursor_attribute(pipe_ctx);
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
if (dc->ctx->dmub_srv)
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
if (dc->hwss.set_cursor_sdr_white_level)
dc->hwss.set_cursor_sdr_white_level(pipe_ctx);
}
......@@ -396,8 +396,8 @@ static void program_cursor_position(
}
dc->hwss.set_cursor_position(pipe_ctx);
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
if (dc->ctx->dmub_srv)
dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
}
if (pipe_to_program)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment