diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-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 bf4a8f57..4005d5f4 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -2793,8 +2793,16 @@ int gk20a_gmmu_alloc(struct gk20a *g, size_t size, struct mem_desc *mem) | |||
2793 | int gk20a_gmmu_alloc_attr(struct gk20a *g, enum dma_attr attr, size_t size, | 2793 | int gk20a_gmmu_alloc_attr(struct gk20a *g, enum dma_attr attr, size_t size, |
2794 | struct mem_desc *mem) | 2794 | struct mem_desc *mem) |
2795 | { | 2795 | { |
2796 | if (g->mm.vidmem_is_vidmem) | 2796 | if (g->mm.vidmem_is_vidmem) { |
2797 | return gk20a_gmmu_alloc_attr_vid(g, attr, size, mem); | 2797 | int err = gk20a_gmmu_alloc_attr_vid(g, attr, size, mem); |
2798 | |||
2799 | if (!err) | ||
2800 | return 0; | ||
2801 | /* | ||
2802 | * Fall back to sysmem (which may then also fail) in case | ||
2803 | * vidmem is exhausted. | ||
2804 | */ | ||
2805 | } | ||
2798 | 2806 | ||
2799 | return gk20a_gmmu_alloc_attr_sys(g, attr, size, mem); | 2807 | return gk20a_gmmu_alloc_attr_sys(g, attr, size, mem); |
2800 | } | 2808 | } |