diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 4c4f8253..679b8492 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -6363,7 +6363,9 @@ int gr_gk20a_get_ctx_buffer_offsets(struct gk20a *g, | |||
6363 | u32 num_registers = 0; | 6363 | u32 num_registers = 0; |
6364 | int err = 0; | 6364 | int err = 0; |
6365 | struct gr_gk20a *gr = &g->gr; | 6365 | struct gr_gk20a *gr = &g->gr; |
6366 | u32 potential_offsets = gr->max_gpc_count * gr->max_tpc_per_gpc_count; | 6366 | u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC); |
6367 | u32 potential_offsets = gr->max_gpc_count * gr->max_tpc_per_gpc_count * | ||
6368 | sm_per_tpc; | ||
6367 | 6369 | ||
6368 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, "addr=0x%x", addr); | 6370 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, "addr=0x%x", addr); |
6369 | 6371 | ||
@@ -6441,7 +6443,9 @@ int gr_gk20a_get_pm_ctx_buffer_offsets(struct gk20a *g, | |||
6441 | u32 num_registers = 0; | 6443 | u32 num_registers = 0; |
6442 | int err = 0; | 6444 | int err = 0; |
6443 | struct gr_gk20a *gr = &g->gr; | 6445 | struct gr_gk20a *gr = &g->gr; |
6444 | u32 potential_offsets = gr->max_gpc_count * gr->max_tpc_per_gpc_count; | 6446 | u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC); |
6447 | u32 potential_offsets = gr->max_gpc_count * gr->max_tpc_per_gpc_count * | ||
6448 | sm_per_tpc; | ||
6445 | 6449 | ||
6446 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, "addr=0x%x", addr); | 6450 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg, "addr=0x%x", addr); |
6447 | 6451 | ||
@@ -7719,7 +7723,9 @@ int __gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch, | |||
7719 | struct nvgpu_mem *current_mem = NULL; | 7723 | struct nvgpu_mem *current_mem = NULL; |
7720 | u32 i, j, offset, v; | 7724 | u32 i, j, offset, v; |
7721 | struct gr_gk20a *gr = &g->gr; | 7725 | struct gr_gk20a *gr = &g->gr; |
7722 | u32 max_offsets = gr->max_gpc_count * gr->max_tpc_per_gpc_count; | 7726 | u32 sm_per_tpc = nvgpu_get_litter_value(g, GPU_LIT_NUM_SM_PER_TPC); |
7727 | u32 max_offsets = gr->max_gpc_count * gr->max_tpc_per_gpc_count * | ||
7728 | sm_per_tpc; | ||
7723 | u32 *offsets = NULL; | 7729 | u32 *offsets = NULL; |
7724 | u32 *offset_addrs = NULL; | 7730 | u32 *offset_addrs = NULL; |
7725 | u32 ctx_op_nr, num_ctx_ops[2] = {num_ctx_wr_ops, num_ctx_rd_ops}; | 7731 | u32 ctx_op_nr, num_ctx_ops[2] = {num_ctx_wr_ops, num_ctx_rd_ops}; |