summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
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/vgpu/mm_vgpu.c
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/vgpu/mm_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/mm_vgpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
index b42fbcb3..b8b5985c 100644
--- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
@@ -106,7 +106,7 @@ static u64 vgpu_locked_gmmu_map(struct vm_gk20a *vm,
106 106
107 /* Allocate (or validate when map_offset != 0) the virtual address. */ 107 /* Allocate (or validate when map_offset != 0) the virtual address. */
108 if (!map_offset) { 108 if (!map_offset) {
109 map_offset = gk20a_vm_alloc_va(vm, size, 109 map_offset = __nvgpu_vm_alloc_va(vm, size,
110 pgsz_idx); 110 pgsz_idx);
111 if (!map_offset) { 111 if (!map_offset) {
112 nvgpu_err(g, "failed to allocate va space\n"); 112 nvgpu_err(g, "failed to allocate va space\n");
@@ -180,7 +180,7 @@ static void vgpu_locked_gmmu_unmap(struct vm_gk20a *vm,
180 gk20a_dbg_fn(""); 180 gk20a_dbg_fn("");
181 181
182 if (va_allocated) { 182 if (va_allocated) {
183 err = gk20a_vm_free_va(vm, vaddr, size, pgsz_idx); 183 err = __nvgpu_vm_free_va(vm, vaddr, pgsz_idx);
184 if (err) { 184 if (err) {
185 dev_err(dev_from_vm(vm), 185 dev_err(dev_from_vm(vm),
186 "failed to free va"); 186 "failed to free va");