diff options
author | Deepak Goyal <dgoyal@nvidia.com> | 2016-07-12 01:42:44 -0400 |
---|---|---|
committer | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-18 07:02:06 -0400 |
commit | e875b4a66c71fbd9b0a978fadfd0de6cd4a70248 (patch) | |
tree | 75902ddec7f1a4f3768410c0b8c3a8ea5dea3664 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 55b298d05a7dd32e5af92d47dab52010f7cfd7a3 (diff) |
gpu: nvgpu: Debugfs support for Railgating stats.
This patch calculates:
-Total time spent by GPU with rails gated.
-Total time spent by GPU with rails ungated.
-Total Railgating Cycles.
and dumps this information in debugfs file.
This feature requires CONFIG_DEBUG_FS set to true.
Bug 200195100
Change-Id: I1379f11237ce4900076947e18524caaa3304c7cb
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: http://git-master/r/1178308
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 949cd4a5..c5da68cc 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -64,6 +64,18 @@ struct cooling_device_gk20a { | |||
64 | struct gk20a *g; | 64 | struct gk20a *g; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #ifdef CONFIG_DEBUG_FS | ||
68 | struct railgate_stats { | ||
69 | unsigned long last_rail_gate_start; | ||
70 | unsigned long last_rail_gate_complete; | ||
71 | unsigned long last_rail_ungate_start; | ||
72 | unsigned long last_rail_ungate_complete; | ||
73 | unsigned long total_rail_gate_time_ms; | ||
74 | unsigned long total_rail_ungate_time_ms; | ||
75 | unsigned long railgating_cycle_count; | ||
76 | }; | ||
77 | #endif | ||
78 | |||
67 | enum gk20a_cbc_op { | 79 | enum gk20a_cbc_op { |
68 | gk20a_cbc_op_clear, | 80 | gk20a_cbc_op_clear, |
69 | gk20a_cbc_op_clean, | 81 | gk20a_cbc_op_clean, |
@@ -687,6 +699,9 @@ struct gk20a { | |||
687 | struct acr_desc acr; | 699 | struct acr_desc acr; |
688 | struct cooling_device_gk20a gk20a_cdev; | 700 | struct cooling_device_gk20a gk20a_cdev; |
689 | 701 | ||
702 | #ifdef CONFIG_DEBUG_FS | ||
703 | struct railgate_stats pstats; | ||
704 | #endif | ||
690 | /* Save pmu fw here so that it lives cross suspend/resume. | 705 | /* Save pmu fw here so that it lives cross suspend/resume. |
691 | pmu suspend destroys all pmu sw/hw states. Loading pmu | 706 | pmu suspend destroys all pmu sw/hw states. Loading pmu |
692 | fw in resume crashes when the resume is from sys_exit. */ | 707 | fw in resume crashes when the resume is from sys_exit. */ |