Patch "drm/mediatek: Fix iommu fault during crtc enabling" has been added to the 6.6-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: Fix iommu fault during crtc enabling

to the 6.6-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-fix-iommu-fault-during-crtc-enabling.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 01cafe032c4c29666644ab864867b4136a8e4f53
Author: Jason-JH.Lin <jason-jh.lin@xxxxxxxxxxxx>
Date:   Wed Aug 9 20:57:22 2023 +0800

    drm/mediatek: Fix iommu fault during crtc enabling
    
    [ Upstream commit 53412dc2905401207f264dc30890f6b9e41524a6 ]
    
    The difference between drm_atomic_helper_commit_tail() and
    drm_atomic_helper_commit_tail_rpm() is
    drm_atomic_helper_commit_tail() will commit plane first and
    then enable crtc, drm_atomic_helper_commit_tail_rpm() will
    enable crtc first and then commit plane.
    
    Before mediatek-drm enables crtc, the power and clk required
    by OVL have not been turned on, so the commit plane cannot be
    committed before crtc is enabled. That means OVL layer should
    not be enabled before crtc is enabled.
    Therefore, the atomic_commit_tail of mediatek-drm is hooked with
    drm_atomic_helper_commit_tail_rpm().
    
    Another reason is that the plane_state of drm_atomic_state is not
    synchronized with the plane_state stored in mtk_crtc during crtc enablng,
    so just set all planes to disabled.
    
    Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
    Signed-off-by: Jason-JH.Lin <jason-jh.lin@xxxxxxxxxxxx>
    Reviewed-by: Alexandre Mergnat <amergnat@xxxxxxxxxxxx>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
    Reviewed-by: CK Hu <ck.hu@xxxxxxxxxxxx>
    Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230809125722.24112-3-jason-jh.lin@xxxxxxxxxxxx/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index b6fa4ad2f94dc..0a511d7688a3a 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
@@ -408,6 +408,9 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)
 		unsigned int local_layer;
 
 		plane_state = to_mtk_plane_state(plane->state);
+
+		/* should not enable layer before crtc enabled */
+		plane_state->pending.enable = false;
 		comp = mtk_drm_ddp_comp_for_plane(crtc, plane, &local_layer);
 		if (comp)
 			mtk_ddp_comp_layer_config(comp, local_layer,



[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