drm/imx: only send event on crtc disable if kept disabled
authorRobert Beckett <bob.beckett@collabora.com>
Tue, 25 Jun 2019 17:59:15 +0000 (18:59 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 4 Jul 2019 10:21:25 +0000 (12:21 +0200)
The event will be sent as part of the vblank enable during the modeset
if the crtc is not being kept disabled.

Fixes: 5f2f911578fb ("drm/imx: atomic phase 3 step 1: Use atomic configuration")

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/imx/ipuv3-crtc.c

index e04d6ef..c436a28 100644 (file)
@@ -94,7 +94,7 @@ static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,
        drm_crtc_vblank_off(crtc);
 
        spin_lock_irq(&crtc->dev->event_lock);
-       if (crtc->state->event) {
+       if (crtc->state->event && !crtc->state->active) {
                drm_crtc_send_vblank_event(crtc, crtc->state->event);
                crtc->state->event = NULL;
        }