Commit 0148ac33547b for kernel

commit 0148ac33547b9af1c5a7f3bb6e5baffcb6e9fac2
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Wed Jul 8 22:15:20 2026 -0500

    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: 466a7d115326 ("drm/amd: Use the first non-dGPU PCI device for BW limits")
    Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5436
    Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
    Link: https://patch.msgid.link/20260709031520.841611-1-mario.limonciello@amd.com
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 9ceb4e034a327a04155f32f1cd1a5031dfa5fe02)
    Cc: stable@vger.kernel.org

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 53335ca96b1d..e5f26e5892ba 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1323,6 +1323,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;
 }