diff options
author | Mark Brown <broonie@kernel.org> | 2024-06-03 14:45:04 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-06-03 14:45:04 +0300 |
commit | 4ac0f06ca044e3ca938681a0eeb7d52a68b0b30f (patch) | |
tree | 9433afff899211152ff78ed38f9a70ab2bb497fc /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 34864c05a54d1bc544c8c3939aababbc481d99e3 (diff) | |
parent | c3f38fa61af77b49866b006939479069cd451173 (diff) | |
download | linux-4ac0f06ca044e3ca938681a0eeb7d52a68b0b30f.tar.xz |
ASoC: Merge up fixes
We need this to get the i.MX platforms working in CI again.
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 861ccff78af9..932dc93b2e63 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5944,13 +5944,18 @@ static void amdgpu_device_partner_bandwidth(struct amdgpu_device *adev, *speed = PCI_SPEED_UNKNOWN; *width = PCIE_LNK_WIDTH_UNKNOWN; - while ((parent = pci_upstream_bridge(parent))) { - /* skip upstream/downstream switches internal to dGPU*/ - if (parent->vendor == PCI_VENDOR_ID_ATI) - continue; - *speed = pcie_get_speed_cap(parent); - *width = pcie_get_width_cap(parent); - break; + if (amdgpu_device_pcie_dynamic_switching_supported(adev)) { + while ((parent = pci_upstream_bridge(parent))) { + /* skip upstream/downstream switches internal to dGPU*/ + if (parent->vendor == PCI_VENDOR_ID_ATI) + continue; + *speed = pcie_get_speed_cap(parent); + *width = pcie_get_width_cap(parent); + break; + } + } else { + /* use the current speeds rather than max if switching is not supported */ + pcie_bandwidth_available(adev->pdev, NULL, speed, width); } } |