Commit fd630ae9 authored by Rob Clark's avatar Rob Clark

drm/msm/dpu: move vblank events to complete_commit()

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: default avatarRob Clark <robdclark@chromium.org>
Reviewed-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
parent d768e504
...@@ -297,7 +297,6 @@ void dpu_crtc_vblank_callback(struct drm_crtc *crtc) ...@@ -297,7 +297,6 @@ void dpu_crtc_vblank_callback(struct drm_crtc *crtc)
dpu_crtc->vblank_cb_time = ktime_get(); dpu_crtc->vblank_cb_time = ktime_get();
else else
dpu_crtc->vblank_cb_count++; dpu_crtc->vblank_cb_count++;
_dpu_crtc_complete_flip(crtc);
drm_crtc_handle_vblank(crtc); drm_crtc_handle_vblank(crtc);
trace_dpu_crtc_vblank_cb(DRMID(crtc)); trace_dpu_crtc_vblank_cb(DRMID(crtc));
} }
...@@ -402,6 +401,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event) ...@@ -402,6 +401,7 @@ static void dpu_crtc_frame_event_cb(void *data, u32 event)
void dpu_crtc_complete_commit(struct drm_crtc *crtc) void dpu_crtc_complete_commit(struct drm_crtc *crtc)
{ {
trace_dpu_crtc_complete_commit(DRMID(crtc)); trace_dpu_crtc_complete_commit(DRMID(crtc));
_dpu_crtc_complete_flip(crtc);
} }
static void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc, static void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment