From 37155b65f1dd6039bdef92f513d86640956bc12c Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Wed, 9 Mar 2016 19:10:20 -0800 Subject: gpu: nvgpu: support for hwpm context switching Add support for hwpm context switching Bug 1648200 Change-Id: I482899bf165cd2ef24bb8617be16df01218e462f Signed-off-by: Peter Daifuku Reviewed-on: http://git-master/r/1120450 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 45d1c217..a75a5ae0 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -647,8 +647,20 @@ struct nvgpu_dbg_gpu_set_next_stop_trigger_type_args { _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 12, struct nvgpu_dbg_gpu_set_next_stop_trigger_type_args) +/* PM Context Switch Mode */ +#define NVGPU_DBG_GPU_HWPM_CTXSW_MODE_NO_CTXSW (0x00000000) +#define NVGPU_DBG_GPU_HWPM_CTXSW_MODE_CTXSW (0x00000001) + +struct nvgpu_dbg_gpu_hwpm_ctxsw_mode_args { + __u32 mode; + __u32 reserved; +}; + +#define NVGPU_DBG_GPU_IOCTL_HWPM_CTXSW_MODE \ + _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 13, struct nvgpu_dbg_gpu_hwpm_ctxsw_mode_args) + #define NVGPU_DBG_GPU_IOCTL_LAST \ - _IOC_NR(NVGPU_DBG_GPU_IOCTL_SET_NEXT_STOP_TRIGGER_TYPE) + _IOC_NR(NVGPU_DBG_GPU_IOCTL_HWPM_CTXSW_MODE) #define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvgpu_dbg_gpu_perfbuf_map_args) -- cgit v1.2.2