From b03afb6d5c4bbca5a26cc95027491c816e5e1f6d Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 19 Apr 2017 16:47:13 -0700 Subject: gpu: nvgpu: add ioctls to get current timeslice Add the following ioctls - NVGPU_CHANNEL_IOCTL_GET_TIMESLICE for channel timeslice in us - NVGPU_TSG_IOCTL_GET_TIMESLICE for TSG timeslice in us If timeslice has not been set explicitly, ioctl returns the default timeslice that will be used when programming the runlist entry. Bug 1883271 Change-Id: Ib18fdd836323b1a2d4efceb1e27d07713bd6fca5 Signed-off-by: Thomas Fleury Reviewed-on: http://git-master/r/1469040 Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/linux/nvgpu.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 401722b1..e7d37221 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -968,11 +968,13 @@ struct nvgpu_gpu_set_event_filter_args { _IOW(NVGPU_TSG_IOCTL_MAGIC, 8, struct nvgpu_runlist_interleave_args) #define NVGPU_IOCTL_TSG_SET_TIMESLICE \ _IOW(NVGPU_TSG_IOCTL_MAGIC, 9, struct nvgpu_timeslice_args) +#define NVGPU_IOCTL_TSG_GET_TIMESLICE \ + _IOR(NVGPU_TSG_IOCTL_MAGIC, 10, struct nvgpu_timeslice_args) #define NVGPU_TSG_IOCTL_MAX_ARG_SIZE \ sizeof(struct nvgpu_event_id_ctrl_args) #define NVGPU_TSG_IOCTL_LAST \ - _IOC_NR(NVGPU_IOCTL_TSG_SET_TIMESLICE) + _IOC_NR(NVGPU_IOCTL_TSG_GET_TIMESLICE) /* @@ -1632,9 +1634,11 @@ struct nvgpu_boosted_ctx_args { _IOW(NVGPU_IOCTL_MAGIC, 123, struct nvgpu_alloc_gpfifo_ex_args) #define NVGPU_IOCTL_CHANNEL_SET_BOOSTED_CTX \ _IOW(NVGPU_IOCTL_MAGIC, 124, struct nvgpu_boosted_ctx_args) +#define NVGPU_IOCTL_CHANNEL_GET_TIMESLICE \ + _IOW(NVGPU_IOCTL_MAGIC, 125, struct nvgpu_timeslice_args) #define NVGPU_IOCTL_CHANNEL_LAST \ - _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_BOOSTED_CTX) + _IOC_NR(NVGPU_IOCTL_CHANNEL_GET_TIMESLICE) #define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_alloc_gpfifo_ex_args) /* -- cgit v1.2.2