drm/amd/display: Add null check for top_pipe_to_program in commit_planes_for_stream
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:09:05 +0000 (02:09 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:09:05 +0000 (02:09 +0000)
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

index 50e643b..0b2eb2a 100644 (file)
@@ -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);