diff options
author | Prashant Malani <pmalani@nvidia.com> | 2014-01-02 15:47:14 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:45 -0400 |
commit | 6157db5d51f634fb44a286098d2764f6787f097c (patch) | |
tree | d4ad97c5d5667246b0462290700b4c9b88e33f0d /drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |
parent | 4c7065b558dac5968610415770d957f0e3b1ba69 (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h index de519bf6..488558fe 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |||
@@ -1049,6 +1049,8 @@ struct pmu_gk20a { | |||
1049 | struct pmu_cmdline_args_v0 args_v0; | 1049 | struct pmu_cmdline_args_v0 args_v0; |
1050 | struct pmu_cmdline_args_v1 args_v1; | 1050 | struct pmu_cmdline_args_v1 args_v1; |
1051 | }; | 1051 | }; |
1052 | unsigned long perfmon_events_cnt; | ||
1053 | bool perfmon_sampling_enabled; | ||
1052 | }; | 1054 | }; |
1053 | 1055 | ||
1054 | struct gk20a_pmu_save_state { | 1056 | struct gk20a_pmu_save_state { |
@@ -1064,6 +1066,8 @@ struct gk20a_pmu_save_state { | |||
1064 | wait_queue_head_t pg_wq; | 1066 | wait_queue_head_t pg_wq; |
1065 | bool sw_ready; | 1067 | bool sw_ready; |
1066 | struct work_struct pg_init; | 1068 | struct work_struct pg_init; |
1069 | unsigned long perfmon_events_cnt; | ||
1070 | bool perfmon_sampling_enabled; | ||
1067 | }; | 1071 | }; |
1068 | 1072 | ||
1069 | int gk20a_init_pmu_support(struct gk20a *g); | 1073 | int gk20a_init_pmu_support(struct gk20a *g); |