summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.c
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/gp10b/rpfb_gp10b.c
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/gp10b/rpfb_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/rpfb_gp10b.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.c b/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.c
index 0fb4248c..56786929 100644
--- a/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.c
@@ -28,7 +28,7 @@ int gp10b_replayable_pagefault_buffer_init(struct gk20a *g)
28{ 28{
29 u32 addr_lo; 29 u32 addr_lo;
30 u32 addr_hi; 30 u32 addr_hi;
31 struct vm_gk20a *vm = &g->mm.bar2.vm; 31 struct vm_gk20a *vm = g->mm.bar2.vm;
32 int err; 32 int err;
33 size_t rbfb_size = NV_UVM_FAULT_BUF_SIZE * 33 size_t rbfb_size = NV_UVM_FAULT_BUF_SIZE *
34 fifo_replay_fault_buffer_size_hw_entries_v(); 34 fifo_replay_fault_buffer_size_hw_entries_v();
@@ -57,7 +57,7 @@ int gp10b_replayable_pagefault_buffer_init(struct gk20a *g)
57 57
58void gp10b_replayable_pagefault_buffer_deinit(struct gk20a *g) 58void gp10b_replayable_pagefault_buffer_deinit(struct gk20a *g)
59{ 59{
60 struct vm_gk20a *vm = &g->mm.bar2.vm; 60 struct vm_gk20a *vm = g->mm.bar2.vm;
61 61
62 nvgpu_dma_unmap_free(vm, &g->mm.bar2_desc); 62 nvgpu_dma_unmap_free(vm, &g->mm.bar2_desc);
63} 63}