Skip to content

Commit 2d331a6

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: resource: revert "Remove "Zen" specific match and quirks"
Commit a9c4a91 ("ACPI: resource: Remove "Zen" specific match and quirks") is causing keyboard problems for quite a log of AMD based laptop users, leading to many bug reports. Revert this change for now, until we can come up with a better fix for the PS/2 IRQ trigger-type/polarity problems on some x86 laptops. Fixes: a9c4a91 ("ACPI: resource: Remove "Zen" specific match and quirks") Link: https://bugzilla.redhat.com/show_bug.cgi?id=2228891 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2229165 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2229317 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217718 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217726 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217731 Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 52a93d3 commit 2d331a6

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

drivers/acpi/resource.c

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,52 @@ static const struct dmi_system_id asus_laptop[] = {
470470
{ }
471471
};
472472

473+
static const struct dmi_system_id lenovo_laptop[] = {
474+
{
475+
.ident = "LENOVO IdeaPad Flex 5 14ALC7",
476+
.matches = {
477+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
478+
DMI_MATCH(DMI_PRODUCT_NAME, "82R9"),
479+
},
480+
},
481+
{
482+
.ident = "LENOVO IdeaPad Flex 5 16ALC7",
483+
.matches = {
484+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
485+
DMI_MATCH(DMI_PRODUCT_NAME, "82RA"),
486+
},
487+
},
488+
{ }
489+
};
490+
491+
static const struct dmi_system_id tongfang_gm_rg[] = {
492+
{
493+
.ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD",
494+
.matches = {
495+
DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
496+
},
497+
},
498+
{ }
499+
};
500+
501+
static const struct dmi_system_id maingear_laptop[] = {
502+
{
503+
.ident = "MAINGEAR Vector Pro 2 15",
504+
.matches = {
505+
DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"),
506+
DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"),
507+
}
508+
},
509+
{
510+
.ident = "MAINGEAR Vector Pro 2 17",
511+
.matches = {
512+
DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"),
513+
DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"),
514+
},
515+
},
516+
{ }
517+
};
518+
473519
static const struct dmi_system_id lg_laptop[] = {
474520
{
475521
.ident = "LG Electronics 17U70P",
@@ -493,6 +539,10 @@ struct irq_override_cmp {
493539
static const struct irq_override_cmp override_table[] = {
494540
{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
495541
{ asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
542+
{ lenovo_laptop, 6, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true },
543+
{ lenovo_laptop, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true },
544+
{ tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
545+
{ maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
496546
{ lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
497547
};
498548

@@ -512,6 +562,16 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
512562
return entry->override;
513563
}
514564

565+
#ifdef CONFIG_X86
566+
/*
567+
* IRQ override isn't needed on modern AMD Zen systems and
568+
* this override breaks active low IRQs on AMD Ryzen 6000 and
569+
* newer systems. Skip it.
570+
*/
571+
if (boot_cpu_has(X86_FEATURE_ZEN))
572+
return false;
573+
#endif
574+
515575
return true;
516576
}
517577

0 commit comments

Comments
 (0)