From: Sasha Levin Date: Mon, 30 Dec 2024 01:33:18 +0000 (-0500) Subject: Fixes for 6.1 X-Git-Tag: v6.1.123~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab6a636cf16f325c1a7a32a40cc856a338df6338;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.1 Signed-off-by: Sasha Levin --- diff --git a/queue-6.1/alsa-hda-realtek-fix-micmute-leds-don-t-work-on-hp-l.patch b/queue-6.1/alsa-hda-realtek-fix-micmute-leds-don-t-work-on-hp-l.patch new file mode 100644 index 00000000000..7a16e0b4019 --- /dev/null +++ b/queue-6.1/alsa-hda-realtek-fix-micmute-leds-don-t-work-on-hp-l.patch @@ -0,0 +1,44 @@ +From ca8898e92021838b36e99635e1910eb44f99dd78 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 2 Dec 2024 22:46:59 +0800 +Subject: ALSA: hda/realtek: fix micmute LEDs don't work on HP Laptops + +From: Chris Chiu + +[ Upstream commit 0d08f0eec961acdb0424a3e2cfb37cfb89154833 ] + +These HP laptops use Realtek HDA codec ALC3315 combined CS35L56 +Amplifiers. They need the quirk ALC285_FIXUP_HP_GPIO_LED to get +the micmute LED working. + +Signed-off-by: Chris Chiu +Reviewed-by: Simon Trimmer +Cc: +Link: https://patch.msgid.link/20241202144659.1553504-1-chris.chiu@canonical.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index beb182080abc..03fe531f8230 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9898,7 +9898,13 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8d01, "HP ZBook Power 14 G12", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firelfy 14 G12A", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), + SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), +-- +2.39.5 + diff --git a/queue-6.1/alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-fo.patch b/queue-6.1/alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-fo.patch new file mode 100644 index 00000000000..ea22ff05eea --- /dev/null +++ b/queue-6.1/alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-fo.patch @@ -0,0 +1,38 @@ +From b7cbb7bc613b1f364c115e9cd18c8bb52527ed5a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 26 Nov 2024 14:05:24 +0800 +Subject: ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook X + G1i + +From: Dirk Su + +[ Upstream commit 7ba81e4c3aa0ca25f06dc4456e7d36fa8e76385f ] + +HP EliteBook X G1i needs ALC285_FIXUP_HP_GPIO_LED quirk to +make mic-mute/audio-mute working. + +Signed-off-by: Dirk Su +Cc: +Link: https://patch.msgid.link/20241126060531.22759-1-dirk.su@canonical.com +Signed-off-by: Takashi Iwai +Stable-dep-of: 0d08f0eec961 ("ALSA: hda/realtek: fix micmute LEDs don't work on HP Laptops") +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index bd0f00794c30..beb182080abc 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9898,6 +9898,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8d84, "HP EliteBook X G1i", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), + SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), +-- +2.39.5 + diff --git a/queue-6.1/freezer-sched-report-frozen-tasks-as-d-instead-of-r.patch b/queue-6.1/freezer-sched-report-frozen-tasks-as-d-instead-of-r.patch new file mode 100644 index 00000000000..316c9107539 --- /dev/null +++ b/queue-6.1/freezer-sched-report-frozen-tasks-as-d-instead-of-r.patch @@ -0,0 +1,71 @@ +From a0a70cd6f4e1298efb48736f11ad4a5cce5388aa Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 17 Dec 2024 00:48:18 +0000 +Subject: freezer, sched: Report frozen tasks as 'D' instead of 'R' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Chen Ridong + +[ Upstream commit f718faf3940e95d5d34af9041f279f598396ab7d ] + +Before commit: + + f5d39b020809 ("freezer,sched: Rewrite core freezer logic") + +the frozen task stat was reported as 'D' in cgroup v1. + +However, after rewriting the core freezer logic, the frozen task stat is +reported as 'R'. This is confusing, especially when a task with stat of +'S' is frozen. + +This bug can be reproduced with these steps: + + $ cd /sys/fs/cgroup/freezer/ + $ mkdir test + $ sleep 1000 & + [1] 739 // task whose stat is 'S' + $ echo 739 > test/cgroup.procs + $ echo FROZEN > test/freezer.state + $ ps -aux | grep 739 + root 739 0.1 0.0 8376 1812 pts/0 R 10:56 0:00 sleep 1000 + +As shown above, a task whose stat is 'S' was changed to 'R' when it was +frozen. + +To solve this regression, simply maintain the same reported state as +before the rewrite. + +[ mingo: Enhanced the changelog and comments ] + +Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic") +Signed-off-by: Chen Ridong +Signed-off-by: Peter Zijlstra (Intel) +Signed-off-by: Ingo Molnar +Acked-by: Tejun Heo +Acked-by: Michal Koutný +Link: https://lore.kernel.org/r/20241217004818.3200515-1-chenridong@huaweicloud.com +Signed-off-by: Sasha Levin +--- + include/linux/sched.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 205a00806835..e87a68b136da 100644 +--- a/include/linux/sched.h ++++ b/include/linux/sched.h +@@ -1670,8 +1670,9 @@ static inline unsigned int __task_state_index(unsigned int tsk_state, + * We're lying here, but rather than expose a completely new task state + * to userspace, we can make this appear as if the task has gone through + * a regular rt_mutex_lock() call. ++ * Report frozen tasks as uninterruptible. + */ +- if (tsk_state & TASK_RTLOCK_WAIT) ++ if ((tsk_state & TASK_RTLOCK_WAIT) || (tsk_state & TASK_FROZEN)) + state = TASK_UNINTERRUPTIBLE; + + return fls(state); +-- +2.39.5 + diff --git a/queue-6.1/pmdomain-core-add-missing-put_device.patch b/queue-6.1/pmdomain-core-add-missing-put_device.patch new file mode 100644 index 00000000000..c4d778ae74c --- /dev/null +++ b/queue-6.1/pmdomain-core-add-missing-put_device.patch @@ -0,0 +1,36 @@ +From c095ec8b4738ec97250b6e37c035fa4c2c09c286 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 Nov 2024 14:42:02 +0100 +Subject: pmdomain: core: Add missing put_device() + +From: Ulf Hansson + +[ Upstream commit b8f7bbd1f4ecff6d6277b8c454f62bb0a1c6dbe4 ] + +When removing a genpd we don't clean up the genpd->dev correctly. Let's add +the missing put_device() in genpd_free_data() to fix this. + +Fixes: 401ea1572de9 ("PM / Domain: Add struct device to genpd") +Cc: stable@vger.kernel.org +Signed-off-by: Ulf Hansson +Message-ID: <20241122134207.157283-2-ulf.hansson@linaro.org> +Signed-off-by: Sasha Levin +--- + drivers/base/power/domain.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c +index e01bb359034b..3c44b0313a10 100644 +--- a/drivers/base/power/domain.c ++++ b/drivers/base/power/domain.c +@@ -2012,6 +2012,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd) + + static void genpd_free_data(struct generic_pm_domain *genpd) + { ++ put_device(&genpd->dev); + if (genpd_is_cpu_domain(genpd)) + free_cpumask_var(genpd->cpus); + if (genpd->free_states) +-- +2.39.5 + diff --git a/queue-6.1/sched-core-report-correct-state-for-task_idle-task_f.patch b/queue-6.1/sched-core-report-correct-state-for-task_idle-task_f.patch new file mode 100644 index 00000000000..0e86bc49f18 --- /dev/null +++ b/queue-6.1/sched-core-report-correct-state-for-task_idle-task_f.patch @@ -0,0 +1,54 @@ +From 003832ae24ccdf4177589ca0fa81ce94dee14aa9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 30 Aug 2023 09:04:19 +1000 +Subject: sched/core: Report correct state for TASK_IDLE | TASK_FREEZABLE + +From: NeilBrown + +[ Upstream commit 0d6b35283bcf1a379cf20066544af8e6a6b16b46 ] + +task_state_index() ignores uninteresting state flags (such as +TASK_FREEZABLE) for most states, but for TASK_IDLE and TASK_RTLOCK_WAIT +it does not. + +So if a task is waiting TASK_IDLE|TASK_FREEZABLE it gets incorrectly +reported as TASK_UNINTERRUPTIBLE or "D". (it is planned for nfsd to +change to use this state). + +Fix this by only testing the interesting bits and not the irrelevant +bits in __task_state_index() + +Signed-off-by: NeilBrown +Signed-off-by: Ingo Molnar +Link: https://lore.kernel.org/r/169335025927.5133.4781141800413736103@noble.neil.brown.name +Stable-dep-of: f718faf3940e ("freezer, sched: Report frozen tasks as 'D' instead of 'R'") +Signed-off-by: Sasha Levin +--- + include/linux/sched.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/linux/sched.h b/include/linux/sched.h +index 0cac69902ec5..205a00806835 100644 +--- a/include/linux/sched.h ++++ b/include/linux/sched.h +@@ -1663,7 +1663,7 @@ static inline unsigned int __task_state_index(unsigned int tsk_state, + + BUILD_BUG_ON_NOT_POWER_OF_2(TASK_REPORT_MAX); + +- if (tsk_state == TASK_IDLE) ++ if ((tsk_state & TASK_IDLE) == TASK_IDLE) + state = TASK_REPORT_IDLE; + + /* +@@ -1671,7 +1671,7 @@ static inline unsigned int __task_state_index(unsigned int tsk_state, + * to userspace, we can make this appear as if the task has gone through + * a regular rt_mutex_lock() call. + */ +- if (tsk_state == TASK_RTLOCK_WAIT) ++ if (tsk_state & TASK_RTLOCK_WAIT) + state = TASK_UNINTERRUPTIBLE; + + return fls(state); +-- +2.39.5 + diff --git a/queue-6.1/series b/queue-6.1/series index 30e05e6d805..339b3fd4098 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -41,3 +41,8 @@ mips-probe-toolchain-support-of-msym32.patch mips-mipsregs-set-proper-isa-level-for-virt-extensio.patch net-mlx5e-don-t-call-cleanup-on-profile-rollback-fai.patch bpf-check-validity-of-link-type-in-bpf_link_show_fdi.patch +alsa-hda-realtek-fix-mute-micmute-leds-don-t-work-fo.patch +alsa-hda-realtek-fix-micmute-leds-don-t-work-on-hp-l.patch +pmdomain-core-add-missing-put_device.patch +sched-core-report-correct-state-for-task_idle-task_f.patch +freezer-sched-report-frozen-tasks-as-d-instead-of-r.patch