gpu: nvgpu: gk20a: Update perfmon init

Make the perfmon sampling configurable, by adding an 'enabled' flag.
This is set according to the CONFIG initially. Modify the perfmon event
handler to not touch clock rates. Add a counter to count the number of
perfmon events.

Also add debugfs entries for the above.

Bug 1410515

Change-Id: Ic8197eef0e46e35af1179a5b06140393541cfd43
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/351564
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Prashant Malani
2014-01-02 12:47:14 -08:00
committed by Dan Willemsen
parent 4c7065b558
commit 6157db5d51
2 changed files with 107 additions and 24 deletions

View File

@@ -1049,6 +1049,8 @@ struct pmu_gk20a {
struct pmu_cmdline_args_v0 args_v0;
struct pmu_cmdline_args_v1 args_v1;
};
unsigned long perfmon_events_cnt;
bool perfmon_sampling_enabled;
};
struct gk20a_pmu_save_state {
@@ -1064,6 +1066,8 @@ struct gk20a_pmu_save_state {
wait_queue_head_t pg_wq;
bool sw_ready;
struct work_struct pg_init;
unsigned long perfmon_events_cnt;
bool perfmon_sampling_enabled;
};
int gk20a_init_pmu_support(struct gk20a *g);