Skip to contentSkip to conversation

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

PATCH In review Rob Clark 3 participants 3 messages Jul 7, 2022

Subsystems (3)
lore
Share & tools
lore

Rob Clark

author
#0 lore raw

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

From: Rob Clark <[email protected]>

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.

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +6 -0
index 4dd0ce09ca74..4ba000951a90 100644
@@ -422,6 +422,9 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
 		if (!state)
 			continue;
 
+		if (!state->visible)
+			continue;
+
 		pstate = to_dpu_plane_state(state);
 		fb = state->fb;
 
@@ -1195,6 +1198,9 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 		if (cnt >= DPU_STAGE_MAX * 4)
 			continue;
 
+		if (!pstate->visible)
+			continue;
+
 		pstates[cnt].dpu_pstate = dpu_pstate;
 		pstates[cnt].drm_pstate = pstate;
 		pstates[cnt].stage = pstate->normalized_zpos;
Signature · 1 line
2.36.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Rob Clark

From: Rob Clark <[email protected]>

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.

Fixes 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Quoted 28 lines
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +6 -0
index 4dd0ce09ca74..4ba000951a90 100644
@@ -422,6 +422,9 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
  		if (!state)
  			continue;
 
+		if (!state->visible)
+			continue;
+
  		pstate = to_dpu_plane_state(state);
  		fb = state->fb;
 
@@ -1195,6 +1198,9 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
  		if (cnt >= DPU_STAGE_MAX * 4)
  			continue;
 
+		if (!pstate->visible)
+			continue;
+
  		pstates[cnt].dpu_pstate = dpu_pstate;
  		pstates[cnt].drm_pstate = pstate;
  		pstates[cnt].stage = pstate->normalized_zpos;
Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v1 1/1
#2 lore raw
In reply to Rob Clark
Quoted 7 lines · Rob Clark

From: Rob Clark <[email protected]>

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.

Will pick up the fixes tag from Dmitry's r-b.

Quoted 28 lines
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +6 -0
index 4dd0ce09ca74..4ba000951a90 100644
@@ -422,6 +422,9 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
  		if (!state)
  			continue;
 
+		if (!state->visible)
+			continue;
+
  		pstate = to_dpu_plane_state(state);
  		fb = state->fb;
 
@@ -1195,6 +1198,9 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
  		if (cnt >= DPU_STAGE_MAX * 4)
  			continue;
 
+		if (!pstate->visible)
+			continue;
+
  		pstates[cnt].dpu_pstate = dpu_pstate;
  		pstates[cnt].drm_pstate = pstate;
  		pstates[cnt].stage = pstate->normalized_zpos;