drm/amdgpu: allow pinning DMA-bufs into VRAM if all importers can do P2P
authorChristian König <christian.koenig@amd.com>
Thu, 9 Jan 2025 16:57:56 +0000 (11:57 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Apr 2025 19:18:30 +0000 (15:18 -0400)
commitf5e7fabd1f5c65b2e077efcdb118cfa67eae7311
treea8074530e760019da84cc3e68faa13c69172b572
parent1b5447d773d461b670f29af7c5a9091cff915259
drm/amdgpu: allow pinning DMA-bufs into VRAM if all importers can do P2P

Try pinning into VRAM to allow P2P with RDMA NICs without ODP
support if all attachments can do P2P. If any attachment can't do
P2P just pin into GTT instead.

Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Tested-by: Pak Nin Lui <pak.lui@amd.com>
Cc: Simona Vetter <simona.vetter@ffwll.ch>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c