drm/msm: Grab a vblank reference when waiting for commit_done
authorSean Paul <seanpaul@chromium.org>
Wed, 3 Oct 2018 20:22:31 +0000 (16:22 -0400)
committerSean Paul <seanpaul@chromium.org>
Fri, 30 Nov 2018 16:58:03 +0000 (11:58 -0500)
Similar to the atomic helpers, we should enable vblank while we're
waiting for the commit to finish. DPU needs this, MDP5 seems to work
fine without it.

Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_atomic.c

index 4bcdeca7479db6a2481c2b6e8ad38defe7f280de..2088a20eb27024f8e868d17b1eb04343a3ad37bb 100644 (file)
@@ -34,7 +34,12 @@ static void msm_atomic_wait_for_commit_done(struct drm_device *dev,
                if (!new_crtc_state->active)
                        continue;
 
+               if (drm_crtc_vblank_get(crtc))
+                       continue;
+
                kms->funcs->wait_for_crtc_commit_done(kms, crtc);
+
+               drm_crtc_vblank_put(crtc);
        }
 }