From bce44eed4701336bb44f29838e6c31d5939dcc02 Mon Sep 17 00:00:00 2001 From: Aravind Venkateswaran Date: Mon, 16 Dec 2019 22:15:35 -0800 Subject: [PATCH] disp: msm: dsi: add additional validation checks for async cmd wait Disable DSI command transfer async wait feature for DSI read commands and the commands sent in non-embedded mode. CRs-Fixed: 2579259 Change-Id: Ib3b08fbb091711aa4be87400b79d01f0dcc05e71 Signed-off-by: Aravind Venkateswaran Signed-off-by: Satya Rama Aditya Pinapala --- msm/dsi/dsi_ctrl.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/msm/dsi/dsi_ctrl.c b/msm/dsi/dsi_ctrl.c index 37d040d98975..9cbb48937ff7 100644 --- a/msm/dsi/dsi_ctrl.c +++ b/msm/dsi/dsi_ctrl.c @@ -1254,13 +1254,19 @@ static u32 dsi_ctrl_validate_msg_flags(const struct mipi_dsi_msg *msg, u32 flags) { /* - * ASYNC command wait mode is not supported for FIFO commands. - * Waiting after a command is transferred cannot be guaranteed - * if DSI_CTRL_CMD_ASYNC_WAIT flag is set. + * ASYNC command wait mode is not supported for + * - commands sent using DSI FIFO memory + * - DSI read commands + * - DCS commands sent in non-embedded mode + * - whenever an explicit wait time is specificed for the command + * since the wait time cannot be guaranteed in async mode */ if ((flags & DSI_CTRL_CMD_FIFO_STORE) || - msg->wait_ms) + flags & DSI_CTRL_CMD_READ || + flags & DSI_CTRL_CMD_NON_EMBEDDED_MODE || + msg->wait_ms) flags &= ~DSI_CTRL_CMD_ASYNC_WAIT; + return flags; }