drm/rockchip: vop: set vop min size to 4x4

Change-Id: Ib00c223b4df34cf0821e19fb23b54c1496bc2b3a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2021-03-12 10:07:21 +08:00
parent 89d6545bd1
commit 6749d4644b

View File

@@ -1663,6 +1663,14 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
vop = to_vop(crtc);
vop_data = vop->data;
if (state->src_w >> 16 < 4 || state->src_h >> 16 < 4 ||
state->crtc_w < 4 || state->crtc_h < 4) {
DRM_ERROR("Invalid size: %dx%d->%dx%d, min size is 4x4\n",
state->src_w >> 16, state->src_h >> 16,
state->crtc_w, state->crtc_h);
return -EINVAL;
}
if (drm_rect_width(src) >> 16 > vop_data->max_input.width ||
drm_rect_height(src) >> 16 > vop_data->max_input.height) {
DRM_ERROR("Invalid source: %dx%d. max input: %dx%d\n",