From 9592a4e6fce8204e9ada54ba00902e792199fec5 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 28 Oct 2015 16:13:14 +0530 Subject: gpu: nvgpu: IOCTL to set TSG timeslice Add new IOCTL NVGPU_IOCTL_TSG_SET_PRIORITY to allow setting timeslice for entire TSG Return error from channel specific IOCTL_CHANNEL_SET_PRIORITY if the channel is part of TSG Separate out API gk20a_channel_get_timescale_from_timeslice() to get timeslice_timeout and scale from timeslice period Use this API to get timeslice_timeout and scale for TSG and store it in tsg_gk20a structure Then trigger runlist update so that new timeslice values will be re-written to runlist for TSG Bug 200146615 Change-Id: I555467d034f81b372b31372f0835d72b1c159508 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/824206 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/uapi/linux/nvgpu.h') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index f55346db..6024edee 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -377,11 +377,13 @@ struct nvgpu_gpu_vsms_mapping { _IO(NVGPU_TSG_IOCTL_MAGIC, 4) #define NVGPU_IOCTL_TSG_PREEMPT \ _IO(NVGPU_TSG_IOCTL_MAGIC, 5) +#define NVGPU_IOCTL_TSG_SET_PRIORITY \ + _IOW(NVGPU_TSG_IOCTL_MAGIC, 6, struct nvgpu_set_priority_args) #define NVGPU_TSG_IOCTL_MAX_ARG_SIZE \ - sizeof(int) + sizeof(struct nvgpu_set_priority_args) #define NVGPU_TSG_IOCTL_LAST \ - _IOC_NR(NVGPU_IOCTL_TSG_PREEMPT) + _IOC_NR(NVGPU_IOCTL_TSG_SET_PRIORITY) /* * /dev/nvhost-dbg-gpu device * -- cgit v1.2.2