From: Liu Ying Date: Fri, 20 Sep 2019 09:42:05 +0000 (+0800) Subject: MLK-22653-2 drm/imx: dpu: crtc: Do not send out bogus vblank event in ->atomic_disable() X-Git-Tag: rel_imx_4.19.35_1.1.0~36 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=ac25a72dcba88acbb7b5cb2087838ef692c4a115;p=linux.git 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) --- 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);