Skip to contentSkip to conversation

drm/amdgpu: Disable PCIe dynamic speed switching on Ryzen Pinnacle Ridge

PATCH In review Mario Limonciello 2 participants 2 messages Jul 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Disable PCIe dynamic speed switching on Ryzen Pinnacle Ridge

AMD Ryzen Pinnacle Ridge (Zen+, family 0x17 model 0x08) CPUs have PCI controllers that don't support PCIe dynamic speed switching, causing system freezes during GPU initialization when enabled.

Disable dynamic speed switching when this CPU is detected.

Assisted-by Claude:sonnet
Fixes 466a7d115326e ("drm/amd: Use the first non-dGPU PCI device for BW limits")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +9 -0
index 27f7a841cd623..f8324712b712c 100644
@@ -1289,6 +1289,15 @@ static bool amdgpu_device_pcie_dynamic_switching_supported(struct amdgpu_device
 
 	if (c->x86_vendor == X86_VENDOR_INTEL)
 		return false;
+
+	/*
+	 * AMD Ryzen Pinnacle Ridge (Zen+, family 0x17 model 0x08) CPUs don't
+	 * support PCIe dynamic speed switching.
+	 * https://gitlab.freedesktop.org/drm/amd/-/work_items/5436
+	 */
+	if (c->x86_vendor == X86_VENDOR_AMD && c->x86 == 0x17 &&
+	    c->x86_model == 0x08)
+		return false;
 #endif
 	return true;
 }
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Mario Limonciello

AMD Ryzen Pinnacle Ridge (Zen+, family 0x17 model 0x08) CPUs have PCI controllers that don't support PCIe dynamic speed switching, causing system freezes during GPU initialization when enabled.

Disable dynamic speed switching when this CPU is detected.

Assisted-by Claude:sonnet
Fixes 466a7d115326e ("drm/amd: Use the first non-dGPU PCI device for BW limits")
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 27f7a841cd623..f8324712b712c 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static bool amdgpu_device_pcie_dynamic_switching_supported(struct amdgpu_device · line 1297

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -0
@@ -1289,6 +1289,15 @@ static bool amdgpu_device_pcie_dynamic_switching_supported(struct amdgpu_device
 
  	if (c->x86_vendor == X86_VENDOR_INTEL)
  		return false;
+
+	/*
+	 * AMD Ryzen Pinnacle Ridge (Zen+, family 0x17 model 0x08) CPUs don't
+	 * support PCIe dynamic speed switching.
+	 * https://gitlab.freedesktop.org/drm/amd/-/work_items/5436
+	 */

Assited-by effect is visibly seen :)

As per rev guide, Gen3 switch hang is common in 0x17/00-0F.

Thanks,
Lijo

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
+	if (c->x86_vendor == X86_VENDOR_AMD && c->x86 == 0x17 &&
+	    c->x86_model == 0x08)
+		return false;
  #endif
  	return true;
  }