3 * (C) COPYRIGHT ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
10 * A copy of the licence is included with the program, and can also be obtained
11 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12 * Boston, MA 02110-1301, USA.
19 * @file mali_kbase_config_defaults.h
21 * Default values for configuration settings
25 #ifndef _KBASE_CONFIG_DEFAULTS_H_
26 #define _KBASE_CONFIG_DEFAULTS_H_
28 /* Default irq throttle time. This is the default desired minimum time in
29 * between two consecutive interrupts from the gpu. The irq throttle gpu
30 * register is set after this value. */
31 #define DEFAULT_IRQ_THROTTLE_TIME_US 20
33 /*** Begin Scheduling defaults ***/
36 * Default scheduling tick granuality, in nanoseconds
39 #define DEFAULT_JS_SCHEDULING_TICK_NS 50000000u
42 * Default minimum number of scheduling ticks before jobs are soft-stopped.
44 * This defines the time-slice for a job (which may be different from that of
47 /* Between 0.1 and 0.15s before soft-stop */
48 #define DEFAULT_JS_SOFT_STOP_TICKS 2
51 * Default minimum number of scheduling ticks before CL jobs are soft-stopped.
53 /* Between 0.05 and 0.1s before soft-stop */
54 #define DEFAULT_JS_SOFT_STOP_TICKS_CL 1
57 * Default minimum number of scheduling ticks before jobs are hard-stopped
59 /* 1.2s before hard-stop, for a certain GLES2 test at 128x128 (bound by
60 * combined vertex+tiler job)
62 #define DEFAULT_JS_HARD_STOP_TICKS_SS_HW_ISSUE_8408 24
63 /* Between 0.2 and 0.25s before hard-stop */
64 #define DEFAULT_JS_HARD_STOP_TICKS_SS 4
67 * Default minimum number of scheduling ticks before CL jobs are hard-stopped.
69 /* Between 0.1 and 0.15s before hard-stop */
70 #define DEFAULT_JS_HARD_STOP_TICKS_CL 2
73 * Default minimum number of scheduling ticks before jobs are hard-stopped
77 #define DEFAULT_JS_HARD_STOP_TICKS_NSS 1200
80 * Default minimum number of scheduling ticks before the GPU is reset
81 * to clear a "stuck" job
83 /* 1.8s before resetting GPU, for a certain GLES2 test at 128x128 (bound by
84 * combined vertex+tiler job)
86 #define DEFAULT_JS_RESET_TICKS_SS_HW_ISSUE_8408 36
87 /* 0.3-0.35s before GPU is reset */
88 #define DEFAULT_JS_RESET_TICKS_SS 6
91 * Default minimum number of scheduling ticks before the GPU is reset
92 * to clear a "stuck" CL job.
94 /* 0.2-0.25s before GPU is reset */
95 #define DEFAULT_JS_RESET_TICKS_CL 4
98 * Default minimum number of scheduling ticks before the GPU is reset
99 * to clear a "stuck" job during dumping.
101 /* 60.1s @ 100ms tick */
102 #define DEFAULT_JS_RESET_TICKS_NSS 1202
105 * Number of milliseconds given for other jobs on the GPU to be
106 * soft-stopped when the GPU needs to be reset.
108 #define DEFAULT_JS_RESET_TIMEOUT_MS 3000
111 * Default timeslice that a context is scheduled in for, in nanoseconds.
113 * When a context has used up this amount of time across its jobs, it is
114 * scheduled out to let another run.
116 * @note the resolution is nanoseconds (ns) here, because that's the format
117 * often used by the OS.
119 /* 0.05s - at 20fps a ctx does at least 1 frame before being scheduled out.
120 * At 40fps, 2 frames, etc
122 #define DEFAULT_JS_CTX_TIMESLICE_NS 50000000
125 * Default initial runtime of a context for CFS, in ticks.
127 * This value is relative to that of the least-run context, and defines where
128 * in the CFS queue a new context is added.
130 #define DEFAULT_JS_CFS_CTX_RUNTIME_INIT_SLICES 1
133 * Default minimum runtime value of a context for CFS, in ticks.
135 * This value is relative to that of the least-run context. This prevents
136 * "stored-up timeslices" DoS attacks.
138 #define DEFAULT_JS_CFS_CTX_RUNTIME_MIN_SLICES 2
141 * Default setting for whether to prefer security or performance.
143 * Currently affects only r0p0-15dev0 HW and earlier.
145 #define DEFAULT_SECURE_BUT_LOSS_OF_PERFORMANCE MALI_FALSE
148 * Default setting for read Address ID limiting on AXI.
150 #define DEFAULT_ARID_LIMIT KBASE_AID_32
153 * Default setting for write Address ID limiting on AXI.
155 #define DEFAULT_AWID_LIMIT KBASE_AID_32
158 * Default setting for using alternative hardware counters.
160 #define DEFAULT_ALTERNATIVE_HWC MALI_FALSE
162 /*** End Scheduling defaults ***/
164 /*** Begin Power Manager defaults */
167 #define DEFAULT_PM_DVFS_FREQ 100
170 * Default poweroff tick granuality, in nanoseconds
173 #define DEFAULT_PM_GPU_POWEROFF_TICK_NS 400000
176 * Default number of poweroff ticks before shader cores are powered off
179 #define DEFAULT_PM_POWEROFF_TICK_SHADER 2
182 * Default number of poweroff ticks before GPU is powered off
184 #define DEFAULT_PM_POWEROFF_TICK_GPU 2 /* 400-800us */
186 /*** End Power Manager defaults ***/
189 * Default UMP device mapping. A UMP_DEVICE_<device>_SHIFT value which
190 * defines which UMP device this GPU should be mapped to.
192 #define DEFAULT_UMP_GPU_DEVICE_SHIFT UMP_DEVICE_Z_SHIFT
195 * Default value for KBASE_CONFIG_ATTR_CPU_SPEED_FUNC.
196 * Points to @ref kbase_cpuprops_get_default_clock_speed.
198 #define DEFAULT_CPU_SPEED_FUNC \
199 ((uintptr_t)kbase_cpuprops_get_default_clock_speed)
201 #endif /* _KBASE_CONFIG_DEFAULTS_H_ */