aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMark yao <mark.yao@rock-chips.com>2017-07-31 05:49:55 -0400
committerMark Yao <mark.yao@rock-chips.com>2017-08-04 04:09:44 -0400
commitd415fb87aa0051b377ba248ae33152c3e336dea6 (patch)
tree6d3bbd78f0480448817a81eac120e8438fdf3bbe /drivers/gpu
parentda709a7b27082421289e264f3491a8f43cd4d2f7 (diff)
drm/rockchip: vop: report error when check resource error
The user would be confused while facing a error commit without any error report. Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Reviewed-by: Sandy huang <sandy.huang@rock-chips.com> Link: https://patchwork.freedesktop.org/patch/msgid/1501494596-7090-1-git-send-email-mark.yao@rock-chips.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index e59ef93bcd74..948719dddc36 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -675,8 +675,10 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
675 * Src.x1 can be odd when do clip, but yuv plane start point 675 * Src.x1 can be odd when do clip, but yuv plane start point
676 * need align with 2 pixel. 676 * need align with 2 pixel.
677 */ 677 */
678 if (is_yuv_support(fb->format->format) && ((state->src.x1 >> 16) % 2)) 678 if (is_yuv_support(fb->format->format) && ((state->src.x1 >> 16) % 2)) {
679 DRM_ERROR("Invalid Source: Yuv format not support odd xpos\n");
679 return -EINVAL; 680 return -EINVAL;
681 }
680 682
681 return 0; 683 return 0;
682} 684}