From: Sasha Levin Date: Sat, 20 May 2023 18:13:01 +0000 (-0400) Subject: Fixes for 6.1 X-Git-Tag: v6.3.4~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5881967af94b97b67031ea081d473257bea60efd;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.1 Signed-off-by: Sasha Levin --- diff --git a/queue-6.1/drm-amdgpu-drop-gfx_v11_0_cp_ecc_error_irq_funcs.patch b/queue-6.1/drm-amdgpu-drop-gfx_v11_0_cp_ecc_error_irq_funcs.patch new file mode 100644 index 00000000000..73a37479d0a --- /dev/null +++ b/queue-6.1/drm-amdgpu-drop-gfx_v11_0_cp_ecc_error_irq_funcs.patch @@ -0,0 +1,83 @@ +From 59974466f06e09c1f1c9953dc3ddf6ed00773370 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 4 May 2023 01:46:12 -0400 +Subject: drm/amdgpu: drop gfx_v11_0_cp_ecc_error_irq_funcs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Horatio Zhang + +[ Upstream commit 720b47229a5b24061d1c2e29ddb6043a59178d79 ] + +The gfx.cp_ecc_error_irq is retired in gfx11. In gfx_v11_0_hw_fini still +use amdgpu_irq_put to disable this interrupt, which caused the call trace +in this function. + +[ 102.873958] Call Trace: +[ 102.873959] +[ 102.873961] gfx_v11_0_hw_fini+0x23/0x1e0 [amdgpu] +[ 102.874019] gfx_v11_0_suspend+0xe/0x20 [amdgpu] +[ 102.874072] amdgpu_device_ip_suspend_phase2+0x240/0x460 [amdgpu] +[ 102.874122] amdgpu_device_ip_suspend+0x3d/0x80 [amdgpu] +[ 102.874172] amdgpu_device_pre_asic_reset+0xd9/0x490 [amdgpu] +[ 102.874223] amdgpu_device_gpu_recover.cold+0x548/0xce6 [amdgpu] +[ 102.874321] amdgpu_debugfs_reset_work+0x4c/0x70 [amdgpu] +[ 102.874375] process_one_work+0x21f/0x3f0 +[ 102.874377] worker_thread+0x200/0x3e0 +[ 102.874378] ? process_one_work+0x3f0/0x3f0 +[ 102.874379] kthread+0xfd/0x130 +[ 102.874380] ? kthread_complete_and_exit+0x20/0x20 +[ 102.874381] ret_from_fork+0x22/0x30 + +v2: +- Handle umc and gfx ras cases in separated patch +- Retired the gfx_v11_0_cp_ecc_error_irq_funcs in gfx11 + +v3: +- Improve the subject and code comments +- Add judgment on gfx11 in the function of amdgpu_gfx_ras_late_init + +v4: +- Drop the define of CP_ME1_PIPE_INST_ADDR_INTERVAL and +SET_ECC_ME_PIPE_STATE which using in gfx_v11_0_set_cp_ecc_error_state +- Check cp_ecc_error_irq.funcs rather than ip version for a more +sustainable life + +v5: +- Simplify judgment conditions + +Signed-off-by: Horatio Zhang +Reviewed-by: Hawking Zhang +Acked-by: Christian König +Reviewed-by: Guchun Chen +Reviewed-by: Feifei Xu +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +index 3380daf42da8a..b803e785d3aff 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +@@ -683,9 +683,11 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r + if (r) + return r; + +- r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0); +- if (r) +- goto late_fini; ++ if (adev->gfx.cp_ecc_error_irq.funcs) { ++ r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0); ++ if (r) ++ goto late_fini; ++ } + } else { + amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0); + } +-- +2.39.2 + diff --git a/queue-6.1/platform-x86-hp-wmi-add-micmute-to-hp_wmi_keymap-str.patch b/queue-6.1/platform-x86-hp-wmi-add-micmute-to-hp_wmi_keymap-str.patch new file mode 100644 index 00000000000..fbc89ad1637 --- /dev/null +++ b/queue-6.1/platform-x86-hp-wmi-add-micmute-to-hp_wmi_keymap-str.patch @@ -0,0 +1,36 @@ +From cb877366e32c927a196f3bb5c46cf6d2459ae44e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 25 Apr 2023 01:36:44 -0500 +Subject: platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct + +From: Fae + +[ Upstream commit decab2825c3ef9b154c6f76bce40872ffb41c36f ] + +Fixes micmute key of HP Envy X360 ey0xxx. + +Signed-off-by: Fae +Link: https://lore.kernel.org/r/20230425063644.11828-1-faenkhauser@gmail.com +Cc: stable@vger.kernel.org +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + drivers/platform/x86/hp/hp-wmi.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c +index 4a3851332ef2c..94af7d398a1bf 100644 +--- a/drivers/platform/x86/hp/hp-wmi.c ++++ b/drivers/platform/x86/hp/hp-wmi.c +@@ -211,6 +211,7 @@ struct bios_rfkill2_state { + static const struct key_entry hp_wmi_keymap[] = { + { KE_KEY, 0x02, { KEY_BRIGHTNESSUP } }, + { KE_KEY, 0x03, { KEY_BRIGHTNESSDOWN } }, ++ { KE_KEY, 0x270, { KEY_MICMUTE } }, + { KE_KEY, 0x20e6, { KEY_PROG1 } }, + { KE_KEY, 0x20e8, { KEY_MEDIA } }, + { KE_KEY, 0x2142, { KEY_MEDIA } }, +-- +2.39.2 + diff --git a/queue-6.1/platform-x86-move-existing-hp-drivers-to-a-new-hp-su.patch b/queue-6.1/platform-x86-move-existing-hp-drivers-to-a-new-hp-su.patch new file mode 100644 index 00000000000..971da879739 --- /dev/null +++ b/queue-6.1/platform-x86-move-existing-hp-drivers-to-a-new-hp-su.patch @@ -0,0 +1,250 @@ +From b2e2ba11454524387bfcf1998c5f7a0c100b53bf Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 20 Oct 2022 15:10:28 -0500 +Subject: platform/x86: Move existing HP drivers to a new hp subdir + +From: Jorge Lopez + +[ Upstream commit 6e9b8992b122cb12688bd259fc99e67d1be234eb ] + +The purpose of this patch is to provide a central location where all +HP related drivers are found. HP drivers will recide under +drivers/platform/x86/hp directory. + +Introduce changes to Kconfig file to list all HP driver under "HP X86 +Platform Specific Device Drivers" menu option. Additional changes +include update MAINTAINERS file to indicate hp related drivers new +path. + +Signed-off-by: Jorge Lopez +Link: https://lore.kernel.org/r/20221020201033.12790-2-jorge.lopez2@hp.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Stable-dep-of: decab2825c3e ("platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct") +Signed-off-by: Sasha Levin +--- + MAINTAINERS | 4 +- + drivers/platform/x86/Kconfig | 43 +-------------- + drivers/platform/x86/Makefile | 4 +- + drivers/platform/x86/hp/Kconfig | 63 ++++++++++++++++++++++ + drivers/platform/x86/hp/Makefile | 10 ++++ + drivers/platform/x86/{ => hp}/hp-wmi.c | 0 + drivers/platform/x86/{ => hp}/hp_accel.c | 2 +- + drivers/platform/x86/{ => hp}/tc1100-wmi.c | 0 + 8 files changed, 78 insertions(+), 48 deletions(-) + create mode 100644 drivers/platform/x86/hp/Kconfig + create mode 100644 drivers/platform/x86/hp/Makefile + rename drivers/platform/x86/{ => hp}/hp-wmi.c (100%) + rename drivers/platform/x86/{ => hp}/hp_accel.c (99%) + rename drivers/platform/x86/{ => hp}/tc1100-wmi.c (100%) + +diff --git a/MAINTAINERS b/MAINTAINERS +index 350d7e3ba94f9..301b9ba6af79f 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -9362,7 +9362,7 @@ F: drivers/net/wireless/intersil/hostap/ + HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER + L: platform-driver-x86@vger.kernel.org + S: Orphan +-F: drivers/platform/x86/tc1100-wmi.c ++F: drivers/platform/x86/hp/tc1100-wmi.c + + HPET: High Precision Event Timers driver + M: Clemens Ladisch +@@ -11858,7 +11858,7 @@ M: Eric Piel + S: Maintained + F: Documentation/misc-devices/lis3lv02d.rst + F: drivers/misc/lis3lv02d/ +-F: drivers/platform/x86/hp_accel.c ++F: drivers/platform/x86/hp/hp_accel.c + + LIST KUNIT TEST + M: David Gow +diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig +index b02a8125bc7d5..1396a839dd8a4 100644 +--- a/drivers/platform/x86/Kconfig ++++ b/drivers/platform/x86/Kconfig +@@ -424,24 +424,7 @@ config GPD_POCKET_FAN + of the CPU temperature. Say Y or M if the kernel may be used on a + GPD pocket. + +-config HP_ACCEL +- tristate "HP laptop accelerometer" +- depends on INPUT && ACPI +- depends on SERIO_I8042 +- select SENSORS_LIS3LV02D +- select NEW_LEDS +- select LEDS_CLASS +- help +- This driver provides support for the "Mobile Data Protection System 3D" +- or "3D DriveGuard" feature of HP laptops. On such systems the driver +- should load automatically (via ACPI alias). +- +- Support for a led indicating disk protection will be provided as +- hp::hddprotect. For more information on the feature, refer to +- Documentation/misc-devices/lis3lv02d.rst. +- +- To compile this driver as a module, choose M here: the module will +- be called hp_accel. ++source "drivers/platform/x86/hp/Kconfig" + + config WIRELESS_HOTKEY + tristate "Wireless hotkey button" +@@ -455,30 +438,6 @@ config WIRELESS_HOTKEY + To compile this driver as a module, choose M here: the module will + be called wireless-hotkey. + +-config HP_WMI +- tristate "HP WMI extras" +- depends on ACPI_WMI +- depends on INPUT +- depends on RFKILL || RFKILL = n +- select INPUT_SPARSEKMAP +- select ACPI_PLATFORM_PROFILE +- select HWMON +- help +- Say Y here if you want to support WMI-based hotkeys on HP laptops and +- to read data from WMI such as docking or ambient light sensor state. +- +- To compile this driver as a module, choose M here: the module will +- be called hp-wmi. +- +-config TC1100_WMI +- tristate "HP Compaq TC1100 Tablet WMI Extras" +- depends on !X86_64 +- depends on ACPI +- depends on ACPI_WMI +- help +- This is a driver for the WMI extensions (wireless and bluetooth power +- control) of the HP Compaq TC1100 tablet. +- + config IBM_RTL + tristate "Device driver to enable PRTL support" + depends on PCI +diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile +index 5a428caa654a7..1d3d1b02541b9 100644 +--- a/drivers/platform/x86/Makefile ++++ b/drivers/platform/x86/Makefile +@@ -55,9 +55,7 @@ obj-$(CONFIG_FUJITSU_TABLET) += fujitsu-tablet.o + obj-$(CONFIG_GPD_POCKET_FAN) += gpd-pocket-fan.o + + # Hewlett Packard +-obj-$(CONFIG_HP_ACCEL) += hp_accel.o +-obj-$(CONFIG_HP_WMI) += hp-wmi.o +-obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o ++obj-$(CONFIG_X86_PLATFORM_DRIVERS_HP) += hp/ + + # Hewlett Packard Enterprise + obj-$(CONFIG_UV_SYSFS) += uv_sysfs.o +diff --git a/drivers/platform/x86/hp/Kconfig b/drivers/platform/x86/hp/Kconfig +new file mode 100644 +index 0000000000000..ae165955311ce +--- /dev/null ++++ b/drivers/platform/x86/hp/Kconfig +@@ -0,0 +1,63 @@ ++# SPDX-License-Identifier: GPL-2.0-only ++# ++# X86 Platform Specific Drivers ++# ++menuconfig X86_PLATFORM_DRIVERS_HP ++ bool "HP X86 Platform Specific Device Drivers" ++ depends on X86_PLATFORM_DEVICES ++ help ++ Say Y here to get to see options for device drivers for various ++ HP x86 platforms, including vendor-specific laptop extension drivers. ++ This option alone does not add any kernel code. ++ ++ If you say N, all options in this submenu will be skipped and disabled. ++ ++if X86_PLATFORM_DRIVERS_HP ++ ++config HP_ACCEL ++ tristate "HP laptop accelerometer" ++ default m ++ depends on INPUT && ACPI ++ depends on SERIO_I8042 ++ select SENSORS_LIS3LV02D ++ select NEW_LEDS ++ select LEDS_CLASS ++ help ++ This driver provides support for the "Mobile Data Protection System 3D" ++ or "3D DriveGuard" feature of HP laptops. On such systems the driver ++ should load automatically (via ACPI alias). ++ ++ Support for a led indicating disk protection will be provided as ++ hp::hddprotect. For more information on the feature, refer to ++ Documentation/misc-devices/lis3lv02d.rst. ++ ++ To compile this driver as a module, choose M here: the module will ++ be called hp_accel. ++ ++config HP_WMI ++ tristate "HP WMI extras" ++ default m ++ depends on ACPI_WMI ++ depends on INPUT ++ depends on RFKILL || RFKILL = n ++ select INPUT_SPARSEKMAP ++ select ACPI_PLATFORM_PROFILE ++ select HWMON ++ help ++ Say Y here if you want to support WMI-based hotkeys on HP laptops and ++ to read data from WMI such as docking or ambient light sensor state. ++ ++ To compile this driver as a module, choose M here: the module will ++ be called hp-wmi. ++ ++config TC1100_WMI ++ tristate "HP Compaq TC1100 Tablet WMI Extras" ++ default m ++ depends on !X86_64 ++ depends on ACPI ++ depends on ACPI_WMI ++ help ++ This is a driver for the WMI extensions (wireless and bluetooth power ++ control) of the HP Compaq TC1100 tablet. ++ ++endif # X86_PLATFORM_DRIVERS_HP +diff --git a/drivers/platform/x86/hp/Makefile b/drivers/platform/x86/hp/Makefile +new file mode 100644 +index 0000000000000..db1eed4cd7c7d +--- /dev/null ++++ b/drivers/platform/x86/hp/Makefile +@@ -0,0 +1,10 @@ ++# SPDX-License-Identifier: GPL-2.0 ++# ++# Makefile for linux/drivers/platform/x86/hp ++# HP x86 Platform-Specific Drivers ++# ++ ++# Hewlett Packard ++obj-$(CONFIG_HP_ACCEL) += hp_accel.o ++obj-$(CONFIG_HP_WMI) += hp-wmi.o ++obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o +diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c +similarity index 100% +rename from drivers/platform/x86/hp-wmi.c +rename to drivers/platform/x86/hp/hp-wmi.c +diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp/hp_accel.c +similarity index 99% +rename from drivers/platform/x86/hp_accel.c +rename to drivers/platform/x86/hp/hp_accel.c +index e9f852f7c27ff..6477591747cfd 100644 +--- a/drivers/platform/x86/hp_accel.c ++++ b/drivers/platform/x86/hp/hp_accel.c +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include "../../misc/lis3lv02d/lis3lv02d.h" ++#include "../../../misc/lis3lv02d/lis3lv02d.h" + + /* Delayed LEDs infrastructure ------------------------------------ */ + +diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/hp/tc1100-wmi.c +similarity index 100% +rename from drivers/platform/x86/tc1100-wmi.c +rename to drivers/platform/x86/hp/tc1100-wmi.c +-- +2.39.2 + diff --git a/queue-6.1/series b/queue-6.1/series index fe61841a26a..2520695106c 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -145,3 +145,6 @@ mfd-intel_soc_pmic_chtwc-add-lenovo-yoga-book-x90f-t.patch mfd-dln2-fix-memory-leak-in-dln2_probe.patch mfd-intel-lpss-add-intel-meteor-lake-pch-s-lpss-pci-.patch parisc-replace-regular-spinlock-with-spin_trylock-on.patch +platform-x86-move-existing-hp-drivers-to-a-new-hp-su.patch +platform-x86-hp-wmi-add-micmute-to-hp_wmi_keymap-str.patch +drm-amdgpu-drop-gfx_v11_0_cp_ecc_error_irq_funcs.patch