summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index b2213739..0909b660 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -170,6 +170,11 @@ struct sm_info {
170 u8 tpc_index; 170 u8 tpc_index;
171}; 171};
172 172
173#if defined(CONFIG_GK20A_CYCLE_STATS)
174struct gk20a_cs_snapshot_client;
175struct gk20a_cs_snapshot;
176#endif
177
173struct gr_gk20a { 178struct gr_gk20a {
174 struct gk20a *g; 179 struct gk20a *g;
175 struct { 180 struct {
@@ -294,6 +299,10 @@ struct gr_gk20a {
294 u32 fbp_en_mask; 299 u32 fbp_en_mask;
295 u32 no_of_sm; 300 u32 no_of_sm;
296 struct sm_info *sm_to_cluster; 301 struct sm_info *sm_to_cluster;
302#if defined(CONFIG_GK20A_CYCLE_STATS)
303 struct mutex cs_lock;
304 struct gk20a_cs_snapshot *cs_data;
305#endif
297}; 306};
298 307
299void gk20a_fecs_dump_falcon_stats(struct gk20a *g); 308void gk20a_fecs_dump_falcon_stats(struct gk20a *g);
@@ -497,4 +506,27 @@ void gr_gk20a_free_gr_ctx(struct gk20a *g,
497int gr_gk20a_halt_pipe(struct gk20a *g); 506int gr_gk20a_halt_pipe(struct gk20a *g);
498int gr_gk20a_debugfs_init(struct gk20a *g); 507int gr_gk20a_debugfs_init(struct gk20a *g);
499 508
509#if defined(CONFIG_GK20A_CYCLE_STATS)
510int gr_gk20a_css_attach(struct gk20a *g, /* in - main hw structure */
511 u32 dmabuf_fd, /* in - dma mapped memory */
512 u32 perfmon_id_count, /* in - number of perfmons*/
513 u32 *perfmon_id_start, /* out- index of first pm */
514 /* out - pointer to client data used in later */
515 struct gk20a_cs_snapshot_client **css_client);
516
517int gr_gk20a_css_detach(struct gk20a *g,
518 struct gk20a_cs_snapshot_client *css_client);
519int gr_gk20a_css_flush(struct gk20a *g,
520 struct gk20a_cs_snapshot_client *css_client);
521
522void gr_gk20a_free_cyclestats_snapshot_data(struct gk20a *g);
523
524#else
525/* fake empty cleanup function if no cyclestats snapshots enabled */
526static inline void gr_gk20a_free_cyclestats_snapshot_data(struct gk20a *g)
527{
528 (void)g;
529}
530#endif
531
500#endif /*__GR_GK20A_H__*/ 532#endif /*__GR_GK20A_H__*/