summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2015-01-14 07:04:08 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:08:02 -0400
commit3877adcd656e8e4329e2c4250119de2256f30730 (patch)
treee1228aea1b348e6c2fcd2bcab30e4ea9ef2f5bea /include
parentf93a8cc36b68500c1d1ae235f929c35c4a039497 (diff)
gpu: nvgpu: add hw perfmon buffer mapping ioctls
Map/unmap buffers for HWPM and deal with its instance block, the minimum work required to run the HWPM via regops from userspace. Bug 1517458 Bug 1573150 Change-Id: If14086a88b54bf434843d7c2fee8a9113023a3b0 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/673689 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index 1e438775..ebeacf9b 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -432,10 +432,26 @@ struct nvgpu_dbg_gpu_suspend_resume_all_sms_args {
432#define NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_ALL_SMS \ 432#define NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_ALL_SMS \
433 _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 6, struct nvgpu_dbg_gpu_suspend_resume_all_sms_args) 433 _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 6, struct nvgpu_dbg_gpu_suspend_resume_all_sms_args)
434 434
435struct nvgpu_dbg_gpu_perfbuf_map_args {
436 __u32 dmabuf_fd; /* in */
437 __u32 reserved;
438 __u64 mapping_size; /* in, size of mapped buffer region */
439 __u64 offset; /* out, virtual address of the mapping */
440};
441
442struct nvgpu_dbg_gpu_perfbuf_unmap_args {
443 __u64 offset;
444};
445
446#define NVGPU_DBG_GPU_IOCTL_PERFBUF_MAP \
447 _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 7, struct nvgpu_dbg_gpu_perfbuf_map_args)
448#define NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP \
449 _IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 8, struct nvgpu_dbg_gpu_perfbuf_unmap_args)
450
435#define NVGPU_DBG_GPU_IOCTL_LAST \ 451#define NVGPU_DBG_GPU_IOCTL_LAST \
436 _IOC_NR(NVGPU_DBG_GPU_IOCTL_SUSPEND_RESUME_ALL_SMS) 452 _IOC_NR(NVGPU_DBG_GPU_IOCTL_PERFBUF_UNMAP)
437#define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \ 453#define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \
438 sizeof(struct nvgpu_dbg_gpu_exec_reg_ops_args) 454 sizeof(struct nvgpu_dbg_gpu_perfbuf_map_args)
439 455
440/* 456/*
441 * /dev/nvhost-gpu device 457 * /dev/nvhost-gpu device