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 <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by: Alan Liu <haoping.liu@amd.com> Signed-off-by: Taimur Hassan <syed.hassan@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 4f6d9e3 commit 5a25cef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)