diff options
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); |