MLK-22653-3 drm/imx: dpu: crtc: Remove WARN_ON(!crtc->state->event)
authorLiu Ying <victor.liu@nxp.com>
Mon, 23 Sep 2019 02:30:58 +0000 (10:30 +0800)
committerLiu Ying <victor.liu@nxp.com>
Thu, 26 Sep 2019 01:44:17 +0000 (09:44 +0800)
The DRM atomic core ensures crtc->state->event is not NULL when
calling the ->atomic_disable() or the ->atomic_flush() callbacks.
So, let's remove the unnecessary NULL check warning on it.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 834bff532fe22a79708459ec976da0a74a2e97e2)

drivers/gpu/drm/imx/dpu/dpu-crtc.c

index 6fc081c..a6f11ed 100644 (file)
@@ -313,8 +313,6 @@ static void dpu_crtc_atomic_disable(struct drm_crtc *crtc,
 
        drm_crtc_vblank_off(crtc);
 
-       WARN_ON(!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);
@@ -774,8 +772,6 @@ static void dpu_crtc_atomic_flush(struct drm_crtc *crtc,
                        }
                }
 
-               WARN_ON(!crtc->state->event);
-
                if (crtc->state->event) {
                        spin_lock_irq(&crtc->dev->event_lock);
                        drm_crtc_send_vblank_event(crtc, crtc->state->event);