From 907adfd785e3a3582b2649c48bf4c32f41745e3f Mon Sep 17 00:00:00 2001 From: Peter Boonstoppel Date: Tue, 10 Jan 2017 10:22:54 -0800 Subject: gpu: nvgpu: Add NVGPU_IOCTL_CHANNEL_SET_BOOSTED_CTX This ioctl can be used on gp10b to set a flag in the context header indicating this context should be run at elevated clock frequency. FECS ctxsw ucode will read this flag as part of the context switch and will request higher GPU clock frequencies from BPMP for the duration of the context execution. Bug 1819874 Change-Id: I84bf580923d95585095716d49cea24e58c9440ed Signed-off-by: Peter Boonstoppel Reviewed-on: http://git-master/r/1292746 Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/linux/nvgpu.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 5a9a1d25..1853f667 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -1537,6 +1537,13 @@ struct nvgpu_preemption_mode_args { __u32 compute_preempt_mode; /* in */ }; +struct nvgpu_boosted_ctx_args { +#define NVGPU_BOOSTED_CTX_MODE_NORMAL (0U) +#define NVGPU_BOOSTED_CTX_MODE_BOOSTED_EXECUTION (1U) + __u32 boost; + __u32 padding; +}; + #define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \ _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args) #define NVGPU_IOCTL_CHANNEL_SET_TIMEOUT \ @@ -1585,9 +1592,11 @@ struct nvgpu_preemption_mode_args { _IOW(NVGPU_IOCTL_MAGIC, 122, struct nvgpu_preemption_mode_args) #define NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX \ _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_LAST \ - _IOC_NR(NVGPU_IOCTL_CHANNEL_ALLOC_GPFIFO_EX) + _IOC_NR(NVGPU_IOCTL_CHANNEL_SET_BOOSTED_CTX) #define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_alloc_gpfifo_ex_args) /* -- cgit v1.2.2