diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 811aa0ab235b..d9e7cbd73980 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -5816,11 +5816,22 @@ static int vop2_plane_init(struct vop2 *vop2, struct vop2_win *win, unsigned lon unsigned int max_width, max_height; int ret; + /* + * Some userspace software don't want use afbc plane + */ if (win->feature & WIN_FEATURE_AFBDC) { if (vop2->disable_afbc_win) return -EACCES; } + /* + * Some userspace software don't want cluster sub plane + */ + if (!vop2->support_multi_area) { + if (win->feature & WIN_FEATURE_CLUSTER_SUB) + return -EACCES; + } + ret = drm_universal_plane_init(vop2->drm_dev, &win->base, possible_crtcs, &vop2_plane_funcs, win->formats, win->nformats, win->format_modifiers, win->type, win->name);