From 5febd08ae76cbd4042e53ad70f062cd491b7e8b6 Mon Sep 17 00:00:00 2001 From: sujeet baranwal Date: Tue, 30 Sep 2014 10:54:57 -0700 Subject: gpu: kernel support for suspending/resuming SMs Kernel support for allowing a GPU debugger to suspend and resume SMs. Invocation of "suspend" on a given channel will suspend all SMs if the channel is resident, else remove the channel form the runlist. Similarly, "resume" will either resume all SMs if the channel was resident, or re-enable the channel in the runlist. Change-Id: I3b4ae21dc1b91c1059c828ec6db8125f8a0ce194 Signed-off-by: sujeet baranwal Signed-off-by: Mayank Kaushik Reviewed-on: http://git-master/r/552115 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 719dc255..b7f65d75 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -365,9 +365,19 @@ struct nvgpu_dbg_gpu_smpc_ctxsw_mode_args { #define NVGPU_DBG_GPU_IOCTL_SMPC_CTXSW_MODE \ _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 5, struct nvgpu_dbg_gpu_smpc_ctxsw_mode_args) +/* Suspend /Resume SM control */ +#define NVGPU_DBG_GPU_SUSPEND_ALL_SMS 1 +#define NVGPU_DBG_GPU_RESUME_ALL_SMS 2 + +struct nvgpu_dbg_gpu_suspend_resume_all_sms_args { + __u32 mode; +} __packed; + +#define NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_ALL_SMS \ + _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 6, struct nvgpu_dbg_gpu_suspend_resume_all_sms_args) #define NVGPU_DBG_GPU_IOCTL_LAST \ - _IOC_NR(NVGPU_DBG_GPU_IOCTL_SMPC_CTXSW_MODE) + _IOC_NR(NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_ALL_SMS) #define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvgpu_dbg_gpu_exec_reg_ops_args) -- cgit v1.2.2