diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2017-01-25 19:59:31 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-09 13:44:55 -0500 |
commit | 6c35cebdcb2d14741385cfe051577882a806cdb8 (patch) | |
tree | 80c0e8f0519dc253839a1aa7c8fe6e7da7ad336a /drivers/gpu/nvgpu/gk20a | |
parent | bc47d822298b9f3b2f93a384a7780a3763fee495 (diff) |
gpu: nvgpu: vgpu: suspend/resume contexts
Add ability to suspend/resume contexts for a debug session
(NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_CONTEXTS), in virtualized
case:
- added hal function to resume contexts.
- added vgpu support for suspend contexts, i.e. build a list
of channel ids, and send TEGRA_VGPU_CMD_SUSPEND_CONTEXTS
- added vgpu support for resume contexts, i.e. build a list
of channel ids, and send TEGRA_VGPU_CMD_RESUME_CONTEXTS
Bug 1791111
Change-Id: Icc1c00d94a94dab6384ac263fb811c00fa4b07bf
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/1294761
(cherry picked from commit d17a38eda312ffa92ce92e5bafc30727a8b76c4e)
Reviewed-on: http://git-master/r/1299059
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Cory Perry <cperry@nvidia.com>
Tested-by: Cory Perry <cperry@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 0a0aada7..6a32d727 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -777,7 +777,7 @@ nvgpu_dbg_gpu_ioctl_suspend_resume_contexts(struct dbg_session_gk20a *dbg_s, | |||
777 | break; | 777 | break; |
778 | 778 | ||
779 | case NVGPU_DBG_GPU_RESUME_ALL_CONTEXTS: | 779 | case NVGPU_DBG_GPU_RESUME_ALL_CONTEXTS: |
780 | err = gr_gk20a_resume_contexts(g, dbg_s, | 780 | err = g->ops.gr.resume_contexts(g, dbg_s, |
781 | &ctx_resident_ch_fd); | 781 | &ctx_resident_ch_fd); |
782 | break; | 782 | break; |
783 | } | 783 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 8ce682e3..e55753fe 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -309,6 +309,9 @@ struct gpu_ops { | |||
309 | int (*suspend_contexts)(struct gk20a *g, | 309 | int (*suspend_contexts)(struct gk20a *g, |
310 | struct dbg_session_gk20a *dbg_s, | 310 | struct dbg_session_gk20a *dbg_s, |
311 | int *ctx_resident_ch_fd); | 311 | int *ctx_resident_ch_fd); |
312 | int (*resume_contexts)(struct gk20a *g, | ||
313 | struct dbg_session_gk20a *dbg_s, | ||
314 | int *ctx_resident_ch_fd); | ||
312 | int (*set_preemption_mode)(struct channel_gk20a *ch, | 315 | int (*set_preemption_mode)(struct channel_gk20a *ch, |
313 | u32 graphics_preempt_mode, | 316 | u32 graphics_preempt_mode, |
314 | u32 compute_preempt_mode); | 317 | u32 compute_preempt_mode); |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index e695f02e..3ab63862 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -9304,6 +9304,7 @@ void gk20a_init_gr_ops(struct gpu_ops *gops) | |||
9304 | gops->gr.update_sm_error_state = gk20a_gr_update_sm_error_state; | 9304 | gops->gr.update_sm_error_state = gk20a_gr_update_sm_error_state; |
9305 | gops->gr.clear_sm_error_state = gk20a_gr_clear_sm_error_state; | 9305 | gops->gr.clear_sm_error_state = gk20a_gr_clear_sm_error_state; |
9306 | gops->gr.suspend_contexts = gr_gk20a_suspend_contexts; | 9306 | gops->gr.suspend_contexts = gr_gk20a_suspend_contexts; |
9307 | gops->gr.resume_contexts = gr_gk20a_resume_contexts; | ||
9307 | gops->gr.get_preemption_mode_flags = gr_gk20a_get_preemption_mode_flags; | 9308 | gops->gr.get_preemption_mode_flags = gr_gk20a_get_preemption_mode_flags; |
9308 | gops->gr.program_active_tpc_counts = gr_gk20a_program_active_tpc_counts; | 9309 | gops->gr.program_active_tpc_counts = gr_gk20a_program_active_tpc_counts; |
9309 | gops->gr.program_sm_id_numbering = gr_gk20a_program_sm_id_numbering; | 9310 | gops->gr.program_sm_id_numbering = gr_gk20a_program_sm_id_numbering; |