From f361f89b12a7e2042a86ca2d183c4899bf181d9b Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 16 Aug 2016 17:36:17 -0700 Subject: gpu: nvgpu: Use actual carveouts for WPR region Use a carveout for the WPR region in the VIDMEM. Jira DNVGPU-84 Change-Id: I191ecc3bb317ae3af6b56f5970194e646c513964 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1208527 (cherry picked from commit 7edf74d7468dcff1f01cbd901d83aa0e32602f0e) Reviewed-on: http://git-master/r/1223455 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 36ae1d7d..a0e88c3e 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -895,6 +895,10 @@ static int gk20a_init_vidmem(struct mm_gk20a *mm) u64 default_page_size = SZ_64K; int err; + static struct gk20a_alloc_carveout wpr_co = + GK20A_CARVEOUT("wpr-region", + NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE, SZ_16M); + if (!size) return 0; @@ -921,8 +925,7 @@ static int gk20a_init_vidmem(struct mm_gk20a *mm) } /* Reserve bootstrap region in vidmem allocator */ - gk20a_alloc_fixed(&g->mm.vidmem.allocator, - bootstrap_base, bootstrap_size); + gk20a_alloc_reserve_carveout(&g->mm.vidmem.allocator, &wpr_co); mm->vidmem.base = base; mm->vidmem.size = size - base; -- cgit v1.2.2