Skip to content

Commit

Permalink
drm/amdgpu: ensure no PCIe peer access for CPU XGMI iolinks
Browse files Browse the repository at this point in the history
[Why] Devices with CPU XGMI iolink do not support PCIe peer access.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
(cherry picked from commit b6116052456e26480af9aff29e9d016aeed539d0)

Change-Id: I76c0090638f12adbe05b0b3d29d57fd05cdb626e
  • Loading branch information
Alex Sierra authored and Kent Russell committed Sep 16, 2022
1 parent 9bb33db commit f40f201
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -5588,7 +5588,8 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
adev->gmc.aper_base + adev->gmc.aper_size - 1;

#ifdef CONFIG_PCI_P2PDMA
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);
#endif
return pcie_p2p && p2p_access && (adev->gmc.visible_vram_size &&
Expand Down

0 comments on commit f40f201

Please sign in to comment.