drm/sun4i: Report proper vblank
PATCH 1/2 drm/sun4i: Report proper vblank
The sun4i display engine doesn't have any vblank counter. Use the proper helper for that.
Signed-off-by Maxime Ripard <[email protected]>
--- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_drv.c +1 -1
@@ -92,7 +92,7 @@ static struct drm_driver sun4i_drv_driver = {/* Frame Buffer Operations */ /* VBlank Operations */ - .get_vblank_counter = drm_vblank_count, + .get_vblank_counter = drm_vblank_no_hw_counter, .enable_vblank = sun4i_drv_enable_vblank, .disable_vblank = sun4i_drv_disable_vblank, };
Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm/sun4i: Send vblank event when the CRTC is disabled
So far, we were missing to send the vblank event when disabling the CRTC, making us never report the last vblank event.
This was causing a time out on the page flip, which should be solved now.
Signed-off-by Maxime Ripard <[email protected]>
--- drivers/gpu/drm/sun4i/sun4i_crtc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/sun4i/sun4i_crtc.c +8 -0
@@ -65,6 +65,14 @@ static void sun4i_crtc_disable(struct drm_crtc *crtc)DRM_DEBUG_DRIVER ("Disabling the CRTC\n" );sun4i_tcon_disable (drv->tcon); + +if (crtc->state->event && !crtc->state->active) { +spin_lock_irq (&crtc->dev->event_lock); +drm_crtc_send_vblank_event (crtc, crtc->state->event); +spin_unlock_irq (&crtc->dev->event_lock); + + crtc->state->event =NULL ; + } }static void sun4i_crtc_enable (struct drm_crtc *crtc)
Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel