summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-05-09 21:34:54 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-06 20:09:16 -0400
commitc21f5bca9ae81804130e30ea3e6f7a18d51203dc (patch)
treefb1a2d67532df19d70468610ad2a62c3464876c1 /drivers/gpu/nvgpu/vgpu
parentc2b63150cd947557b8d17637258b988459b8e0ec (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/vgpu')
-rw-r--r--drivers/gpu/nvgpu/vgpu/mm_vgpu.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
index b2bc6f0a..a4ffc7e8 100644
--- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
@@ -31,8 +31,6 @@
31static int vgpu_init_mm_setup_sw(struct gk20a *g) 31static int vgpu_init_mm_setup_sw(struct gk20a *g)
32{ 32{
33 struct mm_gk20a *mm = &g->mm; 33 struct mm_gk20a *mm = &g->mm;
34 struct vm_gk20a *vm = &mm->pmu.vm;
35 u32 big_page_size = gk20a_get_platform(g->dev)->default_big_page_size;
36 34
37 gk20a_dbg_fn(""); 35 gk20a_dbg_fn("");
38 36
@@ -54,11 +52,6 @@ static int vgpu_init_mm_setup_sw(struct gk20a *g)
54 (int)(mm->channel.user_size >> 20), 52 (int)(mm->channel.user_size >> 20),
55 (int)(mm->channel.kernel_size >> 20)); 53 (int)(mm->channel.kernel_size >> 20));
56 54
57 /* gk20a_init_gpu_characteristics expects this to be populated */
58 vm->big_page_size = big_page_size;
59 vm->mmu_levels = (vm->big_page_size == SZ_64K) ?
60 gk20a_mm_levels_64k : gk20a_mm_levels_128k;
61
62 mm->sw_ready = true; 55 mm->sw_ready = true;
63 56
64 return 0; 57 return 0;