]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2019 07:52:31 +0000 (09:52 +0200)
commit 5aeab2bfc9ffa72d3ca73416635cb3785dfc076f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/imx/ipuv3-crtc.c

index 13d49002642bab68688c50d15e399a1b0713b2b8..a42288b8c7a44f7505bbdcf54aa9f6b7fa2e20f7 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;
        }