diff mbox series

ACPI: resource: Add IRQ override for MECHREV Jiaolong17KS

Message ID 1890c3fa24c.d101fdf01298845.3731868257024939195@linux.beauty
State New
Headers show
Series ACPI: resource: Add IRQ override for MECHREV Jiaolong17KS | expand

Commit Message

Li Chen June 30, 2023, 12:20 p.m. UTC
Fix a regression introduced by commit 9946e39fe8d0 ("ACPI: resource: skip
IRQ override on AMD Zen platforms") on MECHREV Jiaolong17KS, which
causes the built-in keyboard to not work. This restores the functionality
by adding an IRQ override.

I have personally tested this on the 17" model but I'm not sure if this
issue is present on the 16 model.

Fixes: 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms")
Signed-off-by: Li Chen <me@linux.beauty>
---
 drivers/acpi/resource.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Mario Limonciello June 30, 2023, 1:09 p.m. UTC | #1
[Public]

> -----Original Message-----
> From: Linux regression tracking (Thorsten Leemhuis)
> <regressions@leemhuis.info>
> Sent: Friday, June 30, 2023 8:06 AM
> To: Li Chen <me@linux.beauty>; linux-kernel <linux-kernel@vger.kernel.org>;
> linux-acpi <linux-acpi@vger.kernel.org>; Len Brown <lenb@kernel.org>; Rafael
> J. Wysocki <rafael@kernel.org>; Limonciello, Mario
> <Mario.Limonciello@amd.com>
> Cc: Linux kernel regressions list <regressions@lists.linux.dev>
> Subject: Re: [PATCH] ACPI: resource: Add IRQ override for MECHREV
> Jiaolong17KS
>
> [CCing mario and the regressions list]
>
> On 30.06.23 14:20, Li Chen wrote:
> > Fix a regression introduced by commit 9946e39fe8d0 ("ACPI: resource: skip
> > IRQ override on AMD Zen platforms") on MECHREV Jiaolong17KS, which
> > causes the built-in keyboard to not work. This restores the functionality
> > by adding an IRQ override.
> >
> > I have personally tested this on the 17" model but I'm not sure if this
> > issue is present on the 16 model.
> >
> > Fixes: 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen
> platforms")
> > Signed-off-by: Li Chen <me@linux.beauty>
>
> Not my area of expertise (so take this with a gain of salt), but I'm
> aware of something that afaics concerns this:
>
> A few days ago a patch was merged to mainline that afaics hopefully
> might make a change like your unnecessary.  See a9c4a912b7d ("ACPI:
> resource: Remove "Zen" specific match and quirks") in mainline or here:
> https://lore.kernel.org/all/20230601221151.670-1-
> mario.limonciello@amd.com/
>
> Might be worth giving a try.
>
> There is a rough plan to backport this to stable kernels, unless
> problems show up.

Correct.
diff mbox series

Patch

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 0800a9d77558..5b00ee90388a 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -527,6 +527,17 @@  static const struct dmi_system_id lg_laptop[] = {
 	{ }
 };
 
+static const struct dmi_system_id mechrev_laptop[] = {
+	{
+		.ident = "Jiaolong17KS Series GM7XG0M",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "MECHREVO"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Jiaolong17KS Series GM7XG0M"),
+		},
+	},
+	{ }
+};
+
 struct irq_override_cmp {
 	const struct dmi_system_id *system;
 	unsigned char irq;
@@ -544,6 +555,7 @@  static const struct irq_override_cmp override_table[] = {
 	{ tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
 	{ maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
 	{ lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
+	{ mechrev_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
 };
 
 static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,