All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC v2 3/5] drm: Add HDMI infoframe helpers
Date: Wed, 05 Dec 2012 18:51:20 +0100	[thread overview]
Message-ID: <50BF8998.6060207@metafoo.de> (raw)
In-Reply-To: <1354725944-1862-4-git-send-email-thierry.reding@avionic-design.de>

On 12/05/2012 05:45 PM, Thierry Reding wrote:
> Add a generic helper to fill in an HDMI AVI infoframe with data
> extracted from a DRM display mode.

That's a very nice patch series, comes in pretty handy. Thanks :)

I've just one comment.

> [...]
> +static inline enum hdmi_picture_aspect
> +drm_display_mode_get_aspect(const struct drm_display_mode *mode)
> +{
> +	enum hdmi_picture_aspect aspect = HDMI_PICTURE_ASPECT_NONE;
> +
> +	if ((mode->hdisplay * 9) / 16 == mode->vdisplay)
> +		aspect = HDMI_PICTURE_ASPECT_16_9;
> +	else if ((mode->hdisplay * 3) / 4 == mode->vdisplay)
> +		aspect = HDMI_PICTURE_ASPECT_4_3;
> +
> +	return aspect;
> +}
> +
> +/**
> + * drm_hdmi_avi_infoframe_from_display_mode() - fill an HDMI AVI infoframe with
> + *                                              data from a DRM display mode
> + * @frame: HDMI AVI infoframe
> + * @mode: DRM display mode
> + *
> + * Returns 0 on success or a negative error code on failure.
> + */
> +int
> +drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
> +					 const struct drm_display_mode *mode)
> +{
[...]
> +
> +	frame->picture_aspect = drm_display_mode_get_aspect(mode);

As far as I know the picture aspect ratio is supposed to be the aspect ratio
of the displayed content not the pixel aspect ratio. The receiver already
knows the pixel aspect ratio since it knows both the pixel width and the
height. The picture aspect ratio is something that could be set by a
userspace application running in fullscreen, e.g. a video player.

> +	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> +
> +	return 0;
> +}

  reply	other threads:[~2012-12-05 18:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05 16:45 [RFC v2 0/5] Add HDMI infoframe helpers Thierry Reding
2012-12-05 16:45 ` [RFC v2 1/5] drm: Add some missing forward declarations Thierry Reding
2012-12-05 16:45 ` [RFC v2 2/5] video: Add generic HDMI infoframe helpers Thierry Reding
2012-12-07 14:32   ` Paulo Zanoni
2012-12-11  7:58     ` Thierry Reding
2012-12-05 16:45 ` [RFC v2 3/5] drm: Add " Thierry Reding
2012-12-05 17:51   ` Lars-Peter Clausen [this message]
2012-12-06  7:28     ` Thierry Reding
2012-12-06  8:28       ` Lars-Peter Clausen
2012-12-06 14:09   ` Daniel Vetter
2012-12-06 14:28     ` Thierry Reding
2012-12-06 15:44       ` Daniel Vetter
2012-12-06 16:02         ` Thierry Reding
2012-12-07 19:00   ` Daniel Vetter
2012-12-05 16:45 ` [RFC v2 4/5] drm: tegra: Use generic " Thierry Reding
2012-12-05 16:45 ` [RFC v2 5/5] drm/i915: " Thierry Reding
2012-12-06 14:16   ` Daniel Vetter
2012-12-06 14:23     ` Thierry Reding
2012-12-06 15:57       ` Daniel Vetter
2012-12-06 16:02         ` Thierry Reding
2012-12-06 16:11   ` Paulo Zanoni
2012-12-06 16:55     ` Paulo Zanoni
2012-12-07  7:28       ` Thierry Reding
2012-12-07  8:30         ` Daniel Vetter
2012-12-07  8:49           ` Thierry Reding
2012-12-07  7:22     ` Thierry Reding
2012-12-07 15:11   ` [RFC] " Paulo Zanoni
2012-12-07 15:32     ` Daniel Vetter
2012-12-11 10:39       ` Daniel Vetter
2012-12-11  8:35     ` Thierry Reding

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=50BF8998.6060207@metafoo.de \
    --to=lars@metafoo.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thierry.reding@avionic-design.de \
    /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.