drm/rockchip: vop2: Check rotation for cluster window at non-afbc mode

Cluster window only support rotation(x/ymirror, rotation90/270)
at afbc mode.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I6439a59793f724bd5d0e643c2d02486cce733165
This commit is contained in:
Andy Yan
2021-11-01 17:06:15 +08:00
committed by Tao Huang
parent ab4a52e2ee
commit 77359bd785

View File

@@ -3307,6 +3307,13 @@ static int vop2_plane_atomic_check(struct drm_plane *plane, struct drm_plane_sta
DRM_ERROR("Unsupported linear yuv format at %s\n", win->name);
return -EINVAL;
}
if (vop2_cluster_window(win) && !vpstate->afbc_en &&
(win->supported_rotations & state->rotation)) {
DRM_ERROR("Unsupported linear rotation(%d) format at %s\n",
state->rotation, win->name);
return -EINVAL;
}
}
/*