[PATCH 4/7] drm/vc4: Use drm_atomic_helper_wait_for_flip_done()

Boris Brezillon boris.brezillon at free-electrons.com
Fri Jun 2 01:32:09 PDT 2017


Replace the drm_atomic_helper_wait_for_vblanks() with a call to
drm_atomic_helper_wait_for_flip_done(). This allows better detection of
page flip done events which what we are really waiting for in
vc4_atomic_complete_commit().

With this approach, we also addresse the 'missed single vblank event'
problem that can arise when the CRTC is configured in oneshot mode
(only a single frame is generated and the CRTC is immediately paused
after this frame). Note that this oneshot mode will be used for the
writeback connector feature.

Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/gpu/drm/vc4/vc4_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index f229abc0991b..86a60e9b623d 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -63,7 +63,7 @@ vc4_atomic_complete_commit(struct vc4_commit *c)
 
 	drm_atomic_helper_commit_hw_done(state);
 
-	drm_atomic_helper_wait_for_vblanks(dev, state);
+	drm_atomic_helper_wait_for_flip_done(dev, state);
 
 	drm_atomic_helper_cleanup_planes(dev, state);
 
-- 
2.7.4




More information about the linux-rpi-kernel mailing list