Patch "drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff()" has been added to the 5.10-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/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff()

to the 5.10-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-mediatek-dsi-move-mtk_dsi_stop-call-back-to-mtk_.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 5d9df7c67c1030dac01fc634141558626bae7741
Author: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
Date:   Thu Aug 4 15:43:25 2022 -0400

    drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff()
    
    [ Upstream commit 90144dd8b0d137d9e78ef34b3c418e51a49299ad ]
    
    As the comment right before the mtk_dsi_stop() call advises,
    mtk_dsi_stop() should only be called after
    mtk_drm_crtc_atomic_disable(). That's because that function calls
    drm_crtc_wait_one_vblank(), which requires the vblank irq to be enabled.
    
    Previously mtk_dsi_stop(), being in mtk_dsi_poweroff() and guarded by a
    refcount, would only be called at the end of
    mtk_drm_crtc_atomic_disable(), through the call to mtk_crtc_ddp_hw_fini().
    Commit cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from
    enable/disable and define new funcs") moved the mtk_dsi_stop() call to
    mtk_output_dsi_disable(), causing it to be called before
    mtk_drm_crtc_atomic_disable(), and consequently generating vblank
    timeout warnings during suspend.
    
    Move the mtk_dsi_stop() call back to mtk_dsi_poweroff() so that we have
    a working vblank irq during mtk_drm_crtc_atomic_disable() and stop
    getting vblank timeout warnings.
    
    Fixes: cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs")
    Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
    Tested-by: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
    Tested-by: Allen-KH Cheng <allen-kh.cheng@xxxxxxxxxxxx>
    Link: http://lists.infradead.org/pipermail/linux-mediatek/2022-August/046713.html
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index b8c1a3c1c517..146c4d04f572 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -668,6 +668,16 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
 	if (--dsi->refcount != 0)
 		return;
 
+	/*
+	 * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since
+	 * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),
+	 * which needs irq for vblank, and mtk_dsi_stop() will disable irq.
+	 * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),
+	 * after dsi is fully set.
+	 */
+	mtk_dsi_stop(dsi);
+
+	mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500);
 	mtk_dsi_reset_engine(dsi);
 	mtk_dsi_lane0_ulp_mode_enter(dsi);
 	mtk_dsi_clk_ulp_mode_enter(dsi);
@@ -718,17 +728,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi)
 	if (!dsi->enabled)
 		return;
 
-	/*
-	 * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since
-	 * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(),
-	 * which needs irq for vblank, and mtk_dsi_stop() will disable irq.
-	 * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(),
-	 * after dsi is fully set.
-	 */
-	mtk_dsi_stop(dsi);
-
-	mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500);
-
 	dsi->enabled = false;
 }
 



[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