[PATCH] drm/amdgpu: ensure no PCIe peer access for CPU XGMI iolinks
Felix Kuehling
felix.kuehling at amd.com
Mon Aug 29 15:25:58 UTC 2022
Am 2022-08-29 um 11:00 schrieb Alex Sierra:
> [Why] Devices with CPU XGMI iolink do not support PCIe peer access.
>
> Signed-off-by: Alex Sierra <alex.sierra at amd.com>
> Acked-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index ce7d117efdb5..afaa1056e039 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -5532,7 +5532,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 &&
More information about the amd-gfx
mailing list