@@ -3072,6 +3072,15 @@ static int skl_check_main_surface(struct intel_plane_state *plane_state)
static int
skl_check_nv12_surface(struct intel_plane_state *plane_state)
{
+ if ((plane_state->base.src.x1 >> 16) % 2 ||
+ (plane_state->base.src.y1 >> 16) % 2 ||
+ (drm_rect_width(&plane_state->base.src) >> 16) % 2 ||
+ (drm_rect_height(&plane_state->base.src) >> 16) % 2) {
+ DRM_DEBUG_KMS("src coordinates and width/height must be a multiple of 2\n");
+
+ return -EINVAL;
+ }
+
/* Display WA #1106 */
if (plane_state->base.rotation !=
(DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90) &&
We can't make NV12 work any other way. The scaler doesn't handle odd coordinates well, and we will get visual corruption on the screen. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/i915/intel_display.c | 9 +++++++++ 1 file changed, 9 insertions(+)