summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHikari Hayashi2022-07-12 21:06:00 +0800
committerHikari Hayashi2022-07-12 21:06:00 +0800
commitc6081d41ea64e04faffaec6b19906391ff1f54bb (patch)
tree6ab1efda7bd8b49ff12c9513cc183e873cf51d0e
parent7b84d085bb56b4fc02140ac1b11c4e49c6a74d5b (diff)
downloadaur-c6081d41ea64e04faffaec6b19906391ff1f54bb.tar.gz
Update ACPI IRQ patch to v6
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD6
-rw-r--r--v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch83
-rw-r--r--v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch42
5 files changed, 49 insertions, 90 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c4c8ac38d3f..c2ccb2099289 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linux-mainline-um5302ta
pkgdesc = Linux
pkgver = 5.19.rc6
- pkgrel = 1
+ pkgrel = 2
url = https://git.kernel.org/torvalds/h/v5.19-rc6
arch = x86_64
license = GPL2
@@ -22,7 +22,7 @@ pkgbase = linux-mainline-um5302ta
options = !strip
source = linux-mainline::git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=v5.19-rc6
source = config
- source = v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch
+ source = v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch
source = v0-ALSA-hda-realtek-Add-quirk-for-ASUS-UM5302TA.patch
source = v0-ASoC-cs35l41-CSC3551.patch
source = v4-Bluetooth-btusb-Add-a-new-VID-PID-0489-e0e2-for-MT7922.patch
@@ -31,7 +31,7 @@ pkgbase = linux-mainline-um5302ta
validpgpkeys = A2FF3A36AAA56654109064AB19802F8B0D70FC30
sha256sums = SKIP
sha256sums = 382aa201a6a6939210dd8668ab052724547b4bd489b38e97502bbd0848061b35
- sha256sums = a78e1868cfcaa34d5e5c8e16f2072e54966798664e5148a804579819ef965814
+ sha256sums = b34496cca01243a0805582cb656b9cfb2781c706cc4d13cea0ac4598364d3425
sha256sums = 6b86f4d857af3622f66da8ad9ea059ea39693fe80e5fbb507b0f8d9bc4616f88
sha256sums = 66ecbd41168b1fb7fe8c8bba8a374456130aeceb64df2708d62f7ac3e700df1f
sha256sums = 5212ffc69ba29c5b29365849e8bdb621c8cadac4025de5a503f55af923f123f0
diff --git a/.gitignore b/.gitignore
index 27f893344709..8bb6a7eddbf8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
!/PKGBUILD
!/.SRCINFO
!/config
-!/v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch
+!/v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch
!/v0-ALSA-hda-realtek-Add-quirk-for-ASUS-UM5302TA.patch
!/v0-ASoC-cs35l41-CSC3551.patch
!/v4-Bluetooth-btusb-Add-a-new-VID-PID-0489-e0e2-for-MT7922.patch
diff --git a/PKGBUILD b/PKGBUILD
index 89c9be92b1f1..d243a35fb7f4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgbase=linux-mainline-um5302ta
pkgver=5.19.rc6
-pkgrel=1
+pkgrel=2
pkgdesc='Linux'
_srctag=v${pkgver%.*}-${pkgver##*.}
url="https://git.kernel.org/torvalds/h/$_srctag"
@@ -19,7 +19,7 @@ _srcname=linux-mainline
source=(
"$_srcname::git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=$_srctag"
config # the main kernel config file
- v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch
+ v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch
v0-ALSA-hda-realtek-Add-quirk-for-ASUS-UM5302TA.patch
v0-ASoC-cs35l41-CSC3551.patch
v4-Bluetooth-btusb-Add-a-new-VID-PID-0489-e0e2-for-MT7922.patch
@@ -31,7 +31,7 @@ validpgpkeys=(
)
sha256sums=('SKIP'
'382aa201a6a6939210dd8668ab052724547b4bd489b38e97502bbd0848061b35'
- 'a78e1868cfcaa34d5e5c8e16f2072e54966798664e5148a804579819ef965814'
+ 'b34496cca01243a0805582cb656b9cfb2781c706cc4d13cea0ac4598364d3425'
'6b86f4d857af3622f66da8ad9ea059ea39693fe80e5fbb507b0f8d9bc4616f88'
'66ecbd41168b1fb7fe8c8bba8a374456130aeceb64df2708d62f7ac3e700df1f'
'5212ffc69ba29c5b29365849e8bdb621c8cadac4025de5a503f55af923f123f0')
diff --git a/v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch b/v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch
deleted file mode 100644
index da4a13c8aac4..000000000000
--- a/v5-ACPI-skip-IRQ1-override-on-3-Ryzen-6000-laptops.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-The IRQ1 of these laptops with Ryzen 6000 and Insyde UEFI are active
-low and defined in legacy format in ACPI DSDT. The kernel override
-makes the keyboard interrupt polarity inverted, resulting in
-non-functional keyboard.
-
-Skip legacy IRQ override for:
-Lenovo ThinkBook 14G4+ ARA
-Redmi Book Pro 15 2022 Ryzen
-Asus Zenbook S 13 OLED UM5302
-
-Cc: <stable@vger.kernel.org>
-Signed-off-by: Tighe Donnelly <tighe.donnelly@protonmail.com>
-Signed-off-by: Kent Hou Man <knthmn0@gmail.com>
-Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
----
-Changes since v1:
- Match DMI_PRODUCT_NAME for ThinkBook because the board name
- is used for other completely different Lenovo laptops.
- Add a patch for RedmiBook
-
-Changes since v2:
- Fix alphabetical order in skip_override_table
- Add a patch for Asus Zenbook
-
-Changes since v3:
- Merge patches as requested
- Fix another alphabetical ordering between two structs
-
-Changes since v4:
- rename the ident in RedmiBook entry.
- There's also an Intel version of this series, so
- rename it to make it specific.
- reword commit title
-
- drivers/acpi/resource.c | 26 ++++++++++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
-diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
-index c2d494784425..0491da180fc5 100644
---- a/drivers/acpi/resource.c
-+++ b/drivers/acpi/resource.c
-@@ -381,6 +381,31 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
- }
- EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
-
-+static const struct dmi_system_id irq1_edge_low_shared[] = {
-+ {
-+ .ident = "Asus Zenbook S 13 OLED UM5302",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-+ DMI_MATCH(DMI_BOARD_NAME, "UM5302TA"),
-+ },
-+ },
-+ {
-+ .ident = "Lenovo ThinkBook 14 G4+ ARA",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
-+ DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
-+ },
-+ },
-+ {
-+ .ident = "Redmi Book Pro 15 2022 Ryzen",
-+ .matches = {
-+ DMI_MATCH(DMI_SYS_VENDOR, "TIMI"),
-+ DMI_MATCH(DMI_BOARD_NAME, "TM2113"),
-+ },
-+ },
-+ { }
-+};
-+
- static const struct dmi_system_id medion_laptop[] = {
- {
- .ident = "MEDION P15651",
-@@ -408,6 +433,7 @@ struct irq_override_cmp {
- };
-
- static const struct irq_override_cmp skip_override_table[] = {
-+ { irq1_edge_low_shared, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1 },
- { medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
- };
-
---
-2.36.1
diff --git a/v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch b/v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch
new file mode 100644
index 000000000000..61873907a94b
--- /dev/null
+++ b/v6-ACPI-skip-IRQ-override-on-AMD-Zen-platforms.patch
@@ -0,0 +1,42 @@
+IRQ override isn't needed on modern AMD Zen systems.
+There's an active low keyboard IRQ on AMD Ryzen 6000 and it will stay
+this way on newer platforms. This IRQ override breaks keyboards for
+almost all Ryzen 6000 laptops currently on the market.
+
+Skip this IRQ override for all AMD Zen platforms because this IRQ
+override is supposed to be a workaround for buggy ACPI DSDT and we can't
+have a long list of all future AMD CPUs/Laptops in the kernel code.
+If a device with buggy ACPI DSDT shows up, a separated list containing
+just them should be created.
+
+Suggested-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
+---
+Change sice v5: reworked
+
+ drivers/acpi/resource.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
+index c2d494784425..510cdec375c4 100644
+--- a/drivers/acpi/resource.c
++++ b/drivers/acpi/resource.c
+@@ -416,6 +416,16 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
+ {
+ int i;
+
++#ifdef CONFIG_X86
++ /*
++ * IRQ override isn't needed on modern AMD Zen systems and
++ * this override breaks active low IRQs on AMD Ryzen 6000 and
++ * newer systems. Skip it.
++ */
++ if (boot_cpu_has(X86_FEATURE_ZEN))
++ return false;
++#endif
++
+ for (i = 0; i < ARRAY_SIZE(skip_override_table); i++) {
+ const struct irq_override_cmp *entry = &skip_override_table[i];
+
+--
+2.36.1