Browse Source

drm/msm/mdp5: release hwpipe(s) for unused planes

Otherwise, if userspace doesn't re-use a given plane, it's hwpipe(s)
could stay permanently assigned.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Rob Clark 8 years ago
parent
commit
adcbae310f
1 changed files with 4 additions and 0 deletions
  1. 4 0
      drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c

+ 4 - 0
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c

@@ -445,6 +445,10 @@ static int mdp5_plane_atomic_check_with_state(struct drm_crtc_state *crtc_state,
 			mdp5_pipe_release(state->state, old_hwpipe);
 			mdp5_pipe_release(state->state, old_right_hwpipe);
 		}
+	} else {
+		mdp5_pipe_release(state->state, mdp5_state->hwpipe);
+		mdp5_pipe_release(state->state, mdp5_state->r_hwpipe);
+		mdp5_state->hwpipe = mdp5_state->r_hwpipe = NULL;
 	}
 
 	return 0;