summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/dma.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/dma.c10
1 files changed, 5 insertions, 5 deletions
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 @@
20#include <nvgpu/dma.h> 20#include <nvgpu/dma.h>
21#include <nvgpu/lock.h> 21#include <nvgpu/lock.h>
22#include <nvgpu/bug.h> 22#include <nvgpu/bug.h>
23#include <nvgpu/gmmu.h>
23 24
24#include <nvgpu/linux/dma.h> 25#include <nvgpu/linux/dma.h>
25 26
@@ -71,7 +72,7 @@ int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size,
71 /* 72 /*
72 * Force the no-kernel-mapping flag on because we don't support 73 * Force the no-kernel-mapping flag on because we don't support
73 * the lack of it for vidmem - the user should not care when 74 * the lack of it for vidmem - the user should not care when
74 * using gk20a_gmmu_alloc_map and it's vidmem, or if there's a 75 * using nvgpu_gmmu_alloc_map and it's vidmem, or if there's a
75 * difference, the user should use the flag explicitly anyway. 76 * difference, the user should use the flag explicitly anyway.
76 */ 77 */
77 int err = nvgpu_dma_alloc_flags_vid(g, 78 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,
285 if (err) 286 if (err)
286 return err; 287 return err;
287 288
288 mem->gpu_va = gk20a_gmmu_map(vm, &mem->priv.sgt, size, 0, 289 mem->gpu_va = nvgpu_gmmu_map(vm, mem, size, 0,
289 gk20a_mem_flag_none, false, 290 gk20a_mem_flag_none, false,
290 mem->aperture); 291 mem->aperture);
291 if (!mem->gpu_va) { 292 if (!mem->gpu_va) {
@@ -315,7 +316,7 @@ int nvgpu_dma_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags,
315 if (err) 316 if (err)
316 return err; 317 return err;
317 318
318 mem->gpu_va = gk20a_gmmu_map(vm, &mem->priv.sgt, size, 0, 319 mem->gpu_va = nvgpu_gmmu_map(vm, mem, size, 0,
319 gk20a_mem_flag_none, false, 320 gk20a_mem_flag_none, false,
320 mem->aperture); 321 mem->aperture);
321 if (!mem->gpu_va) { 322 if (!mem->gpu_va) {
@@ -420,8 +421,7 @@ void nvgpu_dma_free(struct gk20a *g, struct nvgpu_mem *mem)
420void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem) 421void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem)
421{ 422{
422 if (mem->gpu_va) 423 if (mem->gpu_va)
423 gk20a_gmmu_unmap(vm, mem->gpu_va, 424 nvgpu_gmmu_unmap(vm, mem, mem->gpu_va);
424 mem->size, gk20a_mem_flag_none);
425 mem->gpu_va = 0; 425 mem->gpu_va = 0;
426 426
427 nvgpu_dma_free(vm->mm->g, mem); 427 nvgpu_dma_free(vm->mm->g, mem);