Patch "drm/rockchip: vop2: disable planes when disabling the crtc" has been added to the 6.0-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/rockchip: vop2: disable planes when disabling the crtc

to the 6.0-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-rockchip-vop2-disable-planes-when-disabling-the-.patch
and it can be found in the queue-6.0 subdirectory.

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



commit bef14d1439d9ec60ed579302f3c8f8158a90599f
Author: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
Date:   Fri Oct 28 11:52:06 2022 +0200

    drm/rockchip: vop2: disable planes when disabling the crtc
    
    [ Upstream commit 447fb14bf07905b880c9ed1ea92c53d6dd0649d7 ]
    
    The vop2 driver needs to explicitly disable the planes if the crtc is
    disabled. Unless the planes are explicitly disabled, the address of the
    last framebuffer is kept in the registers of the VOP2. When re-enabling
    the encoder after it has been disabled by the driver, the VOP2 will
    start and read the framebuffer that has been freed but is still pointed
    to by the register. The iommu will catch these read accesses and print
    errors.
    
    Explicitly disable the planes when the crtc is disabled to reset the
    registers.
    
    Signed-off-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
    Signed-off-by: Heiko Stuebner <heiko@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20221028095206.2136601-3-m.tretter@xxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index bf9c3e92e1cd..1fc04019dfd8 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -878,10 +878,14 @@ static void vop2_crtc_atomic_disable(struct drm_crtc *crtc,
 {
 	struct vop2_video_port *vp = to_vop2_video_port(crtc);
 	struct vop2 *vop2 = vp->vop2;
+	struct drm_crtc_state *old_crtc_state;
 	int ret;
 
 	vop2_lock(vop2);
 
+	old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
+	drm_atomic_helper_disable_planes_on_crtc(old_crtc_state, false);
+
 	drm_crtc_vblank_off(crtc);
 
 	/*



[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