Skip to content

Commit 5a25cef

Browse files
Taimur Hassanalexdeucher
authored andcommitted
drm/amd/display: check TG is non-null before checking if enabled
[Why & How] If there is no TG allocation we can dereference a NULL pointer when checking if the TG is enabled. Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Alan Liu <[email protected]> Signed-off-by: Taimur Hassan <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4f6d9e3 commit 5a25cef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3278,7 +3278,8 @@ void dcn10_wait_for_mpcc_disconnect(
32783278
if (pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_inst]) {
32793279
struct hubp *hubp = get_hubp_by_inst(res_pool, mpcc_inst);
32803280

3281-
if (pipe_ctx->stream_res.tg->funcs->is_tg_enabled(pipe_ctx->stream_res.tg))
3281+
if (pipe_ctx->stream_res.tg &&
3282+
pipe_ctx->stream_res.tg->funcs->is_tg_enabled(pipe_ctx->stream_res.tg))
32823283
res_pool->mpc->funcs->wait_for_idle(res_pool->mpc, mpcc_inst);
32833284
pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_inst] = false;
32843285
hubp->funcs->set_blank(hubp, true);

0 commit comments

Comments
 (0)