summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2018-10-03 23:22:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-21 16:13:12 +0300
commit5094dea5acab748453e75fcb53db6fe9ce629ab7 (patch)
tree70916e3c1eea01033363c156666dbad78f6731fb
parent81710cedad2fa7ea3221cdf77bcb1d39683f07ac (diff)
downloadlinux-5094dea5acab748453e75fcb53db6fe9ce629ab7.tar.xz
drm/msm: Grab a vblank reference when waiting for commit_done
[ Upstream commit 3b712e43e3876b42b38321ecf790a1f5fe59c834 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/msm/msm_atomic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c
index 025d454163b0..8f77047a226d 100644
--- a/drivers/gpu/drm/msm/msm_atomic.c
+++ b/drivers/gpu/drm/msm/msm_atomic.c
@@ -93,7 +93,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);
}
}