From 150292ddef030f2838d9474cf6df3e8510fa9f6f Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 27 Jan 2022 22:56:43 +0000 Subject: [PATCH] drm/amd/display: check top_pipe_to_program pointer From Yang Li 1fffa8ffd62fc511d4447b793641252c4743e81c in linux 5.15.y/5.15.17 a689e8d1f80012f90384ebac9dcfac4201f9f77e 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 c798c65d427..1860ccc3f4f 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 @@ -2703,7 +2703,8 @@ static void commit_planes_for_stream(struct dc *dc, #endif 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) { if (should_use_dmub_lock(stream->link)) { union dmub_hw_lock_flags hw_locks = { 0 }; struct dmub_hw_lock_inst_flags inst_flags = { 0 }; -- 2.20.1