drm/amd: Fix detection of _PR3 on the PCIe root port
authorjsg <jsg@openbsd.org>
Wed, 18 Oct 2023 01:49:45 +0000 (01:49 +0000)
committerjsg <jsg@openbsd.org>
Wed, 18 Oct 2023 01:49:45 +0000 (01:49 +0000)
From Mario Limonciello
c8bd3e12b3291e632ae189619169914743ba77d1 in linux-6.1.y/6.1.57
134b8c5d8674e7cde380f82e9aedfd46dcdd16f7 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c

index abb3001..9573eb6 100644 (file)
@@ -2215,8 +2215,12 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
                adev->flags |= AMD_IS_PX;
 
        if (!(adev->flags & AMD_IS_APU)) {
-               parent = pci_upstream_bridge(adev->pdev);
+#ifdef notyet
+               parent = pcie_find_root_port(adev->pdev);
                adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
+#else
+               adev->has_pr3 = false;
+#endif
        }
 
        amdgpu_amdkfd_device_probe(adev);