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] [day] [month] [year] [list]
Message-ID: <b7cb3882-b04a-4f1e-a849-956a4df6ff6b@manjaro.org>
Date: Tue, 26 Aug 2025 14:29:47 +0200
From: Philip Müller <philm@...jaro.org>
To: Antheas Kapenekakis <lkml@...heas.dev>, amd-gfx@...ts.freedesktop.org
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 Alex Deucher <alexander.deucher@....com>,
 Christian König <christian.koenig@....com>,
 Mario Limonciello <mario.limonciello@....com>
Subject: Re: [PATCH v1 3/5] drm: panel-backlight-quirks: Add secondary DMI
 match

On 8/24/25 22:02, Antheas Kapenekakis wrote:
> Using a single DMI match only allows matching per manufacturer.
> Introduce a second optional match to allow matching make/model.
> In addition, make DMI optional to allow matching only by EDID.
> 
> Signed-off-by: Antheas Kapenekakis <lkml@...heas.dev>
> ---
>   drivers/gpu/drm/drm_panel_backlight_quirks.c | 19 ++++++++++++++-----
>   1 file changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_panel_backlight_quirks.c b/drivers/gpu/drm/drm_panel_backlight_quirks.c
> index 702726c20ccc..3d386a96e50e 100644
> --- a/drivers/gpu/drm/drm_panel_backlight_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_backlight_quirks.c
> @@ -8,11 +8,14 @@
>   #include <drm/drm_edid.h>
>   #include <drm/drm_utils.h>
>   
> +struct drm_panel_match {
> +	enum dmi_field field;
> +	const char * const value;
> +};
> +
>   struct drm_get_panel_backlight_quirk {
> -	struct {
> -		enum dmi_field field;
> -		const char * const value;
> -	} dmi_match;
> +	struct drm_panel_match dmi_match;
> +	struct drm_panel_match dmi_match_other;
>   	struct drm_edid_ident ident;
>   	struct drm_panel_backlight_quirk quirk;
>   };
> @@ -48,7 +51,13 @@ static bool drm_panel_min_backlight_quirk_matches(
>   	const struct drm_get_panel_backlight_quirk *quirk,
>   	const struct drm_edid *edid)
>   {
> -	if (!dmi_match(quirk->dmi_match.field, quirk->dmi_match.value))
> +	if (quirk->dmi_match.field &&
> +	    !dmi_match(quirk->dmi_match.field, quirk->dmi_match.value))
> +		return false;
> +
> +	if (quirk->dmi_match_other.field &&
> +	    !dmi_match(quirk->dmi_match_other.field,
> +		       quirk->dmi_match_other.value))
>   		return false;
>   
>   	if (quirk->ident.panel_id && !drm_edid_match(edid, &quirk->ident))

Tested-by: Philip Müller <philm@...jaro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ