From: Mark Yao Date: Wed, 22 Mar 2017 11:05:00 +0000 (+0800) Subject: drm/rockchip: vop: report error when check resource error X-Git-Tag: firefly_0821_release~260 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d7debfeb77f8658add7aef3e01068301b5b348fa;p=firefly-linux-kernel-4.4.55.git drm/rockchip: vop: report error when check resource error Change-Id: If59ea4f7344931795cadcfec1cae4d2ab95ab4c3 Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 260ce2f87c47..8cb455843f16 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -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))