From c3fa78b1d9cba28547ca59154207d434931ae746 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 10 Apr 2017 14:04:15 -0700 Subject: gpu: nvgpu: Separate GMMU out of mm_gk20a.c Begin moving (and renaming) the GMMU code into common/mm/gmmu.c. This block of code will be responsible for handling the platform/OS independent GMMU operations. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: Ide761bab75e5d84be3dcb977c4842ae4b3a7c1b3 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1464083 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/dma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/dma.c') diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c index eb2d0ac4..d3d51f18 100644 --- a/drivers/gpu/nvgpu/common/linux/dma.c +++ b/drivers/gpu/nvgpu/common/linux/dma.c @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -71,7 +72,7 @@ int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size, /* * Force the no-kernel-mapping flag on because we don't support * the lack of it for vidmem - the user should not care when - * using gk20a_gmmu_alloc_map and it's vidmem, or if there's a + * using nvgpu_gmmu_alloc_map and it's vidmem, or if there's a * difference, the user should use the flag explicitly anyway. */ int err = nvgpu_dma_alloc_flags_vid(g, @@ -285,7 +286,7 @@ int nvgpu_dma_alloc_map_flags_sys(struct vm_gk20a *vm, unsigned long flags, if (err) return err; - mem->gpu_va = gk20a_gmmu_map(vm, &mem->priv.sgt, size, 0, + mem->gpu_va = nvgpu_gmmu_map(vm, mem, size, 0, gk20a_mem_flag_none, false, mem->aperture); if (!mem->gpu_va) { @@ -315,7 +316,7 @@ int nvgpu_dma_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags, if (err) return err; - mem->gpu_va = gk20a_gmmu_map(vm, &mem->priv.sgt, size, 0, + mem->gpu_va = nvgpu_gmmu_map(vm, mem, size, 0, gk20a_mem_flag_none, false, mem->aperture); if (!mem->gpu_va) { @@ -420,8 +421,7 @@ void nvgpu_dma_free(struct gk20a *g, struct nvgpu_mem *mem) void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem) { if (mem->gpu_va) - gk20a_gmmu_unmap(vm, mem->gpu_va, - mem->size, gk20a_mem_flag_none); + nvgpu_gmmu_unmap(vm, mem, mem->gpu_va); mem->gpu_va = 0; nvgpu_dma_free(vm->mm->g, mem); -- cgit v1.2.2