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]
Message-ID: <CAG3jFytyzmRnpj8pzSUitLhAHQM9b0zhkc2cbfVmgKStfHpwVA@mail.gmail.com>
Date:   Tue, 29 Nov 2022 12:09:19 +0100
From:   Robert Foss <robert.foss@...aro.org>
To:     Guillaume BRUN <the.cheaterman@...il.com>
Cc:     Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        linux-amlogic@...ts.infradead.org,
        Christian Hewitt <christianshewitt@...il.com>
Subject: Re: [PATCH] drm: bridge: dw_hdmi: fix preference of RGB modes over YUV420

On Wed, 16 Nov 2022 at 15:35, Guillaume BRUN <the.cheaterman@...il.com> wrote:
>
> Cheap monitors sometimes advertise YUV modes they don't really have
> (HDMI specification mandates YUV support so even monitors without actual
> support will often wrongfully advertise it) which results in YUV matches
> and user forum complaints of a red tint to light colour display areas in
> common desktop environments.
>
> Moving the default RGB fall-back before YUV selection results in RGB
> mode matching in most cases, reducing complaints.
>
> Fixes: 6c3c719936da ("drm/bridge: synopsys: dw-hdmi: add bus format negociation")
> Signed-off-by: Guillaume BRUN <the.cheaterman@...il.com>
> Tested-by: Christian Hewitt <christianshewitt@...il.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 40d8ca37f5bc..aa51c61a78c7 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2720,6 +2720,9 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
>          * if supported. In any case the default RGB888 format is added
>          */
>
> +       /* Default 8bit RGB fallback */
> +       output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
> +
>         if (max_bpc >= 16 && info->bpc == 16) {
>                 if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
>                         output_fmts[i++] = MEDIA_BUS_FMT_YUV16_1X48;
> @@ -2753,9 +2756,6 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
>         if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
>                 output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;
>
> -       /* Default 8bit RGB fallback */
> -       output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
> -
>         *num_output_fmts = i;
>
>         return output_fmts;
> --
> 2.37.3
>

Reviewed-by: Robert Foss <robert.foss@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ