Skip to content

Commit bfcdf58

Browse files
Jiri Slaby (SUSE)rafaeljw
authored andcommitted
ACPI: resource: do IRQ override on LENOVO IdeaPad
LENOVO IdeaPad Flex 5 is ryzen-5 based and the commit below removed IRQ overriding for those. This broke touchscreen and trackpad: i2c_designware AMDI0010:00: controller timed out i2c_designware AMDI0010:03: controller timed out i2c_hid_acpi i2c-MSFT0001:00: failed to reset device: -61 i2c_designware AMDI0010:03: controller timed out ... i2c_hid_acpi i2c-MSFT0001:00: can't add hid device: -61 i2c_hid_acpi: probe of i2c-MSFT0001:00 failed with error -61 White-list this specific model in the override_table. For this to work, the ZEN test needs to be put below the table walk. Fixes: 37c81d9 (ACPI: resource: skip IRQ override on AMD Zen platforms) Link: https://bugzilla.suse.com/show_bug.cgi?id=1203794 Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 3a1e24f commit bfcdf58

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

drivers/acpi/resource.c

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -428,24 +428,49 @@ static const struct dmi_system_id asus_laptop[] = {
428428
{ }
429429
};
430430

431+
static const struct dmi_system_id lenovo_82ra[] = {
432+
{
433+
.ident = "LENOVO IdeaPad Flex 5 16ALC7",
434+
.matches = {
435+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
436+
DMI_MATCH(DMI_PRODUCT_NAME, "82RA"),
437+
},
438+
},
439+
{ }
440+
};
441+
431442
struct irq_override_cmp {
432443
const struct dmi_system_id *system;
433444
unsigned char irq;
434445
unsigned char triggering;
435446
unsigned char polarity;
436447
unsigned char shareable;
448+
bool override;
437449
};
438450

439-
static const struct irq_override_cmp skip_override_table[] = {
440-
{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
441-
{ asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
451+
static const struct irq_override_cmp override_table[] = {
452+
{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
453+
{ asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
454+
{ lenovo_82ra, 6, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true },
455+
{ lenovo_82ra, 10, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, true },
442456
};
443457

444458
static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
445459
u8 shareable)
446460
{
447461
int i;
448462

463+
for (i = 0; i < ARRAY_SIZE(override_table); i++) {
464+
const struct irq_override_cmp *entry = &override_table[i];
465+
466+
if (dmi_check_system(entry->system) &&
467+
entry->irq == gsi &&
468+
entry->triggering == triggering &&
469+
entry->polarity == polarity &&
470+
entry->shareable == shareable)
471+
return entry->override;
472+
}
473+
449474
#ifdef CONFIG_X86
450475
/*
451476
* IRQ override isn't needed on modern AMD Zen systems and
@@ -456,17 +481,6 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
456481
return false;
457482
#endif
458483

459-
for (i = 0; i < ARRAY_SIZE(skip_override_table); i++) {
460-
const struct irq_override_cmp *entry = &skip_override_table[i];
461-
462-
if (dmi_check_system(entry->system) &&
463-
entry->irq == gsi &&
464-
entry->triggering == triggering &&
465-
entry->polarity == polarity &&
466-
entry->shareable == shareable)
467-
return false;
468-
}
469-
470484
return true;
471485
}
472486

0 commit comments

Comments
 (0)