diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2018-11-20 21:00:29 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-12-07 18:13:54 -0500 |
commit | 1dde0ea95b782425b95455d487cb44991525a1d1 (patch) | |
tree | 2033a93a0417699fca78f5e42f1a7512e80c5a76 /drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |
parent | 3704d56e1a64bb0e951815f91149ae7bb726aa76 (diff) |
drm/amdkfd: Add DMABuf import functionality
This is used for interoperability between ROCm compute and graphics
APIs. It allows importing graphics driver BOs into the ROCm SVM
address space for zero-copy GPU access.
The API is split into two steps (query and import) to allow user mode
to manage the virtual address space allocation for the imported buffer.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c index 3e44d889f7af..71913a18d142 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | |||
@@ -39,8 +39,6 @@ | |||
39 | #include <drm/amdgpu_drm.h> | 39 | #include <drm/amdgpu_drm.h> |
40 | #include <linux/dma-buf.h> | 40 | #include <linux/dma-buf.h> |
41 | 41 | ||
42 | static const struct dma_buf_ops amdgpu_dmabuf_ops; | ||
43 | |||
44 | /** | 42 | /** |
45 | * amdgpu_gem_prime_get_sg_table - &drm_driver.gem_prime_get_sg_table | 43 | * amdgpu_gem_prime_get_sg_table - &drm_driver.gem_prime_get_sg_table |
46 | * implementation | 44 | * implementation |
@@ -332,7 +330,7 @@ static int amdgpu_gem_begin_cpu_access(struct dma_buf *dma_buf, | |||
332 | return ret; | 330 | return ret; |
333 | } | 331 | } |
334 | 332 | ||
335 | static const struct dma_buf_ops amdgpu_dmabuf_ops = { | 333 | const struct dma_buf_ops amdgpu_dmabuf_ops = { |
336 | .attach = amdgpu_gem_map_attach, | 334 | .attach = amdgpu_gem_map_attach, |
337 | .detach = amdgpu_gem_map_detach, | 335 | .detach = amdgpu_gem_map_detach, |
338 | .map_dma_buf = drm_gem_map_dma_buf, | 336 | .map_dma_buf = drm_gem_map_dma_buf, |