Commit 2a10a1ea authored by Guido Günther's avatar Guido Günther Committed by Angus Ainslie (Purism)

nwl-dsi: Properly check for timeouts on wait_for_completion_timeout

Signed-off-by: Guido Günther's avatarGuido Günther <guido.gunther@puri.sm>
parent 34bfd44c
Pipeline #1684 passed with stage
in 31 minutes and 49 seconds
......@@ -824,12 +824,12 @@ static ssize_t nwl_dsi_host_transfer(struct mipi_dsi_host *host,
/* Initiate the DSI packet transmision */
nwl_dsi_begin_transmission(dsi);
wait_for_completion_timeout(&xfer.completed, MIPI_FIFO_TIMEOUT);
ret = xfer.status;
if (xfer.status == -ETIMEDOUT)
DRM_DEV_ERROR(host->dev, "[%02X] DSI transfer timed out\n",
xfer.cmd);
if (!wait_for_completion_timeout(&xfer.completed, MIPI_FIFO_TIMEOUT)) {
DRM_DEV_ERROR(host->dev, "[%02X] DSI transfer timed out\n", xfer.cmd);
ret = -ETIMEDOUT;
} else {
ret = xfer.status;
}
nwl_dsi_disable_clocks(dsi, CLK_RX_ESC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment