drm/rockchip: vop: call vop_cfg_done() under reg_lock
Subsystems (4)
PATCH 1/1 drm/rockchip: vop: call vop_cfg_done() under reg_lock
From: Emil Velikov <[email protected]>
The function vop_cfg_done() is a simple VOP_REG_SET(). As such it should be done under a reg_lock. A quick look through the driver shows that all other instances (apart from driver init) have the lock. Do the same here
---
Noticed while skimming through the code and thus untested.
--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2 -2
@@ -645,10 +645,10 @@ static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) s->enable_afbc = false; } -spin_unlock (&vop->reg_lock); -vop_cfg_done (vop); +spin_unlock (&vop->reg_lock); +/* * At here, vop clock & iommu is enable, R/W vop regs would be safe. */
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Emil Velikov,
Quoted 22 lines · Emil Velikov
From: Emil Velikov <[email protected]>
The function
vop_cfg_done()is a simpleVOP_REG_SET(). As such it should be done under areg_lock. A quick look through the driver shows that all other instances (apart from driver init) have the lock. Do the same hereCc Sandy Huang <[email protected]>Cc Heiko Stübner <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Noticed while skimming through the code and thus untested.--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/rockchip/rockchip_drm_vop.c +0
-0@@ -645,10 +645,10 @@ static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) s->enable_afbc = false; }
drivers/gpu/drm/rockchip/rockchip_drm_vop.c static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) · line 654
Quoted 10 lines
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2
-2-spin_unlock (&vop->reg_lock); -vop_cfg_done (vop); +spin_unlock (&vop->reg_lock); +/* * At here, vop clock & iommu is enable, R/W vop regs would be safe. */
thanks for your patch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 31 lines · Sandy Huang
Hi Emil Velikov,
Quoted 27 lines · Emil Velikov
From: Emil Velikov <[email protected]>
The function
vop_cfg_done()is a simpleVOP_REG_SET(). As such it should be done under areg_lock. A quick look through the driver shows that all other instances (apart from driver init) have the lock. Do the same hereCc Sandy Huang <[email protected]>Cc Heiko Stübner <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Noticed while skimming through the code and thus untested.--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/rockchip/rockchip_drm_vop.c +0
-2@@ -645,10 +645,10 @@ static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) s->enable_afbc = false; } -spin_unlock (&vop->reg_lock); -vop_cfg_done (vop);
Quoted 9 lines
drivers/gpu/drm/rockchip/rockchip_drm_vop.c static int vop_enable(struct drm_crtc *crtc, struct drm_crtc_state *old_state) · line 654
Quoted 5 lines
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2
-0+spin_unlock (&vop->reg_lock); +/* * At here, vop clock & iommu is enable, R/W vop regs would be safe. */ thanks for your patch
Reviewed-by Sandy Huang <[email protected]>
Thanks. Doesn't seems like this was merged, so I pushed it to drm-misc-next.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel