drm/amd: Move helper for dynamic speed switch check out of smu13
PATCH v2 1/2 drm/amd: Move helper for dynamic speed switch check out of smu13
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.
The original problematic dGPU is not supported in 5.15.
Just introduce new function for 5.15 as a dependency for fixing unrelated dGPU that uses this symbol as well.
---v1->v2:
* Update commit to 6.5-rc2 commit.
It merged as both of these:
188623076d0f1a500583d392b6187056bf7cc71a 5d1eb4c4c872b55664f5754cc16827beff8630a7 It's already been backported into 6.1.y as well.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
@@ -1285,6 +1285,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,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 );
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +19 -0
@@ -1319,6 +1319,25 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)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 *
Signature · 1 line
2.34.1
PATCH v2 2/2 drm/amd: Disable ASPM for VI w/ all Intel systems
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.
(cherry-picked from 64ffd2f1d00c6235dabe9704bbb0d9ce3e28147f)
--- drivers/gpu/drm/amd/amdgpu/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vi.c +1 -1
@@ -1147,7 +1147,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)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 ||
Signature · 1 line
2.34.1
Greg KH
maintainerQuoted 9 lines · Mario Limonciello
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 <[email protected]>Reviewed-by Evan Quan <[email protected]>Signed-off-by Alex Deucher <[email protected]>(cherry picked from commit 188623076d0f1a500583d392b6187056bf7cc71a)
Quoted 6 lines
The original problematic dGPU is not supported in 5.15.
Just introduce new function for 5.15 as a dependency for fixing unrelated dGPU that uses this symbol as well.
Signed-off-by Mario Limonciello <[email protected]>
Both now queued up, thanks.
greg k-h