summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-08-16 20:36:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-20 17:56:43 -0400
commitf361f89b12a7e2042a86ca2d183c4899bf181d9b (patch)
treeda39f81a575028835a9b4d453064d26f0887e028 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parentaa14efa2b4b7d52b3b9563ab536ca617e5e11d2e (diff)
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 <alexw@nvidia.com> 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 <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c7
1 files changed, 5 insertions, 2 deletions
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)
895 u64 default_page_size = SZ_64K; 895 u64 default_page_size = SZ_64K;
896 int err; 896 int err;
897 897
898 static struct gk20a_alloc_carveout wpr_co =
899 GK20A_CARVEOUT("wpr-region",
900 NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE, SZ_16M);
901
898 if (!size) 902 if (!size)
899 return 0; 903 return 0;
900 904
@@ -921,8 +925,7 @@ static int gk20a_init_vidmem(struct mm_gk20a *mm)
921 } 925 }
922 926
923 /* Reserve bootstrap region in vidmem allocator */ 927 /* Reserve bootstrap region in vidmem allocator */
924 gk20a_alloc_fixed(&g->mm.vidmem.allocator, 928 gk20a_alloc_reserve_carveout(&g->mm.vidmem.allocator, &wpr_co);
925 bootstrap_base, bootstrap_size);
926 929
927 mm->vidmem.base = base; 930 mm->vidmem.base = base;
928 mm->vidmem.size = size - base; 931 mm->vidmem.size = size - base;