drm/rockchip: vop2: output error info when cluster use non afbc format

This is special feature at rk356x, the cluster layer only can support
afbc format and can't support linear format;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ic8efc26c07a088c246969622fcf2973b00abd9c2
This commit is contained in:
Sandy Huang
2021-08-03 11:35:11 +08:00
parent c553334fe7
commit 8b5885eee1

View File

@@ -2854,6 +2854,17 @@ static int vop2_plane_atomic_check(struct drm_plane *plane, struct drm_plane_sta
else
vpstate->afbc_en = false;
/*
* This is special feature at rk356x, the cluster layer only can support
* afbc format and can't support linear format;
*/
if (VOP_MAJOR(vop2_data->version) == 0x40 && VOP_MINOR(vop2_data->version) == 0x15) {
if (vop2_cluster_window(win) && !vpstate->afbc_en) {
DRM_ERROR("Unsupported linear format at %s\n", win->name);
return -EINVAL;
}
}
/*
* Src.x1 can be odd when do clip, but yuv plane start point
* need align with 2 pixel.