summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index c31f8482..1beff9b9 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -3316,7 +3316,15 @@ int gk20a_gmmu_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags,
3316 size_t size, struct mem_desc *mem) 3316 size_t size, struct mem_desc *mem)
3317{ 3317{
3318 if (vm->mm->vidmem_is_vidmem) { 3318 if (vm->mm->vidmem_is_vidmem) {
3319 int err = gk20a_gmmu_alloc_map_flags_vid(vm, flags, size, mem); 3319 /*
3320 * Force the no-kernel-mapping flag on because we don't support
3321 * the lack of it for vidmem - the user should not care when
3322 * using gk20a_gmmu_alloc_map and it's vidmem, or if there's a
3323 * difference, the user should use the flag explicitly anyway.
3324 */
3325 int err = gk20a_gmmu_alloc_map_flags_vid(vm,
3326 flags | NVGPU_DMA_NO_KERNEL_MAPPING,
3327 size, mem);
3320 3328
3321 if (!err) 3329 if (!err)
3322 return 0; 3330 return 0;
@@ -3361,7 +3369,8 @@ fail_free:
3361int gk20a_gmmu_alloc_map_vid(struct vm_gk20a *vm, size_t size, 3369int gk20a_gmmu_alloc_map_vid(struct vm_gk20a *vm, size_t size,
3362 struct mem_desc *mem) 3370 struct mem_desc *mem)
3363{ 3371{
3364 return gk20a_gmmu_alloc_map_flags_vid(vm, 0, size, mem); 3372 return gk20a_gmmu_alloc_map_flags_vid(vm,
3373 NVGPU_DMA_NO_KERNEL_MAPPING, size, mem);
3365} 3374}
3366 3375
3367int gk20a_gmmu_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags, 3376int gk20a_gmmu_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags,