diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-06-06 05:56:32 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-12 14:03:37 -0400 |
commit | 69dee6a648ad434b75e1a9c64b022ee45d3ff87b (patch) | |
tree | eba316aa07b17760afb1609b331bb3cf0602e545 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |
parent | 914bb78a7dc0687b349310cc28613ea4a4c0be33 (diff) |
gpu: nvgpu: reorganize PMU init
- Moved PMU init code from pmu_gk20a.c to
"drivers/gpu/nvgpu/common/pmu/pmu.c" file
- Moved below related methods
SW/HW init,
init msg handler,
deinit/destroy,
PMU state machine
-Created HAL methods to read message queue tail
& supported mutex count.
-prepend with nvgpu_ for pmu init global
mehtods
JIRA NVGPU-56
JIRA NVGPU-92
Change-Id: Iea9efc194fefa74fb5641d2b2f4633577d2c3a47
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1480002
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-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 | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h index a53329b4..1c29b380 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |||
@@ -63,15 +63,6 @@ struct pmu_surface { | |||
63 | struct flcn_mem_desc_v0 params; | 63 | struct flcn_mem_desc_v0 params; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /*PG defines used by nvpgu-pmu*/ | ||
67 | struct pmu_pg_stats_data { | ||
68 | u32 gating_cnt; | ||
69 | u32 ingating_time; | ||
70 | u32 ungating_time; | ||
71 | u32 avg_entry_latency_us; | ||
72 | u32 avg_exit_latency_us; | ||
73 | }; | ||
74 | |||
75 | #define PMU_PG_IDLE_THRESHOLD_SIM 1000 | 66 | #define PMU_PG_IDLE_THRESHOLD_SIM 1000 |
76 | #define PMU_PG_POST_POWERUP_IDLE_THRESHOLD_SIM 4000000 | 67 | #define PMU_PG_POST_POWERUP_IDLE_THRESHOLD_SIM 4000000 |
77 | /* TBD: QT or else ? */ | 68 | /* TBD: QT or else ? */ |
@@ -105,10 +96,6 @@ struct pmu_pg_stats_data { | |||
105 | #define APCTRL_MINIMUM_TARGET_SAVING_DEFAULT_US (10000) | 96 | #define APCTRL_MINIMUM_TARGET_SAVING_DEFAULT_US (10000) |
106 | #define APCTRL_POWER_BREAKEVEN_DEFAULT_US (2000) | 97 | #define APCTRL_POWER_BREAKEVEN_DEFAULT_US (2000) |
107 | #define APCTRL_CYCLES_PER_SAMPLE_MAX_DEFAULT (200) | 98 | #define APCTRL_CYCLES_PER_SAMPLE_MAX_DEFAULT (200) |
108 | /*PG defines used by nvpgu-pmu*/ | ||
109 | |||
110 | int gk20a_init_pmu_support(struct gk20a *g); | ||
111 | int gk20a_init_pmu_bind_fecs(struct gk20a *g); | ||
112 | 99 | ||
113 | bool gk20a_pmu_is_interrupted(struct nvgpu_pmu *pmu); | 100 | bool gk20a_pmu_is_interrupted(struct nvgpu_pmu *pmu); |
114 | void gk20a_pmu_isr(struct gk20a *g); | 101 | void gk20a_pmu_isr(struct gk20a *g); |
@@ -131,8 +118,8 @@ int gk20a_pmu_queue_head(struct nvgpu_pmu *pmu, struct pmu_queue *queue, | |||
131 | u32 *head, bool set); | 118 | u32 *head, bool set); |
132 | int gk20a_pmu_queue_tail(struct nvgpu_pmu *pmu, struct pmu_queue *queue, | 119 | int gk20a_pmu_queue_tail(struct nvgpu_pmu *pmu, struct pmu_queue *queue, |
133 | u32 *tail, bool set); | 120 | u32 *tail, bool set); |
121 | void gk20a_pmu_msgq_tail(struct nvgpu_pmu *pmu, u32 *tail, bool set); | ||
134 | 122 | ||
135 | int gk20a_pmu_destroy(struct gk20a *g); | ||
136 | int gk20a_pmu_load_norm(struct gk20a *g, u32 *load); | 123 | int gk20a_pmu_load_norm(struct gk20a *g, u32 *load); |
137 | int gk20a_pmu_load_update(struct gk20a *g); | 124 | int gk20a_pmu_load_update(struct gk20a *g); |
138 | void gk20a_pmu_reset_load_counters(struct gk20a *g); | 125 | void gk20a_pmu_reset_load_counters(struct gk20a *g); |
@@ -174,8 +161,6 @@ int gk20a_pmu_vidmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem, | |||
174 | u32 size); | 161 | u32 size); |
175 | int gk20a_pmu_sysmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem, | 162 | int gk20a_pmu_sysmem_surface_alloc(struct gk20a *g, struct nvgpu_mem *mem, |
176 | u32 size); | 163 | u32 size); |
177 | int gk20a_pmu_get_pg_stats(struct gk20a *g, | ||
178 | u32 pg_engine_id, struct pmu_pg_stats_data *pg_stat_data); | ||
179 | bool nvgpu_find_hex_in_string(char *strings, struct gk20a *g, u32 *hex_pos); | 164 | bool nvgpu_find_hex_in_string(char *strings, struct gk20a *g, u32 *hex_pos); |
180 | 165 | ||
181 | int nvgpu_pmu_perfmon_start_sampling(struct nvgpu_pmu *pmu); | 166 | int nvgpu_pmu_perfmon_start_sampling(struct nvgpu_pmu *pmu); |