From c21f5bca9ae81804130e30ea3e6f7a18d51203dc Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 10 May 2017 02:34:54 +0100 Subject: 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 Reviewed-on: http://git-master/r/1480227 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c') 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) struct nvgpu_pmu *pmu = &g->pmu; int err = 0; struct mm_gk20a *mm = &g->mm; - struct vm_gk20a *vm = &mm->pmu.vm; + struct vm_gk20a *vm = mm->pmu.vm; if (pmu->fw) return gk20a_init_pmu(pmu); @@ -3170,7 +3170,7 @@ static int gk20a_init_pmu_setup_sw(struct gk20a *g) { struct nvgpu_pmu *pmu = &g->pmu; struct mm_gk20a *mm = &g->mm; - struct vm_gk20a *vm = &mm->pmu.vm; + struct vm_gk20a *vm = mm->pmu.vm; unsigned int i; int err = 0; u8 *ptr; @@ -4793,7 +4793,7 @@ int gk20a_pmu_vidmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem, u32 size) { struct mm_gk20a *mm = &g->mm; - struct vm_gk20a *vm = &mm->pmu.vm; + struct vm_gk20a *vm = mm->pmu.vm; int err; 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, u32 size) { struct mm_gk20a *mm = &g->mm; - struct vm_gk20a *vm = &mm->pmu.vm; + struct vm_gk20a *vm = mm->pmu.vm; int err; err = nvgpu_dma_alloc_map_sys(vm, size, mem); -- cgit v1.2.2