summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-10-25 13:06:07 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-09 18:05:12 -0500
commita4731b328268e1d75429942f769252e3e0d41328 (patch)
tree5ee3587a0edd609ee6da15a084a0132536f86281
parent54810444d24bd8ca820f88eadbfd227b5fe8c492 (diff)
gpu: nvgpu: Use end of vidmem as bootstrap region
Instead of hard coding bootstrap region, it should always be set to the last 256MB of vidmem. Bug 200244445 Change-Id: I91779d1bf861f4f23a0b646f70b1febbbc4581b5 Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1242409 Reviewed-by: David Martinez Nieto <dmartineznie@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-on: http://git-master/r/1267124 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c6
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 13dc4241..8ac6d1d1 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -914,13 +914,13 @@ static int gk20a_init_vidmem(struct mm_gk20a *mm)
914 int err; 914 int err;
915 915
916 static struct gk20a_alloc_carveout wpr_co = 916 static struct gk20a_alloc_carveout wpr_co =
917 GK20A_CARVEOUT("wpr-region", 917 GK20A_CARVEOUT("wpr-region", 0, SZ_16M);
918 NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE, SZ_16M);
919 918
920 if (!size) 919 if (!size)
921 return 0; 920 return 0;
922 921
923 bootstrap_base = NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE; 922 wpr_co.base = size - SZ_256M;
923 bootstrap_base = wpr_co.base;
924 bootstrap_size = SZ_16M; 924 bootstrap_size = SZ_16M;
925 base = default_page_size; 925 base = default_page_size;
926 926
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 36ba6248..e1ee8c2e 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -51,8 +51,6 @@ enum gk20a_aperture {
51 APERTURE_VIDMEM 51 APERTURE_VIDMEM
52}; 52};
53 53
54#define NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE 0x18000000
55
56static inline const char *gk20a_aperture_str(enum gk20a_aperture aperture) 54static inline const char *gk20a_aperture_str(enum gk20a_aperture aperture)
57{ 55{
58 switch (aperture) { 56 switch (aperture) {