diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/dma.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_as.c | 2 |
2 files changed, 7 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) | |||
420 | void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem) | 421 | void 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); |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c index 6a9d3811..31d99d26 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <uapi/linux/nvgpu.h> | 24 | #include <uapi/linux/nvgpu.h> |
25 | 25 | ||
26 | #include <nvgpu/gmmu.h> | ||
27 | |||
26 | #include "gk20a/gk20a.h" | 28 | #include "gk20a/gk20a.h" |
27 | #include "ioctl_as.h" | 29 | #include "ioctl_as.h" |
28 | 30 | ||