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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c
index 53f3a35e..5fee878a 100644
--- a/drivers/gpu/nvgpu/common/linux/dma.c
+++ b/drivers/gpu/nvgpu/common/linux/dma.c
@@ -21,6 +21,7 @@
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#include <nvgpu/gmmu.h>
24#include <nvgpu/enabled.h>
24 25
25#include <nvgpu/linux/dma.h> 26#include <nvgpu/linux/dma.h>
26 27
@@ -69,7 +70,7 @@ int nvgpu_dma_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem)
69int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size, 70int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size,
70 struct nvgpu_mem *mem) 71 struct nvgpu_mem *mem)
71{ 72{
72 if (g->mm.vidmem_is_vidmem) { 73 if (!nvgpu_is_enabled(g, NVGPU_MM_UNIFIED_MEMORY)) {
73 /* 74 /*
74 * Force the no-kernel-mapping flag on because we don't support 75 * Force the no-kernel-mapping flag on because we don't support
75 * the lack of it for vidmem - the user should not care when 76 * the lack of it for vidmem - the user should not care when
@@ -251,7 +252,7 @@ int nvgpu_dma_alloc_map(struct vm_gk20a *vm, size_t size,
251int nvgpu_dma_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags, 252int nvgpu_dma_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags,
252 size_t size, struct nvgpu_mem *mem) 253 size_t size, struct nvgpu_mem *mem)
253{ 254{
254 if (vm->mm->vidmem_is_vidmem) { 255 if (!nvgpu_is_enabled(gk20a_from_vm(vm), NVGPU_MM_UNIFIED_MEMORY)) {
255 /* 256 /*
256 * Force the no-kernel-mapping flag on because we don't support 257 * Force the no-kernel-mapping flag on because we don't support
257 * the lack of it for vidmem - the user should not care when 258 * the lack of it for vidmem - the user should not care when