From 23e92bee4a8f6b66dfd1f5082af2712c0ae0b602 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Wed, 25 Jan 2017 18:50:44 -0800 Subject: gpu: nvgpu: profiler create/free, hwpm reserve Add support for creating/freeing profiler objects, hwpm reservations Bug 1775465 JIRA EVLR-680 JIRA EVLR-682 Change-Id: I4db83d00e4b0b552b05b9aae96dc553dd1257d88 Signed-off-by: Peter Daifuku Reviewed-on: http://git-master/r/1294401 Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/linux/nvgpu.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'include/uapi') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 400d430b..75011998 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -1264,9 +1264,27 @@ struct nvgpu_dbg_gpu_access_fb_memory_args { #define NVGPU_DBG_GPU_IOCTL_ACCESS_FB_MEMORY \ _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 19, struct nvgpu_dbg_gpu_access_fb_memory_args) +struct nvgpu_dbg_gpu_profiler_obj_mgt_args { + __u32 profiler_handle; + __u32 reserved; +}; + +#define NVGPU_DBG_GPU_IOCTL_PROFILER_ALLOCATE \ + _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 20, struct nvgpu_dbg_gpu_profiler_obj_mgt_args) + +#define NVGPU_DBG_GPU_IOCTL_PROFILER_FREE \ + _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 21, struct nvgpu_dbg_gpu_profiler_obj_mgt_args) + +struct nvgpu_dbg_gpu_profiler_reserve_args { + __u32 profiler_handle; + __u32 acquire; +}; + +#define NVGPU_DBG_GPU_IOCTL_PROFILER_RESERVE \ + _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 22, struct nvgpu_dbg_gpu_profiler_reserve_args) #define NVGPU_DBG_GPU_IOCTL_LAST \ - _IOC_NR(NVGPU_DBG_GPU_IOCTL_ACCESS_FB_MEMORY) + _IOC_NR(NVGPU_DBG_GPU_IOCTL_PROFILER_RESERVE) #define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvgpu_dbg_gpu_access_fb_memory_args) -- cgit v1.2.2