MLK-19819-1 drm/imx: lcdif: bypass atomic check when CRTC will be disabled
authorFancy Fang <chen.fang@nxp.com>
Tue, 9 Oct 2018 07:33:04 +0000 (15:33 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
On 4.14.y kernel branch, the DRM framework has been modified that
when no CONNECTOR attach to CRTC, the fb creation wil be deferred
until some CONNECTOR has been detected via hotplug. And the system
suspend workflow is also affected accordingly, if the CRTC atomic
check fails, the display-subsystem suspend also will be caused to
fail. So bypass the 'bus_format' check when CRTC is going to be
disabled.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 6d54c414c2226bebe7201c69a67891eb4fcc5449)

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

index 457483e..7d83a04 100644 (file)
@@ -94,6 +94,12 @@ static int lcdif_crtc_atomic_check(struct drm_crtc *crtc,
        struct lcdif_crtc *lcdif_crtc = to_lcdif_crtc(crtc);
        struct imx_crtc_state *imx_crtc_state = to_imx_crtc_state(state);
 
+       /* Don't check 'bus_format' when CRTC is
+        * going to be disabled.
+        */
+       if (!state->enable)
+               return 0;
+
        /* return directly when no devices attached
         * to LCDIF to avoid below error messsage to
         * make noises in this case.