summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 5fd0eb0c..b69618ae 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -3130,6 +3130,7 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr)
3130 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.gpc_router.l); 3130 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.gpc_router.l);
3131 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_ltc.l); 3131 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_ltc.l);
3132 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_fbpa.l); 3132 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_fbpa.l);
3133 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_cau.l);
3133 3134
3134 nvgpu_vfree(g, gr->ctx_vars.local_golden_image); 3135 nvgpu_vfree(g, gr->ctx_vars.local_golden_image);
3135 gr->ctx_vars.local_golden_image = NULL; 3136 gr->ctx_vars.local_golden_image = NULL;
@@ -7583,6 +7584,18 @@ static int add_ctxsw_buffer_map_entries_gpcs(struct gk20a *g,
7583 count, offset, max_cnt, base, ~0)) 7584 count, offset, max_cnt, base, ~0))
7584 return -EINVAL; 7585 return -EINVAL;
7585 7586
7587 /* Counter Aggregation Unit, if available */
7588 if (g->gr.ctx_vars.ctxsw_regs.pm_cau.count) {
7589 base = gpc_base + (gpc_stride * gpc_num)
7590 + tpc_in_gpc_base;
7591 if (add_ctxsw_buffer_map_entries_subunits(map,
7592 &g->gr.ctx_vars.ctxsw_regs.pm_cau,
7593 count, offset, max_cnt, base, num_tpcs,
7594 tpc_in_gpc_stride,
7595 (tpc_in_gpc_stride - 1)))
7596 return -EINVAL;
7597 }
7598
7586 *offset = ALIGN(*offset, 256); 7599 *offset = ALIGN(*offset, 256);
7587 } 7600 }
7588 return 0; 7601 return 0;
@@ -7648,6 +7661,8 @@ int gr_gk20a_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map,
7648 *| LIST_pm_ctx_reg_GPC REGn TPC1 | 7661 *| LIST_pm_ctx_reg_GPC REGn TPC1 |
7649 *| List_pm_ctx_reg_uc_GPC REGn TPCn | 7662 *| List_pm_ctx_reg_uc_GPC REGn TPCn |
7650 *| LIST_nv_perf_ctx_reg_GPC | 7663 *| LIST_nv_perf_ctx_reg_GPC |
7664 *| LIST_nv_perf_gpcrouter_ctx_reg |
7665 *| LIST_nv_perf_ctx_reg_CAU |
7651 *| ---- |-- 7666 *| ---- |--
7652 *| GPC1 . | 7667 *| GPC1 . |
7653 *| . |<---- 7668 *| . |<----