From: jsg Date: Tue, 13 Jun 2023 03:01:44 +0000 (+0000) Subject: drm/amd/display: Add NULL plane_state check for cursor disable logic X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3cff4d4e7d0c3b75c9f189c4226b41bec0916872;p=openbsd drm/amd/display: Add NULL plane_state check for cursor disable logic From Nicholas Kazlauskas cc9942840afaa3cbbb90dd41404d15125ae5d192 in linux-6.1.y/6.1.29 d29fb7baab09b6a1dc484c9c67933253883e770a in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index 55d63d860ef..8e46f702dda 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -3369,7 +3369,9 @@ static bool dcn10_can_pipe_disable_cursor(struct pipe_ctx *pipe_ctx) for (test_pipe = pipe_ctx->top_pipe; test_pipe; test_pipe = test_pipe->top_pipe) { // Skip invisible layer and pipe-split plane on same layer - if (!test_pipe->plane_state->visible || test_pipe->plane_state->layer_index == cur_layer) + if (!test_pipe->plane_state || + !test_pipe->plane_state->visible || + test_pipe->plane_state->layer_index == cur_layer) continue; r2 = test_pipe->plane_res.scl_data.recout;