lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 5 Feb 2024 10:39:38 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: Sebastian Wick <sebastian.wick@...hat.com>, 
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Thomas Zimmermann <tzimmermann@...e.de>, 
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>, Emma Anholt <emma@...olt.net>, 
	Jonathan Corbet <corbet@....net>, Sandy Huang <hjc@...k-chips.com>, 
	Heiko Stübner <heiko@...ech.de>, Chen-Yu Tsai <wens@...e.org>, 
	Jernej Skrabec <jernej.skrabec@...il.com>, Samuel Holland <samuel@...lland.org>, linux-doc@...r.kernel.org, 
	linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	Hans Verkuil <hverkuil@...all.nl>, linux-rockchip@...ts.infradead.org, linux-sunxi@...ts.linux.dev, 
	linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org
Subject: Re: Re: Re: Re: [PATCH v5 08/44] drm/connector: hdmi: Add Broadcast
 RGB property

On Fri, Feb 02, 2024 at 06:37:52PM +0200, Ville Syrjälä wrote:
> On Fri, Feb 02, 2024 at 04:59:30PM +0100, Maxime Ripard wrote:
> > On Fri, Feb 02, 2024 at 05:40:47PM +0200, Ville Syrjälä wrote:
> > > On Fri, Feb 02, 2024 at 02:01:39PM +0100, Maxime Ripard wrote:
> > > > Hi,
> > > > 
> > > > On Mon, Jan 15, 2024 at 03:37:20PM +0100, Sebastian Wick wrote:
> > > > > > >  /**
> > > > > > >   * DOC: HDMI connector properties
> > > > > > >   *
> > > > > > > + * Broadcast RGB
> > > > > > > + *      Indicates the RGB Quantization Range (Full vs Limited) used.
> > > > > > > + *      Infoframes will be generated according to that value.
> > > > > > > + *
> > > > > > > + *      The value of this property can be one of the following:
> > > > > > > + *
> > > > > > > + *      Automatic:
> > > > > > > + *              RGB Range is selected automatically based on the mode
> > > > > > > + *              according to the HDMI specifications.
> > > > > > > + *
> > > > > > > + *      Full:
> > > > > > > + *              Full RGB Range is forced.
> > > > > > > + *
> > > > > > > + *      Limited 16:235:
> > > > > > > + *              Limited RGB Range is forced. Unlike the name suggests,
> > > > > > > + *              this works for any number of bits-per-component.
> > > > > > > + *
> > > > > > > + *      Drivers can set up this property by calling
> > > > > > > + *      drm_connector_attach_broadcast_rgb_property().
> > > > > > > + *
> > > > > > 
> > > > > > This is a good time to document this in more detail. There might be two
> > > > > > different things being affected:
> > > > > > 
> > > > > > 1. The signalling (InfoFrame/SDP/...)
> > > > > > 2. The color pipeline processing
> > > > > > 
> > > > > > All values of Broadcast RGB always affect the color pipeline processing
> > > > > > such that a full-range input to the CRTC is converted to either full- or
> > > > > > limited-range, depending on what the monitor is supposed to accept.
> > > > > > 
> > > > > > When automatic is selected, does that mean that there is no signalling,
> > > > > > or that the signalling matches what the monitor is supposed to accept
> > > > > > according to the spec? Also, is this really HDMI specific?
> > > > > > 
> > > > > > When full or limited is selected and the monitor doesn't support the
> > > > > > signalling, what happens?
> > > > > 
> > > > > Forgot to mention: user-space still has no control over RGB vs YCbCr on
> > > > > the cable, so is this only affecting RGB? If not, how does it affect
> > > > > YCbCr?
> > > > 
> > > > So I dug a bit into both the i915 and vc4 drivers, and it looks like if
> > > > we're using a YCbCr format, i915 will always use a limited range while
> > > > vc4 will follow the value of the property.
> > > 
> > > The property is literally called "Broadcast *RGB*".
> > > That should explain why it's only affecting RGB.
> > 
> > Right. And the limited range option is called "Limited 16:235" despite
> > being usable on bpc > 8 bits. Naming errors occurs, and history happens
> > to make names inconsistent too, that's fine and not an argument in
> > itself.
> > 
> > > Full range YCbCr is a much rarer beast so we've never bothered
> > > to enable it.
> > 
> > vc4 supports it.
> 
> Someone implemented it incorrectly then.

Incorrectly according to what documentation / specification? I'm sorry,
but I find it super ironic that i915 gets to do its own thing, not
document any of it, and when people try to clean things up they get told
that we got it all wrong.

> > > Eg. with DP it only became possible with the introduction of the VSC
> > > SDP (and I don't recall if there's additional capability checks that
> > > are also required). With DP MSA signalling full range YCbCr is not
> > > possible at all.
> > 
> > This is for HDMI only.
> > 
> > > I don't recall right now what the HDMI requirements are.
> > 
> > HDMI has supported it for a while, and it's defined (for example) in the
> > HDMI 1.4 spec in Section 6.6 - Video Quantization Ranges. It supports
> > limited and full range on both RGB and YCbCr, as long as the EDIDs state
> > so and the Infoframes signal it.
> 
> I think a good reason for not using a simple boolean like this 
> YCbCr is that it doesn't cover the color encoding part at all,
> which is probably more important than the quantization range.
> So we need a new property anyway.

This isn't what is being discussed here, and as I've shown you, is
completely orthogonal as far as HDMI is concerned.

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ