drm/rockchip: vop2: Support disable Cluster sub win

Change-Id: Ia2f764992ce51ca61f6ba269083fa643509f58e1
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2021-06-02 17:44:49 +08:00
committed by Tao Huang
parent d19ffa72a4
commit 2309468102

View File

@@ -5687,11 +5687,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);