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 --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 0bec9e82..b09fde65 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h @@ -47,6 +47,9 @@ #define RC_TYPE_PBDMA_FAULT 2 #define RC_TYPE_NO_RC 0xff +#define NVGPU_FIFO_DEFAULT_TIMESLICE_TIMEOUT 128UL +#define NVGPU_FIFO_DEFAULT_TIMESLICE_SCALE 3UL + /* * Number of entries in the kickoff latency buffer, used to calculate * the profiling and histogram. This number is calculated to be statistically @@ -399,4 +402,6 @@ void gk20a_fifo_reset_pbdma_method(struct gk20a *g, int pbdma_id, int pbdma_method_index); unsigned int gk20a_fifo_handle_pbdma_intr_0(struct gk20a *g, u32 pbdma_id, u32 pbdma_intr_0, u32 *handled, u32 *error_notifier); + +u32 gk20a_fifo_default_timeslice_us(struct gk20a *g); #endif /*__GR_GK20A_H__*/ -- cgit v1.2.2