summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAingara Paramakuru <aparamakuru@nvidia.com>2016-02-25 14:19:24 -0500
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-03-22 13:42:45 -0400
commit82da6ed595a87c8a3038eecd75880ab21dd4c5de (patch)
tree03e1e1f13c3eaf5d21c1d49362853362634835c9 /include
parent032efd066ec4a8034204b6a34663ab2cac582fbe (diff)
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 <aparamakuru@nvidia.com> Reviewed-on: http://git-master/r/1020917 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/nvgpu.h10
1 files changed, 9 insertions, 1 deletions
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 {
880#define NVGPU_RUNLIST_INTERLEAVE_LEVEL_HIGH 2 880#define NVGPU_RUNLIST_INTERLEAVE_LEVEL_HIGH 2
881#define NVGPU_RUNLIST_INTERLEAVE_NUM_LEVELS 3 881#define NVGPU_RUNLIST_INTERLEAVE_NUM_LEVELS 3
882 882
883/* controls how long a channel occupies an engine uninterrupted */
884struct nvgpu_timeslice_args {
885 __u32 timeslice_us;
886 __u32 reserved;
887};
888
883#define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \ 889#define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \
884 _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args) 890 _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args)
885#define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT \ 891#define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT \
@@ -924,9 +930,11 @@ struct nvgpu_runlist_interleave_args {
924 _IOW(NVGPU_IOCTL_MAGIC, 119, struct nvgpu_channel_wdt_args) 930 _IOW(NVGPU_IOCTL_MAGIC, 119, struct nvgpu_channel_wdt_args)
925#define NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE \ 931#define NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE \
926 _IOW(NVGPU_IOCTL_MAGIC, 120, struct nvgpu_runlist_interleave_args) 932 _IOW(NVGPU_IOCTL_MAGIC, 120, struct nvgpu_runlist_interleave_args)
933#define NVGPU_IOCTL_CHANNEL_SET_TIMESLICE \
934 _IOW(NVGPU_IOCTL_MAGIC, 121, struct nvgpu_timeslice_args)
927 935
928#define NVGPU_IOCTL_CHANNEL_LAST \ 936#define NVGPU_IOCTL_CHANNEL_LAST \
929 _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_RUNLIST_INTERLEAVE) 937 _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_TIMESLICE)
930#define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args) 938#define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args)
931 939
932/* 940/*