summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-06-08 02:58:25 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-10 15:26:28 -0400
commit823ba424568848c1863c6f4b798bbbf0428a9a05 (patch)
treeb0c21683811b76d0a307213a635c2cd17f38b9a0 /include
parent7f6fede92ce0d17395b222fef63eb8895b258ee4 (diff)
gpu: nvgpu: Add uapi support for NVGPU_GPU_IOCTL_GET_ENGINE_INFO
Implement NVGPU_GPU_IOCTL_GET_ENGINE_INFO for retrieving the list of supported engines and their corresponding run list id:s. JIRA DNVGPU-25 Change-Id: I8703388660190f7dcb509c0676f283ca4b820b6f Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1160939 Reviewed-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h
index 03173339..9d649536 100644
--- a/include/uapi/linux/nvgpu.h
+++ b/include/uapi/linux/nvgpu.h
@@ -394,6 +394,33 @@ struct nvgpu_gpu_get_gpu_time_args {
394 __u64 reserved; 394 __u64 reserved;
395}; 395};
396 396
397struct nvgpu_gpu_get_engine_info_item {
398
399#define NVGPU_GPU_ENGINE_ID_GR 0
400#define NVGPU_GPU_ENGINE_ID_GR_COPY 1
401#define NVGPU_GPU_ENGINE_ID_ASYNC_COPY 2
402 __u32 engine_id;
403
404 __u32 engine_instance;
405
406 /* runlist id for opening channels to the engine, or -1 if
407 * channels are not supported */
408 __s32 runlist_id;
409
410 __u32 reserved;
411};
412
413struct nvgpu_gpu_get_engine_info_args {
414 /* [in] Buffer size reserved by userspace.
415 *
416 * [out] Full kernel buffer size. Multiple of sizeof(struct
417 * nvgpu_gpu_get_engine_info_item)
418 */
419 __u32 engine_info_buf_size;
420 __u32 reserved;
421 __u64 engine_info_buf_addr;
422};
423
397#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ 424#define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \
398 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) 425 _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args)
399#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ 426#define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \
@@ -446,8 +473,11 @@ struct nvgpu_gpu_get_gpu_time_args {
446#define NVGPU_GPU_IOCTL_GET_GPU_TIME \ 473#define NVGPU_GPU_IOCTL_GET_GPU_TIME \
447 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 25, \ 474 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 25, \
448 struct nvgpu_gpu_get_gpu_time_args) 475 struct nvgpu_gpu_get_gpu_time_args)
476#define NVGPU_GPU_IOCTL_GET_ENGINE_INFO \
477 _IOWR(NVGPU_GPU_IOCTL_MAGIC, 26, \
478 struct nvgpu_gpu_get_engine_info_args)
449#define NVGPU_GPU_IOCTL_LAST \ 479#define NVGPU_GPU_IOCTL_LAST \
450 _IOC_NR(NVGPU_GPU_IOCTL_GET_GPU_TIME) 480 _IOC_NR(NVGPU_GPU_IOCTL_GET_ENGINE_INFO)
451#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ 481#define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \
452 sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args) 482 sizeof(struct nvgpu_gpu_get_cpu_time_correlation_info_args)
453 483