summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 709f2fd2..9a2dbeb9 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -2735,7 +2735,15 @@ int gk20a_gmmu_alloc_flags(struct gk20a *g, unsigned long flags, size_t size,
2735 struct mem_desc *mem) 2735 struct mem_desc *mem)
2736{ 2736{
2737 if (g->mm.vidmem_is_vidmem) { 2737 if (g->mm.vidmem_is_vidmem) {
2738 int err = gk20a_gmmu_alloc_flags_vid(g, flags, size, mem); 2738 /*
2739 * Force the no-kernel-mapping flag on because we don't support
2740 * the lack of it for vidmem - the user should not care when
2741 * using gk20a_gmmu_alloc_map and it's vidmem, or if there's a
2742 * difference, the user should use the flag explicitly anyway.
2743 */
2744 int err = gk20a_gmmu_alloc_flags_vid(g,
2745 flags | NVGPU_DMA_NO_KERNEL_MAPPING,
2746 size, mem);
2739 2747
2740 if (!err) 2748 if (!err)
2741 return 0; 2749 return 0;
@@ -3012,6 +3020,7 @@ int gk20a_gmmu_alloc_flags_vid_at(struct gk20a *g, unsigned long flags,
3012 mem->size = size; 3020 mem->size = size;
3013 mem->aperture = APERTURE_VIDMEM; 3021 mem->aperture = APERTURE_VIDMEM;
3014 mem->allocator = vidmem_alloc; 3022 mem->allocator = vidmem_alloc;
3023 mem->flags = flags;
3015 3024
3016 nvgpu_init_list_node(&mem->clear_list_entry); 3025 nvgpu_init_list_node(&mem->clear_list_entry);
3017 3026