summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h4
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c11
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h4
3 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 4ab1cd1b..f64a2b96 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -456,6 +456,10 @@ struct gpu_ops {
456 u32 *count, u32 *offset, 456 u32 *count, u32 *offset,
457 u32 max_cnt, u32 base, 457 u32 max_cnt, u32 base,
458 u32 num_fbpas, u32 stride, u32 mask); 458 u32 num_fbpas, u32 stride, u32 mask);
459 int (*add_ctxsw_reg_perf_pma)(struct ctxsw_buf_offset_map_entry *map,
460 struct aiv_list_gk20a *regs,
461 u32 *count, u32 *offset,
462 u32 max_cnt, u32 base, u32 mask);
459 } gr; 463 } gr;
460 struct { 464 struct {
461 void (*init_hw)(struct gk20a *g); 465 void (*init_hw)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index bec33293..9d85a5ef 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -7568,6 +7568,15 @@ static int add_ctxsw_buffer_map_entries_gpcs(struct gk20a *g,
7568 return 0; 7568 return 0;
7569} 7569}
7570 7570
7571int gr_gk20a_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map,
7572 struct aiv_list_gk20a *regs,
7573 u32 *count, u32 *offset,
7574 u32 max_cnt, u32 base, u32 mask)
7575{
7576 return add_ctxsw_buffer_map_entries(map, regs,
7577 count, offset, max_cnt, base, mask);
7578}
7579
7571/* 7580/*
7572 * PM CTXSW BUFFER LAYOUT : 7581 * PM CTXSW BUFFER LAYOUT :
7573 *|---------------------------------------------|0x00 <----PM CTXSW BUFFER BASE 7582 *|---------------------------------------------|0x00 <----PM CTXSW BUFFER BASE
@@ -7671,7 +7680,7 @@ static int gr_gk20a_create_hwpm_ctxsw_buffer_offset_map(struct gk20a *g)
7671 goto cleanup; 7680 goto cleanup;
7672 7681
7673 /* Add entries from _LIST_nv_perf_pma_ctx_reg*/ 7682 /* Add entries from _LIST_nv_perf_pma_ctx_reg*/
7674 if (add_ctxsw_buffer_map_entries(map, &g->gr.ctx_vars.ctxsw_regs.perf_pma, 7683 if (g->ops.gr.add_ctxsw_reg_perf_pma(map, &g->gr.ctx_vars.ctxsw_regs.perf_pma,
7675 &count, &offset, hwpm_ctxsw_reg_count_max, 0, ~0)) 7684 &count, &offset, hwpm_ctxsw_reg_count_max, 0, ~0))
7676 goto cleanup; 7685 goto cleanup;
7677 7686
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index 5ac363e1..54833028 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -817,4 +817,8 @@ int gr_gk20a_add_ctxsw_reg_pm_fbpa(struct gk20a *g,
817 u32 *count, u32 *offset, 817 u32 *count, u32 *offset,
818 u32 max_cnt, u32 base, 818 u32 max_cnt, u32 base,
819 u32 num_fbpas, u32 stride, u32 mask); 819 u32 num_fbpas, u32 stride, u32 mask);
820int gr_gk20a_add_ctxsw_reg_perf_pma(struct ctxsw_buf_offset_map_entry *map,
821 struct aiv_list_gk20a *regs,
822 u32 *count, u32 *offset,
823 u32 max_cnt, u32 base, u32 mask);
820#endif /*__GR_GK20A_H__*/ 824#endif /*__GR_GK20A_H__*/