diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 4005d5f4..1b052a20 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -3203,8 +3203,16 @@ int gk20a_gmmu_alloc_map(struct vm_gk20a *vm, size_t size, | |||
3203 | int gk20a_gmmu_alloc_map_attr(struct vm_gk20a *vm, | 3203 | int gk20a_gmmu_alloc_map_attr(struct vm_gk20a *vm, |
3204 | enum dma_attr attr, size_t size, struct mem_desc *mem) | 3204 | enum dma_attr attr, size_t size, struct mem_desc *mem) |
3205 | { | 3205 | { |
3206 | if (vm->mm->vidmem_is_vidmem) | 3206 | if (vm->mm->vidmem_is_vidmem) { |
3207 | return gk20a_gmmu_alloc_map_attr_vid(vm, 0, size, mem); | 3207 | int err = gk20a_gmmu_alloc_map_attr_vid(vm, 0, size, mem); |
3208 | |||
3209 | if (!err) | ||
3210 | return 0; | ||
3211 | /* | ||
3212 | * Fall back to sysmem (which may then also fail) in case | ||
3213 | * vidmem is exhausted. | ||
3214 | */ | ||
3215 | } | ||
3208 | 3216 | ||
3209 | return gk20a_gmmu_alloc_map_attr_sys(vm, 0, size, mem); | 3217 | return gk20a_gmmu_alloc_map_attr_sys(vm, 0, size, mem); |
3210 | } | 3218 | } |