lkml.org 
[lkml]   [2020]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] drm/msm/dpu: move vblank events to complete_commit()
On 2020-09-07 10:04, Rob Clark wrote:
> 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>

I checked our downstream code as well and yes we are not signaling
page flips inside the vblank_cb and are doing it after
wait_for_commit_done
This aligns with that.
Hence,
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.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,

\
 
 \ /
  Last update: 2020-09-08 21:07    [W:0.074 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site