drm/amdgpu: Fail DMABUF map of XGMI-accessible memory
authorFelix Kuehling <felix.kuehling@amd.com>
Thu, 17 Apr 2025 16:02:09 +0000 (12:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Apr 2025 22:05:02 +0000 (18:05 -0400)
commitdbe4c63689bc6b5fd3ab72650ea4b6a667e96a68
tree05683f4b8308917fd0fd28a14840fcf2d72733c0
parent727b77df826b44853476d6e8690fec4cf5515eca
drm/amdgpu: Fail DMABUF map of XGMI-accessible memory

If peer memory is XGMI-accessible, we should never access it through PCIe
P2P DMA mappings. PCIe P2P is slower, has different coherence behaviour,
limited or no support for atomics, or may not work at all. Fail with a
warning if DMABUF mappings of such memory are attempted.

Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c