drm/i915: Handle YUV subpixel support better
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 22 Mar 2019 13:59:52 +0000 (14:59 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 27 Mar 2019 16:53:30 +0000 (17:53 +0100)
commit3bd02fa4be3aba778cd5aa0ca9e072244ce45a74
treed376692018853d9c78f75601959a4fca2f246b85
parent0e2f54f88b8b9bbdb3a73b6e67cffb402187c73f
drm/i915: Handle YUV subpixel support better

Y41x formats is a 4:4:4 format, so it can be addressed with pixel level accuracy.
Meanwhile it seems that while rotating YUYV 4:2:2 formats need a multiple of 2
for width and height, otherwise corruption occurs.

For YUV 4:2:2, the spec says that w/h should always be even, but we get
away with odd height while unrotated. When rotating it seems corruption
occurs with an odd x/y, and w/h should always be even.
Just to be completely paranoid, reject odd x/y w/h when rotating 90/270.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190322135954.20434-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/intel_sprite.c