diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-10-18 01:49:46 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-10-18 01:49:46 +0000 |
commit | a0c0aa62b8748f6ec2fd9325f3127fe4d2701f54 (patch) | |
tree | 0b2d8688dabdfbd5cbb193cad2fd54de10bcaef7 /sys | |
parent | a272cb756ddb68b14cb4c9c1f307deb18dc0a0a1 (diff) |
drm/amd: Fix detection of _PR3 on the PCIe root port
From Mario Limonciello
c8bd3e12b3291e632ae189619169914743ba77d1 in linux-6.1.y/6.1.57
134b8c5d8674e7cde380f82e9aedfd46dcdd16f7 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index abb3001559e..9573eb6b288 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -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); |