linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/msm/dpu: move vblank events to complete_commit()
@ 2020-09-07 17:04 Rob Clark
  2020-09-07 17:04 ` [PATCH 2/2] drm/msm/dpu: clean up some impossibilities Rob Clark
  2020-09-08 19:06 ` [PATCH 1/2] drm/msm/dpu: move vblank events to complete_commit() abhinavk
  0 siblings, 2 replies; 6+ messages in thread
From: Rob Clark @ 2020-09-07 17:04 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-arm-msm, freedreno, Rob Clark, Rob Clark, Sean Paul,
	David Airlie, Daniel Vetter, Drew Davenport, Kalyan Thota,
	Hongbo Yao, Bernard, open list

From: Rob Clark <robdclark@chromium.org>

We could get a vblank event racing with the current atomic commit,
resulting in sending the pageflip event to userspace early, causing
tearing.  On the other hand, complete_commit() ensures that the
pending flush is complete.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index c2729f71e2fa..89c0245b5de5 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -297,7 +297,6 @@ void dpu_crtc_vblank_callback(struct drm_crtc *crtc)
 		dpu_crtc->vblank_cb_time = ktime_get();
 	else
 		dpu_crtc->vblank_cb_count++;
-	_dpu_crtc_complete_flip(crtc);
 	drm_crtc_handle_vblank(crtc);
 	trace_dpu_crtc_vblank_cb(DRMID(crtc));
 }
@@ -402,6 +401,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)
 void dpu_crtc_complete_commit(struct drm_crtc *crtc)
 {
 	trace_dpu_crtc_complete_commit(DRMID(crtc));
+	_dpu_crtc_complete_flip(crtc);
 }
 
 static void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc,
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-08 20:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 17:04 [PATCH 1/2] drm/msm/dpu: move vblank events to complete_commit() Rob Clark
2020-09-07 17:04 ` [PATCH 2/2] drm/msm/dpu: clean up some impossibilities Rob Clark
2020-09-08 19:44   ` abhinavk
     [not found]   ` <010101746f3f7667-5ee2e9e4-9b10-41e0-8bbc-65219583cb86-000000@us-west-2.amazonses.com>
2020-09-08 20:11     ` Rob Clark
2020-09-08 20:52       ` abhinavk
2020-09-08 19:06 ` [PATCH 1/2] drm/msm/dpu: move vblank events to complete_commit() abhinavk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).