From f5f959a3fa55f1320d42c77568d9c5166eeb22a5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 6 Nov 2023 12:33:57 +0100 Subject: [PATCH] 5.15-stable patches 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 --- ...able-aspm-for-vi-w-all-intel-systems.patch | 40 ++++++++++++ ...amic-speed-switch-check-out-of-smu13.patch | 62 +++++++++++++++++++ queue-5.15/series | 2 + 3 files changed, 104 insertions(+) create mode 100644 queue-5.15/drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch create mode 100644 queue-5.15/drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch 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 index 00000000000..bceb3812c49 --- /dev/null +++ b/queue-5.15/drm-amd-disable-aspm-for-vi-w-all-intel-systems.patch @@ -0,0 +1,40 @@ +From 64ffd2f1d00c6235dabe9704bbb0d9ce3e28147f Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +Date: Fri, 20 Oct 2023 10:26:29 -0500 +Subject: drm/amd: Disable ASPM for VI w/ all Intel systems + +From: Mario Limonciello + +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 +Closes: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2036742 +Signed-off-by: Mario Limonciello +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Mario Limonciello +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..156fa1bee8e --- /dev/null +++ b/queue-5.15/drm-amd-move-helper-for-dynamic-speed-switch-check-out-of-smu13.patch @@ -0,0 +1,62 @@ +From 188623076d0f1a500583d392b6187056bf7cc71a Mon Sep 17 00:00:00 2001 +From: Mario Limonciello +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 + +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 +Reviewed-by: Evan Quan +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org # 6.1.x +Signed-off-by: Mario Limonciello +Signed-off-by: Greg Kroah-Hartman +--- + 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 + * diff --git a/queue-5.15/series b/queue-5.15/series index e1add43375f..ad7871f935b 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -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 -- 2.47.3