summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-04-11 03:27:25 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-04-11 03:27:25 +0000
commit99d184bdf1079a77d71b96bd4742626b690011a2 (patch)
treefca48ae8f62e33580d90ecd0a548a9cf0556a7b6
parenta3462802407371b92db339ffd05aee99c68c372f (diff)
drm/amdgpu: only check for _PR3 on dGPUs
From Alex Deucher fe953e0f77e55d004a5b0c533262e389d01e3198 in linux 5.15.y/5.15.33 85ac2021fe3ace59cc0afd6edf005abad35625b0 in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
index 1c99fd94196..d00a7c9c5f0 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
@@ -2210,8 +2210,10 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
!pci_is_thunderbolt_attached(dev->pdev))
adev->flags |= AMD_IS_PX;
- parent = pci_upstream_bridge(adev->pdev);
- adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
+ if (!(adev->flags & AMD_IS_APU)) {
+ parent = pci_upstream_bridge(adev->pdev);
+ adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
+ }
amdgpu_amdkfd_device_probe(adev);