From 3cff4d4e7d0c3b75c9f189c4226b41bec0916872 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 13 Jun 2023 03:01:44 +0000 Subject: [PATCH] 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 --- sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.20.1