OSDN Git Service

drm/amdkfd: Implement DMA buf fd export from KFD
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 17 Nov 2021 04:15:55 +0000 (23:15 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Feb 2023 19:30:00 +0000 (14:30 -0500)
commitfd234e7581162573742dfb8cc4dc0af3d3148138
treed6b6be5200e1c8c3d9ea5a000e3a8fada599dffe
parent2d81c4cd78477e473dbdedd1dbfb67460fa53c58
drm/amdkfd: Implement DMA buf fd export from KFD

Exports a DMA buf fd of a given KFD buffer handle. This is intended for
being able to import KFD BOs into GEM contexts to leverage the
amdgpu_bo_va API for more flexible virtual address mappings. It will
also be used for the new upstreamable RDMA solution coming to UCX and
RCCL.

The corresponding user mode change (Thunk API and kfdtest) is here:
https://github.com/fxkamd/ROCT-Thunk-Interface/commits/fxkamd/dmabuf

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
include/uapi/linux/kfd_ioctl.h