summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Yan <andy.yan@rock-chips.com>2023-12-11 19:57:41 +0800
committerHeiko Stuebner <heiko@sntech.de>2023-12-13 15:17:48 +0100
commit20529a68307feed00dd3d431d3fff0572616b0f2 (patch)
tree8197dc9828f64279001891bc567445714244f925 /drivers
parentbebad6bd4fbdc448ad3b337ad281b813e68f6f53 (diff)
downloadlinux-stable-20529a68307feed00dd3d431d3fff0572616b0f2.tar.gz
linux-stable-20529a68307feed00dd3d431d3fff0572616b0f2.tar.bz2
linux-stable-20529a68307feed00dd3d431d3fff0572616b0f2.zip
drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode
The enable bit and transform offset of cluster windows should be cleared when it work at linear mode, or we may have a iommu fault issue on rk3588 which cluster windows switch between afbc and linear mode. As the cluster windows of rk3568 only supports afbc format so is therefore not affected. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231211115741.1784954-1-andyshrk@163.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 639dfebc6bd1..a019cc9bbd54 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1312,6 +1312,11 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
vop2_win_write(win, VOP2_WIN_AFBC_ROTATE_270, rotate_270);
vop2_win_write(win, VOP2_WIN_AFBC_ROTATE_90, rotate_90);
} else {
+ if (vop2_cluster_window(win)) {
+ vop2_win_write(win, VOP2_WIN_AFBC_ENABLE, 0);
+ vop2_win_write(win, VOP2_WIN_AFBC_TRANSFORM_OFFSET, 0);
+ }
+
vop2_win_write(win, VOP2_WIN_YRGB_VIR, DIV_ROUND_UP(fb->pitches[0], 4));
}