All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch
Subject: [PATCH v10 05/11] video/hdmi: Reject illegal picture aspect ratios
Date: Fri,  6 Apr 2018 22:34:06 +0530	[thread overview]
Message-ID: <1523034252-5275-6-git-send-email-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <1523034252-5275-1-git-send-email-ankit.k.nautiyal@intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

AVI infoframe can only carry none, 4:3, or 16:9 picture aspect
ratios. Return an error if the user asked for something different.

Cc: Shashank Sharma <shashank.sharma@intel.com>
Cc: "Lin, Jia" <lin.a.jia@intel.com>
Cc: Akashdeep Sharma <akashdeep.sharma@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
---
 drivers/video/hdmi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
index 111a0ab..38716eb5 100644
--- a/drivers/video/hdmi.c
+++ b/drivers/video/hdmi.c
@@ -93,6 +93,9 @@ ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
 	if (size < length)
 		return -ENOSPC;
 
+	if (frame->picture_aspect > HDMI_PICTURE_ASPECT_16_9)
+		return -EINVAL;
+
 	memset(buffer, 0, size);
 
 	ptr[0] = frame->type;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-04-06 17:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 17:04 [PATCH v10 00/11] Aspect ratio support in DRM layer Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 01/11] drm/modes: Introduce drm_mode_match() Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 02/11] drm/edid: Use drm_mode_match_no_clocks_no_stereo() for consistentcy Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 03/11] drm/edid: Fix cea mode aspect ratio handling Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 04/11] drm/edid: Don't send bogus aspect ratios in AVI infoframes Nautiyal, Ankit K
2018-04-06 17:04 ` Nautiyal, Ankit K [this message]
2018-04-06 17:04 ` [PATCH v10 06/11] drm: Add DRM client cap for aspect-ratio Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 07/11] drm: Add helper functions to handle aspect-ratio flag bits Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 08/11] drm: Handle aspect ratio info in legacy and atomic modeset paths Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 09/11] drm: Expose modes with aspect ratio, only if requested Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 10/11] drm: Add aspect ratio parsing in DRM layer Nautiyal, Ankit K
2018-04-06 17:25   ` Nautiyal, Ankit K
2018-04-06 17:44     ` [Intel-gfx] " Ville Syrjälä
2018-04-17  5:15       ` Nautiyal, Ankit K
2018-04-17  7:33         ` [Intel-gfx] " Daniel Vetter
2018-04-17 17:47         ` Ville Syrjälä
2018-04-18 16:02           ` Nautiyal, Ankit K
2018-04-06 17:04 ` [PATCH v10 11/11] drm: Add and handle new aspect ratios " Nautiyal, Ankit K
2018-04-06 17:23 ` ✗ Fi.CI.CHECKPATCH: warning for Aspect ratio support in DRM layer (rev2) Patchwork
2018-04-06 17:41 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-06 21:18 ` ✗ Fi.CI.IGT: failure " 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=1523034252-5275-6-git-send-email-ankit.k.nautiyal@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --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.