diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 0787d4e4..68c1c4e0 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -351,6 +351,28 @@ struct nvgpu_gpu_get_buffer_info_args { | |||
351 | }; | 351 | }; |
352 | }; | 352 | }; |
353 | 353 | ||
354 | #define NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_MAX_COUNT 16 | ||
355 | #define NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_TSC 1 | ||
356 | #define NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_JIFFIES 2 | ||
357 | #define NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_SRC_ID_TIMEOFDAY 3 | ||
358 | |||
359 | struct nvgpu_gpu_get_cpu_time_correlation_sample { | ||
360 | /* gpu timestamp value */ | ||
361 | __u64 cpu_timestamp; | ||
362 | /* raw GPU counter (PTIMER) value */ | ||
363 | __u64 gpu_timestamp; | ||
364 | }; | ||
365 | |||
366 | struct nvgpu_gpu_get_cpu_time_correlation_info_args { | ||
367 | /* timestamp pairs */ | ||
368 | struct nvgpu_gpu_get_cpu_time_correlation_sample samples[ | ||
369 | NVGPU_GPU_GET_CPU_TIME_CORRELATION_INFO_MAX_COUNT]; | ||
370 | /* number of pairs to read */ | ||
371 | __u32 count; | ||
372 | /* cpu clock source id */ | ||
373 | __u32 source_id; | ||
374 | }; | ||
375 | |||
354 | #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ | 376 | #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ |
355 | _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) | 377 | _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) |
356 | #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ | 378 | #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ |
@@ -397,11 +419,13 @@ struct nvgpu_gpu_get_buffer_info_args { | |||
397 | _IO(NVGPU_GPU_IOCTL_MAGIC, 22) | 419 | _IO(NVGPU_GPU_IOCTL_MAGIC, 22) |
398 | #define NVGPU_GPU_IOCTL_CLEAR_SM_ERRORS \ | 420 | #define NVGPU_GPU_IOCTL_CLEAR_SM_ERRORS \ |
399 | _IO(NVGPU_GPU_IOCTL_MAGIC, 23) | 421 | _IO(NVGPU_GPU_IOCTL_MAGIC, 23) |
400 | 422 | #define NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO \ | |
423 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 24, \ | ||
424 | struct nvgpu_gpu_get_cpu_time_correlation_info_args) | ||
401 | #define NVGPU_GPU_IOCTL_LAST \ | 425 | #define NVGPU_GPU_IOCTL_LAST \ |
402 | _IOC_NR(NVGPU_GPU_IOCTL_CLEAR_SM_ERRORS) | 426 | _IOC_NR(NVGPU_GPU_IOCTL_GET_CPU_TIME_CORRELATION_INFO) |
403 | #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ | 427 | #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ |
404 | sizeof(struct nvgpu_gpu_prepare_compressible_read_args) | 428 | sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) |
405 | 429 | ||
406 | /* | 430 | /* |
407 | * /dev/nvhost-tsg-gpu device | 431 | * /dev/nvhost-tsg-gpu device |