drm/msm/mdp5: release hwpipe(s) for unused planes
authorRob Clark <robdclark@gmail.com>
Sun, 21 May 2017 16:05:07 +0000 (12:05 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 27 May 2017 17:48:27 +0000 (13:48 -0400)
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>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c

index 30b4691f7b0d51b727864fe511f297ee75a289b6..7d3741215387110bb7f7ad622cb54d0d411fb9f1 100644 (file)
@@ -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;