rk3288 gpu : update GPU driver r4p0_eac version
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / mali_kbase_config_defaults.h
1 /*
2  *
3  * (C) COPYRIGHT ARM Limited. All rights reserved.
4  *
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
8  * of such GNU licence.
9  *
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.
13  *
14  */
15
16
17
18 /**
19  * @file mali_kbase_config_defaults.h
20  *
21  * Default values for configuration settings
22  *
23  */
24
25 #ifndef _KBASE_CONFIG_DEFAULTS_H_
26 #define _KBASE_CONFIG_DEFAULTS_H_
27
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
32
33 /*** Begin Scheduling defaults ***/
34
35 /**
36  * Default scheduling tick granuality, in nanoseconds
37  */
38 /* 50ms */
39 #define DEFAULT_JS_SCHEDULING_TICK_NS 50000000u
40
41 /**
42  * Default minimum number of scheduling ticks before jobs are soft-stopped.
43  *
44  * This defines the time-slice for a job (which may be different from that of
45  * a context)
46  */
47 /* Between 0.1 and 0.15s before soft-stop */
48 #define DEFAULT_JS_SOFT_STOP_TICKS 2
49
50 /**
51  * Default minimum number of scheduling ticks before CL jobs are soft-stopped.
52  */
53 /* Between 0.05 and 0.1s before soft-stop */
54 #define DEFAULT_JS_SOFT_STOP_TICKS_CL 1
55
56 /**
57  * Default minimum number of scheduling ticks before jobs are hard-stopped
58  */
59 /* 1.2s before hard-stop, for a certain GLES2 test at 128x128 (bound by
60  * combined vertex+tiler job)
61  */
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
65
66 /**
67  * Default minimum number of scheduling ticks before CL jobs are hard-stopped.
68  */
69 /* Between 0.1 and 0.15s before hard-stop */
70 #define DEFAULT_JS_HARD_STOP_TICKS_CL 2
71
72 /**
73  * Default minimum number of scheduling ticks before jobs are hard-stopped
74  * during dumping
75  */
76 /* 60s @ 50ms tick */
77 #define DEFAULT_JS_HARD_STOP_TICKS_NSS 1200
78
79 /**
80  * Default minimum number of scheduling ticks before the GPU is reset
81  * to clear a "stuck" job
82  */
83 /* 1.8s before resetting GPU, for a certain GLES2 test at 128x128 (bound by
84  * combined vertex+tiler job)
85  */
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
89
90 /**
91  * Default minimum number of scheduling ticks before the GPU is reset
92  * to clear a "stuck" CL job.
93  */
94 /* 0.2-0.25s before GPU is reset */
95 #define DEFAULT_JS_RESET_TICKS_CL 4
96
97 /**
98  * Default minimum number of scheduling ticks before the GPU is reset
99  * to clear a "stuck" job during dumping.
100  */
101 /* 60.1s @ 100ms tick */
102 #define DEFAULT_JS_RESET_TICKS_NSS 1202
103
104 /**
105  * Number of milliseconds given for other jobs on the GPU to be
106  * soft-stopped when the GPU needs to be reset.
107  */
108 #define DEFAULT_JS_RESET_TIMEOUT_MS 3000
109
110 /**
111  * Default timeslice that a context is scheduled in for, in nanoseconds.
112  *
113  * When a context has used up this amount of time across its jobs, it is
114  * scheduled out to let another run.
115  *
116  * @note the resolution is nanoseconds (ns) here, because that's the format
117  * often used by the OS.
118  */
119 /* 0.05s - at 20fps a ctx does at least 1 frame before being scheduled out.
120  * At 40fps, 2 frames, etc
121  */
122 #define DEFAULT_JS_CTX_TIMESLICE_NS 50000000
123
124 /**
125  * Default initial runtime of a context for CFS, in ticks.
126  *
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.
129  */
130 #define DEFAULT_JS_CFS_CTX_RUNTIME_INIT_SLICES 1
131
132 /**
133  * Default minimum runtime value of a context for CFS, in ticks.
134  *
135  * This value is relative to that of the least-run context. This prevents
136  * "stored-up timeslices" DoS attacks.
137  */
138 #define DEFAULT_JS_CFS_CTX_RUNTIME_MIN_SLICES 2
139
140 /**
141  * Default setting for whether to prefer security or performance.
142  *
143  * Currently affects only r0p0-15dev0 HW and earlier.
144  */
145 #define DEFAULT_SECURE_BUT_LOSS_OF_PERFORMANCE MALI_FALSE
146
147 /**
148  * Default setting for read Address ID limiting on AXI.
149  */
150 #define DEFAULT_ARID_LIMIT KBASE_AID_32
151
152 /**
153  * Default setting for write Address ID limiting on AXI.
154  */
155 #define DEFAULT_AWID_LIMIT KBASE_AID_32
156
157 /**
158  * Default setting for using alternative hardware counters.
159  */
160 #define DEFAULT_ALTERNATIVE_HWC MALI_FALSE
161
162 /*** End Scheduling defaults ***/
163
164 /*** Begin Power Manager defaults */
165
166 /* Milliseconds */
167 #define DEFAULT_PM_DVFS_FREQ 500
168
169 /**
170  * Default poweroff tick granuality, in nanoseconds
171  */
172 /* 400us */
173 #define DEFAULT_PM_GPU_POWEROFF_TICK_NS 400000
174
175 /**
176  * Default number of poweroff ticks before shader cores are powered off
177  */
178 /* 400-800us */
179 #define DEFAULT_PM_POWEROFF_TICK_SHADER 2
180
181 /**
182  * Default number of poweroff ticks before GPU is powered off
183  */
184 #define DEFAULT_PM_POWEROFF_TICK_GPU 2         /* 400-800us */
185
186 /*** End Power Manager defaults ***/
187
188 /**
189  * Default UMP device mapping. A UMP_DEVICE_<device>_SHIFT value which
190  * defines which UMP device this GPU should be mapped to.
191  */
192 #define DEFAULT_UMP_GPU_DEVICE_SHIFT UMP_DEVICE_Z_SHIFT
193
194 /**
195  * Default value for KBASE_CONFIG_ATTR_CPU_SPEED_FUNC.
196  * Points to @ref kbase_cpuprops_get_default_clock_speed.
197  */
198 #define DEFAULT_CPU_SPEED_FUNC \
199         ((uintptr_t)kbase_cpuprops_get_default_clock_speed)
200
201 #endif /* _KBASE_CONFIG_DEFAULTS_H_ */
202