Patch "drm/msm/dsi: skip the wait for video mode done if not applicable" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/msm/dsi: skip the wait for video mode done if not applicable

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-msm-dsi-skip-the-wait-for-video-mode-done-if-not.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a1b7549ee7ca7dc8b000c4f414d6cc783be58980
Author: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
Date:   Fri Sep 15 13:44:25 2023 -0700

    drm/msm/dsi: skip the wait for video mode done if not applicable
    
    [ Upstream commit ab483e3adcc178254eb1ce0fbdfbea65f86f1006 ]
    
    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: a689554ba6ed ("drm/msm: Initial add DSI connector support")
    Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/557853/
    Link: https://lore.kernel.org/r/20230915204426.19011-1-quic_abhinavk@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 3f6dfb4f9d5a6..ee91bad0d5880 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1075,9 +1075,21 @@ static void dsi_wait4video_done(struct msm_dsi_host *msm_host)
 
 static void dsi_wait4video_eng_busy(struct msm_dsi_host *msm_host)
 {
+	u32 data;
+
 	if (!(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO))
 		return;
 
+	data = dsi_read(msm_host, REG_DSI_STATUS0);
+
+	/* if video mode engine is not busy, its because
+	 * either timing engine was not turned on or the
+	 * DSI controller has finished transmitting the video
+	 * data already, so no need to wait in those cases
+	 */
+	if (!(data & DSI_STATUS0_VIDEO_MODE_ENGINE_BUSY))
+		return;
+
 	if (msm_host->power_on && msm_host->enabled) {
 		dsi_wait4video_done(msm_host);
 		/* delay 4 ms to skip BLLP */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux