From 077e48341d57decfe03d153fccd9fb060d349398 Mon Sep 17 00:00:00 2001 From: Sandy Huang Date: Tue, 19 Mar 2024 19:29:39 +0800 Subject: [PATCH] drm/rockchip: vop2: remove afbc disable when close cluster at rk356x Disable cluster afbc when close cluster is a reasonable operation, but for some design reasons, this will lead to VOP iommu pagefault at rk356x, so we keep it always on at rk356x. Fixes: 8379fd75553a ("drm/rockchip: vop2: add support rk3576") Signed-off-by: Sandy Huang Change-Id: I9931da7f45171161b46fb46ab6b8e1e377debab0 --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 7635186814a6..4387b70158f6 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1955,7 +1955,12 @@ static void vop2_win_disable(struct vop2_win *win, bool skip_splice_win) } VOP_CLUSTER_SET(vop2, win, enable, 0); - VOP_CLUSTER_SET(vop2, win, afbc_enable, 0); + /* + * If disable AFBC when close cluster will lead to VOP iommu + * pagefault at rk356x. + */ + if (vop2->version != VOP_VERSION_RK3568) + VOP_CLUSTER_SET(vop2, win, afbc_enable, 0); } /*