Change-Id: If59ea4f7344931795cadcfec1cae4d2ab95ab4c3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* 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))