From: jsg Date: Fri, 11 Oct 2024 02:09:05 +0000 (+0000) Subject: drm/amd/display: Add null check for top_pipe_to_program in commit_planes_for_stream X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=945264ba3b6bb496e09e52d96f0961530a94e0ac;p=openbsd 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 --- 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);