drm/rockchip: vop: report error when check resource error
authorMark Yao <mark.yao@rock-chips.com>
Wed, 22 Mar 2017 11:05:00 +0000 (19:05 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 23 Mar 2017 04:03:49 +0000 (12:03 +0800)
Change-Id: If59ea4f7344931795cadcfec1cae4d2ab95ab4c3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_vop.c

index 260ce2f..8cb4558 100644 (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))