Преглед на файлове

disp: msm: dsi: swap DSI timing engine programming and ROI cmd tx

The ROI commands are sent with an asynchronous command transfer wait.
If the queued CMD DMA wait for done gets scheduled before the DSI
controller timing engine programming, the later will be blocked waiting
on the ctrl_lock, which was acquired by the queued DMA wait for done work.
This effectively negates any advantage of having the async wait flag for
ROI commands blocking the main commit thread.

The change swaps this order to ensure that such a scenario never happens.

Change-Id: I8a971c0c7733eea3d435b637ca41b34fa60adfc1
Signed-off-by: Satya Rama Aditya Pinapala <[email protected]>
Satya Rama Aditya Pinapala преди 3 години
родител
ревизия
bcd04f60da
променени са 1 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 6 6
      msm/dsi/dsi_display.c

+ 6 - 6
msm/dsi/dsi_display.c

@@ -8135,17 +8135,17 @@ static int dsi_display_set_roi(struct dsi_display *display,
 		if (!changed)
 			continue;
 
-		/* send the new roi to the panel via dcs commands */
-		rc = dsi_panel_send_roi_dcs(display->panel, i, &ctrl_roi);
+		/* re-program the ctrl with the timing based on the new roi */
+		rc = dsi_ctrl_timing_setup(ctrl->ctrl);
 		if (rc) {
-			DSI_ERR("dsi_panel_set_roi failed rc %d\n", rc);
+			DSI_ERR("dsi_ctrl_setup failed rc %d\n", rc);
 			return rc;
 		}
 
-		/* re-program the ctrl with the timing based on the new roi */
-		rc = dsi_ctrl_timing_setup(ctrl->ctrl);
+		/* send the new roi to the panel via dcs commands */
+		rc = dsi_panel_send_roi_dcs(display->panel, i, &ctrl_roi);
 		if (rc) {
-			DSI_ERR("dsi_ctrl_setup failed rc %d\n", rc);
+			DSI_ERR("dsi_panel_set_roi failed rc %d\n", rc);
 			return rc;
 		}
 	}