All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Maxime Ripard <maxime@cerno.tech>, Daniel Vetter <daniel@ffwll.ch>
Cc: Emma Anholt <emma@anholt.net>, David Airlie <airlied@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH v3 3/9] drm/vc4: hdmi: Add Broadcast RGB property to allow override of RGB range
Date: Thu, 19 Oct 2023 10:26:40 +0200	[thread overview]
Message-ID: <12669999-295f-40c5-8c58-ba3ed26efb16@xs4all.nl> (raw)
In-Reply-To: <fwcn3vlgxq5uygi32pyjuktj62wa7zvdgu7xxlpqr7an3kjn7i@25axhlrrkk6z>

Hi Maxime,

On 19/10/2023 10:02, Maxime Ripard wrote:
> Hi,
> 
> On Wed, Oct 11, 2023 at 03:23:18PM +0200, Daniel Vetter wrote:
>> On Mon, 6 Mar 2023 at 11:49, Maxime Ripard <maxime@cerno.tech> wrote:
>>>
>>> From: Dave Stevenson <dave.stevenson@raspberrypi.com>
>>>
>>> Copy Intel's "Broadcast RGB" property semantics to add manual override
>>> of the HDMI pixel range for monitors that don't abide by the content
>>> of the AVI Infoframe.
>>>
>>> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
>>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>>
>> Stumbled over this grepping around, but would have been nice to lift
>> this into drm code and document the property. It's one of the legacy
>> ones from the table of horrors after all ...
>>
>> Shouldn't be an uapi problem because it's copypasted to much, just not great.
> 
> We already discussed it on IRC, but just for the record I have a current
> series that should address exactly that:
> 
> https://lore.kernel.org/dri-devel/20230920-kms-hdmi-connector-state-v2-3-17932daddd7d@kernel.org/
> 
> Maxime

I've pasted a snippet from that patch below for a quick review:

>  /**
>   * DOC: HDMI connector properties
>   *
> + * Broadcast RGB (HDMI Specific):

Full vs Limited is actually not HDMI specific, DisplayPort can signal this as
well for whatever it is worth.

> + *      Indicates the RGB Range (Full vs Limited) used.

RGB Range -> RGB Quantization Range

> + *
> + *      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:

It is very unfortunate that this is called "Limited 16:235" instead of just "Limited"
since for color component bit depths > 8 these values are different.

I have no idea if it is possible to add an alias "Limited" that you can use instead.
In any case, this should document that it works just as well for higher bit depths,
but with different limits.

Regards,

	Hans

> + *              Limited RGB Range is forced.
> + *
> + *      Drivers can set up this property by calling
> + *      drm_connector_attach_broadcast_rgb_property().
> + *
>   * content type (HDMI specific):
>   *	Indicates content type setting to be used in HDMI infoframes to indicate
>   *	content type for the external device, so that it adjusts its display


WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Maxime Ripard <maxime@cerno.tech>, Daniel Vetter <daniel@ffwll.ch>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
	dri-devel@lists.freedesktop.org, Emma Anholt <emma@anholt.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/9] drm/vc4: hdmi: Add Broadcast RGB property to allow override of RGB range
Date: Thu, 19 Oct 2023 10:26:40 +0200	[thread overview]
Message-ID: <12669999-295f-40c5-8c58-ba3ed26efb16@xs4all.nl> (raw)
In-Reply-To: <fwcn3vlgxq5uygi32pyjuktj62wa7zvdgu7xxlpqr7an3kjn7i@25axhlrrkk6z>

Hi Maxime,

On 19/10/2023 10:02, Maxime Ripard wrote:
> Hi,
> 
> On Wed, Oct 11, 2023 at 03:23:18PM +0200, Daniel Vetter wrote:
>> On Mon, 6 Mar 2023 at 11:49, Maxime Ripard <maxime@cerno.tech> wrote:
>>>
>>> From: Dave Stevenson <dave.stevenson@raspberrypi.com>
>>>
>>> Copy Intel's "Broadcast RGB" property semantics to add manual override
>>> of the HDMI pixel range for monitors that don't abide by the content
>>> of the AVI Infoframe.
>>>
>>> Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
>>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>>
>> Stumbled over this grepping around, but would have been nice to lift
>> this into drm code and document the property. It's one of the legacy
>> ones from the table of horrors after all ...
>>
>> Shouldn't be an uapi problem because it's copypasted to much, just not great.
> 
> We already discussed it on IRC, but just for the record I have a current
> series that should address exactly that:
> 
> https://lore.kernel.org/dri-devel/20230920-kms-hdmi-connector-state-v2-3-17932daddd7d@kernel.org/
> 
> Maxime

I've pasted a snippet from that patch below for a quick review:

>  /**
>   * DOC: HDMI connector properties
>   *
> + * Broadcast RGB (HDMI Specific):

Full vs Limited is actually not HDMI specific, DisplayPort can signal this as
well for whatever it is worth.

> + *      Indicates the RGB Range (Full vs Limited) used.

RGB Range -> RGB Quantization Range

> + *
> + *      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:

It is very unfortunate that this is called "Limited 16:235" instead of just "Limited"
since for color component bit depths > 8 these values are different.

I have no idea if it is possible to add an alias "Limited" that you can use instead.
In any case, this should document that it works just as well for higher bit depths,
but with different limits.

Regards,

	Hans

> + *              Limited RGB Range is forced.
> + *
> + *      Drivers can set up this property by calling
> + *      drm_connector_attach_broadcast_rgb_property().
> + *
>   * content type (HDMI specific):
>   *	Indicates content type setting to be used in HDMI infoframes to indicate
>   *	content type for the external device, so that it adjusts its display


  reply	other threads:[~2023-10-19  8:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 10:46 [PATCH v3 0/9] drm/vc4: hdmi: Broadcast RGB, BT601, BT2020 Maxime Ripard
2023-03-06 10:46 ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 1/9] drm/vc4: Switch to container_of_const Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-04-22  5:26   ` Javier Martinez Canillas
2023-04-22  5:26     ` Javier Martinez Canillas
2023-04-25  7:38     ` Maxime Ripard
2023-04-25  7:38       ` Maxime Ripard
2023-04-25  8:21       ` Javier Martinez Canillas
2023-04-25  8:21         ` Javier Martinez Canillas
2023-03-06 10:46 ` [PATCH v3 2/9] drm/vc4: hdmi: Update all the planes if the TV margins are changed Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 3/9] drm/vc4: hdmi: Add Broadcast RGB property to allow override of RGB range Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-10-11 13:23   ` Daniel Vetter
2023-10-11 13:23     ` Daniel Vetter
2023-10-19  8:02     ` Maxime Ripard
2023-10-19  8:02       ` Maxime Ripard
2023-10-19  8:26       ` Hans Verkuil [this message]
2023-10-19  8:26         ` Hans Verkuil
2023-10-23 14:58         ` Maxime Ripard
2023-10-23 14:58           ` Maxime Ripard
2023-10-23 16:22           ` Sebastian Wick
2023-10-23 16:22             ` Sebastian Wick
2023-03-06 10:46 ` [PATCH v3 4/9] drm/vc4: hdmi: Rename full range helper Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 5/9] drm/vc4: hdmi: Swap CSC matrix channels for YUV444 Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 6/9] drm/vc4: hdmi: Rework the CSC matrices organization Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 7/9] drm/vc4: hdmi: Add a function to retrieve the CSC matrix Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 8/9] drm/vc4: hdmi: Add BT.601 Support Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-03-06 10:46 ` [PATCH v3 9/9] drm/vc4: hdmi: Add BT.2020 Support Maxime Ripard
2023-03-06 10:46   ` Maxime Ripard
2023-04-25  7:34 ` [PATCH v3 0/9] drm/vc4: hdmi: Broadcast RGB, BT601, BT2020 Maxime Ripard
2023-04-25  7:34   ` Maxime Ripard

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=12669999-295f-40c5-8c58-ba3ed26efb16@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    /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.