From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: Dom Cobley <dom@raspberrypi.com>,
Tim Gover <tim.gover@raspberrypi.com>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Werner Sembach <wse@tuxedocomputers.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Daniel Vetter <daniel.vetter@intel.com>,
Phil Elwell <phil@raspberrypi.com>
Subject: Re: [PATCH v2 01/14] drm/edid: Don't clear YUV422 if using deep color
Date: Wed, 15 Dec 2021 15:48:39 +0200 [thread overview]
Message-ID: <YbnyNx+0CK8R8Nd8@intel.com> (raw)
In-Reply-To: <20211215124406.340180-2-maxime@cerno.tech>
On Wed, Dec 15, 2021 at 01:43:53PM +0100, Maxime Ripard wrote:
> The current code, when parsing the EDID Deep Color depths, that the
> YUV422 cannot be used, referring to the HDMI 1.3 Specification.
>
> This specification, in its section 6.2.4, indeed states:
>
> For each supported Deep Color mode, RGB 4:4:4 shall be supported and
> optionally YCBCR 4:4:4 may be supported.
>
> YCBCR 4:2:2 is not permitted for any Deep Color mode.
>
> This indeed can be interpreted like the code does, but the HDMI 1.4
> specification further clarifies that statement in its section 6.2.4:
>
> For each supported Deep Color mode, RGB 4:4:4 shall be supported and
> optionally YCBCR 4:4:4 may be supported.
>
> YCBCR 4:2:2 is also 36-bit mode but does not require the further use
> of the Deep Color modes described in section 6.5.2 and 6.5.3.
>
> This means that, even though YUV422 can be used with 12 bit per color,
> it shouldn't be treated as a deep color mode.
>
> This deviates from the interpretation of the code and comment, so let's
> fix those.
>
> Fixes: d0c94692e0a3 ("drm/edid: Parse and handle HDMI deep color modes.")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> drivers/gpu/drm/drm_edid.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 12893e7be89b..e57d1b8cdaaa 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -5106,10 +5106,9 @@ static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,
>
> /*
> * Deep color support mandates RGB444 support for all video
> - * modes and forbids YCRCB422 support for all video modes per
> - * HDMI 1.3 spec.
> + * modes.
> */
> - info->color_formats = DRM_COLOR_FORMAT_RGB444;
> + info->color_formats |= DRM_COLOR_FORMAT_RGB444;
>
> /* YCRCB444 is optional according to spec. */
> if (hdmi[6] & DRM_EDID_HDMI_DC_Y444) {
This whole code seems pretty much wrong. What it tries to do (I think)
is make sure we don't use deep color with YCbCr 4:4:4 unless supported.
But what it actually does is also disable YCbCr 4:4:4 8bpc when deep
color is not supported for YCbCr 4:4:4.
I think what we want is to just get rid of this color_formats stuff here
entirely and instead have some kind of separate tracking of RGB 4:4:4 vs.
YCbCr 4:4:4 deep color capabilities.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-12-15 13:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 12:43 [PATCH v2 00/14] drm/vc4: hdmi: Yet Another Approach to HDMI YUV output Maxime Ripard
2021-12-15 12:43 ` [PATCH v2 01/14] drm/edid: Don't clear YUV422 if using deep color Maxime Ripard
2021-12-15 13:48 ` Ville Syrjälä [this message]
2022-01-11 15:55 ` Maxime Ripard
2022-01-12 13:22 ` Ville Syrjälä
2021-12-15 12:43 ` [PATCH v2 02/14] drm/edid: Rename drm_hdmi_avi_infoframe_colorspace to _colorimetry Maxime Ripard
2021-12-15 13:50 ` Ville Syrjälä
2021-12-15 12:43 ` [PATCH v2 03/14] drm/vc4: hdmi: Add full range RGB helper Maxime Ripard
2021-12-15 12:43 ` [PATCH v2 04/14] drm/vc4: hdmi: Use full range helper in csc functions Maxime Ripard
2021-12-15 12:43 ` [PATCH v2 05/14] drm/vc4: hdmi: Move XBAR setup to csc_setup Maxime Ripard
2021-12-15 12:43 ` [PATCH v2 06/14] drm/vc4: hdmi: Replace CSC_CTL hardcoded value by defines Maxime Ripard
2021-12-15 12:43 ` [PATCH v2 07/14] drm/vc4: hdmi: Define colorspace matrices Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 08/14] drm/vc4: hdmi: Change CSC callback prototype Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 09/14] drm/vc4: hdmi: Move clock validation to its own function Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 10/14] drm/vc4: hdmi: Move clock calculation into " Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 11/14] drm/vc4: hdmi: Take the sink maximum TMDS clock into account Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 12/14] drm/vc4: hdmi: Take bpp into account for the scrambler Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 13/14] drm/vc4: hdmi: Always try to have the highest bpc Maxime Ripard
2021-12-15 12:44 ` [PATCH v2 14/14] drm/vc4: hdmi: Support HDMI YUV output 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=YbnyNx+0CK8R8Nd8@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dom@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maxime@cerno.tech \
--cc=phil@raspberrypi.com \
--cc=tim.gover@raspberrypi.com \
--cc=tzimmermann@suse.de \
--cc=wse@tuxedocomputers.com \
/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