From a4731b328268e1d75429942f769252e3e0d41328 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 25 Oct 2016 10:06:07 -0700 Subject: 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 Reviewed-on: http://git-master/r/1242409 Reviewed-by: David Martinez Nieto Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-on: http://git-master/r/1267124 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 6 +++--- drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 2 -- 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) int err; static struct gk20a_alloc_carveout wpr_co = - GK20A_CARVEOUT("wpr-region", - NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE, SZ_16M); + GK20A_CARVEOUT("wpr-region", 0, SZ_16M); if (!size) return 0; - bootstrap_base = NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE; + wpr_co.base = size - SZ_256M; + bootstrap_base = wpr_co.base; bootstrap_size = SZ_16M; base = default_page_size; 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 { APERTURE_VIDMEM }; -#define NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE 0x18000000 - static inline const char *gk20a_aperture_str(enum gk20a_aperture aperture) { switch (aperture) { -- cgit v1.2.2