From 325e0587d9180b05d59869679fc06b0ba979d973 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 20 Feb 2015 18:15:04 -0800 Subject: gpu: nvgpu: Allow enabling PC sampling Allow enabling of PC sampling hardware workaround. It is only applicable to gm20b. Bug 1517458 Bug 1573150 Change-Id: Iad6a3ae556489fb7ab9628637d291849d2cd98ea Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/710421 --- include/uapi/linux/nvgpu.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include/uapi/linux/nvgpu.h') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 3c53ba94..9e3a362f 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -457,8 +457,20 @@ struct nvgpu_dbg_gpu_perfbuf_unmap_args { #define NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP \ _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 8, struct nvgpu_dbg_gpu_perfbuf_unmap_args) +/* Enable/disable PC Sampling */ +struct nvgpu_dbg_gpu_pc_sampling_args { + __u32 enable; + __u32 _pad0[1]; +}; + +#define NVGPU_DBG_GPU_IOCTL_PC_SAMPLING_DISABLE 0 +#define NVGPU_DBG_GPU_IOCTL_PC_SAMPLING_ENABLE 1 + +#define NVGPU_DBG_GPU_IOCTL_PC_SAMPLING \ + _IOW(NVGPU_DBG_GPU_IOCTL_MAGIC, 9, struct nvgpu_dbg_gpu_pc_sampling_args) + #define NVGPU_DBG_GPU_IOCTL_LAST \ - _IOC_NR(NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP) + _IOC_NR(NVGPU_DBG_GPU_IOCTL_PC_SAMPLING) #define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvgpu_dbg_gpu_perfbuf_map_args) -- cgit v1.2.2