From: jsg Date: Wed, 18 Oct 2023 01:49:45 +0000 (+0000) Subject: drm/amd: Fix detection of _PR3 on the PCIe root port X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c9d1c6fcd76ec5d83e75b76c31d5e68c68d3796d;p=openbsd 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 --- 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);