aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhinav Kumar <abhinavk@codeaurora.org>2018-04-17 16:50:18 -0400
committerRob Clark <robdclark@gmail.com>2018-06-03 16:48:59 -0400
commit9c5638d78df23e3fc5a6f15972f6fc20939ffe8b (patch)
treea3a11038953772abe791e6e63f5a758454d0097f
parent79ebc86c41959113009e3d9b17dc2d4547512ac9 (diff)
drm/msm/dsi: check video mode engine status before waiting
Make sure the video mode engine is on before waiting for the video done interrupt. Changes in v4: - Move setting enabled to false earlier Changes in v3: - Move the return value check to another patch Changes in v2: - Replace pr_err with dev_err - Changed error message Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 93a3cdde72ef..2f770386ab4a 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -173,6 +173,7 @@ struct msm_dsi_host {
173 173
174 bool registered; 174 bool registered;
175 bool power_on; 175 bool power_on;
176 bool enabled;
176 int irq; 177 int irq;
177}; 178};
178 179
@@ -1007,7 +1008,7 @@ static void dsi_wait4video_eng_busy(struct msm_dsi_host *msm_host)
1007 if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO)) 1008 if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO))
1008 return; 1009 return;
1009 1010
1010 if (msm_host->power_on) { 1011 if (msm_host->power_on && msm_host->enabled) {
1011 dsi_wait4video_done(msm_host); 1012 dsi_wait4video_done(msm_host);
1012 /* delay 4 ms to skip BLLP */ 1013 /* delay 4 ms to skip BLLP */
1013 usleep_range(2000, 4000); 1014 usleep_range(2000, 4000);
@@ -2209,7 +2210,7 @@ int msm_dsi_host_enable(struct mipi_dsi_host *host)
2209 * pm_runtime_put_autosuspend(&msm_host->pdev->dev); 2210 * pm_runtime_put_autosuspend(&msm_host->pdev->dev);
2210 * } 2211 * }
2211 */ 2212 */
2212 2213 msm_host->enabled = true;
2213 return 0; 2214 return 0;
2214} 2215}
2215 2216
@@ -2217,6 +2218,7 @@ int msm_dsi_host_disable(struct mipi_dsi_host *host)
2217{ 2218{
2218 struct msm_dsi_host *msm_host = to_msm_dsi_host(host); 2219 struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
2219 2220
2221 msm_host->enabled = false;
2220 dsi_op_mode_config(msm_host, 2222 dsi_op_mode_config(msm_host,
2221 !!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO), false); 2223 !!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO), false);
2222 2224