浏览代码

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 <maxime.ripard@free-electrons.com>
Maxime Ripard 9 年之前
父节点
当前提交
2cd368300a
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      drivers/gpu/drm/sun4i/sun4i_crtc.c

+ 8 - 0
drivers/gpu/drm/sun4i/sun4i_crtc.c

@@ -65,6 +65,14 @@ static void sun4i_crtc_disable(struct drm_crtc *crtc)
 	DRM_DEBUG_DRIVER("Disabling the CRTC\n");
 	DRM_DEBUG_DRIVER("Disabling the CRTC\n");
 
 
 	sun4i_tcon_disable(drv->tcon);
 	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)
 static void sun4i_crtc_enable(struct drm_crtc *crtc)