From 912efcbdfe2cde76207569cf07b3e65599db9722 Mon Sep 17 00:00:00 2001 From: Anand Tarakh Date: Tue, 18 Jun 2024 18:57:54 +0530 Subject: [PATCH] disp: msm: dsi: wait for mdp idle before roi update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As part of partial update, the DSI command engine is programmed with the new ROI. However, because double buffering is not enabled for DSI command mode registers, updating them during a partial update use case when the previous frame is not yet finished can result in a configuration mismatch between MDP and DSI. In this scenario, DSI is configured with the new ROI, while MDP is still configured for the previous frame’s ROI. This mismatch can lead to a write pointer timeout. To avoid this issue, wait for MDP to be idle before updating the new ROI. Change-Id: I1796cb7872edaf9e1d76681c2d948bc1b567c298 Signed-off-by: Anand Tarakh --- msm/dsi/dsi_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 84b0e919b9..a2de644e83 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -8605,6 +8605,10 @@ static int dsi_display_set_roi(struct dsi_display *display, if (!changed) continue; + rc = dsi_ctrl_wait_for_cmd_mode_mdp_idle(ctrl->ctrl); + if (rc) + DSI_ERR("wait for cmd mode mdp idle failed rc = %d", rc); + /* re-program the ctrl with the timing based on the new roi */ rc = dsi_ctrl_timing_setup(ctrl->ctrl); if (rc) {