drm/msm/mdp5: ignore planes that are not visible
authorRob Clark <robdclark@gmail.com>
Tue, 24 Oct 2017 14:19:42 +0000 (10:19 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 28 Oct 2017 18:02:54 +0000 (14:02 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c

index 436bf628ef9cb61794ec59d2f8fededdc3cf9113..1a4aedb16b54521b98324912e748c21eda6d324c 100644 (file)
@@ -114,6 +114,8 @@ static u32 crtc_flush_all(struct drm_crtc *crtc)
                return 0;
 
        drm_atomic_crtc_for_each_plane(plane, crtc) {
+               if (!plane->state->visible)
+                       continue;
                flush_mask |= mdp5_plane_get_flush(plane);
        }
 
@@ -242,6 +244,9 @@ static void blend_setup(struct drm_crtc *crtc)
        drm_atomic_crtc_for_each_plane(plane, crtc) {
                enum mdp5_pipe right_pipe;
 
+               if (!plane->state->visible)
+                       continue;
+
                pstate = to_mdp5_plane_state(plane->state);
                pstates[pstate->stage] = pstate;
                stage[pstate->stage][PIPE_LEFT] = mdp5_plane_pipe(plane);
@@ -586,6 +591,9 @@ static int mdp5_crtc_atomic_check(struct drm_crtc *crtc,
        DBG("%s: check", crtc->name);
 
        drm_atomic_crtc_state_for_each_plane_state(plane, pstate, state) {
+               if (!pstate->visible)
+                       continue;
+
                pstates[cnt].plane = plane;
                pstates[cnt].state = to_mdp5_plane_state(pstate);