From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 8/8] drm/i915: Force planar YUV coordinates to be a multiple of 2, v2.
Date: Thu, 20 Sep 2018 12:27:11 +0200 [thread overview]
Message-ID: <20180920102711.4184-9-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20180920102711.4184-1-maarten.lankhorst@linux.intel.com>
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.
Changes since v1:
- Put the check in intel_plane_check_src_coordinates. (Ville)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/i915/intel_sprite.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 7d3c7469d271..46c6336cb858 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -253,13 +253,20 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state)
src->y2 = (src_y + src_h) << 16;
if (fb->format->is_yuv &&
- fb->format->format != DRM_FORMAT_NV12 &&
(src_x & 1 || src_w & 1)) {
DRM_DEBUG_KMS("src x/w (%u, %u) must be a multiple of 2 for YUV planes\n",
src_x, src_w);
return -EINVAL;
}
+ if (fb->format->is_yuv &&
+ fb->format->num_planes > 1 &&
+ (src_y & 1 || src_h & 1)) {
+ DRM_DEBUG_KMS("src y/h (%u, %u) must be a multiple of 2 for planar YUV planes\n",
+ src_y, src_h);
+ return -EINVAL;
+ }
+
return 0;
}
--
2.18.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-09-20 10:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 10:27 [PATCH 0/8] drm/i915: Preparations for adding gen11 planar formats Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 1/8] drm/i915: Clean up casts to crtc_state in intel_atomic_commit_tail() Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 2/8] drm/i915: Handle cursor updating active_planes correctly, v2 Maarten Lankhorst
2018-09-20 23:18 ` Matt Roper
2018-09-21 9:41 ` Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 3/8] drm/i915: Unconditionally clear plane visibility, v2 Maarten Lankhorst
2018-09-20 23:18 ` Matt Roper
2018-09-21 15:26 ` Ville Syrjälä
2018-09-21 16:00 ` Maarten Lankhorst
2018-09-21 16:15 ` Ville Syrjälä
2018-09-21 16:20 ` Maarten Lankhorst
2018-09-21 16:24 ` Ville Syrjälä
2018-09-20 10:27 ` [PATCH 4/8] drm/i915: Make intel_crtc_disable_planes() use active planes mask Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 5/8] drm/i915: Replace call to commit_planes_on_crtc with internal update, v2 Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 6/8] drm/i915: Clean up scaler setup Maarten Lankhorst
2018-09-20 23:19 ` Matt Roper
2018-09-21 14:44 ` [PATCH] drm/i915: Clean up scaler setup, v2 Maarten Lankhorst
2018-09-21 16:40 ` Matt Roper
2018-09-21 17:32 ` Maarten Lankhorst
2018-09-20 10:27 ` [PATCH 7/8] drm/i915: Move programming plane scaler to its own function Maarten Lankhorst
2018-09-20 23:19 ` Matt Roper
2018-09-21 15:29 ` Ville Syrjälä
2018-09-20 10:27 ` Maarten Lankhorst [this message]
2018-09-20 23:19 ` [PATCH 8/8] drm/i915: Force planar YUV coordinates to be a multiple of 2, v2 Matt Roper
2018-09-20 10:49 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Preparations for adding gen11 planar formats Patchwork
2018-09-20 10:52 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-20 11:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-20 12:10 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-09-21 15:00 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Preparations for adding gen11 planar formats. (rev2) Patchwork
2018-09-21 15:03 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-21 15:21 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-21 16:23 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180920102711.4184-9-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.