drm/omap: don't check dispc timings for DSI
authorSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 23 May 2019 20:07:54 +0000 (22:07 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 10 Jun 2019 14:04:15 +0000 (17:04 +0300)
While most display types only forward their VM to the DISPC, this
is not true for DSI. DSI calculates the VM for DISPC based on its
own, but it's not identical. Actually the DSI VM is not even a valid
DISPC VM making this check fail. Let's restore the old behaviour
and avoid checking the DISPC VM for DSI here.

Fixes: 7c27fa57ef31 ("drm/omap: Call dispc timings check operation directly")
Acked-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_crtc.c

index 5a29bf01c0e885b0d0835cef77ba652d79aac72b..86827a061b0bca16682fbb26f738ce8e219224c1 100644 (file)
@@ -395,10 +395,20 @@ static enum drm_mode_status omap_crtc_mode_valid(struct drm_crtc *crtc,
        int r;
 
        drm_display_mode_to_videomode(mode, &vm);
-       r = priv->dispc_ops->mgr_check_timings(priv->dispc, omap_crtc->channel,
-                                              &vm);
-       if (r)
-               return r;
+
+       /*
+        * DSI might not call this, since the supplied mode is not a
+        * valid DISPC mode. DSI will calculate and configure the
+        * proper DISPC mode later.
+        */
+       if (omap_crtc->pipe->output->next == NULL ||
+           omap_crtc->pipe->output->next->type != OMAP_DISPLAY_TYPE_DSI) {
+               r = priv->dispc_ops->mgr_check_timings(priv->dispc,
+                                                      omap_crtc->channel,
+                                                      &vm);
+               if (r)
+                       return r;
+       }
 
        /* Check for bandwidth limit */
        if (priv->max_bandwidth) {