From: jsg Date: Thu, 27 Jan 2022 22:56:43 +0000 (+0000) Subject: drm/amd/display: check top_pipe_to_program pointer X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=150292ddef030f2838d9474cf6df3e8510fa9f6f;p=openbsd 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 --- 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 };