diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-09-07 19:45:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-18 19:00:37 -0400 |
commit | 0853109c9994d1375a10d13ae254690a4a4c9610 (patch) | |
tree | 339adb7e8e74c8e0085b24ed9e50181a9aafa3ee /drivers/gpu/nvgpu/include | |
parent | b3446bc0b6fca6cb992667f80a95f8503b6a652a (diff) |
gpu: nvgpu: Refactoring nvgpu_vm functions
Refactor the last nvgpu_vm functions from the mm_gk20a.c code. This
removes some usages of dma_buf from the mm_gk20a.c code, too, which
helps make mm_gk20a.c less Linux specific.
Also delete some header files that are no longer necessary in
gk20a/mm_gk20a.c which are Linux specific. The mm_gk20a.c code is now
quite close to being Linux free.
JIRA NVGPU-30
JIRA NVGPU-138
Change-Id: I72b370bd85a7b029768b0fb4827d6abba42007c3
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1566629
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vm.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h index f8868065..8c56461c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h | |||
@@ -31,9 +31,10 @@ | |||
31 | #include <nvgpu/nvgpu_mem.h> | 31 | #include <nvgpu/nvgpu_mem.h> |
32 | #include <nvgpu/allocator.h> | 32 | #include <nvgpu/allocator.h> |
33 | 33 | ||
34 | struct dma_buf; | ||
35 | |||
34 | struct vm_gk20a; | 36 | struct vm_gk20a; |
35 | struct nvgpu_vm_area; | 37 | struct nvgpu_vm_area; |
36 | struct buffer_attrs; | ||
37 | struct gk20a_comptag_allocator; | 38 | struct gk20a_comptag_allocator; |
38 | 39 | ||
39 | /** | 40 | /** |
@@ -212,6 +213,7 @@ int nvgpu_vm_unmap_buffer(struct vm_gk20a *vm, u64 offset, | |||
212 | 213 | ||
213 | void nvgpu_vm_unmap_locked(struct nvgpu_mapped_buf *mapped_buffer, | 214 | void nvgpu_vm_unmap_locked(struct nvgpu_mapped_buf *mapped_buffer, |
214 | struct vm_gk20a_mapping_batch *batch); | 215 | struct vm_gk20a_mapping_batch *batch); |
216 | void nvgpu_vm_unmap_locked_ref(struct nvgpu_ref *ref); | ||
215 | 217 | ||
216 | /* | 218 | /* |
217 | * These all require the VM update lock to be held. | 219 | * These all require the VM update lock to be held. |
@@ -223,9 +225,6 @@ struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_range( | |||
223 | struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_less_than( | 225 | struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_less_than( |
224 | struct vm_gk20a *vm, u64 addr); | 226 | struct vm_gk20a *vm, u64 addr); |
225 | 227 | ||
226 | int nvgpu_vm_find_buf(struct vm_gk20a *vm, u64 gpu_va, | ||
227 | struct dma_buf **dmabuf, | ||
228 | u64 *offset); | ||
229 | int nvgpu_insert_mapped_buf(struct vm_gk20a *vm, | 228 | int nvgpu_insert_mapped_buf(struct vm_gk20a *vm, |
230 | struct nvgpu_mapped_buf *mapped_buffer); | 229 | struct nvgpu_mapped_buf *mapped_buffer); |
231 | void nvgpu_remove_mapped_buf(struct vm_gk20a *vm, | 230 | void nvgpu_remove_mapped_buf(struct vm_gk20a *vm, |