Message ID | 1464546923-13439-20-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Daniel, On Sun, May 29, 2016 at 08:35:16PM +0200, Daniel Vetter wrote: > atomic_flush seems to be the right place, right after we commit the > plane updates. Again use the fullproof version, since the pipe might > be off. This looks fine. How can that be tested? modetest requires async vblank, which is not there yet, and X doesn't seem to use it at all (since it works fine without it). Thanks! Maxime
On Wed, Jun 01, 2016 at 06:18:59PM +0200, Maxime Ripard wrote: > Hi Daniel, > > On Sun, May 29, 2016 at 08:35:16PM +0200, Daniel Vetter wrote: > > atomic_flush seems to be the right place, right after we commit the > > plane updates. Again use the fullproof version, since the pipe might > > be off. > > This looks fine. > > How can that be tested? modetest requires async vblank, which is not > there yet, and X doesn't seem to use it at all (since it works fine > without it). Run the entire series. It implements nonblocking commit for everyone. I'm just working on submitting the non-RFC version of this series. -Daniel
diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c index 4182a21f5923..f628b6d8f23f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c @@ -51,10 +51,22 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc, { struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); struct sun4i_drv *drv = scrtc->drv; + struct drm_pending_vblank_event *event = crtc->state->event; DRM_DEBUG_DRIVER("Committing plane changes\n"); sun4i_backend_commit(drv->backend); + + if (event) { + crtc->state->event = NULL; + + spin_lock_irq(&crtc->dev->event_lock); + if (drm_crtc_vblank_get(crtc) == 0) + drm_crtc_arm_vblank_event(crtc, event); + else + drm_crtc_send_vblank_event(crtc, event); + spin_unlock_irq(&crtc->dev->event_lock); + } } static void sun4i_crtc_disable(struct drm_crtc *crtc)
atomic_flush seems to be the right place, right after we commit the plane updates. Again use the fullproof version, since the pipe might be off. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- drivers/gpu/drm/sun4i/sun4i_crtc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)