diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/nvgpu.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 84732452..0bf88628 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -510,6 +510,18 @@ struct nvgpu_gpu_alloc_vidmem_args { | |||
510 | }; | 510 | }; |
511 | }; | 511 | }; |
512 | 512 | ||
513 | struct nvgpu_gpu_get_memory_state_args { | ||
514 | /* | ||
515 | * Current free space for this device; may change even when any | ||
516 | * kernel-managed metadata (e.g., page tables or channels) is allocated | ||
517 | * or freed. For an idle gpu, an allocation of this size would succeed. | ||
518 | */ | ||
519 | __u64 total_free_bytes; | ||
520 | |||
521 | /* For future use; must be set to 0. */ | ||
522 | __u64 reserved[4]; | ||
523 | }; | ||
524 | |||
513 | #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ | 525 | #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ |
514 | _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) | 526 | _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) |
515 | #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ | 527 | #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ |
@@ -568,8 +580,11 @@ struct nvgpu_gpu_alloc_vidmem_args { | |||
568 | #define NVGPU_GPU_IOCTL_ALLOC_VIDMEM \ | 580 | #define NVGPU_GPU_IOCTL_ALLOC_VIDMEM \ |
569 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 27, \ | 581 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 27, \ |
570 | struct nvgpu_gpu_alloc_vidmem_args) | 582 | struct nvgpu_gpu_alloc_vidmem_args) |
583 | #define NVGPU_GPU_IOCTL_GET_MEMORY_STATE \ | ||
584 | _IOWR(NVGPU_GPU_IOCTL_MAGIC, 33, \ | ||
585 | struct nvgpu_gpu_get_memory_state_args) | ||
571 | #define NVGPU_GPU_IOCTL_LAST \ | 586 | #define NVGPU_GPU_IOCTL_LAST \ |
572 | _IOC_NR(NVGPU_GPU_IOCTL_ALLOC_VIDMEM) | 587 | _IOC_NR(NVGPU_GPU_IOCTL_GET_MEMORY_STATE) |
573 | #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ | 588 | #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ |
574 | sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) | 589 | sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) |
575 | 590 | ||