From 945264ba3b6bb496e09e52d96f0961530a94e0ac Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 11 Oct 2024 02:09:05 +0000 Subject: [PATCH] drm/amd/display: Add null check for top_pipe_to_program in commit_planes_for_stream From Srinivasan Shanmugam e47e563c6f0db7d792a559301862c19ead0dfc2f in linux-6.6.y/6.6.55 66d71a72539e173a9b00ca0b1852cbaa5f5bf1ad in mainline linux --- sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c index 50e643bfdfb..0b2eb2a6c8e 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c +++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c @@ -3797,7 +3797,8 @@ static void commit_planes_for_stream(struct dc *dc, } if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed) - if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) { + if (top_pipe_to_program && + top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) { top_pipe_to_program->stream_res.tg->funcs->wait_for_state( top_pipe_to_program->stream_res.tg, CRTC_STATE_VACTIVE); -- 2.20.1