From af1a4988a8be7181b02c9726210d677cb6b4b5c3 Mon Sep 17 00:00:00 2001 From: Hoegeun Kwon Date: Thu, 14 Feb 2019 11:22:19 +0900 Subject: [PATCH] drm/vc4: Fix reduce interrupt timeout 'workaround' 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 --- drivers/gpu/drm/vc4/vc4_dsi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index e79c436..79b2cbd 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -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; -- 2.7.4