From a0c0aa62b8748f6ec2fd9325f3127fe4d2701f54 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 18 Oct 2023 01:49:46 +0000 Subject: 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 --- sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') 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); -- cgit v1.2.3