diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2016-03-09 22:10:20 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-07 14:05:49 -0400 |
commit | 37155b65f1dd6039bdef92f513d86640956bc12c (patch) | |
tree | 1deb57523c3acc445996c642da6ac96e1cf7c355 /drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |
parent | 6675c03603669c667c6ffec34567eaf101a2d09d (diff) |
gpu: nvgpu: support for hwpm context switching
Add support for hwpm context switching
Bug 1648200
Change-Id: I482899bf165cd2ef24bb8617be16df01218e462f
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: http://git-master/r/1120450
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 2c575534..c82cf75c 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -198,8 +198,13 @@ struct gr_gk20a { | |||
198 | u32 golden_image_size; | 198 | u32 golden_image_size; |
199 | u32 *local_golden_image; | 199 | u32 *local_golden_image; |
200 | 200 | ||
201 | u32 hwpm_ctxsw_buffer_offset_map_count; | ||
202 | struct ctxsw_buf_offset_map_entry *hwpm_ctxsw_buffer_offset_map; | ||
203 | |||
201 | u32 zcull_ctxsw_image_size; | 204 | u32 zcull_ctxsw_image_size; |
202 | 205 | ||
206 | u32 pm_ctxsw_image_size; | ||
207 | |||
203 | u32 buffer_header_size; | 208 | u32 buffer_header_size; |
204 | 209 | ||
205 | u32 priv_access_map_size; | 210 | u32 priv_access_map_size; |
@@ -219,6 +224,14 @@ struct gr_gk20a { | |||
219 | struct aiv_list_gk20a pm_sys; | 224 | struct aiv_list_gk20a pm_sys; |
220 | struct aiv_list_gk20a pm_gpc; | 225 | struct aiv_list_gk20a pm_gpc; |
221 | struct aiv_list_gk20a pm_tpc; | 226 | struct aiv_list_gk20a pm_tpc; |
227 | struct aiv_list_gk20a pm_ppc; | ||
228 | struct aiv_list_gk20a perf_sys; | ||
229 | struct aiv_list_gk20a perf_gpc; | ||
230 | struct aiv_list_gk20a fbp; | ||
231 | struct aiv_list_gk20a fbp_router; | ||
232 | struct aiv_list_gk20a gpc_router; | ||
233 | struct aiv_list_gk20a pm_ltc; | ||
234 | struct aiv_list_gk20a pm_fbpa; | ||
222 | } ctxsw_regs; | 235 | } ctxsw_regs; |
223 | int regs_base_index; | 236 | int regs_base_index; |
224 | bool valid; | 237 | bool valid; |
@@ -484,9 +497,17 @@ int gr_gk20a_get_ctx_buffer_offsets(struct gk20a *g, | |||
484 | u32 *offsets, u32 *offset_addrs, | 497 | u32 *offsets, u32 *offset_addrs, |
485 | u32 *num_offsets, | 498 | u32 *num_offsets, |
486 | bool is_quad, u32 quad); | 499 | bool is_quad, u32 quad); |
500 | int gr_gk20a_get_pm_ctx_buffer_offsets(struct gk20a *g, | ||
501 | u32 addr, | ||
502 | u32 max_offsets, | ||
503 | u32 *offsets, u32 *offset_addrs, | ||
504 | u32 *num_offsets); | ||
487 | int gr_gk20a_update_smpc_ctxsw_mode(struct gk20a *g, | 505 | int gr_gk20a_update_smpc_ctxsw_mode(struct gk20a *g, |
488 | struct channel_gk20a *c, | 506 | struct channel_gk20a *c, |
489 | bool enable_smpc_ctxsw); | 507 | bool enable_smpc_ctxsw); |
508 | int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g, | ||
509 | struct channel_gk20a *c, | ||
510 | bool enable_hwpm_ctxsw); | ||
490 | 511 | ||
491 | struct channel_ctx_gk20a; | 512 | struct channel_ctx_gk20a; |
492 | int gr_gk20a_ctx_patch_write(struct gk20a *g, struct channel_ctx_gk20a *ch_ctx, | 513 | int gr_gk20a_ctx_patch_write(struct gk20a *g, struct channel_ctx_gk20a *ch_ctx, |