From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Fritz Koenig <frkoenig@google.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Reject NV12 planes with odd width/start position
Date: Fri, 18 May 2018 15:25:26 +0300 [thread overview]
Message-ID: <20180518122526.GS23723@intel.com> (raw)
In-Reply-To: <20180517190714.167312-1-frkoenig@google.com>
On Thu, May 17, 2018 at 12:07:14PM -0700, Fritz Koenig wrote:
> Planes with an odd width will appear to have an incorrect
> stride. When the start position is odd the controller
> can lock up.
Just remove the strange NV12 check from the %2 checks in
intel_check_sprite_plane()?
>
> Signed-off-by: Fritz Koenig <frkoenig@google.com>
> ---
>
> Hi,
>
> This appears to be a limitation of the hardware that is not being
> checked. Is this supported and am I not enabling it correctly?
>
>
> drivers/gpu/drm/i915/intel_atomic_plane.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index 7481ce85746b..ca4553592ab9 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -188,6 +188,21 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
> else
> crtc_state->active_planes &= ~BIT(intel_plane->id);
>
> + /*
> + * NV12 plane is not allowed to start from an odd position or
> + * end on an odd position.
> + */
> + if (state->fb && (DRM_FORMAT_NV12 == state->fb->format->format)) {
> + if ((intel_state->base.src_w >> 16) & 1) {
> + DRM_DEBUG_KMS("Invalid Source: Yuv format does not support odd width\n");
> + return -EINVAL;
> + }
> + if ((intel_state->base.src_x >> 16) & 1) {
> + DRM_DEBUG_KMS("Invalid Source: Yuv format does not support odd x pos\n");
> + return -EINVAL;
> + }
> + }
> +
> return intel_plane_atomic_calc_changes(old_crtc_state,
> &crtc_state->base,
> old_plane_state,
> --
> 2.17.0.441.gb46fe60e1d-goog
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-05-18 12:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 19:07 [PATCH] drm/i915: Reject NV12 planes with odd width/start position Fritz Koenig
2018-05-18 10:32 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-05-18 12:25 ` Ville Syrjälä [this message]
2018-05-18 14:15 ` [PATCH] " Ville Syrjälä
2018-05-18 17:10 ` Fritz Koenig
2018-05-18 14:20 ` Chris Wilson
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=20180518122526.GS23723@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=frkoenig@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox