Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dpu: Fix for non-visible planes

Fixes `kms_cursor_crc --run-subtest cursor-offscreen`.. when the cursor
moves offscreen the plane becomes non-visible, so we need to skip over
it in crtc atomic test and mixer setup.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/492819/
Link: https://lore.kernel.org/r/20220707212003.1710163-1-robdclark@gmail.com

+6
+6
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
··· 422 422 if (!state) 423 423 continue; 424 424 425 + if (!state->visible) 426 + continue; 427 + 425 428 pstate = to_dpu_plane_state(state); 426 429 fb = state->fb; 427 430 ··· 1196 1193 goto end; 1197 1194 } 1198 1195 if (cnt >= DPU_STAGE_MAX * 4) 1196 + continue; 1197 + 1198 + if (!pstate->visible) 1199 1199 continue; 1200 1200 1201 1201 pstates[cnt].dpu_pstate = dpu_pstate;