diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2016-04-27 19:47:54 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-12 11:41:54 -0400 |
commit | 911f14e1f40f501922162e8e5df85a81b9a7e90e (patch) | |
tree | 644a2176a800aadcb6070bacdcb6a8b86151b1c8 /drivers | |
parent | fb9dc629af3f6aebc3413dcd044e32a036d7782d (diff) |
gpu: nvgpu: use correct ltc cnt in hwpm offset map
Fix the offset calculation code to save/restore proper number of LTCs
to conform to FECS microcode
Bug 1736910
Change-Id: I46ae1e0b45ffe354693db6ceb0aeeeac3d344b34
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: http://git-master/r/1133896
(cherry picked from commit 97751ee7a44537f5aa5198ac362d9ee416adc172)
Reviewed-on: http://git-master/r/1146244
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index c61bb235..4e7c36ee 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -7524,6 +7524,7 @@ static int gr_gk20a_create_hwpm_ctxsw_buffer_offset_map(struct gk20a *g) | |||
7524 | u32 ltc_stride = nvgpu_get_litter_value(g, GPU_LIT_LTC_STRIDE); | 7524 | u32 ltc_stride = nvgpu_get_litter_value(g, GPU_LIT_LTC_STRIDE); |
7525 | u32 num_fbpas = nvgpu_get_litter_value(g, GPU_LIT_NUM_FBPAS); | 7525 | u32 num_fbpas = nvgpu_get_litter_value(g, GPU_LIT_NUM_FBPAS); |
7526 | u32 fbpa_stride = nvgpu_get_litter_value(g, GPU_LIT_FBPA_STRIDE); | 7526 | u32 fbpa_stride = nvgpu_get_litter_value(g, GPU_LIT_FBPA_STRIDE); |
7527 | u32 num_ltc = g->ops.gr.get_max_ltc_per_fbp(g) * g->gr.num_fbps; | ||
7527 | 7528 | ||
7528 | if (hwpm_ctxsw_buffer_size == 0) { | 7529 | if (hwpm_ctxsw_buffer_size == 0) { |
7529 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, | 7530 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, |
@@ -7579,7 +7580,7 @@ static int gr_gk20a_create_hwpm_ctxsw_buffer_offset_map(struct gk20a *g) | |||
7579 | &g->gr.ctx_vars.ctxsw_regs.pm_ltc, | 7580 | &g->gr.ctx_vars.ctxsw_regs.pm_ltc, |
7580 | &count, &offset, | 7581 | &count, &offset, |
7581 | hwpm_ctxsw_reg_count_max, 0, | 7582 | hwpm_ctxsw_reg_count_max, 0, |
7582 | g->ltc_count, ltc_stride, ~0)) | 7583 | num_ltc, ltc_stride, ~0)) |
7583 | goto cleanup; | 7584 | goto cleanup; |
7584 | 7585 | ||
7585 | offset = ALIGN(offset, 256); | 7586 | offset = ALIGN(offset, 256); |