diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-05-09 06:19:43 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-09 14:13:54 -0400 |
commit | 40ca7cc573430ca4e21fdec4a44394c09d615846 (patch) | |
tree | e4ee884dd8863d9928b34c7b0bf7468f2903c6b1 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |
parent | 821d1cab904d055264bc5d62b0c0d5187417ff13 (diff) |
gpu: nvgpu: reorganize PMU IPC
- Moved PMU IPC related code to
drivers/gpu/nvgpu/common/pmu/pmu_ipc.c file,
-Below is the list which are moved
seq
mutex
queue
cmd/msg post & process
event handling
NVGPU-56
Change-Id: Ic380faa27de4e5574d5b22500125e86027fd4b5d
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1478167
GVS: Gerrit_Virtual_Submit
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
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 | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h index 24bc5822..a53329b4 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |||
@@ -57,15 +57,6 @@ struct nvgpu_firmware; | |||
57 | #define PMU_PGENG_GR_BUFFER_IDX_ZBC (1) | 57 | #define PMU_PGENG_GR_BUFFER_IDX_ZBC (1) |
58 | #define PMU_PGENG_GR_BUFFER_IDX_FECS (2) | 58 | #define PMU_PGENG_GR_BUFFER_IDX_FECS (2) |
59 | 59 | ||
60 | struct pmu_payload { | ||
61 | struct { | ||
62 | void *buf; | ||
63 | u32 offset; | ||
64 | u32 size; | ||
65 | u32 fb_size; | ||
66 | } in, out; | ||
67 | }; | ||
68 | |||
69 | struct pmu_surface { | 60 | struct pmu_surface { |
70 | struct nvgpu_mem vidmem_desc; | 61 | struct nvgpu_mem vidmem_desc; |
71 | struct nvgpu_mem sysmem_desc; | 62 | struct nvgpu_mem sysmem_desc; |
@@ -119,14 +110,9 @@ struct pmu_pg_stats_data { | |||
119 | int gk20a_init_pmu_support(struct gk20a *g); | 110 | int gk20a_init_pmu_support(struct gk20a *g); |
120 | int gk20a_init_pmu_bind_fecs(struct gk20a *g); | 111 | int gk20a_init_pmu_bind_fecs(struct gk20a *g); |
121 | 112 | ||
113 | bool gk20a_pmu_is_interrupted(struct nvgpu_pmu *pmu); | ||
122 | void gk20a_pmu_isr(struct gk20a *g); | 114 | void gk20a_pmu_isr(struct gk20a *g); |
123 | 115 | ||
124 | /* send a cmd to pmu */ | ||
125 | int gk20a_pmu_cmd_post(struct gk20a *g, struct pmu_cmd *cmd, struct pmu_msg *msg, | ||
126 | struct pmu_payload *payload, u32 queue_id, | ||
127 | pmu_callback callback, void* cb_param, | ||
128 | u32 *seq_desc, unsigned long timeout); | ||
129 | |||
130 | int gk20a_pmu_enable_elpg(struct gk20a *g); | 116 | int gk20a_pmu_enable_elpg(struct gk20a *g); |
131 | int gk20a_pmu_disable_elpg(struct gk20a *g); | 117 | int gk20a_pmu_disable_elpg(struct gk20a *g); |
132 | int gk20a_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg); | 118 | int gk20a_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg); |
@@ -138,8 +124,14 @@ void gk20a_pmu_save_zbc(struct gk20a *g, u32 entries); | |||
138 | 124 | ||
139 | int gk20a_pmu_perfmon_enable(struct gk20a *g, bool enable); | 125 | int gk20a_pmu_perfmon_enable(struct gk20a *g, bool enable); |
140 | 126 | ||
141 | int pmu_mutex_acquire(struct nvgpu_pmu *pmu, u32 id, u32 *token); | 127 | int gk20a_pmu_mutex_acquire(struct nvgpu_pmu *pmu, u32 id, u32 *token); |
142 | int pmu_mutex_release(struct nvgpu_pmu *pmu, u32 id, u32 *token); | 128 | int gk20a_pmu_mutex_release(struct nvgpu_pmu *pmu, u32 id, u32 *token); |
129 | |||
130 | int gk20a_pmu_queue_head(struct nvgpu_pmu *pmu, struct pmu_queue *queue, | ||
131 | u32 *head, bool set); | ||
132 | int gk20a_pmu_queue_tail(struct nvgpu_pmu *pmu, struct pmu_queue *queue, | ||
133 | u32 *tail, bool set); | ||
134 | |||
143 | int gk20a_pmu_destroy(struct gk20a *g); | 135 | int gk20a_pmu_destroy(struct gk20a *g); |
144 | int gk20a_pmu_load_norm(struct gk20a *g, u32 *load); | 136 | int gk20a_pmu_load_norm(struct gk20a *g, u32 *load); |
145 | int gk20a_pmu_load_update(struct gk20a *g); | 137 | int gk20a_pmu_load_update(struct gk20a *g); |
@@ -157,7 +149,6 @@ int pmu_bootstrap(struct nvgpu_pmu *pmu); | |||
157 | int gk20a_init_pmu(struct nvgpu_pmu *pmu); | 149 | int gk20a_init_pmu(struct nvgpu_pmu *pmu); |
158 | void pmu_dump_falcon_stats(struct nvgpu_pmu *pmu); | 150 | void pmu_dump_falcon_stats(struct nvgpu_pmu *pmu); |
159 | void gk20a_remove_pmu_support(struct nvgpu_pmu *pmu); | 151 | void gk20a_remove_pmu_support(struct nvgpu_pmu *pmu); |
160 | void pmu_seq_init(struct nvgpu_pmu *pmu); | ||
161 | 152 | ||
162 | int gk20a_init_pmu(struct nvgpu_pmu *pmu); | 153 | int gk20a_init_pmu(struct nvgpu_pmu *pmu); |
163 | 154 | ||