diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-12-21 04:51:49 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-19 11:07:45 -0400 |
commit | b63c4bced5b01e2aef477ecfca784848e2a2cd3a (patch) | |
tree | 4309e72334876236efc29fd57bda6f49599c7732 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | dfac8ce70464413c0e3748634c57d49950e71933 (diff) |
gpu: nvgpu: IOCTL to suspend/resume context
Add below IOCTL to suspend/resume a context
NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_CONTEXTS:
Suspend sequence :
- disable ctxsw
- loop through list of channels
- if channel is ctx resident, suspend all SMs
- otherwise, disable channel/TSG
- enable ctxsw
Resume sequence :
- disable ctxsw
- loop through list of channels
- if channel is ctx resident, resume all SMs
- otherwise, enable channel/TSG
- enable ctxsw
Bug 200156699
Change-Id: Iacf1bf7877b67ddf87cc6891c37c758a4644b014
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1120332
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index b03e779b..5c397ad8 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -248,6 +248,9 @@ struct gpu_ops { | |||
248 | sm_error_state); | 248 | sm_error_state); |
249 | int (*clear_sm_error_state)(struct gk20a *g, | 249 | int (*clear_sm_error_state)(struct gk20a *g, |
250 | struct channel_gk20a *ch, u32 sm_id); | 250 | struct channel_gk20a *ch, u32 sm_id); |
251 | int (*suspend_contexts)(struct gk20a *g, | ||
252 | struct dbg_session_gk20a *dbg_s, | ||
253 | int *ctx_resident_ch_fd); | ||
251 | } gr; | 254 | } gr; |
252 | const char *name; | 255 | const char *name; |
253 | struct { | 256 | struct { |