[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <etqrbspmy2s75b7lxj3frcjxfnyciawzlxm7im4gvnj6t7z3fx@vx3dfsxitwdn>
Date: Thu, 15 May 2025 16:52:06 +0200
From: Maxime Ripard <mripard@...nel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Dave Stevenson <dave.stevenson@...pberrypi.com>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>, Dmitry Baryshkov <lumag@...nel.org>, kernel@...labora.com,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 06/23] drm/connector: hdmi: Use YUV420 output format
as an RGB fallback
On Thu, May 15, 2025 at 03:44:18PM +0300, Cristian Ciocaltea wrote:
> Hi Maxime,
>
> On 5/13/25 4:35 PM, Maxime Ripard wrote:
> > Hi,
> >
> > On Fri, Apr 25, 2025 at 01:26:57PM +0300, Cristian Ciocaltea wrote:
> >> Try to make use of YUV420 when computing the best output format and
> >> RGB cannot be supported for any of the available color depths.
> >>
> >> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
> >> ---
> >> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 22 +++++++++++++++++-----
> >> 1 file changed, 17 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> >> index 9e0a468073acbb2477eff1abef1c09d63620afaa..1fba10b92a6baa49150b6ff1e96bf2c2739bf269 100644
> >> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> >> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> >> @@ -648,14 +648,26 @@ hdmi_compute_config(const struct drm_connector *connector,
> >> 8, connector->max_bpc);
> >> int ret;
> >>
> >> - /*
> >> - * TODO: Add support for YCbCr420 output for HDMI 2.0 capable
> >> - * devices, for modes that only support YCbCr420.
> >> - */
> >> ret = hdmi_compute_format_bpc(connector, conn_state, mode, max_bpc,
> >> HDMI_COLORSPACE_RGB);
> >> + if (!ret)
> >> + return 0;
> >
> > Sorry, I missed it on the previous iteration, but this condition
> > inversion compared to the rest of the function is throwing me off :)
> >
> > I believe something like
> >
> > If (ret) {
> > if (connector->ycbcr_420_allowed) {
> > hdmi_compute_format_bpc(..., HDMI_COLORSPACE_YUV420)
> > } else {
> > drm_dbg_kms("Can't use YUV420")
> > }
> > }
> >
> > Would be more natural
>
> Yep, will do.
>
> Please let me know if I can start preparing v5, as I'm not sure if you
> managed to also check the test-related patches.
I haven't gotten through the whole series yet, sorry. I hope to finish
it by ~ the middle of next week.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists