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/gk20a/pmu_gk20a.c | |
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/gk20a/pmu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index e74a5264..f296b57c 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -3132,7 +3132,7 @@ static int gk20a_prepare_ucode(struct gk20a *g) | |||
3132 | struct nvgpu_pmu *pmu = &g->pmu; | 3132 | struct nvgpu_pmu *pmu = &g->pmu; |
3133 | int err = 0; | 3133 | int err = 0; |
3134 | struct mm_gk20a *mm = &g->mm; | 3134 | struct mm_gk20a *mm = &g->mm; |
3135 | struct vm_gk20a *vm = &mm->pmu.vm; | 3135 | struct vm_gk20a *vm = mm->pmu.vm; |
3136 | 3136 | ||
3137 | if (pmu->fw) | 3137 | if (pmu->fw) |
3138 | return gk20a_init_pmu(pmu); | 3138 | return gk20a_init_pmu(pmu); |
@@ -3170,7 +3170,7 @@ static int gk20a_init_pmu_setup_sw(struct gk20a *g) | |||
3170 | { | 3170 | { |
3171 | struct nvgpu_pmu *pmu = &g->pmu; | 3171 | struct nvgpu_pmu *pmu = &g->pmu; |
3172 | struct mm_gk20a *mm = &g->mm; | 3172 | struct mm_gk20a *mm = &g->mm; |
3173 | struct vm_gk20a *vm = &mm->pmu.vm; | 3173 | struct vm_gk20a *vm = mm->pmu.vm; |
3174 | unsigned int i; | 3174 | unsigned int i; |
3175 | int err = 0; | 3175 | int err = 0; |
3176 | u8 *ptr; | 3176 | u8 *ptr; |
@@ -4793,7 +4793,7 @@ int gk20a_pmu_vidmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem, | |||
4793 | u32 size) | 4793 | u32 size) |
4794 | { | 4794 | { |
4795 | struct mm_gk20a *mm = &g->mm; | 4795 | struct mm_gk20a *mm = &g->mm; |
4796 | struct vm_gk20a *vm = &mm->pmu.vm; | 4796 | struct vm_gk20a *vm = mm->pmu.vm; |
4797 | int err; | 4797 | int err; |
4798 | 4798 | ||
4799 | err = nvgpu_dma_alloc_map_vid(vm, size, mem); | 4799 | err = nvgpu_dma_alloc_map_vid(vm, size, mem); |
@@ -4809,7 +4809,7 @@ int gk20a_pmu_sysmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem, | |||
4809 | u32 size) | 4809 | u32 size) |
4810 | { | 4810 | { |
4811 | struct mm_gk20a *mm = &g->mm; | 4811 | struct mm_gk20a *mm = &g->mm; |
4812 | struct vm_gk20a *vm = &mm->pmu.vm; | 4812 | struct vm_gk20a *vm = mm->pmu.vm; |
4813 | int err; | 4813 | int err; |
4814 | 4814 | ||
4815 | err = nvgpu_dma_alloc_map_sys(vm, size, mem); | 4815 | err = nvgpu_dma_alloc_map_sys(vm, size, mem); |