Bug 199523 - ACPI IRQ 7 wrong detected on HP Envy x360 - AMD Ryzen 5 2500U
Summary: ACPI IRQ 7 wrong detected on HP Envy x360 - AMD Ryzen 5 2500U
Status: RESOLVED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: BIOS (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: acpi_bios
URL:
Keywords:
Depends on:
Blocks: 198715
  Show dependency tree
 
Reported: 2018-04-26 15:13 UTC by Lukas Kahnert
Modified: 2018-11-26 08:24 UTC (History)
10 users (show)

See Also:
Kernel Version: 4.16
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Disassembled ACPI Table (566.89 KB, text/plain)
2018-04-26 15:13 UTC, Lukas Kahnert
Details
dmesg log 4.16.4 (54.82 KB, text/plain)
2018-04-26 15:15 UTC, Lukas Kahnert
Details
[PATCH] pinctrl/amd: Take irq-type directly from the ACPI resource table (3.89 KB, patch)
2018-11-19 12:30 UTC, Hans de Goede
Details | Diff
[PATCH] ACPI / platform: Add SMB0001 HID to forbidden_id_list (3.62 KB, patch)
2018-11-20 11:08 UTC, Hans de Goede
Details | Diff

Description Lukas Kahnert 2018-04-26 15:13:12 UTC
Created attachment 275599 [details]
Disassembled ACPI Table

I tried to get the touchscreen work for HP Envy x360(Ryzen 2500u) on current kernel and found out that the Interrupt for the GPIO driver get wrong detected and configured. Maybe a typical bug in the ACPI table from BIOS.
In ACPI Table the IRQ is defined as

Interrupt (ResourceConsumer, Level, ActiveLow, Shared, ,, )
                    {
                        0x00000007,
                    }

but in dmesg it prints

[    0.098531] ACPI: IRQ 7 override to edge, high

I just made a dirty hack to force "level, low" for this IRQ (and a change related to other bug) and the touchscreen works as expected.
But it needs a true fix in the hardware detection and configuration.
Comment 1 Lukas Kahnert 2018-04-26 15:15:39 UTC
Created attachment 275601 [details]
dmesg log 4.16.4

dmesg log of a vanilla 4.16.4 kernel
Comment 2 Hans de Goede 2018-11-19 11:37:49 UTC
Hi Lukas,

Thank you for pinpointing the problem like this for us. I don't see any really obvious nice answer here.

So I believe it is best to override the IRQ type manually in the AMD gpio driver to correct the acpi_get_override_irq() results from the ACPI core.

I've written a patch doing this, which although not really pretty should be upstreamable (and should not cause issues on other devices).

If you can give this patch a try that would be great. I will attach it here.

Regards,

Hans
Comment 3 Hans de Goede 2018-11-19 12:30:54 UTC
Created attachment 279527 [details]
[PATCH] pinctrl/amd: Take irq-type directly from the ACPI resource table
Comment 4 Hans de Goede 2018-11-20 11:08:30 UTC
Created attachment 279553 [details]
[PATCH]  ACPI / platform: Add SMB0001 HID to forbidden_id_list

So my previous patch was no good. As discussed in bug 198715 this patch actually fixes this and has been submitted upstream.

See the commit message inside the patch for a long explanation of what the problem was and how this patch fixes it.
Comment 5 Lukas Kahnert 2018-11-26 08:24:39 UTC
Patch upstream since Kernel 4.20-rc4

Note You need to log in before you can comment on or make changes to this bug.