summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/nvgpu.h
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2016-04-12 15:33:36 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-04-15 17:05:23 -0400
commit6b35cb05b7822174bf037da7229154004df4f229 (patch)
tree7b0bf53f809160322c310a885759794c9c79161c /include/uapi/linux/nvgpu.h
parent701803d489ad1e2ba818a637f81f42aa6c484eb2 (diff)
gpu: nvgpu: Implement NVGPU_GPU_IOCTL_GET_GPU_TIME
Implement NVGPU_GPU_IOCTL_GET_GPU_TIME for reading the GPU time. Bug 1395833 Change-Id: I7ddc7c28ff0c9a336cc0dcd820b15fb0fea714d0 Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: http://git-master/r/1125630 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/uapi/linux/nvgpu.h')
-rw-r--r--include/uapi/linux/nvgpu.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index d84c5440..cf89b9d8 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -377,6 +377,14 @@ struct nvgpu_gpu_get_cpu_time_correlation_info_args {
377 __u32 source_id; 377 __u32 source_id;
378}; 378};
379 379
380struct nvgpu_gpu_get_gpu_time_args {
381 /* raw GPU counter (PTIMER) value */
382 __u64 gpu_timestamp;
383
384 /* reserved for future extensions */
385 __u64 reserved;
386};
387
380#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ 388#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \
381 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) 389 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args)
382#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ 390#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \
@@ -426,8 +434,11 @@ struct nvgpu_gpu_get_cpu_time_correlation_info_args {
426#define NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO \ 434#define NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO \
427 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 24, \ 435 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 24, \
428 struct nvgpu_gpu_get_cpu_time_correlation_info_args) 436 struct nvgpu_gpu_get_cpu_time_correlation_info_args)
437#define NVGPU_GPU_IOCTL_GET_GPU_TIME \
438 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 25, \
439 struct nvgpu_gpu_get_gpu_time_args)
429#define NVGPU_GPU_IOCTL_LAST \ 440#define NVGPU_GPU_IOCTL_LAST \
430 _IOC_NR(NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO) 441 _IOC_NR(NVGPU_GPU_IOCTL_GET_GPU_TIME)
431#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ 442#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \
432 sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) 443 sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args)
433 444