From a295d90cac87949256b629e29f97fa5e28a1feb3 Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Thu, 9 Jun 2016 10:30:16 +0530 Subject: gpu: nvgpu: Add uapi support for non-graphics engines Extend the existing NVGPU_GPU_IOCTL_OPEN_CHANNEL interface to allow opening channels for other than the primary (i.e., the graphics) runlists. This is required to push work to dGPU engines that have their own runlists, such as the asynchronous copy engines and the multimedia engines. Minor change - Added active_engines_list allocation and assignment for fifo_vgpu back end. JIRA DNVGPU-25 Change-Id: I3ed377e2c9a2b4dd72e8256463510a62c64e7a8f Signed-off-by: Lakshmanan M Reviewed-on: http://git-master/r/1161541 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'include/uapi') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 9d649536..992355d9 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -298,7 +298,20 @@ struct nvgpu_gpu_get_tpc_masks_args { }; struct nvgpu_gpu_open_channel_args { - __s32 channel_fd; + union { + __s32 channel_fd; /* deprecated: use out.channel_fd instead */ + struct { + /* runlist_id is the runlist for the + * channel. Basically, the runlist specifies the target + * engine(s) for which the channel is + * opened. Runlist_id -1 is synonym for the primary + * graphics runlist. */ + __s32 runlist_id; + } in; + struct { + __s32 channel_fd; + } out; + }; }; /* L2 cache writeback, optionally invalidate clean lines and flush fb */ @@ -820,7 +833,20 @@ struct nvgpu_get_param_args { } __packed; struct nvgpu_channel_open_args { - __s32 channel_fd; + union { + __s32 channel_fd; /* deprecated: use out.channel_fd instead */ + struct { + /* runlist_id is the runlist for the + * channel. Basically, the runlist specifies the target + * engine(s) for which the channel is + * opened. Runlist_id -1 is synonym for the primary + * graphics runlist. */ + __s32 runlist_id; + } in; + struct { + __s32 channel_fd; + } out; + }; }; struct nvgpu_set_nvmap_fd_args { -- cgit v1.2.2