summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-10-25 13:05:46 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:51 -0500
commitbfc12d25a41c2b5a4d06f233f16331e43c489d8e (patch)
treea4c091b9aef6381fbb868e6bcc4bff9d1b3f934a
parent206a5c2d39825fcac63f7a1bb09319252626520d (diff)
gpu: nvgpu: Use bootstrap base for WPR address
Use the bootstrap base address for calculating the address of WPR. The bootstrap base is dynamic and depends on amount of memory, so we should not hard code any address. Bug 200244445 Change-Id: Ia700d24c8d572a25946f7b1847faec72c40c6796 Signed-off-by: David Martinez Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1242252 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/1267125 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gp106/acr_gp106.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c
index 3bd79bcd..b883ad83 100644
--- a/drivers/gpu/nvgpu/gp106/acr_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c
@@ -40,7 +40,7 @@ typedef int (*get_ucode_details)(struct gk20a *g,
40/* Both size and address of WPR need to be 128K-aligned */ 40/* Both size and address of WPR need to be 128K-aligned */
41#define WPR_ALIGNMENT 0x20000 41#define WPR_ALIGNMENT 0x20000
42#define GP106_DGPU_NONWPR NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE 42#define GP106_DGPU_NONWPR NVGPU_VIDMEM_BOOTSTRAP_ALLOCATOR_BASE
43#define GP106_DGPU_WPR (GP106_DGPU_NONWPR + 0x400000) 43#define GP106_DGPU_WPR_OFFSET 0x400000
44#define DGPU_WPR_SIZE 0x100000 44#define DGPU_WPR_SIZE 0x100000
45 45
46/*Externs*/ 46/*Externs*/
@@ -79,8 +79,8 @@ static get_ucode_details pmu_acr_supp_ucode_list[] = {
79 79
80static void gp106_wpr_info(struct gk20a *g, struct wpr_carveout_info *inf) 80static void gp106_wpr_info(struct gk20a *g, struct wpr_carveout_info *inf)
81{ 81{
82 inf->wpr_base = GP106_DGPU_WPR; 82 inf->nonwpr_base = g->mm.vidmem.bootstrap_base;
83 inf->nonwpr_base = GP106_DGPU_NONWPR; 83 inf->wpr_base = inf->nonwpr_base + GP106_DGPU_WPR_OFFSET;
84 inf->size = DGPU_WPR_SIZE; 84 inf->size = DGPU_WPR_SIZE;
85} 85}
86 86