]> Git Repo - linux.git/commitdiff
drm/amdgpu: ensure no PCIe peer access for CPU XGMI iolinks
authorAlex Sierra <[email protected]>
Thu, 25 Aug 2022 20:42:08 +0000 (15:42 -0500)
committerAlex Deucher <[email protected]>
Tue, 30 Aug 2022 21:07:43 +0000 (17:07 -0400)
[Why] Devices with CPU XGMI iolink do not support PCIe peer access.

Signed-off-by: Alex Sierra <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index f095a2513affc2a58150e9213400e92ab237dadc..1400abee9f402e3785374516a21105d7120a7ea7 100644 (file)
@@ -5524,7 +5524,8 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
                ~*peer_adev->dev->dma_mask : ~((1ULL << 32) - 1);
        resource_size_t aper_limit =
                adev->gmc.aper_base + adev->gmc.aper_size - 1;
-       bool p2p_access = !(pci_p2pdma_distance_many(adev->pdev,
+       bool p2p_access = !adev->gmc.xgmi.connected_to_cpu &&
+                         !(pci_p2pdma_distance_many(adev->pdev,
                                        &peer_adev->dev, 1, true) < 0);
 
        return pcie_p2p && p2p_access && (adev->gmc.visible_vram_size &&
This page took 0.066213 seconds and 4 git commands to generate.