diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-05-09 21:34:54 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-06 20:09:16 -0400 |
commit | c21f5bca9ae81804130e30ea3e6f7a18d51203dc (patch) | |
tree | fb1a2d67532df19d70468610ad2a62c3464876c1 /drivers/gpu/nvgpu/include | |
parent | c2b63150cd947557b8d17637258b988459b8e0ec (diff) |
gpu: nvgpu: Remove extraneous VM init/deinit APIs
Support only VM pointers and ref-counting for maintaining VMs. This
dramatically reduces the complexity of the APIs, avoids the API
abuse that has existed, and ensures that future VM usage is
consistent with current usage.
Also remove the combined VM free/instance block deletion. Any place
where this was done is now replaced with an explict free of the
instance block and a nvgpu_vm_put().
JIRA NVGPU-12
JIRA NVGPU-30
Change-Id: Ib73e8d574ecc9abf6dad0b40a2c5795d6396cc8c
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1480227
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vm.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h index 403f3b18..f6d88cc3 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h | |||
@@ -225,20 +225,14 @@ int nvgpu_insert_mapped_buf(struct vm_gk20a *vm, | |||
225 | void nvgpu_remove_mapped_buf(struct vm_gk20a *vm, | 225 | void nvgpu_remove_mapped_buf(struct vm_gk20a *vm, |
226 | struct nvgpu_mapped_buf *mapped_buffer); | 226 | struct nvgpu_mapped_buf *mapped_buffer); |
227 | 227 | ||
228 | void nvgpu_deinit_vm(struct vm_gk20a *vm); | 228 | struct vm_gk20a *nvgpu_vm_init(struct gk20a *g, |
229 | void __nvgpu_vm_remove(struct vm_gk20a *vm); | 229 | u32 big_page_size, |
230 | void nvgpu_vm_remove(struct vm_gk20a *vm); | 230 | u64 low_hole, |
231 | void nvgpu_vm_remove_inst(struct vm_gk20a *vm, struct nvgpu_mem *inst_block); | 231 | u64 kernel_reserved, |
232 | 232 | u64 aperture_size, | |
233 | int nvgpu_init_vm(struct mm_gk20a *mm, | 233 | bool big_pages, |
234 | struct vm_gk20a *vm, | 234 | bool userspace_managed, |
235 | u32 big_page_size, | 235 | char *name); |
236 | u64 low_hole, | ||
237 | u64 kernel_reserved, | ||
238 | u64 aperture_size, | ||
239 | bool big_pages, | ||
240 | bool userspace_managed, | ||
241 | char *name); | ||
242 | 236 | ||
243 | /* | 237 | /* |
244 | * These are private to the VM code but are unfortunately used by the vgpu code. | 238 | * These are private to the VM code but are unfortunately used by the vgpu code. |