From e84524efd2dff7d3ad94518fdcbb7484295a4e97 Mon Sep 17 00:00:00 2001 From: Aravind Venkateswaran Date: Mon, 16 Dec 2019 16:34:17 -0800 Subject: [PATCH] disp: msm: dsi: disable DSI cmd tx async wait for video mode For video mode panels, async wait feature for DCS command transmission may not always be reliable as additional programming would be needed to ensure that the DCS commands are correctly scheduled. Until this feature is properly implemented and validated, disable this for video mode panels to avoid potential DSI command transfer failures. Change-Id: I18c853bc5607cc1cc523b36f6f346b213911c1a9 Signed-off-by: Aravind Venkateswaran Signed-off-by: Satya Rama Aditya Pinapala --- msm/dsi/dsi_ctrl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/msm/dsi/dsi_ctrl.c b/msm/dsi/dsi_ctrl.c index 9cbb48937ff7..75bd3bda68b3 100644 --- a/msm/dsi/dsi_ctrl.c +++ b/msm/dsi/dsi_ctrl.c @@ -1250,7 +1250,8 @@ static void dsi_kickoff_msg_tx(struct dsi_ctrl *dsi_ctrl, } } -static u32 dsi_ctrl_validate_msg_flags(const struct mipi_dsi_msg *msg, +static u32 dsi_ctrl_validate_msg_flags(struct dsi_ctrl *dsi_ctrl, + const struct mipi_dsi_msg *msg, u32 flags) { /* @@ -1260,11 +1261,13 @@ static u32 dsi_ctrl_validate_msg_flags(const struct mipi_dsi_msg *msg, * - 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 + * - video mode panels */ if ((flags & DSI_CTRL_CMD_FIFO_STORE) || flags & DSI_CTRL_CMD_READ || flags & DSI_CTRL_CMD_NON_EMBEDDED_MODE || - msg->wait_ms) + msg->wait_ms || + (dsi_ctrl->host_config.panel_mode == DSI_OP_VIDEO_MODE)) flags &= ~DSI_CTRL_CMD_ASYNC_WAIT; return flags; @@ -1295,7 +1298,7 @@ static int dsi_message_tx(struct dsi_ctrl *dsi_ctrl, goto error; } - flags = dsi_ctrl_validate_msg_flags(msg, flags); + flags = dsi_ctrl_validate_msg_flags(dsi_ctrl, msg, flags); if (dsi_ctrl->dma_wait_queued) dsi_ctrl_flush_cmd_dma_queue(dsi_ctrl);