From d5384cd02b8fa180746611138f221fb28cccb64c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 29 Apr 2024 13:45:20 +0200 Subject: [PATCH] 5.4-stable patches added patches: arm64-dts-rockchip-enable-internal-pull-up-for-q7_thrm-on-rk3399-puma.patch drm-amdgpu-fix-leak-when-gpu-memory-allocation-fails.patch --- ...l-pull-up-for-q7_thrm-on-rk3399-puma.patch | 45 +++++++++++++++++++ ...eak-when-gpu-memory-allocation-fails.patch | 31 +++++++++++++ queue-5.4/series | 2 + 3 files changed, 78 insertions(+) create mode 100644 queue-5.4/arm64-dts-rockchip-enable-internal-pull-up-for-q7_thrm-on-rk3399-puma.patch create mode 100644 queue-5.4/drm-amdgpu-fix-leak-when-gpu-memory-allocation-fails.patch diff --git a/queue-5.4/arm64-dts-rockchip-enable-internal-pull-up-for-q7_thrm-on-rk3399-puma.patch b/queue-5.4/arm64-dts-rockchip-enable-internal-pull-up-for-q7_thrm-on-rk3399-puma.patch new file mode 100644 index 00000000000..3de42c365ed --- /dev/null +++ b/queue-5.4/arm64-dts-rockchip-enable-internal-pull-up-for-q7_thrm-on-rk3399-puma.patch @@ -0,0 +1,45 @@ +From 0ac417b8f124427c90ec8c2ef4f632b821d924cc Mon Sep 17 00:00:00 2001 +From: Iskander Amara +Date: Fri, 8 Mar 2024 09:52:42 +0100 +Subject: arm64: dts: rockchip: enable internal pull-up for Q7_THRM# on RK3399 Puma + +From: Iskander Amara + +commit 0ac417b8f124427c90ec8c2ef4f632b821d924cc upstream. + +Q7_THRM# pin is connected to a diode on the module which is used +as a level shifter, and the pin have a pull-down enabled by +default. We need to configure it to internal pull-up, other- +wise whenever the pin is configured as INPUT and we try to +control it externally the value will always remain zero. + +Signed-off-by: Iskander Amara +Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") +Reviewed-by: Quentin Schulz +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240308085243.69903-1-iskander.amara@theobroma-systems.com +Signed-off-by: Heiko Stuebner +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +@@ -431,6 +431,16 @@ + }; + + &pinctrl { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&q7_thermal_pin>; ++ ++ gpios { ++ q7_thermal_pin: q7-thermal-pin { ++ rockchip,pins = ++ <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ + i2c8 { + i2c8_xfer_a: i2c8-xfer { + rockchip,pins = diff --git a/queue-5.4/drm-amdgpu-fix-leak-when-gpu-memory-allocation-fails.patch b/queue-5.4/drm-amdgpu-fix-leak-when-gpu-memory-allocation-fails.patch new file mode 100644 index 00000000000..80f0711b548 --- /dev/null +++ b/queue-5.4/drm-amdgpu-fix-leak-when-gpu-memory-allocation-fails.patch @@ -0,0 +1,31 @@ +From 25e9227c6afd200bed6774c866980b8e36d033af Mon Sep 17 00:00:00 2001 +From: Mukul Joshi +Date: Thu, 18 Apr 2024 11:32:34 -0400 +Subject: drm/amdgpu: Fix leak when GPU memory allocation fails + +From: Mukul Joshi + +commit 25e9227c6afd200bed6774c866980b8e36d033af upstream. + +Free the sync object if the memory allocation fails for any +reason. + +Signed-off-by: Mukul Joshi +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +@@ -1204,6 +1204,7 @@ allocate_init_user_pages_failed: + err_bo_create: + unreserve_mem_limit(adev, size, alloc_domain, !!sg); + err_reserve_limit: ++ amdgpu_sync_free(&(*mem)->sync); + mutex_destroy(&(*mem)->lock); + kfree(*mem); + err: diff --git a/queue-5.4/series b/queue-5.4/series index 0bd22d38c18..669cef5f310 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -88,3 +88,5 @@ tracing-increase-perf_max_trace_size-to-handle-sentinel1-and-docker-together.pat bluetooth-fix-type-of-len-in-l2cap-sco-_sock_getsockopt_old.patch bluetooth-btusb-add-realtek-rtl8852be-support-id-0x0bda-0x4853.patch btrfs-fix-information-leak-in-btrfs_ioctl_logical_to_ino.patch +arm64-dts-rockchip-enable-internal-pull-up-for-q7_thrm-on-rk3399-puma.patch +drm-amdgpu-fix-leak-when-gpu-memory-allocation-fails.patch -- 2.39.5