From a022e7ae150e34ef9678258bc20e41d87cd424a4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 12 Jan 2025 10:18:16 +0100 Subject: [PATCH] 5.15-stable patches added patches: acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch riscv-fix-sleeping-in-invalid-context-in-die.patch --- ...4vap-to-irq1_level_low_skip_override.patch | 42 +++++++++++ ...hg0a-to-irq1_edge_low_force_override.patch | 58 +++++++++++++++ ...urfaces-to-the-value-supported-by-hw.patch | 38 ++++++++++ ...x-sleeping-in-invalid-context-in-die.patch | 74 +++++++++++++++++++ queue-5.15/series | 4 + 5 files changed, 216 insertions(+) create mode 100644 queue-5.15/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch create mode 100644 queue-5.15/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch create mode 100644 queue-5.15/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch create mode 100644 queue-5.15/riscv-fix-sleeping-in-invalid-context-in-die.patch diff --git a/queue-5.15/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch b/queue-5.15/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch new file mode 100644 index 00000000000..9cbf6a9c332 --- /dev/null +++ b/queue-5.15/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch @@ -0,0 +1,42 @@ +From 66d337fede44dcbab4107d37684af8fcab3d648e Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 20 Dec 2024 19:13:52 +0100 +Subject: ACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[] + +From: Hans de Goede + +commit 66d337fede44dcbab4107d37684af8fcab3d648e upstream. + +Like the Vivobook X1704VAP the X1504VAP has its keyboard IRQ (1) described +as ActiveLow in the DSDT, which the kernel overrides to EdgeHigh which +breaks the keyboard. + +Add the X1504VAP to the irq1_level_low_skip_override[] quirk table to fix +this. + +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219224 +Cc: All applicable +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241220181352.25974-1-hdegoede@redhat.com +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/resource.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/acpi/resource.c ++++ b/drivers/acpi/resource.c +@@ -443,6 +443,13 @@ static const struct dmi_system_id asus_l + }, + }, + { ++ /* Asus Vivobook X1504VAP */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_BOARD_NAME, "X1504VAP"), ++ }, ++ }, ++ { + /* Asus Vivobook X1704VAP */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), diff --git a/queue-5.15/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch b/queue-5.15/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch new file mode 100644 index 00000000000..c21ad283abb --- /dev/null +++ b/queue-5.15/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch @@ -0,0 +1,58 @@ +From 7ed4e4a659d99499dc6968c61970d41b64feeac0 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 28 Dec 2024 17:48:45 +0100 +Subject: ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[] + +From: Hans de Goede + +commit 7ed4e4a659d99499dc6968c61970d41b64feeac0 upstream. + +The TongFang GM5HG0A is a TongFang barebone design which is sold under +various brand names. + +The ACPI IRQ override for the keyboard IRQ must be used on these AMD Zen +laptops in order for the IRQ to work. + +At least on the SKIKK Vanaheim variant the DMI product- and board-name +strings have been replaced by the OEM with "Vanaheim" so checking that +board-name contains "GM5HG0A" as is usually done for TongFang barebones +quirks does not work. + +The DMI OEM strings do contain "GM5HG0A". I have looked at the dmidecode +for a few other TongFang devices and the TongFang code-name string being +in the OEM strings seems to be something which is consistently true. + +Add a quirk checking one of the DMI_OEM_STRING(s) is "GM5HG0A" in the hope +that this will work for other OEM versions of the "GM5HG0A" too. + +Link: https://www.skikk.eu/en/laptops/vanaheim-15-rtx-4060 +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219614 +Cc: All applicable +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241228164845.42381-1-hdegoede@redhat.com +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/resource.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/acpi/resource.c ++++ b/drivers/acpi/resource.c +@@ -618,6 +618,17 @@ static const struct dmi_system_id lg_lap + DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"), + }, + }, ++ { ++ /* ++ * TongFang GM5HG0A in case of the SKIKK Vanaheim relabel the ++ * board-name is changed, so check OEM strings instead. Note ++ * OEM string matches are always exact matches. ++ * https://bugzilla.kernel.org/show_bug.cgi?id=219614 ++ */ ++ .matches = { ++ DMI_EXACT_MATCH(DMI_OEM_STRING, "GM5HG0A"), ++ }, ++ }, + { } + }; + diff --git a/queue-5.15/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch b/queue-5.15/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch new file mode 100644 index 00000000000..8ec962b778e --- /dev/null +++ b/queue-5.15/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch @@ -0,0 +1,38 @@ +From 21541bc6b44241e3f791f9e552352d8440b2b29e Mon Sep 17 00:00:00 2001 +From: Melissa Wen +Date: Tue, 17 Dec 2024 17:45:04 -0300 +Subject: drm/amd/display: increase MAX_SURFACES to the value supported by hw + +From: Melissa Wen + +commit 21541bc6b44241e3f791f9e552352d8440b2b29e upstream. + +As the hw supports up to 4 surfaces, increase the maximum number of +surfaces to prevent the DC error when trying to use more than three +planes. + +[drm:dc_state_add_plane [amdgpu]] *ERROR* Surface: can not attach plane_state 000000003e2cb82c! Maximum is: 3 + +Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3693 +Signed-off-by: Melissa Wen +Reviewed-by: Rodrigo Siqueira +Signed-off-by: Rodrigo Siqueira +Signed-off-by: Alex Deucher +(cherry picked from commit b8d6daffc871a42026c3c20bff7b8fa0302298c1) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/dc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/dc/dc.h ++++ b/drivers/gpu/drm/amd/display/dc/dc.h +@@ -47,7 +47,7 @@ struct aux_payload; + + #define DC_VER "3.2.149" + +-#define MAX_SURFACES 3 ++#define MAX_SURFACES 4 + #define MAX_PLANES 6 + #define MAX_STREAMS 6 + #define MAX_SINKS_PER_LINK 4 diff --git a/queue-5.15/riscv-fix-sleeping-in-invalid-context-in-die.patch b/queue-5.15/riscv-fix-sleeping-in-invalid-context-in-die.patch new file mode 100644 index 00000000000..c7f47aaa2dc --- /dev/null +++ b/queue-5.15/riscv-fix-sleeping-in-invalid-context-in-die.patch @@ -0,0 +1,74 @@ +From 6a97f4118ac07cfdc316433f385dbdc12af5025e Mon Sep 17 00:00:00 2001 +From: Nam Cao +Date: Mon, 18 Nov 2024 10:13:33 +0100 +Subject: riscv: Fix sleeping in invalid context in die() + +From: Nam Cao + +commit 6a97f4118ac07cfdc316433f385dbdc12af5025e upstream. + +die() can be called in exception handler, and therefore cannot sleep. +However, die() takes spinlock_t which can sleep with PREEMPT_RT enabled. +That causes the following warning: + +BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 +in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 285, name: mutex +preempt_count: 110001, expected: 0 +RCU nest depth: 0, expected: 0 +CPU: 0 UID: 0 PID: 285 Comm: mutex Not tainted 6.12.0-rc7-00022-ge19049cf7d56-dirty #234 +Hardware name: riscv-virtio,qemu (DT) +Call Trace: + dump_backtrace+0x1c/0x24 + show_stack+0x2c/0x38 + dump_stack_lvl+0x5a/0x72 + dump_stack+0x14/0x1c + __might_resched+0x130/0x13a + rt_spin_lock+0x2a/0x5c + die+0x24/0x112 + do_trap_insn_illegal+0xa0/0xea + _new_vmalloc_restore_context_a0+0xcc/0xd8 +Oops - illegal instruction [#1] + +Switch to use raw_spinlock_t, which does not sleep even with PREEMPT_RT +enabled. + +Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") +Signed-off-by: Nam Cao +Cc: stable@vger.kernel.org +Reviewed-by: Sebastian Andrzej Siewior +Link: https://lore.kernel.org/r/20241118091333.1185288-1-namcao@linutronix.de +Signed-off-by: Palmer Dabbelt +Signed-off-by: Greg Kroah-Hartman +--- + arch/riscv/kernel/traps.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/riscv/kernel/traps.c ++++ b/arch/riscv/kernel/traps.c +@@ -27,7 +27,7 @@ + + int show_unhandled_signals = 1; + +-static DEFINE_SPINLOCK(die_lock); ++static DEFINE_RAW_SPINLOCK(die_lock); + + void die(struct pt_regs *regs, const char *str) + { +@@ -38,7 +38,7 @@ void die(struct pt_regs *regs, const cha + + oops_enter(); + +- spin_lock_irqsave(&die_lock, flags); ++ raw_spin_lock_irqsave(&die_lock, flags); + console_verbose(); + bust_spinlocks(1); + +@@ -55,7 +55,7 @@ void die(struct pt_regs *regs, const cha + + bust_spinlocks(0); + add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); +- spin_unlock_irqrestore(&die_lock, flags); ++ raw_spin_unlock_irqrestore(&die_lock, flags); + oops_exit(); + + if (in_interrupt()) diff --git a/queue-5.15/series b/queue-5.15/series index 45dcd4d5a9a..4d0eb7839fd 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -31,3 +31,7 @@ sctp-sysctl-auth_enable-avoid-using-current-nsproxy.patch sctp-sysctl-udp_port-avoid-using-current-nsproxy.patch sctp-sysctl-plpmtud_probe_interval-avoid-using-current-nsproxy.patch drm-amd-display-add-check-for-granularity-in-dml-ceil-floor-helpers.patch +riscv-fix-sleeping-in-invalid-context-in-die.patch +acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch +acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch +drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch -- 2.47.3