drm/vc4: Fix reduce interrupt timeout 'workaround'
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 14 Feb 2019 02:22:19 +0000 (11:22 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 4 Nov 2019 09:00:55 +0000 (18:00 +0900)
Since flag 'ignore_lcd=0' is set in config.txt, dsi interrupt is
disabled so that interrupt does not occur even when dsi_write is
operated. The waiting time causes a boot delay. So it reduces the
timeout to 100msecs until it is resolved. As a result, the boot delay
has been reduced from 22,000 to 2,200 msecs.

Change-Id: I2c27397102f38128ffd3599405d57198fd0f16f6
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/gpu/drm/vc4/vc4_dsi.c

index e79c436..79b2cbd 100644 (file)
@@ -1236,11 +1236,17 @@ static ssize_t vc4_dsi_host_transfer(struct mipi_dsi_host *host,
        DSI_PORT_WRITE(TXPKT1H, pkth);
        DSI_PORT_WRITE(TXPKT1C, pktc);
 
+       /*
+        * WORKAROUND: The timeout below bas been reduced from 1000 to 100msecs.
+        * Interrupt does not occur even if DSI transmission is performed,
+        * so reduce timeout.
+        */
        if (!wait_for_completion_timeout(&dsi->xfer_completion,
-                                        msecs_to_jiffies(1000))) {
+                                        msecs_to_jiffies(100))) {
                dev_err(&dsi->pdev->dev, "transfer interrupt wait timeout");
                dev_err(&dsi->pdev->dev, "instat: 0x%08x\n",
                        DSI_PORT_READ(INT_STAT));
+               dev_warn(&dsi->pdev->dev, "WORKAROUND: Interrupt does not occur even if DSI transmission.");
                ret = -ETIMEDOUT;
        } else {
                ret = dsi->xfer_result;