浏览代码

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 <[email protected]>
Satya Rama Aditya Pinapala 5 年之前
父节点
当前提交
b03e4eceb8
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      msm/dsi/dsi_display.c

+ 4 - 4
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;
 }