]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Nov 2023 11:33:57 +0000 (12:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Nov 2023 11:33:57 +0000 (12:33 +0100)
added patches:
drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch
drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch

queue-5.15/drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch [new file with mode: 0644]
queue-5.15/drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch b/queue-5.15/drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch
new file mode 100644 (file)
index 0000000..bceb381
--- /dev/null
@@ -0,0 +1,40 @@
+From 64ffd2f1d00c6235dabe9704bbb0d9ce3e28147f Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello@amd.com>
+Date: Fri, 20 Oct 2023 10:26:29 -0500
+Subject: drm/amd: Disable ASPM for VI w/ all Intel systems
+
+From: Mario Limonciello <mario.limonciello@amd.com>
+
+commit 64ffd2f1d00c6235dabe9704bbb0d9ce3e28147f upstream.
+
+Originally we were quirking ASPM disabled specifically for VI when
+used with Alder Lake, but it appears to have problems with Rocket
+Lake as well.
+
+Like we've done in the case of dpm for newer platforms, disable
+ASPM for all Intel systems.
+
+Cc: stable@vger.kernel.org # 5.15+
+Fixes: 0064b0ce85bb ("drm/amd/pm: enable ASPM by default")
+Reported-and-tested-by: Paolo Gentili <paolo.gentili@canonical.com>
+Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/vi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/vi.c
++++ b/drivers/gpu/drm/amd/amdgpu/vi.c
+@@ -1147,7 +1147,7 @@ static void vi_program_aspm(struct amdgp
+       bool bL1SS = false;
+       bool bClkReqSupport = true;
+-      if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_aspm_support_quirk())
++      if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_pcie_dynamic_switching_supported())
+               return;
+       if (adev->flags & AMD_IS_APU ||
diff --git a/queue-5.15/drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch b/queue-5.15/drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch
new file mode 100644 (file)
index 0000000..156fa1b
--- /dev/null
@@ -0,0 +1,62 @@
+From 188623076d0f1a500583d392b6187056bf7cc71a Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello@amd.com>
+Date: Fri, 7 Jul 2023 21:26:08 -0500
+Subject: drm/amd: Move helper for dynamic speed switch check out of smu13
+
+From: Mario Limonciello <mario.limonciello@amd.com>
+
+commit 188623076d0f1a500583d392b6187056bf7cc71a upstream.
+
+This helper is used for checking if the connected host supports
+the feature, it can be moved into generic code to be used by other
+smu implementations as well.
+
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.1.x
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h        |    1 +
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   19 +++++++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -1285,6 +1285,7 @@ int amdgpu_device_gpu_recover(struct amd
+ void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
+ int amdgpu_device_pci_reset(struct amdgpu_device *adev);
+ bool amdgpu_device_need_post(struct amdgpu_device *adev);
++bool amdgpu_device_pcie_dynamic_switching_supported(void);
+ bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
+ bool amdgpu_device_aspm_support_quirk(void);
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -1319,6 +1319,25 @@ bool amdgpu_device_need_post(struct amdg
+       return true;
+ }
++/*
++ * Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
++ * speed switching. Until we have confirmation from Intel that a specific host
++ * supports it, it's safer that we keep it disabled for all.
++ *
++ * https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/005/pci-express-support/
++ * https://gitlab.freedesktop.org/drm/amd/-/issues/2663
++ */
++bool amdgpu_device_pcie_dynamic_switching_supported(void)
++{
++#if IS_ENABLED(CONFIG_X86)
++      struct cpuinfo_x86 *c = &cpu_data(0);
++
++      if (c->x86_vendor == X86_VENDOR_INTEL)
++              return false;
++#endif
++      return true;
++}
++
+ /**
+  * amdgpu_device_should_use_aspm - check if the device should program ASPM
+  *
index e1add43375fdf7247abc4c915ac0fe810522326e..ad7871f935be0d52deb294b2bd40d742febb7dfc 100644 (file)
@@ -109,3 +109,5 @@ can-isotp-handle-wait_event_interruptible-return-values.patch
 can-isotp-add-local-echo-tx-processing-and-tx-without-fc.patch
 can-isotp-isotp_bind-do-not-validate-unused-address-information.patch
 can-isotp-isotp_sendmsg-fix-tx-state-detection-and-wait-behavior.patch
+drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch
+drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch