summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-04-26 17:27:02 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-24 15:14:13 -0400
commitb70bad4b9f40e94f731fd9d509e1f3f6617f0b05 (patch)
tree21bfaf082aeb7662eb194f72c5f33a36c7cb7bdc /drivers/gpu/nvgpu/include
parent92fe030e5250409ecd500dcf719547f3fb0f1873 (diff)
gpu: nvgpu: Refactor gk20a_vm_alloc_va()
This function is an internal function to the VM manager that allocates virtual memory space in the GVA allocator. It is unfortunately used in the vGPU code, though. In any event, this patch cleans up and moves the implementation of these functions into the VM common code. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: I24a3d29b5fcb12615df27d2ac82891d1bacfe541 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1477745 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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h
index 69c08c77..fb55483d 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vm.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h
@@ -242,4 +242,17 @@ int nvgpu_init_vm(struct mm_gk20a *mm,
242 char *name); 242 char *name);
243void nvgpu_deinit_vm(struct vm_gk20a *vm); 243void nvgpu_deinit_vm(struct vm_gk20a *vm);
244 244
245/*
246 * These are private to the VM code but are unfortunately used by the vgpu code.
247 * It appears to be used for an optimization in reducing the number of server
248 * requests to the vgpu server. Basically the vgpu implementation of
249 * map_global_ctx_buffers() sends a bunch of VA ranges over to the RM server.
250 * Ideally the RM server can just batch mappings but until such a time this
251 * will be used by the vgpu code.
252 */
253u64 __nvgpu_vm_alloc_va(struct vm_gk20a *vm, u64 size,
254 enum gmmu_pgsz_gk20a pgsz_idx);
255int __nvgpu_vm_free_va(struct vm_gk20a *vm, u64 addr,
256 enum gmmu_pgsz_gk20a pgsz_idx);
257
245#endif 258#endif