From adb33505b21a8e75267bb74d602becf8db51946b Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Fri, 30 Jan 2015 15:22:11 +0200 Subject: gpu: nvgpu: add open channel ioctl to ctrl node Add the ioctl to open a new gpu channel to also the control node for improved process startup performance, in addition to the current open ioctl in the channel node. The new channel fd creation is refactored to a separate function which is called from both ctrl and channel ioctls. Bug 1604952 Change-Id: I3357ceec694c0e6d7a85807183884324cb725d3a Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/679516 Reviewed-by: Sami Kiminki Reviewed-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 20acc66a..1e438775 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -1,7 +1,7 @@ /* * NVGPU Public Interface Header * - * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -238,6 +238,10 @@ struct nvgpu_gpu_get_tpc_masks_args { __u64 mask_buf_addr; }; +struct nvgpu_gpu_open_channel_args { + __s32 channel_fd; +}; + #define NVGPU_GPU_IOCTL_ZCULL_GET_CTX_SIZE \ _IOR(NVGPU_GPU_IOCTL_MAGIC, 1, struct nvgpu_gpu_zcull_get_ctx_size_args) #define NVGPU_GPU_IOCTL_ZCULL_GET_INFO \ @@ -258,9 +262,11 @@ struct nvgpu_gpu_get_tpc_masks_args { _IOWR(NVGPU_GPU_IOCTL_MAGIC, 9, struct nvgpu_gpu_open_tsg_args) #define NVGPU_GPU_IOCTL_GET_TPC_MASKS \ _IOWR(NVGPU_GPU_IOCTL_MAGIC, 10, struct nvgpu_gpu_get_tpc_masks_args) +#define NVGPU_GPU_IOCTL_OPEN_CHANNEL \ + _IOWR(NVGPU_GPU_IOCTL_MAGIC, 11, struct nvgpu_gpu_open_channel_args) #define NVGPU_GPU_IOCTL_LAST \ - _IOC_NR(NVGPU_GPU_IOCTL_GET_TPC_MASKS) + _IOC_NR(NVGPU_GPU_IOCTL_OPEN_CHANNEL) #define NVGPU_GPU_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvgpu_gpu_prepare_compressible_read_args) -- cgit v1.2.2