From ac25a72dcba88acbb7b5cb2087838ef692c4a115 Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Fri, 20 Sep 2019 17:42:05 +0800 Subject: [PATCH] MLK-22653-2 drm/imx: dpu: crtc: Do not send out bogus vblank event in ->atomic_disable() When a full modeset is needed, the CRTC could be totally disabled or enabled/re-enabled after the modeset. If it's re-enabled, a vblank event would be sent during the CRTC enablement procedure. So, a bogus event should be killed in the ->atomic_disable() callback. Signed-off-by: Liu Ying (cherry picked from commit cee2d80af5e38fb022973c023f548ff02a515882) --- drivers/gpu/drm/imx/dpu/dpu-crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/dpu/dpu-crtc.c b/drivers/gpu/drm/imx/dpu/dpu-crtc.c index b23c1988bd50..6fc081c73cec 100644 --- a/drivers/gpu/drm/imx/dpu/dpu-crtc.c +++ b/drivers/gpu/drm/imx/dpu/dpu-crtc.c @@ -315,7 +315,7 @@ static void dpu_crtc_atomic_disable(struct drm_crtc *crtc, WARN_ON(!crtc->state->event); - if (crtc->state->event) { + 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); -- 2.17.1