mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Philip Müller" <philm@manjaro.org>
To: Antheas Kapenekakis <lkml@antheas.dev>, amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>
Subject: Re: [PATCH v1 3/5] drm: panel-backlight-quirks: Add secondary DMI match
Date: Tue, 26 Aug 2025 14:29:47 +0200	[thread overview]
Message-ID: <b7cb3882-b04a-4f1e-a849-956a4df6ff6b@manjaro.org> (raw)
In-Reply-To: <20250824200202.1744335-4-lkml@antheas.dev>

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@antheas.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@manjaro.org>

  reply	other threads:[~2025-08-26 12:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-24 20:01 [PATCH v1 0/5] drm: panel-backlight-quirks: Do partial refactor and apply OLED fix Antheas Kapenekakis
2025-08-24 20:01 ` [PATCH v1 1/5] drm: panel-backlight-quirks: Make ident optional Antheas Kapenekakis
2025-08-24 20:01 ` [PATCH v1 2/5] drm: panel-backlight-quirks: Convert brightness quirk to generic structure Antheas Kapenekakis
2025-08-25 17:53   ` Mario Limonciello
2025-08-26 12:29   ` Philip Müller
2025-08-24 20:02 ` [PATCH v1 3/5] drm: panel-backlight-quirks: Add secondary DMI match Antheas Kapenekakis
2025-08-26 12:29   ` Philip Müller [this message]
2025-08-24 20:02 ` [PATCH v1 4/5] drm: panel-backlight-quirks: Add brightness mask quirk Antheas Kapenekakis
2025-08-25 18:02   ` Mario Limonciello
2025-08-25 21:17     ` Antheas Kapenekakis
2025-08-25 21:22       ` Mario Limonciello
2025-08-25 21:26         ` Antheas Kapenekakis
2025-08-26 12:28   ` Philip Müller
2025-08-24 20:02 ` [PATCH v1 5/5] drm: panel-backlight-quirks: Add Steam Decks Antheas Kapenekakis
2025-08-25 16:47   ` Mario Limonciello
2025-08-25 21:02     ` Antheas Kapenekakis
2025-08-25 21:05       ` Mario Limonciello
2025-08-25 21:20         ` Antheas Kapenekakis
2025-08-26 11:38   ` Robert Beckett
2025-08-25 16:45 ` [PATCH v1 0/5] drm: panel-backlight-quirks: Do partial refactor and apply OLED fix Mario Limonciello

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=b7cb3882-b04a-4f1e-a849-956a4df6ff6b@manjaro.org \
    --to=philm@manjaro.org \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@antheas.dev \
    --cc=mario.limonciello@amd.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

all inboxes | Powered by JetHome®