From 82da6ed595a87c8a3038eecd75880ab21dd4c5de Mon Sep 17 00:00:00 2001 From: Aingara Paramakuru Date: Thu, 25 Feb 2016 14:19:24 -0500 Subject: gpu: nvgpu: add support to set channel timeslice As part of improving GPU scheduling, userspace can now set a channel's timeslice, within reasonable limits imposed by the kernel driver. JIRA VFND-1312 Bug 1729664 Change-Id: I4c3430c43437889b8685f12988d4b967bb7877bb Signed-off-by: Aingara Paramakuru Reviewed-on: http://git-master/r/1020917 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 68c1c4e0..0c8de87f 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -880,6 +880,12 @@ struct nvgpu_runlist_interleave_args { #define NVGPU_RUNLIST_INTERLEAVE_LEVEL_HIGH 2 #define NVGPU_RUNLIST_INTERLEAVE_NUM_LEVELS 3 +/* controls how long a channel occupies an engine uninterrupted */ +struct nvgpu_timeslice_args { + __u32 timeslice_us; + __u32 reserved; +}; + #define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \ _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args) #define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT \ @@ -924,9 +930,11 @@ struct nvgpu_runlist_interleave_args { _IOW(NVGPU_IOCTL_MAGIC, 119, struct nvgpu_channel_wdt_args) #define NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE \ _IOW(NVGPU_IOCTL_MAGIC, 120, struct nvgpu_runlist_interleave_args) +#define NVGPU_IOCTL_CHANNEL_SET_TIMESLICE \ + _IOW(NVGPU_IOCTL_MAGIC, 121, struct nvgpu_timeslice_args) #define NVGPU_IOCTL_CHANNEL_LAST \ - _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE) + _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_TIMESLICE) #define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args) /* -- cgit v1.2.2