Skip to content

Commit ab483e3

Browse files
author
Abhinav Kumar
committed
drm/msm/dsi: skip the wait for video mode done if not applicable
dsi_wait4video_done() API waits for the DSI video mode engine to become idle so that we can transmit the DCS commands in the beginning of BLLP. However, with the current sequence, the MDP timing engine is turned on after the panel's pre_enable() callback which can send out the DCS commands needed to power up the panel. During those cases, this API will always timeout and print out the error spam leading to long bootup times and log flooding. Fix this by checking if the DSI video engine was actually busy before waiting for it to become idle otherwise this is a redundant wait. changes in v2: - move the reg read below the video mode check - minor fixes in commit text Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/34 Fixes: a689554 ("drm/msm: Initial add DSI connector support") Signed-off-by: Abhinav Kumar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/557853/ Link: https://lore.kernel.org/r/[email protected]
1 parent c0666d1 commit ab483e3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,9 +1082,21 @@ static void dsi_wait4video_done(struct msm_dsi_host *msm_host)
10821082

10831083
static void dsi_wait4video_eng_busy(struct msm_dsi_host *msm_host)
10841084
{
1085+
u32 data;
1086+
10851087
if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO))
10861088
return;
10871089

1090+
data = dsi_read(msm_host, REG_DSI_STATUS0);
1091+
1092+
/* if video mode engine is not busy, its because
1093+
* either timing engine was not turned on or the
1094+
* DSI controller has finished transmitting the video
1095+
* data already, so no need to wait in those cases
1096+
*/
1097+
if (!(data & DSI_STATUS0_VIDEO_MODE_ENGINE_BUSY))
1098+
return;
1099+
10881100
if (msm_host->power_on && msm_host->enabled) {
10891101
dsi_wait4video_done(msm_host);
10901102
/* delay 4 ms to skip BLLP */

0 commit comments

Comments
 (0)