From b03e4eceb8aeaaaca63d7a3792ea2fe93b938551 Mon Sep 17 00:00:00 2001 From: Satya Rama Aditya Pinapala Date: Wed, 1 Jul 2020 13:03:26 -0700 Subject: [PATCH] disp: msm: dsi: reorder operations during DSI display pre kickoff During a dynamic mode switch if the DSI clocks need to be changed, it would result in a sequence of clock off and on operations. If this happens after a partial update even though the commands are sent with an asynchronous wait flag, the clock off forces the commit thread to wait till the DSI command wait_for_done thread is scheduled and completed. The change ensures that the clock change is the first operation that occurs during pre kickoff. Change-Id: I1b4e765cd0281f1539fc4af309247f3bc0867c1b Signed-off-by: Satya Rama Aditya Pinapala --- msm/dsi/dsi_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index ebef95b0a6..3d1cddff59 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -7546,15 +7546,13 @@ int dsi_display_pre_kickoff(struct drm_connector *connector, struct dsi_display *display, struct msm_display_kickoff_params *params) { - int rc = 0; + int rc = 0, ret = 0; int i; /* check and setup MISR */ if (display->misr_enable) _dsi_display_setup_misr(display); - rc = dsi_display_set_roi(display, params->rois); - /* dynamic DSI clock setting */ if (atomic_read(&display->clkrate_change_pending)) { mutex_lock(&display->display_lock); @@ -7572,7 +7570,6 @@ int dsi_display_pre_kickoff(struct drm_connector *connector, */ display_for_each_ctrl(i, display) { struct dsi_ctrl *ctrl = display->ctrl[i].ctrl; - int ret = 0; ret = dsi_ctrl_wait_for_cmd_mode_mdp_idle(ctrl); if (ret) @@ -7590,6 +7587,9 @@ wait_failure: mutex_unlock(&display->display_lock); } + if (!ret) + rc = dsi_display_set_roi(display, params->rois); + return rc; }