drm/rockchip: vop: report error when check resource error

Change-Id: If59ea4f7344931795cadcfec1cae4d2ab95ab4c3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
Mark Yao
2017-03-22 19:05:00 +08:00
committed by Huang, Tao
parent d0b696db78
commit d7debfeb77

View File

@@ -982,8 +982,10 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
* Src.x1 can be odd when do clip, but yuv plane start point
* need align with 2 pixel.
*/
if (is_yuv_support(fb->pixel_format) && ((src->x1 >> 16) % 2))
if (is_yuv_support(fb->pixel_format) && ((src->x1 >> 16) % 2)) {
DRM_ERROR("Invalid Source: Yuv format Can't support odd xpos\n");
return -EINVAL;
}
offset = (src->x1 >> 16) * drm_format_plane_bpp(fb->pixel_format, 0) / 8;
if (state->rotation & BIT(DRM_REFLECT_Y))