drm/amdkfd: Export DMABufs from KFD using GEM handles

Create GEM handles for exporting DMABufs using GEM-Prime APIs. The GEM
handles are created in a drm_client_dev context to avoid exposing them
in user mode contexts through a DMABuf import.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Felix Kuehling
2023-08-24 14:41:30 -04:00
committed by Alex Deucher
parent 4e95669ecb
commit 1819200166
4 changed files with 44 additions and 9 deletions

View File

@@ -1855,8 +1855,8 @@ static uint32_t get_process_num_bos(struct kfd_process *p)
return num_of_bos;
}
static int criu_get_prime_handle(struct kgd_mem *mem, int flags,
u32 *shared_fd)
static int criu_get_prime_handle(struct kgd_mem *mem,
int flags, u32 *shared_fd)
{
struct dma_buf *dmabuf;
int ret;