xref: /openbmc/linux/drivers/gpu/drm/msm/adreno/a6xx.xml.h (revision 59b4412f)
1 #ifndef A6XX_XML
2 #define A6XX_XML
3 
4 /* Autogenerated file, DO NOT EDIT manually!
5 
6 This file was generated by the rules-ng-ng headergen tool in this git repository:
7 http://github.com/freedreno/envytools/
8 git clone https://github.com/freedreno/envytools.git
9 
10 The rules-ng-ng source files this header was generated from are:
11 - /home/robclark/src/envytools/rnndb/adreno.xml               (    501 bytes, from 2018-07-03 19:37:13)
12 - /home/robclark/src/envytools/rnndb/freedreno_copyright.xml  (   1572 bytes, from 2018-07-03 19:37:13)
13 - /home/robclark/src/envytools/rnndb/adreno/a2xx.xml          (  42463 bytes, from 2018-11-19 13:44:03)
14 - /home/robclark/src/envytools/rnndb/adreno/adreno_common.xml (  14201 bytes, from 2018-12-02 17:29:54)
15 - /home/robclark/src/envytools/rnndb/adreno/adreno_pm4.xml    (  43052 bytes, from 2018-12-02 17:29:54)
16 - /home/robclark/src/envytools/rnndb/adreno/a3xx.xml          (  83840 bytes, from 2018-07-03 19:37:13)
17 - /home/robclark/src/envytools/rnndb/adreno/a4xx.xml          ( 112086 bytes, from 2018-07-03 19:37:13)
18 - /home/robclark/src/envytools/rnndb/adreno/a5xx.xml          ( 147240 bytes, from 2018-12-02 17:29:54)
19 - /home/smasetty/playarea/envytools/rnndb/adreno/a6xx.xml     ( 161969 bytes, from 2019-11-29 07:18:16)
20 - /home/robclark/src/envytools/rnndb/adreno/a6xx_gmu.xml      (  10431 bytes, from 2018-09-14 13:03:07)
21 - /home/robclark/src/envytools/rnndb/adreno/ocmem.xml         (   1773 bytes, from 2018-07-03 19:37:13)
22 
23 Copyright (C) 2013-2019 by the following authors:
24 - Rob Clark <robdclark@gmail.com> (robclark)
25 - Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
26 
27 Permission is hereby granted, free of charge, to any person obtaining
28 a copy of this software and associated documentation files (the
29 "Software"), to deal in the Software without restriction, including
30 without limitation the rights to use, copy, modify, merge, publish,
31 distribute, sublicense, and/or sell copies of the Software, and to
32 permit persons to whom the Software is furnished to do so, subject to
33 the following conditions:
34 
35 The above copyright notice and this permission notice (including the
36 next paragraph) shall be included in all copies or substantial
37 portions of the Software.
38 
39 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
42 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
43 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
44 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
45 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 */
47 
48 
49 enum a6xx_color_fmt {
50 	RB6_A8_UNORM = 2,
51 	RB6_R8_UNORM = 3,
52 	RB6_R8_SNORM = 4,
53 	RB6_R8_UINT = 5,
54 	RB6_R8_SINT = 6,
55 	RB6_R4G4B4A4_UNORM = 8,
56 	RB6_R5G5B5A1_UNORM = 10,
57 	RB6_R5G6B5_UNORM = 14,
58 	RB6_R8G8_UNORM = 15,
59 	RB6_R8G8_SNORM = 16,
60 	RB6_R8G8_UINT = 17,
61 	RB6_R8G8_SINT = 18,
62 	RB6_R16_UNORM = 21,
63 	RB6_R16_SNORM = 22,
64 	RB6_R16_FLOAT = 23,
65 	RB6_R16_UINT = 24,
66 	RB6_R16_SINT = 25,
67 	RB6_R8G8B8A8_UNORM = 48,
68 	RB6_R8G8B8_UNORM = 49,
69 	RB6_R8G8B8A8_SNORM = 50,
70 	RB6_R8G8B8A8_UINT = 51,
71 	RB6_R8G8B8A8_SINT = 52,
72 	RB6_R10G10B10A2_UNORM = 55,
73 	RB6_R10G10B10A2_UINT = 58,
74 	RB6_R11G11B10_FLOAT = 66,
75 	RB6_R16G16_UNORM = 67,
76 	RB6_R16G16_SNORM = 68,
77 	RB6_R16G16_FLOAT = 69,
78 	RB6_R16G16_UINT = 70,
79 	RB6_R16G16_SINT = 71,
80 	RB6_R32_FLOAT = 74,
81 	RB6_R32_UINT = 75,
82 	RB6_R32_SINT = 76,
83 	RB6_R16G16B16A16_UNORM = 96,
84 	RB6_R16G16B16A16_SNORM = 97,
85 	RB6_R16G16B16A16_FLOAT = 98,
86 	RB6_R16G16B16A16_UINT = 99,
87 	RB6_R16G16B16A16_SINT = 100,
88 	RB6_R32G32_FLOAT = 103,
89 	RB6_R32G32_UINT = 104,
90 	RB6_R32G32_SINT = 105,
91 	RB6_R32G32B32A32_FLOAT = 130,
92 	RB6_R32G32B32A32_UINT = 131,
93 	RB6_R32G32B32A32_SINT = 132,
94 	RB6_X8Z24_UNORM = 160,
95 };
96 
97 enum a6xx_tile_mode {
98 	TILE6_LINEAR = 0,
99 	TILE6_2 = 2,
100 	TILE6_3 = 3,
101 };
102 
103 enum a6xx_vtx_fmt {
104 	VFMT6_8_UNORM = 3,
105 	VFMT6_8_SNORM = 4,
106 	VFMT6_8_UINT = 5,
107 	VFMT6_8_SINT = 6,
108 	VFMT6_8_8_UNORM = 15,
109 	VFMT6_8_8_SNORM = 16,
110 	VFMT6_8_8_UINT = 17,
111 	VFMT6_8_8_SINT = 18,
112 	VFMT6_16_UNORM = 21,
113 	VFMT6_16_SNORM = 22,
114 	VFMT6_16_FLOAT = 23,
115 	VFMT6_16_UINT = 24,
116 	VFMT6_16_SINT = 25,
117 	VFMT6_8_8_8_UNORM = 33,
118 	VFMT6_8_8_8_SNORM = 34,
119 	VFMT6_8_8_8_UINT = 35,
120 	VFMT6_8_8_8_SINT = 36,
121 	VFMT6_8_8_8_8_UNORM = 48,
122 	VFMT6_8_8_8_8_SNORM = 50,
123 	VFMT6_8_8_8_8_UINT = 51,
124 	VFMT6_8_8_8_8_SINT = 52,
125 	VFMT6_10_10_10_2_UNORM = 54,
126 	VFMT6_10_10_10_2_SNORM = 57,
127 	VFMT6_10_10_10_2_UINT = 58,
128 	VFMT6_10_10_10_2_SINT = 59,
129 	VFMT6_11_11_10_FLOAT = 66,
130 	VFMT6_16_16_UNORM = 67,
131 	VFMT6_16_16_SNORM = 68,
132 	VFMT6_16_16_FLOAT = 69,
133 	VFMT6_16_16_UINT = 70,
134 	VFMT6_16_16_SINT = 71,
135 	VFMT6_32_UNORM = 72,
136 	VFMT6_32_SNORM = 73,
137 	VFMT6_32_FLOAT = 74,
138 	VFMT6_32_UINT = 75,
139 	VFMT6_32_SINT = 76,
140 	VFMT6_32_FIXED = 77,
141 	VFMT6_16_16_16_UNORM = 88,
142 	VFMT6_16_16_16_SNORM = 89,
143 	VFMT6_16_16_16_FLOAT = 90,
144 	VFMT6_16_16_16_UINT = 91,
145 	VFMT6_16_16_16_SINT = 92,
146 	VFMT6_16_16_16_16_UNORM = 96,
147 	VFMT6_16_16_16_16_SNORM = 97,
148 	VFMT6_16_16_16_16_FLOAT = 98,
149 	VFMT6_16_16_16_16_UINT = 99,
150 	VFMT6_16_16_16_16_SINT = 100,
151 	VFMT6_32_32_UNORM = 101,
152 	VFMT6_32_32_SNORM = 102,
153 	VFMT6_32_32_FLOAT = 103,
154 	VFMT6_32_32_UINT = 104,
155 	VFMT6_32_32_SINT = 105,
156 	VFMT6_32_32_FIXED = 106,
157 	VFMT6_32_32_32_UNORM = 112,
158 	VFMT6_32_32_32_SNORM = 113,
159 	VFMT6_32_32_32_UINT = 114,
160 	VFMT6_32_32_32_SINT = 115,
161 	VFMT6_32_32_32_FLOAT = 116,
162 	VFMT6_32_32_32_FIXED = 117,
163 	VFMT6_32_32_32_32_UNORM = 128,
164 	VFMT6_32_32_32_32_SNORM = 129,
165 	VFMT6_32_32_32_32_FLOAT = 130,
166 	VFMT6_32_32_32_32_UINT = 131,
167 	VFMT6_32_32_32_32_SINT = 132,
168 	VFMT6_32_32_32_32_FIXED = 133,
169 };
170 
171 enum a6xx_tex_fmt {
172 	TFMT6_A8_UNORM = 2,
173 	TFMT6_8_UNORM = 3,
174 	TFMT6_8_SNORM = 4,
175 	TFMT6_8_UINT = 5,
176 	TFMT6_8_SINT = 6,
177 	TFMT6_4_4_4_4_UNORM = 8,
178 	TFMT6_5_5_5_1_UNORM = 10,
179 	TFMT6_5_6_5_UNORM = 14,
180 	TFMT6_8_8_UNORM = 15,
181 	TFMT6_8_8_SNORM = 16,
182 	TFMT6_8_8_UINT = 17,
183 	TFMT6_8_8_SINT = 18,
184 	TFMT6_L8_A8_UNORM = 19,
185 	TFMT6_16_UNORM = 21,
186 	TFMT6_16_SNORM = 22,
187 	TFMT6_16_FLOAT = 23,
188 	TFMT6_16_UINT = 24,
189 	TFMT6_16_SINT = 25,
190 	TFMT6_8_8_8_8_UNORM = 48,
191 	TFMT6_8_8_8_UNORM = 49,
192 	TFMT6_8_8_8_8_SNORM = 50,
193 	TFMT6_8_8_8_8_UINT = 51,
194 	TFMT6_8_8_8_8_SINT = 52,
195 	TFMT6_9_9_9_E5_FLOAT = 53,
196 	TFMT6_10_10_10_2_UNORM = 54,
197 	TFMT6_10_10_10_2_UINT = 58,
198 	TFMT6_11_11_10_FLOAT = 66,
199 	TFMT6_16_16_UNORM = 67,
200 	TFMT6_16_16_SNORM = 68,
201 	TFMT6_16_16_FLOAT = 69,
202 	TFMT6_16_16_UINT = 70,
203 	TFMT6_16_16_SINT = 71,
204 	TFMT6_32_FLOAT = 74,
205 	TFMT6_32_UINT = 75,
206 	TFMT6_32_SINT = 76,
207 	TFMT6_16_16_16_16_UNORM = 96,
208 	TFMT6_16_16_16_16_SNORM = 97,
209 	TFMT6_16_16_16_16_FLOAT = 98,
210 	TFMT6_16_16_16_16_UINT = 99,
211 	TFMT6_16_16_16_16_SINT = 100,
212 	TFMT6_32_32_FLOAT = 103,
213 	TFMT6_32_32_UINT = 104,
214 	TFMT6_32_32_SINT = 105,
215 	TFMT6_32_32_32_UINT = 114,
216 	TFMT6_32_32_32_SINT = 115,
217 	TFMT6_32_32_32_FLOAT = 116,
218 	TFMT6_32_32_32_32_FLOAT = 130,
219 	TFMT6_32_32_32_32_UINT = 131,
220 	TFMT6_32_32_32_32_SINT = 132,
221 	TFMT6_X8Z24_UNORM = 160,
222 	TFMT6_ETC2_RG11_UNORM = 171,
223 	TFMT6_ETC2_RG11_SNORM = 172,
224 	TFMT6_ETC2_R11_UNORM = 173,
225 	TFMT6_ETC2_R11_SNORM = 174,
226 	TFMT6_ETC1 = 175,
227 	TFMT6_ETC2_RGB8 = 176,
228 	TFMT6_ETC2_RGBA8 = 177,
229 	TFMT6_ETC2_RGB8A1 = 178,
230 	TFMT6_DXT1 = 179,
231 	TFMT6_DXT3 = 180,
232 	TFMT6_DXT5 = 181,
233 	TFMT6_RGTC1_UNORM = 183,
234 	TFMT6_RGTC1_SNORM = 184,
235 	TFMT6_RGTC2_UNORM = 187,
236 	TFMT6_RGTC2_SNORM = 188,
237 	TFMT6_BPTC_UFLOAT = 190,
238 	TFMT6_BPTC_FLOAT = 191,
239 	TFMT6_BPTC = 192,
240 	TFMT6_ASTC_4x4 = 193,
241 	TFMT6_ASTC_5x4 = 194,
242 	TFMT6_ASTC_5x5 = 195,
243 	TFMT6_ASTC_6x5 = 196,
244 	TFMT6_ASTC_6x6 = 197,
245 	TFMT6_ASTC_8x5 = 198,
246 	TFMT6_ASTC_8x6 = 199,
247 	TFMT6_ASTC_8x8 = 200,
248 	TFMT6_ASTC_10x5 = 201,
249 	TFMT6_ASTC_10x6 = 202,
250 	TFMT6_ASTC_10x8 = 203,
251 	TFMT6_ASTC_10x10 = 204,
252 	TFMT6_ASTC_12x10 = 205,
253 	TFMT6_ASTC_12x12 = 206,
254 };
255 
256 enum a6xx_tex_fetchsize {
257 	TFETCH6_1_BYTE = 0,
258 	TFETCH6_2_BYTE = 1,
259 	TFETCH6_4_BYTE = 2,
260 	TFETCH6_8_BYTE = 3,
261 	TFETCH6_16_BYTE = 4,
262 };
263 
264 enum a6xx_depth_format {
265 	DEPTH6_NONE = 0,
266 	DEPTH6_16 = 1,
267 	DEPTH6_24_8 = 2,
268 	DEPTH6_32 = 4,
269 };
270 
271 enum a6xx_shader_id {
272 	A6XX_TP0_TMO_DATA = 9,
273 	A6XX_TP0_SMO_DATA = 10,
274 	A6XX_TP0_MIPMAP_BASE_DATA = 11,
275 	A6XX_TP1_TMO_DATA = 25,
276 	A6XX_TP1_SMO_DATA = 26,
277 	A6XX_TP1_MIPMAP_BASE_DATA = 27,
278 	A6XX_SP_INST_DATA = 41,
279 	A6XX_SP_LB_0_DATA = 42,
280 	A6XX_SP_LB_1_DATA = 43,
281 	A6XX_SP_LB_2_DATA = 44,
282 	A6XX_SP_LB_3_DATA = 45,
283 	A6XX_SP_LB_4_DATA = 46,
284 	A6XX_SP_LB_5_DATA = 47,
285 	A6XX_SP_CB_BINDLESS_DATA = 48,
286 	A6XX_SP_CB_LEGACY_DATA = 49,
287 	A6XX_SP_UAV_DATA = 50,
288 	A6XX_SP_INST_TAG = 51,
289 	A6XX_SP_CB_BINDLESS_TAG = 52,
290 	A6XX_SP_TMO_UMO_TAG = 53,
291 	A6XX_SP_SMO_TAG = 54,
292 	A6XX_SP_STATE_DATA = 55,
293 	A6XX_HLSQ_CHUNK_CVS_RAM = 73,
294 	A6XX_HLSQ_CHUNK_CPS_RAM = 74,
295 	A6XX_HLSQ_CHUNK_CVS_RAM_TAG = 75,
296 	A6XX_HLSQ_CHUNK_CPS_RAM_TAG = 76,
297 	A6XX_HLSQ_ICB_CVS_CB_BASE_TAG = 77,
298 	A6XX_HLSQ_ICB_CPS_CB_BASE_TAG = 78,
299 	A6XX_HLSQ_CVS_MISC_RAM = 80,
300 	A6XX_HLSQ_CPS_MISC_RAM = 81,
301 	A6XX_HLSQ_INST_RAM = 82,
302 	A6XX_HLSQ_GFX_CVS_CONST_RAM = 83,
303 	A6XX_HLSQ_GFX_CPS_CONST_RAM = 84,
304 	A6XX_HLSQ_CVS_MISC_RAM_TAG = 85,
305 	A6XX_HLSQ_CPS_MISC_RAM_TAG = 86,
306 	A6XX_HLSQ_INST_RAM_TAG = 87,
307 	A6XX_HLSQ_GFX_CVS_CONST_RAM_TAG = 88,
308 	A6XX_HLSQ_GFX_CPS_CONST_RAM_TAG = 89,
309 	A6XX_HLSQ_PWR_REST_RAM = 90,
310 	A6XX_HLSQ_PWR_REST_TAG = 91,
311 	A6XX_HLSQ_DATAPATH_META = 96,
312 	A6XX_HLSQ_FRONTEND_META = 97,
313 	A6XX_HLSQ_INDIRECT_META = 98,
314 	A6XX_HLSQ_BACKEND_META = 99,
315 };
316 
317 enum a6xx_debugbus_id {
318 	A6XX_DBGBUS_CP = 1,
319 	A6XX_DBGBUS_RBBM = 2,
320 	A6XX_DBGBUS_VBIF = 3,
321 	A6XX_DBGBUS_HLSQ = 4,
322 	A6XX_DBGBUS_UCHE = 5,
323 	A6XX_DBGBUS_DPM = 6,
324 	A6XX_DBGBUS_TESS = 7,
325 	A6XX_DBGBUS_PC = 8,
326 	A6XX_DBGBUS_VFDP = 9,
327 	A6XX_DBGBUS_VPC = 10,
328 	A6XX_DBGBUS_TSE = 11,
329 	A6XX_DBGBUS_RAS = 12,
330 	A6XX_DBGBUS_VSC = 13,
331 	A6XX_DBGBUS_COM = 14,
332 	A6XX_DBGBUS_LRZ = 16,
333 	A6XX_DBGBUS_A2D = 17,
334 	A6XX_DBGBUS_CCUFCHE = 18,
335 	A6XX_DBGBUS_GMU_CX = 19,
336 	A6XX_DBGBUS_RBP = 20,
337 	A6XX_DBGBUS_DCS = 21,
338 	A6XX_DBGBUS_DBGC = 22,
339 	A6XX_DBGBUS_CX = 23,
340 	A6XX_DBGBUS_GMU_GX = 24,
341 	A6XX_DBGBUS_TPFCHE = 25,
342 	A6XX_DBGBUS_GBIF_GX = 26,
343 	A6XX_DBGBUS_GPC = 29,
344 	A6XX_DBGBUS_LARC = 30,
345 	A6XX_DBGBUS_HLSQ_SPTP = 31,
346 	A6XX_DBGBUS_RB_0 = 32,
347 	A6XX_DBGBUS_RB_1 = 33,
348 	A6XX_DBGBUS_UCHE_WRAPPER = 36,
349 	A6XX_DBGBUS_CCU_0 = 40,
350 	A6XX_DBGBUS_CCU_1 = 41,
351 	A6XX_DBGBUS_VFD_0 = 56,
352 	A6XX_DBGBUS_VFD_1 = 57,
353 	A6XX_DBGBUS_VFD_2 = 58,
354 	A6XX_DBGBUS_VFD_3 = 59,
355 	A6XX_DBGBUS_SP_0 = 64,
356 	A6XX_DBGBUS_SP_1 = 65,
357 	A6XX_DBGBUS_TPL1_0 = 72,
358 	A6XX_DBGBUS_TPL1_1 = 73,
359 	A6XX_DBGBUS_TPL1_2 = 74,
360 	A6XX_DBGBUS_TPL1_3 = 75,
361 };
362 
363 enum a6xx_cp_perfcounter_select {
364 	PERF_CP_ALWAYS_COUNT = 0,
365 	PERF_CP_BUSY_GFX_CORE_IDLE = 1,
366 	PERF_CP_BUSY_CYCLES = 2,
367 	PERF_CP_NUM_PREEMPTIONS = 3,
368 	PERF_CP_PREEMPTION_REACTION_DELAY = 4,
369 	PERF_CP_PREEMPTION_SWITCH_OUT_TIME = 5,
370 	PERF_CP_PREEMPTION_SWITCH_IN_TIME = 6,
371 	PERF_CP_DEAD_DRAWS_IN_BIN_RENDER = 7,
372 	PERF_CP_PREDICATED_DRAWS_KILLED = 8,
373 	PERF_CP_MODE_SWITCH = 9,
374 	PERF_CP_ZPASS_DONE = 10,
375 	PERF_CP_CONTEXT_DONE = 11,
376 	PERF_CP_CACHE_FLUSH = 12,
377 	PERF_CP_LONG_PREEMPTIONS = 13,
378 	PERF_CP_SQE_I_CACHE_STARVE = 14,
379 	PERF_CP_SQE_IDLE = 15,
380 	PERF_CP_SQE_PM4_STARVE_RB_IB = 16,
381 	PERF_CP_SQE_PM4_STARVE_SDS = 17,
382 	PERF_CP_SQE_MRB_STARVE = 18,
383 	PERF_CP_SQE_RRB_STARVE = 19,
384 	PERF_CP_SQE_VSD_STARVE = 20,
385 	PERF_CP_VSD_DECODE_STARVE = 21,
386 	PERF_CP_SQE_PIPE_OUT_STALL = 22,
387 	PERF_CP_SQE_SYNC_STALL = 23,
388 	PERF_CP_SQE_PM4_WFI_STALL = 24,
389 	PERF_CP_SQE_SYS_WFI_STALL = 25,
390 	PERF_CP_SQE_T4_EXEC = 26,
391 	PERF_CP_SQE_LOAD_STATE_EXEC = 27,
392 	PERF_CP_SQE_SAVE_SDS_STATE = 28,
393 	PERF_CP_SQE_DRAW_EXEC = 29,
394 	PERF_CP_SQE_CTXT_REG_BUNCH_EXEC = 30,
395 	PERF_CP_SQE_EXEC_PROFILED = 31,
396 	PERF_CP_MEMORY_POOL_EMPTY = 32,
397 	PERF_CP_MEMORY_POOL_SYNC_STALL = 33,
398 	PERF_CP_MEMORY_POOL_ABOVE_THRESH = 34,
399 	PERF_CP_AHB_WR_STALL_PRE_DRAWS = 35,
400 	PERF_CP_AHB_STALL_SQE_GMU = 36,
401 	PERF_CP_AHB_STALL_SQE_WR_OTHER = 37,
402 	PERF_CP_AHB_STALL_SQE_RD_OTHER = 38,
403 	PERF_CP_CLUSTER0_EMPTY = 39,
404 	PERF_CP_CLUSTER1_EMPTY = 40,
405 	PERF_CP_CLUSTER2_EMPTY = 41,
406 	PERF_CP_CLUSTER3_EMPTY = 42,
407 	PERF_CP_CLUSTER4_EMPTY = 43,
408 	PERF_CP_CLUSTER5_EMPTY = 44,
409 	PERF_CP_PM4_DATA = 45,
410 	PERF_CP_PM4_HEADERS = 46,
411 	PERF_CP_VBIF_READ_BEATS = 47,
412 	PERF_CP_VBIF_WRITE_BEATS = 48,
413 	PERF_CP_SQE_INSTR_COUNTER = 49,
414 };
415 
416 enum a6xx_rbbm_perfcounter_select {
417 	PERF_RBBM_ALWAYS_COUNT = 0,
418 	PERF_RBBM_ALWAYS_ON = 1,
419 	PERF_RBBM_TSE_BUSY = 2,
420 	PERF_RBBM_RAS_BUSY = 3,
421 	PERF_RBBM_PC_DCALL_BUSY = 4,
422 	PERF_RBBM_PC_VSD_BUSY = 5,
423 	PERF_RBBM_STATUS_MASKED = 6,
424 	PERF_RBBM_COM_BUSY = 7,
425 	PERF_RBBM_DCOM_BUSY = 8,
426 	PERF_RBBM_VBIF_BUSY = 9,
427 	PERF_RBBM_VSC_BUSY = 10,
428 	PERF_RBBM_TESS_BUSY = 11,
429 	PERF_RBBM_UCHE_BUSY = 12,
430 	PERF_RBBM_HLSQ_BUSY = 13,
431 };
432 
433 enum a6xx_pc_perfcounter_select {
434 	PERF_PC_BUSY_CYCLES = 0,
435 	PERF_PC_WORKING_CYCLES = 1,
436 	PERF_PC_STALL_CYCLES_VFD = 2,
437 	PERF_PC_STALL_CYCLES_TSE = 3,
438 	PERF_PC_STALL_CYCLES_VPC = 4,
439 	PERF_PC_STALL_CYCLES_UCHE = 5,
440 	PERF_PC_STALL_CYCLES_TESS = 6,
441 	PERF_PC_STALL_CYCLES_TSE_ONLY = 7,
442 	PERF_PC_STALL_CYCLES_VPC_ONLY = 8,
443 	PERF_PC_PASS1_TF_STALL_CYCLES = 9,
444 	PERF_PC_STARVE_CYCLES_FOR_INDEX = 10,
445 	PERF_PC_STARVE_CYCLES_FOR_TESS_FACTOR = 11,
446 	PERF_PC_STARVE_CYCLES_FOR_VIZ_STREAM = 12,
447 	PERF_PC_STARVE_CYCLES_FOR_POSITION = 13,
448 	PERF_PC_STARVE_CYCLES_DI = 14,
449 	PERF_PC_VIS_STREAMS_LOADED = 15,
450 	PERF_PC_INSTANCES = 16,
451 	PERF_PC_VPC_PRIMITIVES = 17,
452 	PERF_PC_DEAD_PRIM = 18,
453 	PERF_PC_LIVE_PRIM = 19,
454 	PERF_PC_VERTEX_HITS = 20,
455 	PERF_PC_IA_VERTICES = 21,
456 	PERF_PC_IA_PRIMITIVES = 22,
457 	PERF_PC_GS_PRIMITIVES = 23,
458 	PERF_PC_HS_INVOCATIONS = 24,
459 	PERF_PC_DS_INVOCATIONS = 25,
460 	PERF_PC_VS_INVOCATIONS = 26,
461 	PERF_PC_GS_INVOCATIONS = 27,
462 	PERF_PC_DS_PRIMITIVES = 28,
463 	PERF_PC_VPC_POS_DATA_TRANSACTION = 29,
464 	PERF_PC_3D_DRAWCALLS = 30,
465 	PERF_PC_2D_DRAWCALLS = 31,
466 	PERF_PC_NON_DRAWCALL_GLOBAL_EVENTS = 32,
467 	PERF_TESS_BUSY_CYCLES = 33,
468 	PERF_TESS_WORKING_CYCLES = 34,
469 	PERF_TESS_STALL_CYCLES_PC = 35,
470 	PERF_TESS_STARVE_CYCLES_PC = 36,
471 	PERF_PC_TSE_TRANSACTION = 37,
472 	PERF_PC_TSE_VERTEX = 38,
473 	PERF_PC_TESS_PC_UV_TRANS = 39,
474 	PERF_PC_TESS_PC_UV_PATCHES = 40,
475 	PERF_PC_TESS_FACTOR_TRANS = 41,
476 };
477 
478 enum a6xx_vfd_perfcounter_select {
479 	PERF_VFD_BUSY_CYCLES = 0,
480 	PERF_VFD_STALL_CYCLES_UCHE = 1,
481 	PERF_VFD_STALL_CYCLES_VPC_ALLOC = 2,
482 	PERF_VFD_STALL_CYCLES_SP_INFO = 3,
483 	PERF_VFD_STALL_CYCLES_SP_ATTR = 4,
484 	PERF_VFD_STARVE_CYCLES_UCHE = 5,
485 	PERF_VFD_RBUFFER_FULL = 6,
486 	PERF_VFD_ATTR_INFO_FIFO_FULL = 7,
487 	PERF_VFD_DECODED_ATTRIBUTE_BYTES = 8,
488 	PERF_VFD_NUM_ATTRIBUTES = 9,
489 	PERF_VFD_UPPER_SHADER_FIBERS = 10,
490 	PERF_VFD_LOWER_SHADER_FIBERS = 11,
491 	PERF_VFD_MODE_0_FIBERS = 12,
492 	PERF_VFD_MODE_1_FIBERS = 13,
493 	PERF_VFD_MODE_2_FIBERS = 14,
494 	PERF_VFD_MODE_3_FIBERS = 15,
495 	PERF_VFD_MODE_4_FIBERS = 16,
496 	PERF_VFD_TOTAL_VERTICES = 17,
497 	PERF_VFDP_STALL_CYCLES_VFD = 18,
498 	PERF_VFDP_STALL_CYCLES_VFD_INDEX = 19,
499 	PERF_VFDP_STALL_CYCLES_VFD_PROG = 20,
500 	PERF_VFDP_STARVE_CYCLES_PC = 21,
501 	PERF_VFDP_VS_STAGE_WAVES = 22,
502 };
503 
504 enum a6xx_hlsq_perfcounter_select {
505 	PERF_HLSQ_BUSY_CYCLES = 0,
506 	PERF_HLSQ_STALL_CYCLES_UCHE = 1,
507 	PERF_HLSQ_STALL_CYCLES_SP_STATE = 2,
508 	PERF_HLSQ_STALL_CYCLES_SP_FS_STAGE = 3,
509 	PERF_HLSQ_UCHE_LATENCY_CYCLES = 4,
510 	PERF_HLSQ_UCHE_LATENCY_COUNT = 5,
511 	PERF_HLSQ_FS_STAGE_1X_WAVES = 6,
512 	PERF_HLSQ_FS_STAGE_2X_WAVES = 7,
513 	PERF_HLSQ_QUADS = 8,
514 	PERF_HLSQ_CS_INVOCATIONS = 9,
515 	PERF_HLSQ_COMPUTE_DRAWCALLS = 10,
516 	PERF_HLSQ_FS_DATA_WAIT_PROGRAMMING = 11,
517 	PERF_HLSQ_DUAL_FS_PROG_ACTIVE = 12,
518 	PERF_HLSQ_DUAL_VS_PROG_ACTIVE = 13,
519 	PERF_HLSQ_FS_BATCH_COUNT_ZERO = 14,
520 	PERF_HLSQ_VS_BATCH_COUNT_ZERO = 15,
521 	PERF_HLSQ_WAVE_PENDING_NO_QUAD = 16,
522 	PERF_HLSQ_WAVE_PENDING_NO_PRIM_BASE = 17,
523 	PERF_HLSQ_STALL_CYCLES_VPC = 18,
524 	PERF_HLSQ_PIXELS = 19,
525 	PERF_HLSQ_DRAW_MODE_SWITCH_VSFS_SYNC = 20,
526 };
527 
528 enum a6xx_vpc_perfcounter_select {
529 	PERF_VPC_BUSY_CYCLES = 0,
530 	PERF_VPC_WORKING_CYCLES = 1,
531 	PERF_VPC_STALL_CYCLES_UCHE = 2,
532 	PERF_VPC_STALL_CYCLES_VFD_WACK = 3,
533 	PERF_VPC_STALL_CYCLES_HLSQ_PRIM_ALLOC = 4,
534 	PERF_VPC_STALL_CYCLES_PC = 5,
535 	PERF_VPC_STALL_CYCLES_SP_LM = 6,
536 	PERF_VPC_STARVE_CYCLES_SP = 7,
537 	PERF_VPC_STARVE_CYCLES_LRZ = 8,
538 	PERF_VPC_PC_PRIMITIVES = 9,
539 	PERF_VPC_SP_COMPONENTS = 10,
540 	PERF_VPC_STALL_CYCLES_VPCRAM_POS = 11,
541 	PERF_VPC_LRZ_ASSIGN_PRIMITIVES = 12,
542 	PERF_VPC_RB_VISIBLE_PRIMITIVES = 13,
543 	PERF_VPC_LM_TRANSACTION = 14,
544 	PERF_VPC_STREAMOUT_TRANSACTION = 15,
545 	PERF_VPC_VS_BUSY_CYCLES = 16,
546 	PERF_VPC_PS_BUSY_CYCLES = 17,
547 	PERF_VPC_VS_WORKING_CYCLES = 18,
548 	PERF_VPC_PS_WORKING_CYCLES = 19,
549 	PERF_VPC_STARVE_CYCLES_RB = 20,
550 	PERF_VPC_NUM_VPCRAM_READ_POS = 21,
551 	PERF_VPC_WIT_FULL_CYCLES = 22,
552 	PERF_VPC_VPCRAM_FULL_CYCLES = 23,
553 	PERF_VPC_LM_FULL_WAIT_FOR_INTP_END = 24,
554 	PERF_VPC_NUM_VPCRAM_WRITE = 25,
555 	PERF_VPC_NUM_VPCRAM_READ_SO = 26,
556 	PERF_VPC_NUM_ATTR_REQ_LM = 27,
557 };
558 
559 enum a6xx_tse_perfcounter_select {
560 	PERF_TSE_BUSY_CYCLES = 0,
561 	PERF_TSE_CLIPPING_CYCLES = 1,
562 	PERF_TSE_STALL_CYCLES_RAS = 2,
563 	PERF_TSE_STALL_CYCLES_LRZ_BARYPLANE = 3,
564 	PERF_TSE_STALL_CYCLES_LRZ_ZPLANE = 4,
565 	PERF_TSE_STARVE_CYCLES_PC = 5,
566 	PERF_TSE_INPUT_PRIM = 6,
567 	PERF_TSE_INPUT_NULL_PRIM = 7,
568 	PERF_TSE_TRIVAL_REJ_PRIM = 8,
569 	PERF_TSE_CLIPPED_PRIM = 9,
570 	PERF_TSE_ZERO_AREA_PRIM = 10,
571 	PERF_TSE_FACENESS_CULLED_PRIM = 11,
572 	PERF_TSE_ZERO_PIXEL_PRIM = 12,
573 	PERF_TSE_OUTPUT_NULL_PRIM = 13,
574 	PERF_TSE_OUTPUT_VISIBLE_PRIM = 14,
575 	PERF_TSE_CINVOCATION = 15,
576 	PERF_TSE_CPRIMITIVES = 16,
577 	PERF_TSE_2D_INPUT_PRIM = 17,
578 	PERF_TSE_2D_ALIVE_CYCLES = 18,
579 	PERF_TSE_CLIP_PLANES = 19,
580 };
581 
582 enum a6xx_ras_perfcounter_select {
583 	PERF_RAS_BUSY_CYCLES = 0,
584 	PERF_RAS_SUPERTILE_ACTIVE_CYCLES = 1,
585 	PERF_RAS_STALL_CYCLES_LRZ = 2,
586 	PERF_RAS_STARVE_CYCLES_TSE = 3,
587 	PERF_RAS_SUPER_TILES = 4,
588 	PERF_RAS_8X4_TILES = 5,
589 	PERF_RAS_MASKGEN_ACTIVE = 6,
590 	PERF_RAS_FULLY_COVERED_SUPER_TILES = 7,
591 	PERF_RAS_FULLY_COVERED_8X4_TILES = 8,
592 	PERF_RAS_PRIM_KILLED_INVISILBE = 9,
593 	PERF_RAS_SUPERTILE_GEN_ACTIVE_CYCLES = 10,
594 	PERF_RAS_LRZ_INTF_WORKING_CYCLES = 11,
595 	PERF_RAS_BLOCKS = 12,
596 };
597 
598 enum a6xx_uche_perfcounter_select {
599 	PERF_UCHE_BUSY_CYCLES = 0,
600 	PERF_UCHE_STALL_CYCLES_ARBITER = 1,
601 	PERF_UCHE_VBIF_LATENCY_CYCLES = 2,
602 	PERF_UCHE_VBIF_LATENCY_SAMPLES = 3,
603 	PERF_UCHE_VBIF_READ_BEATS_TP = 4,
604 	PERF_UCHE_VBIF_READ_BEATS_VFD = 5,
605 	PERF_UCHE_VBIF_READ_BEATS_HLSQ = 6,
606 	PERF_UCHE_VBIF_READ_BEATS_LRZ = 7,
607 	PERF_UCHE_VBIF_READ_BEATS_SP = 8,
608 	PERF_UCHE_READ_REQUESTS_TP = 9,
609 	PERF_UCHE_READ_REQUESTS_VFD = 10,
610 	PERF_UCHE_READ_REQUESTS_HLSQ = 11,
611 	PERF_UCHE_READ_REQUESTS_LRZ = 12,
612 	PERF_UCHE_READ_REQUESTS_SP = 13,
613 	PERF_UCHE_WRITE_REQUESTS_LRZ = 14,
614 	PERF_UCHE_WRITE_REQUESTS_SP = 15,
615 	PERF_UCHE_WRITE_REQUESTS_VPC = 16,
616 	PERF_UCHE_WRITE_REQUESTS_VSC = 17,
617 	PERF_UCHE_EVICTS = 18,
618 	PERF_UCHE_BANK_REQ0 = 19,
619 	PERF_UCHE_BANK_REQ1 = 20,
620 	PERF_UCHE_BANK_REQ2 = 21,
621 	PERF_UCHE_BANK_REQ3 = 22,
622 	PERF_UCHE_BANK_REQ4 = 23,
623 	PERF_UCHE_BANK_REQ5 = 24,
624 	PERF_UCHE_BANK_REQ6 = 25,
625 	PERF_UCHE_BANK_REQ7 = 26,
626 	PERF_UCHE_VBIF_READ_BEATS_CH0 = 27,
627 	PERF_UCHE_VBIF_READ_BEATS_CH1 = 28,
628 	PERF_UCHE_GMEM_READ_BEATS = 29,
629 	PERF_UCHE_TPH_REF_FULL = 30,
630 	PERF_UCHE_TPH_VICTIM_FULL = 31,
631 	PERF_UCHE_TPH_EXT_FULL = 32,
632 	PERF_UCHE_VBIF_STALL_WRITE_DATA = 33,
633 	PERF_UCHE_DCMP_LATENCY_SAMPLES = 34,
634 	PERF_UCHE_DCMP_LATENCY_CYCLES = 35,
635 	PERF_UCHE_VBIF_READ_BEATS_PC = 36,
636 	PERF_UCHE_READ_REQUESTS_PC = 37,
637 	PERF_UCHE_RAM_READ_REQ = 38,
638 	PERF_UCHE_RAM_WRITE_REQ = 39,
639 };
640 
641 enum a6xx_tp_perfcounter_select {
642 	PERF_TP_BUSY_CYCLES = 0,
643 	PERF_TP_STALL_CYCLES_UCHE = 1,
644 	PERF_TP_LATENCY_CYCLES = 2,
645 	PERF_TP_LATENCY_TRANS = 3,
646 	PERF_TP_FLAG_CACHE_REQUEST_SAMPLES = 4,
647 	PERF_TP_FLAG_CACHE_REQUEST_LATENCY = 5,
648 	PERF_TP_L1_CACHELINE_REQUESTS = 6,
649 	PERF_TP_L1_CACHELINE_MISSES = 7,
650 	PERF_TP_SP_TP_TRANS = 8,
651 	PERF_TP_TP_SP_TRANS = 9,
652 	PERF_TP_OUTPUT_PIXELS = 10,
653 	PERF_TP_FILTER_WORKLOAD_16BIT = 11,
654 	PERF_TP_FILTER_WORKLOAD_32BIT = 12,
655 	PERF_TP_QUADS_RECEIVED = 13,
656 	PERF_TP_QUADS_OFFSET = 14,
657 	PERF_TP_QUADS_SHADOW = 15,
658 	PERF_TP_QUADS_ARRAY = 16,
659 	PERF_TP_QUADS_GRADIENT = 17,
660 	PERF_TP_QUADS_1D = 18,
661 	PERF_TP_QUADS_2D = 19,
662 	PERF_TP_QUADS_BUFFER = 20,
663 	PERF_TP_QUADS_3D = 21,
664 	PERF_TP_QUADS_CUBE = 22,
665 	PERF_TP_DIVERGENT_QUADS_RECEIVED = 23,
666 	PERF_TP_PRT_NON_RESIDENT_EVENTS = 24,
667 	PERF_TP_OUTPUT_PIXELS_POINT = 25,
668 	PERF_TP_OUTPUT_PIXELS_BILINEAR = 26,
669 	PERF_TP_OUTPUT_PIXELS_MIP = 27,
670 	PERF_TP_OUTPUT_PIXELS_ANISO = 28,
671 	PERF_TP_OUTPUT_PIXELS_ZERO_LOD = 29,
672 	PERF_TP_FLAG_CACHE_REQUESTS = 30,
673 	PERF_TP_FLAG_CACHE_MISSES = 31,
674 	PERF_TP_L1_5_L2_REQUESTS = 32,
675 	PERF_TP_2D_OUTPUT_PIXELS = 33,
676 	PERF_TP_2D_OUTPUT_PIXELS_POINT = 34,
677 	PERF_TP_2D_OUTPUT_PIXELS_BILINEAR = 35,
678 	PERF_TP_2D_FILTER_WORKLOAD_16BIT = 36,
679 	PERF_TP_2D_FILTER_WORKLOAD_32BIT = 37,
680 	PERF_TP_TPA2TPC_TRANS = 38,
681 	PERF_TP_L1_MISSES_ASTC_1TILE = 39,
682 	PERF_TP_L1_MISSES_ASTC_2TILE = 40,
683 	PERF_TP_L1_MISSES_ASTC_4TILE = 41,
684 	PERF_TP_L1_5_L2_COMPRESS_REQS = 42,
685 	PERF_TP_L1_5_L2_COMPRESS_MISS = 43,
686 	PERF_TP_L1_BANK_CONFLICT = 44,
687 	PERF_TP_L1_5_MISS_LATENCY_CYCLES = 45,
688 	PERF_TP_L1_5_MISS_LATENCY_TRANS = 46,
689 	PERF_TP_QUADS_CONSTANT_MULTIPLIED = 47,
690 	PERF_TP_FRONTEND_WORKING_CYCLES = 48,
691 	PERF_TP_L1_TAG_WORKING_CYCLES = 49,
692 	PERF_TP_L1_DATA_WRITE_WORKING_CYCLES = 50,
693 	PERF_TP_PRE_L1_DECOM_WORKING_CYCLES = 51,
694 	PERF_TP_BACKEND_WORKING_CYCLES = 52,
695 	PERF_TP_FLAG_CACHE_WORKING_CYCLES = 53,
696 	PERF_TP_L1_5_CACHE_WORKING_CYCLES = 54,
697 	PERF_TP_STARVE_CYCLES_SP = 55,
698 	PERF_TP_STARVE_CYCLES_UCHE = 56,
699 };
700 
701 enum a6xx_sp_perfcounter_select {
702 	PERF_SP_BUSY_CYCLES = 0,
703 	PERF_SP_ALU_WORKING_CYCLES = 1,
704 	PERF_SP_EFU_WORKING_CYCLES = 2,
705 	PERF_SP_STALL_CYCLES_VPC = 3,
706 	PERF_SP_STALL_CYCLES_TP = 4,
707 	PERF_SP_STALL_CYCLES_UCHE = 5,
708 	PERF_SP_STALL_CYCLES_RB = 6,
709 	PERF_SP_NON_EXECUTION_CYCLES = 7,
710 	PERF_SP_WAVE_CONTEXTS = 8,
711 	PERF_SP_WAVE_CONTEXT_CYCLES = 9,
712 	PERF_SP_FS_STAGE_WAVE_CYCLES = 10,
713 	PERF_SP_FS_STAGE_WAVE_SAMPLES = 11,
714 	PERF_SP_VS_STAGE_WAVE_CYCLES = 12,
715 	PERF_SP_VS_STAGE_WAVE_SAMPLES = 13,
716 	PERF_SP_FS_STAGE_DURATION_CYCLES = 14,
717 	PERF_SP_VS_STAGE_DURATION_CYCLES = 15,
718 	PERF_SP_WAVE_CTRL_CYCLES = 16,
719 	PERF_SP_WAVE_LOAD_CYCLES = 17,
720 	PERF_SP_WAVE_EMIT_CYCLES = 18,
721 	PERF_SP_WAVE_NOP_CYCLES = 19,
722 	PERF_SP_WAVE_WAIT_CYCLES = 20,
723 	PERF_SP_WAVE_FETCH_CYCLES = 21,
724 	PERF_SP_WAVE_IDLE_CYCLES = 22,
725 	PERF_SP_WAVE_END_CYCLES = 23,
726 	PERF_SP_WAVE_LONG_SYNC_CYCLES = 24,
727 	PERF_SP_WAVE_SHORT_SYNC_CYCLES = 25,
728 	PERF_SP_WAVE_JOIN_CYCLES = 26,
729 	PERF_SP_LM_LOAD_INSTRUCTIONS = 27,
730 	PERF_SP_LM_STORE_INSTRUCTIONS = 28,
731 	PERF_SP_LM_ATOMICS = 29,
732 	PERF_SP_GM_LOAD_INSTRUCTIONS = 30,
733 	PERF_SP_GM_STORE_INSTRUCTIONS = 31,
734 	PERF_SP_GM_ATOMICS = 32,
735 	PERF_SP_VS_STAGE_TEX_INSTRUCTIONS = 33,
736 	PERF_SP_VS_STAGE_EFU_INSTRUCTIONS = 34,
737 	PERF_SP_VS_STAGE_FULL_ALU_INSTRUCTIONS = 35,
738 	PERF_SP_VS_STAGE_HALF_ALU_INSTRUCTIONS = 36,
739 	PERF_SP_FS_STAGE_TEX_INSTRUCTIONS = 37,
740 	PERF_SP_FS_STAGE_CFLOW_INSTRUCTIONS = 38,
741 	PERF_SP_FS_STAGE_EFU_INSTRUCTIONS = 39,
742 	PERF_SP_FS_STAGE_FULL_ALU_INSTRUCTIONS = 40,
743 	PERF_SP_FS_STAGE_HALF_ALU_INSTRUCTIONS = 41,
744 	PERF_SP_FS_STAGE_BARY_INSTRUCTIONS = 42,
745 	PERF_SP_VS_INSTRUCTIONS = 43,
746 	PERF_SP_FS_INSTRUCTIONS = 44,
747 	PERF_SP_ADDR_LOCK_COUNT = 45,
748 	PERF_SP_UCHE_READ_TRANS = 46,
749 	PERF_SP_UCHE_WRITE_TRANS = 47,
750 	PERF_SP_EXPORT_VPC_TRANS = 48,
751 	PERF_SP_EXPORT_RB_TRANS = 49,
752 	PERF_SP_PIXELS_KILLED = 50,
753 	PERF_SP_ICL1_REQUESTS = 51,
754 	PERF_SP_ICL1_MISSES = 52,
755 	PERF_SP_HS_INSTRUCTIONS = 53,
756 	PERF_SP_DS_INSTRUCTIONS = 54,
757 	PERF_SP_GS_INSTRUCTIONS = 55,
758 	PERF_SP_CS_INSTRUCTIONS = 56,
759 	PERF_SP_GPR_READ = 57,
760 	PERF_SP_GPR_WRITE = 58,
761 	PERF_SP_FS_STAGE_HALF_EFU_INSTRUCTIONS = 59,
762 	PERF_SP_VS_STAGE_HALF_EFU_INSTRUCTIONS = 60,
763 	PERF_SP_LM_BANK_CONFLICTS = 61,
764 	PERF_SP_TEX_CONTROL_WORKING_CYCLES = 62,
765 	PERF_SP_LOAD_CONTROL_WORKING_CYCLES = 63,
766 	PERF_SP_FLOW_CONTROL_WORKING_CYCLES = 64,
767 	PERF_SP_LM_WORKING_CYCLES = 65,
768 	PERF_SP_DISPATCHER_WORKING_CYCLES = 66,
769 	PERF_SP_SEQUENCER_WORKING_CYCLES = 67,
770 	PERF_SP_LOW_EFFICIENCY_STARVED_BY_TP = 68,
771 	PERF_SP_STARVE_CYCLES_HLSQ = 69,
772 	PERF_SP_NON_EXECUTION_LS_CYCLES = 70,
773 	PERF_SP_WORKING_EU = 71,
774 	PERF_SP_ANY_EU_WORKING = 72,
775 	PERF_SP_WORKING_EU_FS_STAGE = 73,
776 	PERF_SP_ANY_EU_WORKING_FS_STAGE = 74,
777 	PERF_SP_WORKING_EU_VS_STAGE = 75,
778 	PERF_SP_ANY_EU_WORKING_VS_STAGE = 76,
779 	PERF_SP_WORKING_EU_CS_STAGE = 77,
780 	PERF_SP_ANY_EU_WORKING_CS_STAGE = 78,
781 	PERF_SP_GPR_READ_PREFETCH = 79,
782 	PERF_SP_GPR_READ_CONFLICT = 80,
783 	PERF_SP_GPR_WRITE_CONFLICT = 81,
784 	PERF_SP_GM_LOAD_LATENCY_CYCLES = 82,
785 	PERF_SP_GM_LOAD_LATENCY_SAMPLES = 83,
786 	PERF_SP_EXECUTABLE_WAVES = 84,
787 };
788 
789 enum a6xx_rb_perfcounter_select {
790 	PERF_RB_BUSY_CYCLES = 0,
791 	PERF_RB_STALL_CYCLES_HLSQ = 1,
792 	PERF_RB_STALL_CYCLES_FIFO0_FULL = 2,
793 	PERF_RB_STALL_CYCLES_FIFO1_FULL = 3,
794 	PERF_RB_STALL_CYCLES_FIFO2_FULL = 4,
795 	PERF_RB_STARVE_CYCLES_SP = 5,
796 	PERF_RB_STARVE_CYCLES_LRZ_TILE = 6,
797 	PERF_RB_STARVE_CYCLES_CCU = 7,
798 	PERF_RB_STARVE_CYCLES_Z_PLANE = 8,
799 	PERF_RB_STARVE_CYCLES_BARY_PLANE = 9,
800 	PERF_RB_Z_WORKLOAD = 10,
801 	PERF_RB_HLSQ_ACTIVE = 11,
802 	PERF_RB_Z_READ = 12,
803 	PERF_RB_Z_WRITE = 13,
804 	PERF_RB_C_READ = 14,
805 	PERF_RB_C_WRITE = 15,
806 	PERF_RB_TOTAL_PASS = 16,
807 	PERF_RB_Z_PASS = 17,
808 	PERF_RB_Z_FAIL = 18,
809 	PERF_RB_S_FAIL = 19,
810 	PERF_RB_BLENDED_FXP_COMPONENTS = 20,
811 	PERF_RB_BLENDED_FP16_COMPONENTS = 21,
812 	PERF_RB_PS_INVOCATIONS = 22,
813 	PERF_RB_2D_ALIVE_CYCLES = 23,
814 	PERF_RB_2D_STALL_CYCLES_A2D = 24,
815 	PERF_RB_2D_STARVE_CYCLES_SRC = 25,
816 	PERF_RB_2D_STARVE_CYCLES_SP = 26,
817 	PERF_RB_2D_STARVE_CYCLES_DST = 27,
818 	PERF_RB_2D_VALID_PIXELS = 28,
819 	PERF_RB_3D_PIXELS = 29,
820 	PERF_RB_BLENDER_WORKING_CYCLES = 30,
821 	PERF_RB_ZPROC_WORKING_CYCLES = 31,
822 	PERF_RB_CPROC_WORKING_CYCLES = 32,
823 	PERF_RB_SAMPLER_WORKING_CYCLES = 33,
824 	PERF_RB_STALL_CYCLES_CCU_COLOR_READ = 34,
825 	PERF_RB_STALL_CYCLES_CCU_COLOR_WRITE = 35,
826 	PERF_RB_STALL_CYCLES_CCU_DEPTH_READ = 36,
827 	PERF_RB_STALL_CYCLES_CCU_DEPTH_WRITE = 37,
828 	PERF_RB_STALL_CYCLES_VPC = 38,
829 	PERF_RB_2D_INPUT_TRANS = 39,
830 	PERF_RB_2D_OUTPUT_RB_DST_TRANS = 40,
831 	PERF_RB_2D_OUTPUT_RB_SRC_TRANS = 41,
832 	PERF_RB_BLENDED_FP32_COMPONENTS = 42,
833 	PERF_RB_COLOR_PIX_TILES = 43,
834 	PERF_RB_STALL_CYCLES_CCU = 44,
835 	PERF_RB_EARLY_Z_ARB3_GRANT = 45,
836 	PERF_RB_LATE_Z_ARB3_GRANT = 46,
837 	PERF_RB_EARLY_Z_SKIP_GRANT = 47,
838 };
839 
840 enum a6xx_vsc_perfcounter_select {
841 	PERF_VSC_BUSY_CYCLES = 0,
842 	PERF_VSC_WORKING_CYCLES = 1,
843 	PERF_VSC_STALL_CYCLES_UCHE = 2,
844 	PERF_VSC_EOT_NUM = 3,
845 	PERF_VSC_INPUT_TILES = 4,
846 };
847 
848 enum a6xx_ccu_perfcounter_select {
849 	PERF_CCU_BUSY_CYCLES = 0,
850 	PERF_CCU_STALL_CYCLES_RB_DEPTH_RETURN = 1,
851 	PERF_CCU_STALL_CYCLES_RB_COLOR_RETURN = 2,
852 	PERF_CCU_STARVE_CYCLES_FLAG_RETURN = 3,
853 	PERF_CCU_DEPTH_BLOCKS = 4,
854 	PERF_CCU_COLOR_BLOCKS = 5,
855 	PERF_CCU_DEPTH_BLOCK_HIT = 6,
856 	PERF_CCU_COLOR_BLOCK_HIT = 7,
857 	PERF_CCU_PARTIAL_BLOCK_READ = 8,
858 	PERF_CCU_GMEM_READ = 9,
859 	PERF_CCU_GMEM_WRITE = 10,
860 	PERF_CCU_DEPTH_READ_FLAG0_COUNT = 11,
861 	PERF_CCU_DEPTH_READ_FLAG1_COUNT = 12,
862 	PERF_CCU_DEPTH_READ_FLAG2_COUNT = 13,
863 	PERF_CCU_DEPTH_READ_FLAG3_COUNT = 14,
864 	PERF_CCU_DEPTH_READ_FLAG4_COUNT = 15,
865 	PERF_CCU_DEPTH_READ_FLAG5_COUNT = 16,
866 	PERF_CCU_DEPTH_READ_FLAG6_COUNT = 17,
867 	PERF_CCU_DEPTH_READ_FLAG8_COUNT = 18,
868 	PERF_CCU_COLOR_READ_FLAG0_COUNT = 19,
869 	PERF_CCU_COLOR_READ_FLAG1_COUNT = 20,
870 	PERF_CCU_COLOR_READ_FLAG2_COUNT = 21,
871 	PERF_CCU_COLOR_READ_FLAG3_COUNT = 22,
872 	PERF_CCU_COLOR_READ_FLAG4_COUNT = 23,
873 	PERF_CCU_COLOR_READ_FLAG5_COUNT = 24,
874 	PERF_CCU_COLOR_READ_FLAG6_COUNT = 25,
875 	PERF_CCU_COLOR_READ_FLAG8_COUNT = 26,
876 	PERF_CCU_2D_RD_REQ = 27,
877 	PERF_CCU_2D_WR_REQ = 28,
878 };
879 
880 enum a6xx_lrz_perfcounter_select {
881 	PERF_LRZ_BUSY_CYCLES = 0,
882 	PERF_LRZ_STARVE_CYCLES_RAS = 1,
883 	PERF_LRZ_STALL_CYCLES_RB = 2,
884 	PERF_LRZ_STALL_CYCLES_VSC = 3,
885 	PERF_LRZ_STALL_CYCLES_VPC = 4,
886 	PERF_LRZ_STALL_CYCLES_FLAG_PREFETCH = 5,
887 	PERF_LRZ_STALL_CYCLES_UCHE = 6,
888 	PERF_LRZ_LRZ_READ = 7,
889 	PERF_LRZ_LRZ_WRITE = 8,
890 	PERF_LRZ_READ_LATENCY = 9,
891 	PERF_LRZ_MERGE_CACHE_UPDATING = 10,
892 	PERF_LRZ_PRIM_KILLED_BY_MASKGEN = 11,
893 	PERF_LRZ_PRIM_KILLED_BY_LRZ = 12,
894 	PERF_LRZ_VISIBLE_PRIM_AFTER_LRZ = 13,
895 	PERF_LRZ_FULL_8X8_TILES = 14,
896 	PERF_LRZ_PARTIAL_8X8_TILES = 15,
897 	PERF_LRZ_TILE_KILLED = 16,
898 	PERF_LRZ_TOTAL_PIXEL = 17,
899 	PERF_LRZ_VISIBLE_PIXEL_AFTER_LRZ = 18,
900 	PERF_LRZ_FULLY_COVERED_TILES = 19,
901 	PERF_LRZ_PARTIAL_COVERED_TILES = 20,
902 	PERF_LRZ_FEEDBACK_ACCEPT = 21,
903 	PERF_LRZ_FEEDBACK_DISCARD = 22,
904 	PERF_LRZ_FEEDBACK_STALL = 23,
905 	PERF_LRZ_STALL_CYCLES_RB_ZPLANE = 24,
906 	PERF_LRZ_STALL_CYCLES_RB_BPLANE = 25,
907 	PERF_LRZ_STALL_CYCLES_VC = 26,
908 	PERF_LRZ_RAS_MASK_TRANS = 27,
909 };
910 
911 enum a6xx_cmp_perfcounter_select {
912 	PERF_CMPDECMP_STALL_CYCLES_ARB = 0,
913 	PERF_CMPDECMP_VBIF_LATENCY_CYCLES = 1,
914 	PERF_CMPDECMP_VBIF_LATENCY_SAMPLES = 2,
915 	PERF_CMPDECMP_VBIF_READ_DATA_CCU = 3,
916 	PERF_CMPDECMP_VBIF_WRITE_DATA_CCU = 4,
917 	PERF_CMPDECMP_VBIF_READ_REQUEST = 5,
918 	PERF_CMPDECMP_VBIF_WRITE_REQUEST = 6,
919 	PERF_CMPDECMP_VBIF_READ_DATA = 7,
920 	PERF_CMPDECMP_VBIF_WRITE_DATA = 8,
921 	PERF_CMPDECMP_FLAG_FETCH_CYCLES = 9,
922 	PERF_CMPDECMP_FLAG_FETCH_SAMPLES = 10,
923 	PERF_CMPDECMP_DEPTH_WRITE_FLAG1_COUNT = 11,
924 	PERF_CMPDECMP_DEPTH_WRITE_FLAG2_COUNT = 12,
925 	PERF_CMPDECMP_DEPTH_WRITE_FLAG3_COUNT = 13,
926 	PERF_CMPDECMP_DEPTH_WRITE_FLAG4_COUNT = 14,
927 	PERF_CMPDECMP_DEPTH_WRITE_FLAG5_COUNT = 15,
928 	PERF_CMPDECMP_DEPTH_WRITE_FLAG6_COUNT = 16,
929 	PERF_CMPDECMP_DEPTH_WRITE_FLAG8_COUNT = 17,
930 	PERF_CMPDECMP_COLOR_WRITE_FLAG1_COUNT = 18,
931 	PERF_CMPDECMP_COLOR_WRITE_FLAG2_COUNT = 19,
932 	PERF_CMPDECMP_COLOR_WRITE_FLAG3_COUNT = 20,
933 	PERF_CMPDECMP_COLOR_WRITE_FLAG4_COUNT = 21,
934 	PERF_CMPDECMP_COLOR_WRITE_FLAG5_COUNT = 22,
935 	PERF_CMPDECMP_COLOR_WRITE_FLAG6_COUNT = 23,
936 	PERF_CMPDECMP_COLOR_WRITE_FLAG8_COUNT = 24,
937 	PERF_CMPDECMP_2D_STALL_CYCLES_VBIF_REQ = 25,
938 	PERF_CMPDECMP_2D_STALL_CYCLES_VBIF_WR = 26,
939 	PERF_CMPDECMP_2D_STALL_CYCLES_VBIF_RETURN = 27,
940 	PERF_CMPDECMP_2D_RD_DATA = 28,
941 	PERF_CMPDECMP_2D_WR_DATA = 29,
942 	PERF_CMPDECMP_VBIF_READ_DATA_UCHE_CH0 = 30,
943 	PERF_CMPDECMP_VBIF_READ_DATA_UCHE_CH1 = 31,
944 	PERF_CMPDECMP_2D_OUTPUT_TRANS = 32,
945 	PERF_CMPDECMP_VBIF_WRITE_DATA_UCHE = 33,
946 	PERF_CMPDECMP_DEPTH_WRITE_FLAG0_COUNT = 34,
947 	PERF_CMPDECMP_COLOR_WRITE_FLAG0_COUNT = 35,
948 	PERF_CMPDECMP_COLOR_WRITE_FLAGALPHA_COUNT = 36,
949 	PERF_CMPDECMP_2D_BUSY_CYCLES = 37,
950 	PERF_CMPDECMP_2D_REORDER_STARVE_CYCLES = 38,
951 	PERF_CMPDECMP_2D_PIXELS = 39,
952 };
953 
954 enum a6xx_tex_filter {
955 	A6XX_TEX_NEAREST = 0,
956 	A6XX_TEX_LINEAR = 1,
957 	A6XX_TEX_ANISO = 2,
958 };
959 
960 enum a6xx_tex_clamp {
961 	A6XX_TEX_REPEAT = 0,
962 	A6XX_TEX_CLAMP_TO_EDGE = 1,
963 	A6XX_TEX_MIRROR_REPEAT = 2,
964 	A6XX_TEX_CLAMP_TO_BORDER = 3,
965 	A6XX_TEX_MIRROR_CLAMP = 4,
966 };
967 
968 enum a6xx_tex_aniso {
969 	A6XX_TEX_ANISO_1 = 0,
970 	A6XX_TEX_ANISO_2 = 1,
971 	A6XX_TEX_ANISO_4 = 2,
972 	A6XX_TEX_ANISO_8 = 3,
973 	A6XX_TEX_ANISO_16 = 4,
974 };
975 
976 enum a6xx_tex_swiz {
977 	A6XX_TEX_X = 0,
978 	A6XX_TEX_Y = 1,
979 	A6XX_TEX_Z = 2,
980 	A6XX_TEX_W = 3,
981 	A6XX_TEX_ZERO = 4,
982 	A6XX_TEX_ONE = 5,
983 };
984 
985 enum a6xx_tex_type {
986 	A6XX_TEX_1D = 0,
987 	A6XX_TEX_2D = 1,
988 	A6XX_TEX_CUBE = 2,
989 	A6XX_TEX_3D = 3,
990 };
991 
992 #define A6XX_RBBM_INT_0_MASK_RBBM_GPU_IDLE			0x00000001
993 #define A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR			0x00000002
994 #define A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW	0x00000040
995 #define A6XX_RBBM_INT_0_MASK_RBBM_GPC_ERROR			0x00000080
996 #define A6XX_RBBM_INT_0_MASK_CP_SW				0x00000100
997 #define A6XX_RBBM_INT_0_MASK_CP_HW_ERROR			0x00000200
998 #define A6XX_RBBM_INT_0_MASK_CP_CCU_FLUSH_DEPTH_TS		0x00000400
999 #define A6XX_RBBM_INT_0_MASK_CP_CCU_FLUSH_COLOR_TS		0x00000800
1000 #define A6XX_RBBM_INT_0_MASK_CP_CCU_RESOLVE_TS			0x00001000
1001 #define A6XX_RBBM_INT_0_MASK_CP_IB2				0x00002000
1002 #define A6XX_RBBM_INT_0_MASK_CP_IB1				0x00004000
1003 #define A6XX_RBBM_INT_0_MASK_CP_RB				0x00008000
1004 #define A6XX_RBBM_INT_0_MASK_CP_RB_DONE_TS			0x00020000
1005 #define A6XX_RBBM_INT_0_MASK_CP_WT_DONE_TS			0x00040000
1006 #define A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS			0x00100000
1007 #define A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW		0x00400000
1008 #define A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT			0x00800000
1009 #define A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS			0x01000000
1010 #define A6XX_RBBM_INT_0_MASK_UCHE_TRAP_INTR			0x02000000
1011 #define A6XX_RBBM_INT_0_MASK_DEBBUS_INTR_0			0x04000000
1012 #define A6XX_RBBM_INT_0_MASK_DEBBUS_INTR_1			0x08000000
1013 #define A6XX_RBBM_INT_0_MASK_ISDB_CPU_IRQ			0x40000000
1014 #define A6XX_RBBM_INT_0_MASK_ISDB_UNDER_DEBUG			0x80000000
1015 #define A6XX_CP_INT_CP_OPCODE_ERROR				0x00000001
1016 #define A6XX_CP_INT_CP_UCODE_ERROR				0x00000002
1017 #define A6XX_CP_INT_CP_HW_FAULT_ERROR				0x00000004
1018 #define A6XX_CP_INT_CP_REGISTER_PROTECTION_ERROR		0x00000010
1019 #define A6XX_CP_INT_CP_AHB_ERROR				0x00000020
1020 #define A6XX_CP_INT_CP_VSD_PARITY_ERROR				0x00000040
1021 #define A6XX_CP_INT_CP_ILLEGAL_INSTR_ERROR			0x00000080
1022 #define REG_A6XX_CP_RB_BASE					0x00000800
1023 
1024 #define REG_A6XX_CP_RB_BASE_HI					0x00000801
1025 
1026 #define REG_A6XX_CP_RB_CNTL					0x00000802
1027 
1028 #define REG_A6XX_CP_RB_RPTR_ADDR_LO				0x00000804
1029 
1030 #define REG_A6XX_CP_RB_RPTR_ADDR_HI				0x00000805
1031 
1032 #define REG_A6XX_CP_RB_RPTR					0x00000806
1033 
1034 #define REG_A6XX_CP_RB_WPTR					0x00000807
1035 
1036 #define REG_A6XX_CP_SQE_CNTL					0x00000808
1037 
1038 #define REG_A6XX_CP_HW_FAULT					0x00000821
1039 
1040 #define REG_A6XX_CP_INTERRUPT_STATUS				0x00000823
1041 
1042 #define REG_A6XX_CP_PROTECT_STATUS				0x00000824
1043 
1044 #define REG_A6XX_CP_SQE_INSTR_BASE_LO				0x00000830
1045 
1046 #define REG_A6XX_CP_SQE_INSTR_BASE_HI				0x00000831
1047 
1048 #define REG_A6XX_CP_MISC_CNTL					0x00000840
1049 
1050 #define REG_A6XX_CP_APRIV_CNTL					0x00000844
1051 
1052 #define REG_A6XX_CP_ROQ_THRESHOLDS_1				0x000008c1
1053 
1054 #define REG_A6XX_CP_ROQ_THRESHOLDS_2				0x000008c2
1055 
1056 #define REG_A6XX_CP_MEM_POOL_SIZE				0x000008c3
1057 
1058 #define REG_A6XX_CP_CHICKEN_DBG					0x00000841
1059 
1060 #define REG_A6XX_CP_ADDR_MODE_CNTL				0x00000842
1061 
1062 #define REG_A6XX_CP_DBG_ECO_CNTL				0x00000843
1063 
1064 #define REG_A6XX_CP_PROTECT_CNTL				0x0000084f
1065 
1066 static inline uint32_t REG_A6XX_CP_SCRATCH(uint32_t i0) { return 0x00000883 + 0x1*i0; }
1067 
1068 static inline uint32_t REG_A6XX_CP_SCRATCH_REG(uint32_t i0) { return 0x00000883 + 0x1*i0; }
1069 
1070 static inline uint32_t REG_A6XX_CP_PROTECT(uint32_t i0) { return 0x00000850 + 0x1*i0; }
1071 
1072 static inline uint32_t REG_A6XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000850 + 0x1*i0; }
1073 #define A6XX_CP_PROTECT_REG_BASE_ADDR__MASK			0x0003ffff
1074 #define A6XX_CP_PROTECT_REG_BASE_ADDR__SHIFT			0
1075 static inline uint32_t A6XX_CP_PROTECT_REG_BASE_ADDR(uint32_t val)
1076 {
1077 	return ((val) << A6XX_CP_PROTECT_REG_BASE_ADDR__SHIFT) & A6XX_CP_PROTECT_REG_BASE_ADDR__MASK;
1078 }
1079 #define A6XX_CP_PROTECT_REG_MASK_LEN__MASK			0x7ffc0000
1080 #define A6XX_CP_PROTECT_REG_MASK_LEN__SHIFT			18
1081 static inline uint32_t A6XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)
1082 {
1083 	return ((val) << A6XX_CP_PROTECT_REG_MASK_LEN__SHIFT) & A6XX_CP_PROTECT_REG_MASK_LEN__MASK;
1084 }
1085 #define A6XX_CP_PROTECT_REG_READ				0x80000000
1086 
1087 #define REG_A6XX_CP_CONTEXT_SWITCH_CNTL				0x000008a0
1088 
1089 #define REG_A6XX_CP_CONTEXT_SWITCH_SMMU_INFO_LO			0x000008a1
1090 
1091 #define REG_A6XX_CP_CONTEXT_SWITCH_SMMU_INFO_HI			0x000008a2
1092 
1093 #define REG_A6XX_CP_CONTEXT_SWITCH_PRIV_NON_SECURE_RESTORE_ADDR_LO	0x000008a3
1094 
1095 #define REG_A6XX_CP_CONTEXT_SWITCH_PRIV_NON_SECURE_RESTORE_ADDR_HI	0x000008a4
1096 
1097 #define REG_A6XX_CP_CONTEXT_SWITCH_PRIV_SECURE_RESTORE_ADDR_LO	0x000008a5
1098 
1099 #define REG_A6XX_CP_CONTEXT_SWITCH_PRIV_SECURE_RESTORE_ADDR_HI	0x000008a6
1100 
1101 #define REG_A6XX_CP_CONTEXT_SWITCH_NON_PRIV_RESTORE_ADDR_LO	0x000008a7
1102 
1103 #define REG_A6XX_CP_CONTEXT_SWITCH_NON_PRIV_RESTORE_ADDR_HI	0x000008a8
1104 
1105 #define REG_A6XX_CP_PERFCTR_CP_SEL_0				0x000008d0
1106 
1107 #define REG_A6XX_CP_PERFCTR_CP_SEL_1				0x000008d1
1108 
1109 #define REG_A6XX_CP_PERFCTR_CP_SEL_2				0x000008d2
1110 
1111 #define REG_A6XX_CP_PERFCTR_CP_SEL_3				0x000008d3
1112 
1113 #define REG_A6XX_CP_PERFCTR_CP_SEL_4				0x000008d4
1114 
1115 #define REG_A6XX_CP_PERFCTR_CP_SEL_5				0x000008d5
1116 
1117 #define REG_A6XX_CP_PERFCTR_CP_SEL_6				0x000008d6
1118 
1119 #define REG_A6XX_CP_PERFCTR_CP_SEL_7				0x000008d7
1120 
1121 #define REG_A6XX_CP_PERFCTR_CP_SEL_8				0x000008d8
1122 
1123 #define REG_A6XX_CP_PERFCTR_CP_SEL_9				0x000008d9
1124 
1125 #define REG_A6XX_CP_PERFCTR_CP_SEL_10				0x000008da
1126 
1127 #define REG_A6XX_CP_PERFCTR_CP_SEL_11				0x000008db
1128 
1129 #define REG_A6XX_CP_PERFCTR_CP_SEL_12				0x000008dc
1130 
1131 #define REG_A6XX_CP_PERFCTR_CP_SEL_13				0x000008dd
1132 
1133 #define REG_A6XX_CP_CRASH_SCRIPT_BASE_LO			0x00000900
1134 
1135 #define REG_A6XX_CP_CRASH_SCRIPT_BASE_HI			0x00000901
1136 
1137 #define REG_A6XX_CP_CRASH_DUMP_CNTL				0x00000902
1138 
1139 #define REG_A6XX_CP_CRASH_DUMP_STATUS				0x00000903
1140 
1141 #define REG_A6XX_CP_SQE_STAT_ADDR				0x00000908
1142 
1143 #define REG_A6XX_CP_SQE_STAT_DATA				0x00000909
1144 
1145 #define REG_A6XX_CP_DRAW_STATE_ADDR				0x0000090a
1146 
1147 #define REG_A6XX_CP_DRAW_STATE_DATA				0x0000090b
1148 
1149 #define REG_A6XX_CP_ROQ_DBG_ADDR				0x0000090c
1150 
1151 #define REG_A6XX_CP_ROQ_DBG_DATA				0x0000090d
1152 
1153 #define REG_A6XX_CP_MEM_POOL_DBG_ADDR				0x0000090e
1154 
1155 #define REG_A6XX_CP_MEM_POOL_DBG_DATA				0x0000090f
1156 
1157 #define REG_A6XX_CP_SQE_UCODE_DBG_ADDR				0x00000910
1158 
1159 #define REG_A6XX_CP_SQE_UCODE_DBG_DATA				0x00000911
1160 
1161 #define REG_A6XX_CP_IB1_BASE					0x00000928
1162 
1163 #define REG_A6XX_CP_IB1_BASE_HI					0x00000929
1164 
1165 #define REG_A6XX_CP_IB1_REM_SIZE				0x0000092a
1166 
1167 #define REG_A6XX_CP_IB2_BASE					0x0000092b
1168 
1169 #define REG_A6XX_CP_IB2_BASE_HI					0x0000092c
1170 
1171 #define REG_A6XX_CP_IB2_REM_SIZE				0x0000092d
1172 
1173 #define REG_A6XX_CP_ALWAYS_ON_COUNTER_LO			0x00000980
1174 
1175 #define REG_A6XX_CP_ALWAYS_ON_COUNTER_HI			0x00000981
1176 
1177 #define REG_A6XX_CP_AHB_CNTL					0x0000098d
1178 
1179 #define REG_A6XX_CP_APERTURE_CNTL_HOST				0x00000a00
1180 
1181 #define REG_A6XX_CP_APERTURE_CNTL_CD				0x00000a03
1182 
1183 #define REG_A6XX_VSC_ADDR_MODE_CNTL				0x00000c01
1184 
1185 #define REG_A6XX_RBBM_INT_0_STATUS				0x00000201
1186 
1187 #define REG_A6XX_RBBM_STATUS					0x00000210
1188 #define A6XX_RBBM_STATUS_GPU_BUSY_IGN_AHB			0x00800000
1189 #define A6XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP			0x00400000
1190 #define A6XX_RBBM_STATUS_HLSQ_BUSY				0x00200000
1191 #define A6XX_RBBM_STATUS_VSC_BUSY				0x00100000
1192 #define A6XX_RBBM_STATUS_TPL1_BUSY				0x00080000
1193 #define A6XX_RBBM_STATUS_SP_BUSY				0x00040000
1194 #define A6XX_RBBM_STATUS_UCHE_BUSY				0x00020000
1195 #define A6XX_RBBM_STATUS_VPC_BUSY				0x00010000
1196 #define A6XX_RBBM_STATUS_VFD_BUSY				0x00008000
1197 #define A6XX_RBBM_STATUS_TESS_BUSY				0x00004000
1198 #define A6XX_RBBM_STATUS_PC_VSD_BUSY				0x00002000
1199 #define A6XX_RBBM_STATUS_PC_DCALL_BUSY				0x00001000
1200 #define A6XX_RBBM_STATUS_COM_DCOM_BUSY				0x00000800
1201 #define A6XX_RBBM_STATUS_LRZ_BUSY				0x00000400
1202 #define A6XX_RBBM_STATUS_A2D_BUSY				0x00000200
1203 #define A6XX_RBBM_STATUS_CCU_BUSY				0x00000100
1204 #define A6XX_RBBM_STATUS_RB_BUSY				0x00000080
1205 #define A6XX_RBBM_STATUS_RAS_BUSY				0x00000040
1206 #define A6XX_RBBM_STATUS_TSE_BUSY				0x00000020
1207 #define A6XX_RBBM_STATUS_VBIF_BUSY				0x00000010
1208 #define A6XX_RBBM_STATUS_GFX_DBGC_BUSY				0x00000008
1209 #define A6XX_RBBM_STATUS_CP_BUSY				0x00000004
1210 #define A6XX_RBBM_STATUS_CP_AHB_BUSY_CP_MASTER			0x00000002
1211 #define A6XX_RBBM_STATUS_CP_AHB_BUSY_CX_MASTER			0x00000001
1212 
1213 #define REG_A6XX_RBBM_STATUS3					0x00000213
1214 
1215 #define REG_A6XX_RBBM_VBIF_GX_RESET_STATUS			0x00000215
1216 
1217 #define REG_A6XX_RBBM_PERFCTR_CP_0_LO				0x00000400
1218 
1219 #define REG_A6XX_RBBM_PERFCTR_CP_0_HI				0x00000401
1220 
1221 #define REG_A6XX_RBBM_PERFCTR_CP_1_LO				0x00000402
1222 
1223 #define REG_A6XX_RBBM_PERFCTR_CP_1_HI				0x00000403
1224 
1225 #define REG_A6XX_RBBM_PERFCTR_CP_2_LO				0x00000404
1226 
1227 #define REG_A6XX_RBBM_PERFCTR_CP_2_HI				0x00000405
1228 
1229 #define REG_A6XX_RBBM_PERFCTR_CP_3_LO				0x00000406
1230 
1231 #define REG_A6XX_RBBM_PERFCTR_CP_3_HI				0x00000407
1232 
1233 #define REG_A6XX_RBBM_PERFCTR_CP_4_LO				0x00000408
1234 
1235 #define REG_A6XX_RBBM_PERFCTR_CP_4_HI				0x00000409
1236 
1237 #define REG_A6XX_RBBM_PERFCTR_CP_5_LO				0x0000040a
1238 
1239 #define REG_A6XX_RBBM_PERFCTR_CP_5_HI				0x0000040b
1240 
1241 #define REG_A6XX_RBBM_PERFCTR_CP_6_LO				0x0000040c
1242 
1243 #define REG_A6XX_RBBM_PERFCTR_CP_6_HI				0x0000040d
1244 
1245 #define REG_A6XX_RBBM_PERFCTR_CP_7_LO				0x0000040e
1246 
1247 #define REG_A6XX_RBBM_PERFCTR_CP_7_HI				0x0000040f
1248 
1249 #define REG_A6XX_RBBM_PERFCTR_CP_8_LO				0x00000410
1250 
1251 #define REG_A6XX_RBBM_PERFCTR_CP_8_HI				0x00000411
1252 
1253 #define REG_A6XX_RBBM_PERFCTR_CP_9_LO				0x00000412
1254 
1255 #define REG_A6XX_RBBM_PERFCTR_CP_9_HI				0x00000413
1256 
1257 #define REG_A6XX_RBBM_PERFCTR_CP_10_LO				0x00000414
1258 
1259 #define REG_A6XX_RBBM_PERFCTR_CP_10_HI				0x00000415
1260 
1261 #define REG_A6XX_RBBM_PERFCTR_CP_11_LO				0x00000416
1262 
1263 #define REG_A6XX_RBBM_PERFCTR_CP_11_HI				0x00000417
1264 
1265 #define REG_A6XX_RBBM_PERFCTR_CP_12_LO				0x00000418
1266 
1267 #define REG_A6XX_RBBM_PERFCTR_CP_12_HI				0x00000419
1268 
1269 #define REG_A6XX_RBBM_PERFCTR_CP_13_LO				0x0000041a
1270 
1271 #define REG_A6XX_RBBM_PERFCTR_CP_13_HI				0x0000041b
1272 
1273 #define REG_A6XX_RBBM_PERFCTR_RBBM_0_LO				0x0000041c
1274 
1275 #define REG_A6XX_RBBM_PERFCTR_RBBM_0_HI				0x0000041d
1276 
1277 #define REG_A6XX_RBBM_PERFCTR_RBBM_1_LO				0x0000041e
1278 
1279 #define REG_A6XX_RBBM_PERFCTR_RBBM_1_HI				0x0000041f
1280 
1281 #define REG_A6XX_RBBM_PERFCTR_RBBM_2_LO				0x00000420
1282 
1283 #define REG_A6XX_RBBM_PERFCTR_RBBM_2_HI				0x00000421
1284 
1285 #define REG_A6XX_RBBM_PERFCTR_RBBM_3_LO				0x00000422
1286 
1287 #define REG_A6XX_RBBM_PERFCTR_RBBM_3_HI				0x00000423
1288 
1289 #define REG_A6XX_RBBM_PERFCTR_PC_0_LO				0x00000424
1290 
1291 #define REG_A6XX_RBBM_PERFCTR_PC_0_HI				0x00000425
1292 
1293 #define REG_A6XX_RBBM_PERFCTR_PC_1_LO				0x00000426
1294 
1295 #define REG_A6XX_RBBM_PERFCTR_PC_1_HI				0x00000427
1296 
1297 #define REG_A6XX_RBBM_PERFCTR_PC_2_LO				0x00000428
1298 
1299 #define REG_A6XX_RBBM_PERFCTR_PC_2_HI				0x00000429
1300 
1301 #define REG_A6XX_RBBM_PERFCTR_PC_3_LO				0x0000042a
1302 
1303 #define REG_A6XX_RBBM_PERFCTR_PC_3_HI				0x0000042b
1304 
1305 #define REG_A6XX_RBBM_PERFCTR_PC_4_LO				0x0000042c
1306 
1307 #define REG_A6XX_RBBM_PERFCTR_PC_4_HI				0x0000042d
1308 
1309 #define REG_A6XX_RBBM_PERFCTR_PC_5_LO				0x0000042e
1310 
1311 #define REG_A6XX_RBBM_PERFCTR_PC_5_HI				0x0000042f
1312 
1313 #define REG_A6XX_RBBM_PERFCTR_PC_6_LO				0x00000430
1314 
1315 #define REG_A6XX_RBBM_PERFCTR_PC_6_HI				0x00000431
1316 
1317 #define REG_A6XX_RBBM_PERFCTR_PC_7_LO				0x00000432
1318 
1319 #define REG_A6XX_RBBM_PERFCTR_PC_7_HI				0x00000433
1320 
1321 #define REG_A6XX_RBBM_PERFCTR_VFD_0_LO				0x00000434
1322 
1323 #define REG_A6XX_RBBM_PERFCTR_VFD_0_HI				0x00000435
1324 
1325 #define REG_A6XX_RBBM_PERFCTR_VFD_1_LO				0x00000436
1326 
1327 #define REG_A6XX_RBBM_PERFCTR_VFD_1_HI				0x00000437
1328 
1329 #define REG_A6XX_RBBM_PERFCTR_VFD_2_LO				0x00000438
1330 
1331 #define REG_A6XX_RBBM_PERFCTR_VFD_2_HI				0x00000439
1332 
1333 #define REG_A6XX_RBBM_PERFCTR_VFD_3_LO				0x0000043a
1334 
1335 #define REG_A6XX_RBBM_PERFCTR_VFD_3_HI				0x0000043b
1336 
1337 #define REG_A6XX_RBBM_PERFCTR_VFD_4_LO				0x0000043c
1338 
1339 #define REG_A6XX_RBBM_PERFCTR_VFD_4_HI				0x0000043d
1340 
1341 #define REG_A6XX_RBBM_PERFCTR_VFD_5_LO				0x0000043e
1342 
1343 #define REG_A6XX_RBBM_PERFCTR_VFD_5_HI				0x0000043f
1344 
1345 #define REG_A6XX_RBBM_PERFCTR_VFD_6_LO				0x00000440
1346 
1347 #define REG_A6XX_RBBM_PERFCTR_VFD_6_HI				0x00000441
1348 
1349 #define REG_A6XX_RBBM_PERFCTR_VFD_7_LO				0x00000442
1350 
1351 #define REG_A6XX_RBBM_PERFCTR_VFD_7_HI				0x00000443
1352 
1353 #define REG_A6XX_RBBM_PERFCTR_HLSQ_0_LO				0x00000444
1354 
1355 #define REG_A6XX_RBBM_PERFCTR_HLSQ_0_HI				0x00000445
1356 
1357 #define REG_A6XX_RBBM_PERFCTR_HLSQ_1_LO				0x00000446
1358 
1359 #define REG_A6XX_RBBM_PERFCTR_HLSQ_1_HI				0x00000447
1360 
1361 #define REG_A6XX_RBBM_PERFCTR_HLSQ_2_LO				0x00000448
1362 
1363 #define REG_A6XX_RBBM_PERFCTR_HLSQ_2_HI				0x00000449
1364 
1365 #define REG_A6XX_RBBM_PERFCTR_HLSQ_3_LO				0x0000044a
1366 
1367 #define REG_A6XX_RBBM_PERFCTR_HLSQ_3_HI				0x0000044b
1368 
1369 #define REG_A6XX_RBBM_PERFCTR_HLSQ_4_LO				0x0000044c
1370 
1371 #define REG_A6XX_RBBM_PERFCTR_HLSQ_4_HI				0x0000044d
1372 
1373 #define REG_A6XX_RBBM_PERFCTR_HLSQ_5_LO				0x0000044e
1374 
1375 #define REG_A6XX_RBBM_PERFCTR_HLSQ_5_HI				0x0000044f
1376 
1377 #define REG_A6XX_RBBM_PERFCTR_VPC_0_LO				0x00000450
1378 
1379 #define REG_A6XX_RBBM_PERFCTR_VPC_0_HI				0x00000451
1380 
1381 #define REG_A6XX_RBBM_PERFCTR_VPC_1_LO				0x00000452
1382 
1383 #define REG_A6XX_RBBM_PERFCTR_VPC_1_HI				0x00000453
1384 
1385 #define REG_A6XX_RBBM_PERFCTR_VPC_2_LO				0x00000454
1386 
1387 #define REG_A6XX_RBBM_PERFCTR_VPC_2_HI				0x00000455
1388 
1389 #define REG_A6XX_RBBM_PERFCTR_VPC_3_LO				0x00000456
1390 
1391 #define REG_A6XX_RBBM_PERFCTR_VPC_3_HI				0x00000457
1392 
1393 #define REG_A6XX_RBBM_PERFCTR_VPC_4_LO				0x00000458
1394 
1395 #define REG_A6XX_RBBM_PERFCTR_VPC_4_HI				0x00000459
1396 
1397 #define REG_A6XX_RBBM_PERFCTR_VPC_5_LO				0x0000045a
1398 
1399 #define REG_A6XX_RBBM_PERFCTR_VPC_5_HI				0x0000045b
1400 
1401 #define REG_A6XX_RBBM_PERFCTR_CCU_0_LO				0x0000045c
1402 
1403 #define REG_A6XX_RBBM_PERFCTR_CCU_0_HI				0x0000045d
1404 
1405 #define REG_A6XX_RBBM_PERFCTR_CCU_1_LO				0x0000045e
1406 
1407 #define REG_A6XX_RBBM_PERFCTR_CCU_1_HI				0x0000045f
1408 
1409 #define REG_A6XX_RBBM_PERFCTR_CCU_2_LO				0x00000460
1410 
1411 #define REG_A6XX_RBBM_PERFCTR_CCU_2_HI				0x00000461
1412 
1413 #define REG_A6XX_RBBM_PERFCTR_CCU_3_LO				0x00000462
1414 
1415 #define REG_A6XX_RBBM_PERFCTR_CCU_3_HI				0x00000463
1416 
1417 #define REG_A6XX_RBBM_PERFCTR_CCU_4_LO				0x00000464
1418 
1419 #define REG_A6XX_RBBM_PERFCTR_CCU_4_HI				0x00000465
1420 
1421 #define REG_A6XX_RBBM_PERFCTR_TSE_0_LO				0x00000466
1422 
1423 #define REG_A6XX_RBBM_PERFCTR_TSE_0_HI				0x00000467
1424 
1425 #define REG_A6XX_RBBM_PERFCTR_TSE_1_LO				0x00000468
1426 
1427 #define REG_A6XX_RBBM_PERFCTR_TSE_1_HI				0x00000469
1428 
1429 #define REG_A6XX_RBBM_PERFCTR_TSE_2_LO				0x0000046a
1430 
1431 #define REG_A6XX_RBBM_PERFCTR_CCU_4_HI				0x00000465
1432 
1433 #define REG_A6XX_RBBM_PERFCTR_TSE_0_LO				0x00000466
1434 
1435 #define REG_A6XX_RBBM_PERFCTR_TSE_0_HI				0x00000467
1436 
1437 #define REG_A6XX_RBBM_PERFCTR_TSE_1_LO				0x00000468
1438 
1439 #define REG_A6XX_RBBM_PERFCTR_TSE_1_HI				0x00000469
1440 
1441 #define REG_A6XX_RBBM_PERFCTR_TSE_2_LO				0x0000046a
1442 
1443 #define REG_A6XX_RBBM_PERFCTR_TSE_2_HI				0x0000046b
1444 
1445 #define REG_A6XX_RBBM_PERFCTR_TSE_3_LO				0x0000046c
1446 
1447 #define REG_A6XX_RBBM_PERFCTR_TSE_3_HI				0x0000046d
1448 
1449 #define REG_A6XX_RBBM_PERFCTR_RAS_0_LO				0x0000046e
1450 
1451 #define REG_A6XX_RBBM_PERFCTR_RAS_0_HI				0x0000046f
1452 
1453 #define REG_A6XX_RBBM_PERFCTR_RAS_1_LO				0x00000470
1454 
1455 #define REG_A6XX_RBBM_PERFCTR_RAS_1_HI				0x00000471
1456 
1457 #define REG_A6XX_RBBM_PERFCTR_RAS_2_LO				0x00000472
1458 
1459 #define REG_A6XX_RBBM_PERFCTR_RAS_2_HI				0x00000473
1460 
1461 #define REG_A6XX_RBBM_PERFCTR_RAS_3_LO				0x00000474
1462 
1463 #define REG_A6XX_RBBM_PERFCTR_RAS_3_HI				0x00000475
1464 
1465 #define REG_A6XX_RBBM_PERFCTR_UCHE_0_LO				0x00000476
1466 
1467 #define REG_A6XX_RBBM_PERFCTR_UCHE_0_HI				0x00000477
1468 
1469 #define REG_A6XX_RBBM_PERFCTR_UCHE_1_LO				0x00000478
1470 
1471 #define REG_A6XX_RBBM_PERFCTR_UCHE_1_HI				0x00000479
1472 
1473 #define REG_A6XX_RBBM_PERFCTR_UCHE_2_LO				0x0000047a
1474 
1475 #define REG_A6XX_RBBM_PERFCTR_UCHE_2_HI				0x0000047b
1476 
1477 #define REG_A6XX_RBBM_PERFCTR_UCHE_3_LO				0x0000047c
1478 
1479 #define REG_A6XX_RBBM_PERFCTR_UCHE_3_HI				0x0000047d
1480 
1481 #define REG_A6XX_RBBM_PERFCTR_UCHE_4_LO				0x0000047e
1482 
1483 #define REG_A6XX_RBBM_PERFCTR_UCHE_4_HI				0x0000047f
1484 
1485 #define REG_A6XX_RBBM_PERFCTR_UCHE_5_LO				0x00000480
1486 
1487 #define REG_A6XX_RBBM_PERFCTR_UCHE_5_HI				0x00000481
1488 
1489 #define REG_A6XX_RBBM_PERFCTR_UCHE_6_LO				0x00000482
1490 
1491 #define REG_A6XX_RBBM_PERFCTR_UCHE_6_HI				0x00000483
1492 
1493 #define REG_A6XX_RBBM_PERFCTR_UCHE_7_LO				0x00000484
1494 
1495 #define REG_A6XX_RBBM_PERFCTR_UCHE_7_HI				0x00000485
1496 
1497 #define REG_A6XX_RBBM_PERFCTR_UCHE_8_LO				0x00000486
1498 
1499 #define REG_A6XX_RBBM_PERFCTR_UCHE_8_HI				0x00000487
1500 
1501 #define REG_A6XX_RBBM_PERFCTR_UCHE_9_LO				0x00000488
1502 
1503 #define REG_A6XX_RBBM_PERFCTR_UCHE_9_HI				0x00000489
1504 
1505 #define REG_A6XX_RBBM_PERFCTR_UCHE_10_LO			0x0000048a
1506 
1507 #define REG_A6XX_RBBM_PERFCTR_UCHE_10_HI			0x0000048b
1508 
1509 #define REG_A6XX_RBBM_PERFCTR_UCHE_11_LO			0x0000048c
1510 
1511 #define REG_A6XX_RBBM_PERFCTR_UCHE_11_HI			0x0000048d
1512 
1513 #define REG_A6XX_RBBM_PERFCTR_TP_0_LO				0x0000048e
1514 
1515 #define REG_A6XX_RBBM_PERFCTR_TP_0_HI				0x0000048f
1516 
1517 #define REG_A6XX_RBBM_PERFCTR_TP_1_LO				0x00000490
1518 
1519 #define REG_A6XX_RBBM_PERFCTR_TP_1_HI				0x00000491
1520 
1521 #define REG_A6XX_RBBM_PERFCTR_TP_2_LO				0x00000492
1522 
1523 #define REG_A6XX_RBBM_PERFCTR_TP_2_HI				0x00000493
1524 
1525 #define REG_A6XX_RBBM_PERFCTR_TP_3_LO				0x00000494
1526 
1527 #define REG_A6XX_RBBM_PERFCTR_TP_3_HI				0x00000495
1528 
1529 #define REG_A6XX_RBBM_PERFCTR_TP_4_LO				0x00000496
1530 
1531 #define REG_A6XX_RBBM_PERFCTR_TP_4_HI				0x00000497
1532 
1533 #define REG_A6XX_RBBM_PERFCTR_TP_5_LO				0x00000498
1534 
1535 #define REG_A6XX_RBBM_PERFCTR_TP_5_HI				0x00000499
1536 
1537 #define REG_A6XX_RBBM_PERFCTR_TP_6_LO				0x0000049a
1538 
1539 #define REG_A6XX_RBBM_PERFCTR_TP_6_HI				0x0000049b
1540 
1541 #define REG_A6XX_RBBM_PERFCTR_TP_7_LO				0x0000049c
1542 
1543 #define REG_A6XX_RBBM_PERFCTR_TP_7_HI				0x0000049d
1544 
1545 #define REG_A6XX_RBBM_PERFCTR_TP_8_LO				0x0000049e
1546 
1547 #define REG_A6XX_RBBM_PERFCTR_TP_8_HI				0x0000049f
1548 
1549 #define REG_A6XX_RBBM_PERFCTR_TP_9_LO				0x000004a0
1550 
1551 #define REG_A6XX_RBBM_PERFCTR_TP_9_HI				0x000004a1
1552 
1553 #define REG_A6XX_RBBM_PERFCTR_TP_10_LO				0x000004a2
1554 
1555 #define REG_A6XX_RBBM_PERFCTR_TP_10_HI				0x000004a3
1556 
1557 #define REG_A6XX_RBBM_PERFCTR_TP_11_LO				0x000004a4
1558 
1559 #define REG_A6XX_RBBM_PERFCTR_TP_11_HI				0x000004a5
1560 
1561 #define REG_A6XX_RBBM_PERFCTR_SP_0_LO				0x000004a6
1562 
1563 #define REG_A6XX_RBBM_PERFCTR_SP_0_HI				0x000004a7
1564 
1565 #define REG_A6XX_RBBM_PERFCTR_SP_1_LO				0x000004a8
1566 
1567 #define REG_A6XX_RBBM_PERFCTR_SP_1_HI				0x000004a9
1568 
1569 #define REG_A6XX_RBBM_PERFCTR_SP_2_LO				0x000004aa
1570 
1571 #define REG_A6XX_RBBM_PERFCTR_SP_2_HI				0x000004ab
1572 
1573 #define REG_A6XX_RBBM_PERFCTR_SP_3_LO				0x000004ac
1574 
1575 #define REG_A6XX_RBBM_PERFCTR_SP_3_HI				0x000004ad
1576 
1577 #define REG_A6XX_RBBM_PERFCTR_SP_4_LO				0x000004ae
1578 
1579 #define REG_A6XX_RBBM_PERFCTR_SP_4_HI				0x000004af
1580 
1581 #define REG_A6XX_RBBM_PERFCTR_SP_5_LO				0x000004b0
1582 
1583 #define REG_A6XX_RBBM_PERFCTR_SP_5_HI				0x000004b1
1584 
1585 #define REG_A6XX_RBBM_PERFCTR_SP_6_LO				0x000004b2
1586 
1587 #define REG_A6XX_RBBM_PERFCTR_SP_6_HI				0x000004b3
1588 
1589 #define REG_A6XX_RBBM_PERFCTR_SP_7_LO				0x000004b4
1590 
1591 #define REG_A6XX_RBBM_PERFCTR_SP_7_HI				0x000004b5
1592 
1593 #define REG_A6XX_RBBM_PERFCTR_SP_8_LO				0x000004b6
1594 
1595 #define REG_A6XX_RBBM_PERFCTR_SP_8_HI				0x000004b7
1596 
1597 #define REG_A6XX_RBBM_PERFCTR_SP_9_LO				0x000004b8
1598 
1599 #define REG_A6XX_RBBM_PERFCTR_SP_9_HI				0x000004b9
1600 
1601 #define REG_A6XX_RBBM_PERFCTR_SP_10_LO				0x000004ba
1602 
1603 #define REG_A6XX_RBBM_PERFCTR_SP_10_HI				0x000004bb
1604 
1605 #define REG_A6XX_RBBM_PERFCTR_SP_11_LO				0x000004bc
1606 
1607 #define REG_A6XX_RBBM_PERFCTR_SP_11_HI				0x000004bd
1608 
1609 #define REG_A6XX_RBBM_PERFCTR_SP_12_LO				0x000004be
1610 
1611 #define REG_A6XX_RBBM_PERFCTR_SP_12_HI				0x000004bf
1612 
1613 #define REG_A6XX_RBBM_PERFCTR_SP_13_LO				0x000004c0
1614 
1615 #define REG_A6XX_RBBM_PERFCTR_SP_13_HI				0x000004c1
1616 
1617 #define REG_A6XX_RBBM_PERFCTR_SP_14_LO				0x000004c2
1618 
1619 #define REG_A6XX_RBBM_PERFCTR_SP_14_HI				0x000004c3
1620 
1621 #define REG_A6XX_RBBM_PERFCTR_SP_15_LO				0x000004c4
1622 
1623 #define REG_A6XX_RBBM_PERFCTR_SP_15_HI				0x000004c5
1624 
1625 #define REG_A6XX_RBBM_PERFCTR_SP_16_LO				0x000004c6
1626 
1627 #define REG_A6XX_RBBM_PERFCTR_SP_16_HI				0x000004c7
1628 
1629 #define REG_A6XX_RBBM_PERFCTR_SP_17_LO				0x000004c8
1630 
1631 #define REG_A6XX_RBBM_PERFCTR_SP_17_HI				0x000004c9
1632 
1633 #define REG_A6XX_RBBM_PERFCTR_SP_18_LO				0x000004ca
1634 
1635 #define REG_A6XX_RBBM_PERFCTR_SP_18_HI				0x000004cb
1636 
1637 #define REG_A6XX_RBBM_PERFCTR_SP_19_LO				0x000004cc
1638 
1639 #define REG_A6XX_RBBM_PERFCTR_SP_19_HI				0x000004cd
1640 
1641 #define REG_A6XX_RBBM_PERFCTR_SP_20_LO				0x000004ce
1642 
1643 #define REG_A6XX_RBBM_PERFCTR_SP_20_HI				0x000004cf
1644 
1645 #define REG_A6XX_RBBM_PERFCTR_SP_21_LO				0x000004d0
1646 
1647 #define REG_A6XX_RBBM_PERFCTR_SP_21_HI				0x000004d1
1648 
1649 #define REG_A6XX_RBBM_PERFCTR_SP_22_LO				0x000004d2
1650 
1651 #define REG_A6XX_RBBM_PERFCTR_SP_22_HI				0x000004d3
1652 
1653 #define REG_A6XX_RBBM_PERFCTR_SP_23_LO				0x000004d4
1654 
1655 #define REG_A6XX_RBBM_PERFCTR_SP_23_HI				0x000004d5
1656 
1657 #define REG_A6XX_RBBM_PERFCTR_RB_0_LO				0x000004d6
1658 
1659 #define REG_A6XX_RBBM_PERFCTR_RB_0_HI				0x000004d7
1660 
1661 #define REG_A6XX_RBBM_PERFCTR_RB_1_LO				0x000004d8
1662 
1663 #define REG_A6XX_RBBM_PERFCTR_RB_1_HI				0x000004d9
1664 
1665 #define REG_A6XX_RBBM_PERFCTR_RB_2_LO				0x000004da
1666 
1667 #define REG_A6XX_RBBM_PERFCTR_RB_2_HI				0x000004db
1668 
1669 #define REG_A6XX_RBBM_PERFCTR_RB_3_LO				0x000004dc
1670 
1671 #define REG_A6XX_RBBM_PERFCTR_RB_3_HI				0x000004dd
1672 
1673 #define REG_A6XX_RBBM_PERFCTR_RB_4_LO				0x000004de
1674 
1675 #define REG_A6XX_RBBM_PERFCTR_RB_4_HI				0x000004df
1676 
1677 #define REG_A6XX_RBBM_PERFCTR_RB_5_LO				0x000004e0
1678 
1679 #define REG_A6XX_RBBM_PERFCTR_RB_5_HI				0x000004e1
1680 
1681 #define REG_A6XX_RBBM_PERFCTR_RB_6_LO				0x000004e2
1682 
1683 #define REG_A6XX_RBBM_PERFCTR_RB_6_HI				0x000004e3
1684 
1685 #define REG_A6XX_RBBM_PERFCTR_RB_7_LO				0x000004e4
1686 
1687 #define REG_A6XX_RBBM_PERFCTR_RB_7_HI				0x000004e5
1688 
1689 #define REG_A6XX_RBBM_PERFCTR_VSC_0_LO				0x000004e6
1690 
1691 #define REG_A6XX_RBBM_PERFCTR_VSC_0_HI				0x000004e7
1692 
1693 #define REG_A6XX_RBBM_PERFCTR_VSC_1_LO				0x000004e8
1694 
1695 #define REG_A6XX_RBBM_PERFCTR_VSC_1_HI				0x000004e9
1696 
1697 #define REG_A6XX_RBBM_PERFCTR_LRZ_0_LO				0x000004ea
1698 
1699 #define REG_A6XX_RBBM_PERFCTR_LRZ_0_HI				0x000004eb
1700 
1701 #define REG_A6XX_RBBM_PERFCTR_LRZ_1_LO				0x000004ec
1702 
1703 #define REG_A6XX_RBBM_PERFCTR_LRZ_1_HI				0x000004ed
1704 
1705 #define REG_A6XX_RBBM_PERFCTR_LRZ_2_LO				0x000004ee
1706 
1707 #define REG_A6XX_RBBM_PERFCTR_LRZ_2_HI				0x000004ef
1708 
1709 #define REG_A6XX_RBBM_PERFCTR_LRZ_3_LO				0x000004f0
1710 
1711 #define REG_A6XX_RBBM_PERFCTR_LRZ_3_HI				0x000004f1
1712 
1713 #define REG_A6XX_RBBM_PERFCTR_CMP_0_LO				0x000004f2
1714 
1715 #define REG_A6XX_RBBM_PERFCTR_CMP_0_HI				0x000004f3
1716 
1717 #define REG_A6XX_RBBM_PERFCTR_CMP_1_LO				0x000004f4
1718 
1719 #define REG_A6XX_RBBM_PERFCTR_CMP_1_HI				0x000004f5
1720 
1721 #define REG_A6XX_RBBM_PERFCTR_CMP_2_LO				0x000004f6
1722 
1723 #define REG_A6XX_RBBM_PERFCTR_CMP_2_HI				0x000004f7
1724 
1725 #define REG_A6XX_RBBM_PERFCTR_CMP_3_LO				0x000004f8
1726 
1727 #define REG_A6XX_RBBM_PERFCTR_CMP_3_HI				0x000004f9
1728 
1729 #define REG_A6XX_RBBM_PERFCTR_CNTL				0x00000500
1730 
1731 #define REG_A6XX_RBBM_PERFCTR_LOAD_CMD0				0x00000501
1732 
1733 #define REG_A6XX_RBBM_PERFCTR_LOAD_CMD1				0x00000502
1734 
1735 #define REG_A6XX_RBBM_PERFCTR_LOAD_CMD2				0x00000503
1736 
1737 #define REG_A6XX_RBBM_PERFCTR_LOAD_CMD3				0x00000504
1738 
1739 #define REG_A6XX_RBBM_PERFCTR_LOAD_VALUE_LO			0x00000505
1740 
1741 #define REG_A6XX_RBBM_PERFCTR_LOAD_VALUE_HI			0x00000506
1742 
1743 #define REG_A6XX_RBBM_PERFCTR_RBBM_SEL_0			0x00000507
1744 
1745 #define REG_A6XX_RBBM_PERFCTR_RBBM_SEL_1			0x00000508
1746 
1747 #define REG_A6XX_RBBM_PERFCTR_RBBM_SEL_2			0x00000509
1748 
1749 #define REG_A6XX_RBBM_PERFCTR_RBBM_SEL_3			0x0000050a
1750 
1751 #define REG_A6XX_RBBM_PERFCTR_GPU_BUSY_MASKED			0x0000050b
1752 
1753 #define REG_A6XX_RBBM_ISDB_CNT					0x00000533
1754 
1755 #define REG_A6XX_RBBM_SECVID_TRUST_CNTL				0x0000f400
1756 
1757 #define REG_A6XX_RBBM_SECVID_TSB_TRUSTED_BASE_LO		0x0000f800
1758 
1759 #define REG_A6XX_RBBM_SECVID_TSB_TRUSTED_BASE_HI		0x0000f801
1760 
1761 #define REG_A6XX_RBBM_SECVID_TSB_TRUSTED_SIZE			0x0000f802
1762 
1763 #define REG_A6XX_RBBM_SECVID_TSB_CNTL				0x0000f803
1764 
1765 #define REG_A6XX_RBBM_SECVID_TSB_ADDR_MODE_CNTL			0x0000f810
1766 
1767 #define REG_A6XX_RBBM_VBIF_CLIENT_QOS_CNTL			0x00000010
1768 
1769 #define REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL			0x00000011
1770 
1771 #define REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL			0x0000001f
1772 
1773 #define REG_A6XX_RBBM_INT_CLEAR_CMD				0x00000037
1774 
1775 #define REG_A6XX_RBBM_INT_0_MASK				0x00000038
1776 
1777 #define REG_A6XX_RBBM_SP_HYST_CNT				0x00000042
1778 
1779 #define REG_A6XX_RBBM_SW_RESET_CMD				0x00000043
1780 
1781 #define REG_A6XX_RBBM_RAC_THRESHOLD_CNT				0x00000044
1782 
1783 #define REG_A6XX_RBBM_BLOCK_SW_RESET_CMD			0x00000045
1784 
1785 #define REG_A6XX_RBBM_BLOCK_SW_RESET_CMD2			0x00000046
1786 
1787 #define REG_A6XX_RBBM_CLOCK_CNTL				0x000000ae
1788 
1789 #define REG_A6XX_RBBM_CLOCK_CNTL_SP0				0x000000b0
1790 
1791 #define REG_A6XX_RBBM_CLOCK_CNTL_SP1				0x000000b1
1792 
1793 #define REG_A6XX_RBBM_CLOCK_CNTL_SP2				0x000000b2
1794 
1795 #define REG_A6XX_RBBM_CLOCK_CNTL_SP3				0x000000b3
1796 
1797 #define REG_A6XX_RBBM_CLOCK_CNTL2_SP0				0x000000b4
1798 
1799 #define REG_A6XX_RBBM_CLOCK_CNTL2_SP1				0x000000b5
1800 
1801 #define REG_A6XX_RBBM_CLOCK_CNTL2_SP2				0x000000b6
1802 
1803 #define REG_A6XX_RBBM_CLOCK_CNTL2_SP3				0x000000b7
1804 
1805 #define REG_A6XX_RBBM_CLOCK_DELAY_SP0				0x000000b8
1806 
1807 #define REG_A6XX_RBBM_CLOCK_DELAY_SP1				0x000000b9
1808 
1809 #define REG_A6XX_RBBM_CLOCK_DELAY_SP2				0x000000ba
1810 
1811 #define REG_A6XX_RBBM_CLOCK_DELAY_SP3				0x000000bb
1812 
1813 #define REG_A6XX_RBBM_CLOCK_HYST_SP0				0x000000bc
1814 
1815 #define REG_A6XX_RBBM_CLOCK_HYST_SP1				0x000000bd
1816 
1817 #define REG_A6XX_RBBM_CLOCK_HYST_SP2				0x000000be
1818 
1819 #define REG_A6XX_RBBM_CLOCK_HYST_SP3				0x000000bf
1820 
1821 #define REG_A6XX_RBBM_CLOCK_CNTL_TP0				0x000000c0
1822 
1823 #define REG_A6XX_RBBM_CLOCK_CNTL_TP1				0x000000c1
1824 
1825 #define REG_A6XX_RBBM_CLOCK_CNTL_TP2				0x000000c2
1826 
1827 #define REG_A6XX_RBBM_CLOCK_CNTL_TP3				0x000000c3
1828 
1829 #define REG_A6XX_RBBM_CLOCK_CNTL2_TP0				0x000000c4
1830 
1831 #define REG_A6XX_RBBM_CLOCK_CNTL2_TP1				0x000000c5
1832 
1833 #define REG_A6XX_RBBM_CLOCK_CNTL2_TP2				0x000000c6
1834 
1835 #define REG_A6XX_RBBM_CLOCK_CNTL2_TP3				0x000000c7
1836 
1837 #define REG_A6XX_RBBM_CLOCK_CNTL3_TP0				0x000000c8
1838 
1839 #define REG_A6XX_RBBM_CLOCK_CNTL3_TP1				0x000000c9
1840 
1841 #define REG_A6XX_RBBM_CLOCK_CNTL3_TP2				0x000000ca
1842 
1843 #define REG_A6XX_RBBM_CLOCK_CNTL3_TP3				0x000000cb
1844 
1845 #define REG_A6XX_RBBM_CLOCK_CNTL4_TP0				0x000000cc
1846 
1847 #define REG_A6XX_RBBM_CLOCK_CNTL4_TP1				0x000000cd
1848 
1849 #define REG_A6XX_RBBM_CLOCK_CNTL4_TP2				0x000000ce
1850 
1851 #define REG_A6XX_RBBM_CLOCK_CNTL4_TP3				0x000000cf
1852 
1853 #define REG_A6XX_RBBM_CLOCK_DELAY_TP0				0x000000d0
1854 
1855 #define REG_A6XX_RBBM_CLOCK_DELAY_TP1				0x000000d1
1856 
1857 #define REG_A6XX_RBBM_CLOCK_DELAY_TP2				0x000000d2
1858 
1859 #define REG_A6XX_RBBM_CLOCK_DELAY_TP3				0x000000d3
1860 
1861 #define REG_A6XX_RBBM_CLOCK_DELAY2_TP0				0x000000d4
1862 
1863 #define REG_A6XX_RBBM_CLOCK_DELAY2_TP1				0x000000d5
1864 
1865 #define REG_A6XX_RBBM_CLOCK_DELAY2_TP2				0x000000d6
1866 
1867 #define REG_A6XX_RBBM_CLOCK_DELAY2_TP3				0x000000d7
1868 
1869 #define REG_A6XX_RBBM_CLOCK_DELAY3_TP0				0x000000d8
1870 
1871 #define REG_A6XX_RBBM_CLOCK_DELAY3_TP1				0x000000d9
1872 
1873 #define REG_A6XX_RBBM_CLOCK_DELAY3_TP2				0x000000da
1874 
1875 #define REG_A6XX_RBBM_CLOCK_DELAY3_TP3				0x000000db
1876 
1877 #define REG_A6XX_RBBM_CLOCK_DELAY4_TP0				0x000000dc
1878 
1879 #define REG_A6XX_RBBM_CLOCK_DELAY4_TP1				0x000000dd
1880 
1881 #define REG_A6XX_RBBM_CLOCK_DELAY4_TP2				0x000000de
1882 
1883 #define REG_A6XX_RBBM_CLOCK_DELAY4_TP3				0x000000df
1884 
1885 #define REG_A6XX_RBBM_CLOCK_HYST_TP0				0x000000e0
1886 
1887 #define REG_A6XX_RBBM_CLOCK_HYST_TP1				0x000000e1
1888 
1889 #define REG_A6XX_RBBM_CLOCK_HYST_TP2				0x000000e2
1890 
1891 #define REG_A6XX_RBBM_CLOCK_HYST_TP3				0x000000e3
1892 
1893 #define REG_A6XX_RBBM_CLOCK_HYST2_TP0				0x000000e4
1894 
1895 #define REG_A6XX_RBBM_CLOCK_HYST2_TP1				0x000000e5
1896 
1897 #define REG_A6XX_RBBM_CLOCK_HYST2_TP2				0x000000e6
1898 
1899 #define REG_A6XX_RBBM_CLOCK_HYST2_TP3				0x000000e7
1900 
1901 #define REG_A6XX_RBBM_CLOCK_HYST3_TP0				0x000000e8
1902 
1903 #define REG_A6XX_RBBM_CLOCK_HYST3_TP1				0x000000e9
1904 
1905 #define REG_A6XX_RBBM_CLOCK_HYST3_TP2				0x000000ea
1906 
1907 #define REG_A6XX_RBBM_CLOCK_HYST3_TP3				0x000000eb
1908 
1909 #define REG_A6XX_RBBM_CLOCK_HYST4_TP0				0x000000ec
1910 
1911 #define REG_A6XX_RBBM_CLOCK_HYST4_TP1				0x000000ed
1912 
1913 #define REG_A6XX_RBBM_CLOCK_HYST4_TP2				0x000000ee
1914 
1915 #define REG_A6XX_RBBM_CLOCK_HYST4_TP3				0x000000ef
1916 
1917 #define REG_A6XX_RBBM_CLOCK_CNTL_RB0				0x000000f0
1918 
1919 #define REG_A6XX_RBBM_CLOCK_CNTL_RB1				0x000000f1
1920 
1921 #define REG_A6XX_RBBM_CLOCK_CNTL_RB2				0x000000f2
1922 
1923 #define REG_A6XX_RBBM_CLOCK_CNTL_RB3				0x000000f3
1924 
1925 #define REG_A6XX_RBBM_CLOCK_CNTL2_RB0				0x000000f4
1926 
1927 #define REG_A6XX_RBBM_CLOCK_CNTL2_RB1				0x000000f5
1928 
1929 #define REG_A6XX_RBBM_CLOCK_CNTL2_RB2				0x000000f6
1930 
1931 #define REG_A6XX_RBBM_CLOCK_CNTL2_RB3				0x000000f7
1932 
1933 #define REG_A6XX_RBBM_CLOCK_CNTL_CCU0				0x000000f8
1934 
1935 #define REG_A6XX_RBBM_CLOCK_CNTL_CCU1				0x000000f9
1936 
1937 #define REG_A6XX_RBBM_CLOCK_CNTL_CCU2				0x000000fa
1938 
1939 #define REG_A6XX_RBBM_CLOCK_CNTL_CCU3				0x000000fb
1940 
1941 #define REG_A6XX_RBBM_CLOCK_HYST_RB_CCU0			0x00000100
1942 
1943 #define REG_A6XX_RBBM_CLOCK_HYST_RB_CCU1			0x00000101
1944 
1945 #define REG_A6XX_RBBM_CLOCK_HYST_RB_CCU2			0x00000102
1946 
1947 #define REG_A6XX_RBBM_CLOCK_HYST_RB_CCU3			0x00000103
1948 
1949 #define REG_A6XX_RBBM_CLOCK_CNTL_RAC				0x00000104
1950 
1951 #define REG_A6XX_RBBM_CLOCK_CNTL2_RAC				0x00000105
1952 
1953 #define REG_A6XX_RBBM_CLOCK_DELAY_RAC				0x00000106
1954 
1955 #define REG_A6XX_RBBM_CLOCK_HYST_RAC				0x00000107
1956 
1957 #define REG_A6XX_RBBM_CLOCK_CNTL_TSE_RAS_RBBM			0x00000108
1958 
1959 #define REG_A6XX_RBBM_CLOCK_DELAY_TSE_RAS_RBBM			0x00000109
1960 
1961 #define REG_A6XX_RBBM_CLOCK_HYST_TSE_RAS_RBBM			0x0000010a
1962 
1963 #define REG_A6XX_RBBM_CLOCK_CNTL_UCHE				0x0000010b
1964 
1965 #define REG_A6XX_RBBM_CLOCK_CNTL2_UCHE				0x0000010c
1966 
1967 #define REG_A6XX_RBBM_CLOCK_CNTL3_UCHE				0x0000010d
1968 
1969 #define REG_A6XX_RBBM_CLOCK_CNTL4_UCHE				0x0000010e
1970 
1971 #define REG_A6XX_RBBM_CLOCK_DELAY_UCHE				0x0000010f
1972 
1973 #define REG_A6XX_RBBM_CLOCK_HYST_UCHE				0x00000110
1974 
1975 #define REG_A6XX_RBBM_CLOCK_MODE_VFD				0x00000111
1976 
1977 #define REG_A6XX_RBBM_CLOCK_DELAY_VFD				0x00000112
1978 
1979 #define REG_A6XX_RBBM_CLOCK_HYST_VFD				0x00000113
1980 
1981 #define REG_A6XX_RBBM_CLOCK_MODE_GPC				0x00000114
1982 
1983 #define REG_A6XX_RBBM_CLOCK_DELAY_GPC				0x00000115
1984 
1985 #define REG_A6XX_RBBM_CLOCK_HYST_GPC				0x00000116
1986 
1987 #define REG_A6XX_RBBM_CLOCK_DELAY_HLSQ_2			0x00000117
1988 
1989 #define REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX				0x00000118
1990 
1991 #define REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX			0x00000119
1992 
1993 #define REG_A6XX_RBBM_CLOCK_HYST_GMU_GX				0x0000011a
1994 
1995 #define REG_A6XX_RBBM_CLOCK_MODE_HLSQ				0x0000011b
1996 
1997 #define REG_A6XX_RBBM_CLOCK_DELAY_HLSQ				0x0000011c
1998 
1999 #define REG_A6XX_DBGC_CFG_DBGBUS_SEL_A				0x00000600
2000 
2001 #define REG_A6XX_DBGC_CFG_DBGBUS_SEL_B				0x00000601
2002 
2003 #define REG_A6XX_DBGC_CFG_DBGBUS_SEL_C				0x00000602
2004 
2005 #define REG_A6XX_DBGC_CFG_DBGBUS_SEL_D				0x00000603
2006 #define A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX__MASK		0x000000ff
2007 #define A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX__SHIFT		0
2008 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX(uint32_t val)
2009 {
2010 	return ((val) << A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX__SHIFT) & A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_INDEX__MASK;
2011 }
2012 #define A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL__MASK		0x0000ff00
2013 #define A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL__SHIFT		8
2014 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL(uint32_t val)
2015 {
2016 	return ((val) << A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL__SHIFT) & A6XX_DBGC_CFG_DBGBUS_SEL_D_PING_BLK_SEL__MASK;
2017 }
2018 
2019 #define REG_A6XX_DBGC_CFG_DBGBUS_CNTLT				0x00000604
2020 #define A6XX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__MASK		0x0000003f
2021 #define A6XX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__SHIFT		0
2022 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN(uint32_t val)
2023 {
2024 	return ((val) << A6XX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__SHIFT) & A6XX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__MASK;
2025 }
2026 #define A6XX_DBGC_CFG_DBGBUS_CNTLT_GRANU__MASK			0x00007000
2027 #define A6XX_DBGC_CFG_DBGBUS_CNTLT_GRANU__SHIFT			12
2028 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_CNTLT_GRANU(uint32_t val)
2029 {
2030 	return ((val) << A6XX_DBGC_CFG_DBGBUS_CNTLT_GRANU__SHIFT) & A6XX_DBGC_CFG_DBGBUS_CNTLT_GRANU__MASK;
2031 }
2032 #define A6XX_DBGC_CFG_DBGBUS_CNTLT_SEGT__MASK			0xf0000000
2033 #define A6XX_DBGC_CFG_DBGBUS_CNTLT_SEGT__SHIFT			28
2034 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_CNTLT_SEGT(uint32_t val)
2035 {
2036 	return ((val) << A6XX_DBGC_CFG_DBGBUS_CNTLT_SEGT__SHIFT) & A6XX_DBGC_CFG_DBGBUS_CNTLT_SEGT__MASK;
2037 }
2038 
2039 #define REG_A6XX_DBGC_CFG_DBGBUS_CNTLM				0x00000605
2040 #define A6XX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__MASK			0x0f000000
2041 #define A6XX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__SHIFT		24
2042 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_CNTLM_ENABLE(uint32_t val)
2043 {
2044 	return ((val) << A6XX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__SHIFT) & A6XX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__MASK;
2045 }
2046 
2047 #define REG_A6XX_DBGC_CFG_DBGBUS_IVTL_0				0x00000608
2048 
2049 #define REG_A6XX_DBGC_CFG_DBGBUS_IVTL_1				0x00000609
2050 
2051 #define REG_A6XX_DBGC_CFG_DBGBUS_IVTL_2				0x0000060a
2052 
2053 #define REG_A6XX_DBGC_CFG_DBGBUS_IVTL_3				0x0000060b
2054 
2055 #define REG_A6XX_DBGC_CFG_DBGBUS_MASKL_0			0x0000060c
2056 
2057 #define REG_A6XX_DBGC_CFG_DBGBUS_MASKL_1			0x0000060d
2058 
2059 #define REG_A6XX_DBGC_CFG_DBGBUS_MASKL_2			0x0000060e
2060 
2061 #define REG_A6XX_DBGC_CFG_DBGBUS_MASKL_3			0x0000060f
2062 
2063 #define REG_A6XX_DBGC_CFG_DBGBUS_BYTEL_0			0x00000610
2064 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__MASK		0x0000000f
2065 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__SHIFT		0
2066 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0(uint32_t val)
2067 {
2068 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__MASK;
2069 }
2070 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__MASK		0x000000f0
2071 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__SHIFT		4
2072 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1(uint32_t val)
2073 {
2074 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__MASK;
2075 }
2076 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__MASK		0x00000f00
2077 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__SHIFT		8
2078 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2(uint32_t val)
2079 {
2080 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__MASK;
2081 }
2082 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__MASK		0x0000f000
2083 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__SHIFT		12
2084 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3(uint32_t val)
2085 {
2086 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__MASK;
2087 }
2088 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__MASK		0x000f0000
2089 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__SHIFT		16
2090 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4(uint32_t val)
2091 {
2092 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__MASK;
2093 }
2094 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__MASK		0x00f00000
2095 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__SHIFT		20
2096 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5(uint32_t val)
2097 {
2098 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__MASK;
2099 }
2100 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__MASK		0x0f000000
2101 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__SHIFT		24
2102 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6(uint32_t val)
2103 {
2104 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__MASK;
2105 }
2106 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__MASK		0xf0000000
2107 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__SHIFT		28
2108 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7(uint32_t val)
2109 {
2110 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__MASK;
2111 }
2112 
2113 #define REG_A6XX_DBGC_CFG_DBGBUS_BYTEL_1			0x00000611
2114 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__MASK		0x0000000f
2115 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__SHIFT		0
2116 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8(uint32_t val)
2117 {
2118 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__MASK;
2119 }
2120 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__MASK		0x000000f0
2121 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__SHIFT		4
2122 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9(uint32_t val)
2123 {
2124 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__MASK;
2125 }
2126 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__MASK		0x00000f00
2127 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__SHIFT		8
2128 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10(uint32_t val)
2129 {
2130 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__MASK;
2131 }
2132 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__MASK		0x0000f000
2133 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__SHIFT		12
2134 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11(uint32_t val)
2135 {
2136 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__MASK;
2137 }
2138 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__MASK		0x000f0000
2139 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__SHIFT		16
2140 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12(uint32_t val)
2141 {
2142 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__MASK;
2143 }
2144 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__MASK		0x00f00000
2145 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__SHIFT		20
2146 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13(uint32_t val)
2147 {
2148 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__MASK;
2149 }
2150 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__MASK		0x0f000000
2151 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__SHIFT		24
2152 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14(uint32_t val)
2153 {
2154 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__MASK;
2155 }
2156 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__MASK		0xf0000000
2157 #define A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__SHIFT		28
2158 static inline uint32_t A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15(uint32_t val)
2159 {
2160 	return ((val) << A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__SHIFT) & A6XX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__MASK;
2161 }
2162 
2163 #define REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF1			0x0000062f
2164 
2165 #define REG_A6XX_DBGC_CFG_DBGBUS_TRACE_BUF2			0x00000630
2166 
2167 #define REG_A6XX_VSC_PERFCTR_VSC_SEL_0				0x00000cd8
2168 
2169 #define REG_A6XX_VSC_PERFCTR_VSC_SEL_1				0x00000cd9
2170 
2171 #define REG_A6XX_GRAS_ADDR_MODE_CNTL				0x00008601
2172 
2173 #define REG_A6XX_GRAS_PERFCTR_TSE_SEL_0				0x00008610
2174 
2175 #define REG_A6XX_GRAS_PERFCTR_TSE_SEL_1				0x00008611
2176 
2177 #define REG_A6XX_GRAS_PERFCTR_TSE_SEL_2				0x00008612
2178 
2179 #define REG_A6XX_GRAS_PERFCTR_TSE_SEL_3				0x00008613
2180 
2181 #define REG_A6XX_GRAS_PERFCTR_RAS_SEL_0				0x00008614
2182 
2183 #define REG_A6XX_GRAS_PERFCTR_RAS_SEL_1				0x00008615
2184 
2185 #define REG_A6XX_GRAS_PERFCTR_RAS_SEL_2				0x00008616
2186 
2187 #define REG_A6XX_GRAS_PERFCTR_RAS_SEL_3				0x00008617
2188 
2189 #define REG_A6XX_GRAS_PERFCTR_LRZ_SEL_0				0x00008618
2190 
2191 #define REG_A6XX_GRAS_PERFCTR_LRZ_SEL_1				0x00008619
2192 
2193 #define REG_A6XX_GRAS_PERFCTR_LRZ_SEL_2				0x0000861a
2194 
2195 #define REG_A6XX_GRAS_PERFCTR_LRZ_SEL_3				0x0000861b
2196 
2197 #define REG_A6XX_RB_ADDR_MODE_CNTL				0x00008e05
2198 
2199 #define REG_A6XX_RB_NC_MODE_CNTL				0x00008e08
2200 
2201 #define REG_A6XX_RB_PERFCTR_RB_SEL_0				0x00008e10
2202 
2203 #define REG_A6XX_RB_PERFCTR_RB_SEL_1				0x00008e11
2204 
2205 #define REG_A6XX_RB_PERFCTR_RB_SEL_2				0x00008e12
2206 
2207 #define REG_A6XX_RB_PERFCTR_RB_SEL_3				0x00008e13
2208 
2209 #define REG_A6XX_RB_PERFCTR_RB_SEL_4				0x00008e14
2210 
2211 #define REG_A6XX_RB_PERFCTR_RB_SEL_5				0x00008e15
2212 
2213 #define REG_A6XX_RB_PERFCTR_RB_SEL_6				0x00008e16
2214 
2215 #define REG_A6XX_RB_PERFCTR_RB_SEL_7				0x00008e17
2216 
2217 #define REG_A6XX_RB_PERFCTR_CCU_SEL_0				0x00008e18
2218 
2219 #define REG_A6XX_RB_PERFCTR_CCU_SEL_1				0x00008e19
2220 
2221 #define REG_A6XX_RB_PERFCTR_CCU_SEL_2				0x00008e1a
2222 
2223 #define REG_A6XX_RB_PERFCTR_CCU_SEL_3				0x00008e1b
2224 
2225 #define REG_A6XX_RB_PERFCTR_CCU_SEL_4				0x00008e1c
2226 
2227 #define REG_A6XX_RB_PERFCTR_CMP_SEL_0				0x00008e2c
2228 
2229 #define REG_A6XX_RB_PERFCTR_CMP_SEL_1				0x00008e2d
2230 
2231 #define REG_A6XX_RB_PERFCTR_CMP_SEL_2				0x00008e2e
2232 
2233 #define REG_A6XX_RB_PERFCTR_CMP_SEL_3				0x00008e2f
2234 
2235 #define REG_A6XX_RB_RB_SUB_BLOCK_SEL_CNTL_CD			0x00008e3d
2236 
2237 #define REG_A6XX_RB_CONTEXT_SWITCH_GMEM_SAVE_RESTORE		0x00008e50
2238 
2239 #define REG_A6XX_PC_DBG_ECO_CNTL				0x00009e00
2240 
2241 #define REG_A6XX_PC_ADDR_MODE_CNTL				0x00009e01
2242 
2243 #define REG_A6XX_PC_PERFCTR_PC_SEL_0				0x00009e34
2244 
2245 #define REG_A6XX_PC_PERFCTR_PC_SEL_1				0x00009e35
2246 
2247 #define REG_A6XX_PC_PERFCTR_PC_SEL_2				0x00009e36
2248 
2249 #define REG_A6XX_PC_PERFCTR_PC_SEL_3				0x00009e37
2250 
2251 #define REG_A6XX_PC_PERFCTR_PC_SEL_4				0x00009e38
2252 
2253 #define REG_A6XX_PC_PERFCTR_PC_SEL_5				0x00009e39
2254 
2255 #define REG_A6XX_PC_PERFCTR_PC_SEL_6				0x00009e3a
2256 
2257 #define REG_A6XX_PC_PERFCTR_PC_SEL_7				0x00009e3b
2258 
2259 #define REG_A6XX_HLSQ_ADDR_MODE_CNTL				0x0000be05
2260 
2261 #define REG_A6XX_HLSQ_PERFCTR_HLSQ_SEL_0			0x0000be10
2262 
2263 #define REG_A6XX_HLSQ_PERFCTR_HLSQ_SEL_1			0x0000be11
2264 
2265 #define REG_A6XX_HLSQ_PERFCTR_HLSQ_SEL_2			0x0000be12
2266 
2267 #define REG_A6XX_HLSQ_PERFCTR_HLSQ_SEL_3			0x0000be13
2268 
2269 #define REG_A6XX_HLSQ_PERFCTR_HLSQ_SEL_4			0x0000be14
2270 
2271 #define REG_A6XX_HLSQ_PERFCTR_HLSQ_SEL_5			0x0000be15
2272 
2273 #define REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE			0x0000c800
2274 
2275 #define REG_A6XX_HLSQ_DBG_READ_SEL				0x0000d000
2276 
2277 #define REG_A6XX_VFD_ADDR_MODE_CNTL				0x0000a601
2278 
2279 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_0				0x0000a610
2280 
2281 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_1				0x0000a611
2282 
2283 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_2				0x0000a612
2284 
2285 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_3				0x0000a613
2286 
2287 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_4				0x0000a614
2288 
2289 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_5				0x0000a615
2290 
2291 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_6				0x0000a616
2292 
2293 #define REG_A6XX_VFD_PERFCTR_VFD_SEL_7				0x0000a617
2294 
2295 #define REG_A6XX_VPC_ADDR_MODE_CNTL				0x00009601
2296 
2297 #define REG_A6XX_VPC_PERFCTR_VPC_SEL_0				0x00009604
2298 
2299 #define REG_A6XX_VPC_PERFCTR_VPC_SEL_1				0x00009605
2300 
2301 #define REG_A6XX_VPC_PERFCTR_VPC_SEL_2				0x00009606
2302 
2303 #define REG_A6XX_VPC_PERFCTR_VPC_SEL_3				0x00009607
2304 
2305 #define REG_A6XX_VPC_PERFCTR_VPC_SEL_4				0x00009608
2306 
2307 #define REG_A6XX_VPC_PERFCTR_VPC_SEL_5				0x00009609
2308 
2309 #define REG_A6XX_UCHE_ADDR_MODE_CNTL				0x00000e00
2310 
2311 #define REG_A6XX_UCHE_MODE_CNTL					0x00000e01
2312 
2313 #define REG_A6XX_UCHE_WRITE_RANGE_MAX_LO			0x00000e05
2314 
2315 #define REG_A6XX_UCHE_WRITE_RANGE_MAX_HI			0x00000e06
2316 
2317 #define REG_A6XX_UCHE_WRITE_THRU_BASE_LO			0x00000e07
2318 
2319 #define REG_A6XX_UCHE_WRITE_THRU_BASE_HI			0x00000e08
2320 
2321 #define REG_A6XX_UCHE_TRAP_BASE_LO				0x00000e09
2322 
2323 #define REG_A6XX_UCHE_TRAP_BASE_HI				0x00000e0a
2324 
2325 #define REG_A6XX_UCHE_GMEM_RANGE_MIN_LO				0x00000e0b
2326 
2327 #define REG_A6XX_UCHE_GMEM_RANGE_MIN_HI				0x00000e0c
2328 
2329 #define REG_A6XX_UCHE_GMEM_RANGE_MAX_LO				0x00000e0d
2330 
2331 #define REG_A6XX_UCHE_GMEM_RANGE_MAX_HI				0x00000e0e
2332 
2333 #define REG_A6XX_UCHE_CACHE_WAYS				0x00000e17
2334 
2335 #define REG_A6XX_UCHE_FILTER_CNTL				0x00000e18
2336 
2337 #define REG_A6XX_UCHE_CLIENT_PF					0x00000e19
2338 #define A6XX_UCHE_CLIENT_PF_PERFSEL__MASK			0x000000ff
2339 #define A6XX_UCHE_CLIENT_PF_PERFSEL__SHIFT			0
2340 static inline uint32_t A6XX_UCHE_CLIENT_PF_PERFSEL(uint32_t val)
2341 {
2342 	return ((val) << A6XX_UCHE_CLIENT_PF_PERFSEL__SHIFT) & A6XX_UCHE_CLIENT_PF_PERFSEL__MASK;
2343 }
2344 
2345 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_0			0x00000e1c
2346 
2347 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_1			0x00000e1d
2348 
2349 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_2			0x00000e1e
2350 
2351 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_3			0x00000e1f
2352 
2353 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_4			0x00000e20
2354 
2355 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_5			0x00000e21
2356 
2357 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_6			0x00000e22
2358 
2359 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_7			0x00000e23
2360 
2361 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_8			0x00000e24
2362 
2363 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_9			0x00000e25
2364 
2365 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_10			0x00000e26
2366 
2367 #define REG_A6XX_UCHE_PERFCTR_UCHE_SEL_11			0x00000e27
2368 
2369 #define REG_A6XX_SP_ADDR_MODE_CNTL				0x0000ae01
2370 
2371 #define REG_A6XX_SP_NC_MODE_CNTL				0x0000ae02
2372 
2373 #define REG_A6XX_SP_PERFCTR_SP_SEL_0				0x0000ae10
2374 
2375 #define REG_A6XX_SP_PERFCTR_SP_SEL_1				0x0000ae11
2376 
2377 #define REG_A6XX_SP_PERFCTR_SP_SEL_2				0x0000ae12
2378 
2379 #define REG_A6XX_SP_PERFCTR_SP_SEL_3				0x0000ae13
2380 
2381 #define REG_A6XX_SP_PERFCTR_SP_SEL_4				0x0000ae14
2382 
2383 #define REG_A6XX_SP_PERFCTR_SP_SEL_5				0x0000ae15
2384 
2385 #define REG_A6XX_SP_PERFCTR_SP_SEL_6				0x0000ae16
2386 
2387 #define REG_A6XX_SP_PERFCTR_SP_SEL_7				0x0000ae17
2388 
2389 #define REG_A6XX_SP_PERFCTR_SP_SEL_8				0x0000ae18
2390 
2391 #define REG_A6XX_SP_PERFCTR_SP_SEL_9				0x0000ae19
2392 
2393 #define REG_A6XX_SP_PERFCTR_SP_SEL_10				0x0000ae1a
2394 
2395 #define REG_A6XX_SP_PERFCTR_SP_SEL_11				0x0000ae1b
2396 
2397 #define REG_A6XX_SP_PERFCTR_SP_SEL_12				0x0000ae1c
2398 
2399 #define REG_A6XX_SP_PERFCTR_SP_SEL_13				0x0000ae1d
2400 
2401 #define REG_A6XX_SP_PERFCTR_SP_SEL_14				0x0000ae1e
2402 
2403 #define REG_A6XX_SP_PERFCTR_SP_SEL_15				0x0000ae1f
2404 
2405 #define REG_A6XX_SP_PERFCTR_SP_SEL_16				0x0000ae20
2406 
2407 #define REG_A6XX_SP_PERFCTR_SP_SEL_17				0x0000ae21
2408 
2409 #define REG_A6XX_SP_PERFCTR_SP_SEL_18				0x0000ae22
2410 
2411 #define REG_A6XX_SP_PERFCTR_SP_SEL_19				0x0000ae23
2412 
2413 #define REG_A6XX_SP_PERFCTR_SP_SEL_20				0x0000ae24
2414 
2415 #define REG_A6XX_SP_PERFCTR_SP_SEL_21				0x0000ae25
2416 
2417 #define REG_A6XX_SP_PERFCTR_SP_SEL_22				0x0000ae26
2418 
2419 #define REG_A6XX_SP_PERFCTR_SP_SEL_23				0x0000ae27
2420 
2421 #define REG_A6XX_TPL1_ADDR_MODE_CNTL				0x0000b601
2422 
2423 #define REG_A6XX_TPL1_NC_MODE_CNTL				0x0000b604
2424 
2425 #define REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_0			0x0000b608
2426 
2427 #define REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_1			0x0000b609
2428 
2429 #define REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_2			0x0000b60a
2430 
2431 #define REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_3			0x0000b60b
2432 
2433 #define REG_A6XX_TPL1_BICUBIC_WEIGHTS_TABLE_4			0x0000b60c
2434 
2435 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_0				0x0000b610
2436 
2437 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_1				0x0000b611
2438 
2439 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_2				0x0000b612
2440 
2441 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_3				0x0000b613
2442 
2443 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_4				0x0000b614
2444 
2445 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_5				0x0000b615
2446 
2447 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_6				0x0000b616
2448 
2449 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_7				0x0000b617
2450 
2451 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_8				0x0000b618
2452 
2453 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_9				0x0000b619
2454 
2455 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_10				0x0000b61a
2456 
2457 #define REG_A6XX_TPL1_PERFCTR_TP_SEL_11				0x0000b61b
2458 
2459 #define REG_A6XX_VBIF_VERSION					0x00003000
2460 
2461 #define REG_A6XX_VBIF_CLKON					0x00003001
2462 #define A6XX_VBIF_CLKON_FORCE_ON_TESTBUS			0x00000002
2463 
2464 #define REG_A6XX_VBIF_GATE_OFF_WRREQ_EN				0x0000302a
2465 
2466 #define REG_A6XX_VBIF_XIN_HALT_CTRL0				0x00003080
2467 
2468 #define REG_A6XX_VBIF_XIN_HALT_CTRL1				0x00003081
2469 
2470 #define REG_A6XX_VBIF_TEST_BUS_OUT_CTRL				0x00003084
2471 
2472 #define REG_A6XX_VBIF_TEST_BUS1_CTRL0				0x00003085
2473 
2474 #define REG_A6XX_VBIF_TEST_BUS1_CTRL1				0x00003086
2475 #define A6XX_VBIF_TEST_BUS1_CTRL1_DATA_SEL__MASK		0x0000000f
2476 #define A6XX_VBIF_TEST_BUS1_CTRL1_DATA_SEL__SHIFT		0
2477 static inline uint32_t A6XX_VBIF_TEST_BUS1_CTRL1_DATA_SEL(uint32_t val)
2478 {
2479 	return ((val) << A6XX_VBIF_TEST_BUS1_CTRL1_DATA_SEL__SHIFT) & A6XX_VBIF_TEST_BUS1_CTRL1_DATA_SEL__MASK;
2480 }
2481 
2482 #define REG_A6XX_VBIF_TEST_BUS2_CTRL0				0x00003087
2483 
2484 #define REG_A6XX_VBIF_TEST_BUS2_CTRL1				0x00003088
2485 #define A6XX_VBIF_TEST_BUS2_CTRL1_DATA_SEL__MASK		0x000001ff
2486 #define A6XX_VBIF_TEST_BUS2_CTRL1_DATA_SEL__SHIFT		0
2487 static inline uint32_t A6XX_VBIF_TEST_BUS2_CTRL1_DATA_SEL(uint32_t val)
2488 {
2489 	return ((val) << A6XX_VBIF_TEST_BUS2_CTRL1_DATA_SEL__SHIFT) & A6XX_VBIF_TEST_BUS2_CTRL1_DATA_SEL__MASK;
2490 }
2491 
2492 #define REG_A6XX_VBIF_TEST_BUS_OUT				0x0000308c
2493 
2494 #define REG_A6XX_VBIF_PERF_CNT_SEL0				0x000030d0
2495 
2496 #define REG_A6XX_VBIF_PERF_CNT_SEL1				0x000030d1
2497 
2498 #define REG_A6XX_VBIF_PERF_CNT_SEL2				0x000030d2
2499 
2500 #define REG_A6XX_VBIF_PERF_CNT_SEL3				0x000030d3
2501 
2502 #define REG_A6XX_VBIF_PERF_CNT_LOW0				0x000030d8
2503 
2504 #define REG_A6XX_VBIF_PERF_CNT_LOW1				0x000030d9
2505 
2506 #define REG_A6XX_VBIF_PERF_CNT_LOW2				0x000030da
2507 
2508 #define REG_A6XX_VBIF_PERF_CNT_LOW3				0x000030db
2509 
2510 #define REG_A6XX_VBIF_PERF_CNT_HIGH0				0x000030e0
2511 
2512 #define REG_A6XX_VBIF_PERF_CNT_HIGH1				0x000030e1
2513 
2514 #define REG_A6XX_VBIF_PERF_CNT_HIGH2				0x000030e2
2515 
2516 #define REG_A6XX_VBIF_PERF_CNT_HIGH3				0x000030e3
2517 
2518 #define REG_A6XX_VBIF_PERF_PWR_CNT_EN0				0x00003100
2519 
2520 #define REG_A6XX_VBIF_PERF_PWR_CNT_EN1				0x00003101
2521 
2522 #define REG_A6XX_VBIF_PERF_PWR_CNT_EN2				0x00003102
2523 
2524 #define REG_A6XX_VBIF_PERF_PWR_CNT_LOW0				0x00003110
2525 
2526 #define REG_A6XX_VBIF_PERF_PWR_CNT_LOW1				0x00003111
2527 
2528 #define REG_A6XX_VBIF_PERF_PWR_CNT_LOW2				0x00003112
2529 
2530 #define REG_A6XX_VBIF_PERF_PWR_CNT_HIGH0			0x00003118
2531 
2532 #define REG_A6XX_VBIF_PERF_PWR_CNT_HIGH1			0x00003119
2533 
2534 #define REG_A6XX_VBIF_PERF_PWR_CNT_HIGH2			0x0000311a
2535 
2536 #define REG_A6XX_GBIF_SCACHE_CNTL1				0x00003c02
2537 
2538 #define REG_A6XX_GBIF_QSB_SIDE0					0x00003c03
2539 
2540 #define REG_A6XX_GBIF_QSB_SIDE1					0x00003c04
2541 
2542 #define REG_A6XX_GBIF_QSB_SIDE2					0x00003c05
2543 
2544 #define REG_A6XX_GBIF_QSB_SIDE3					0x00003c06
2545 
2546 #define REG_A6XX_GBIF_HALT					0x00003c45
2547 
2548 #define REG_A6XX_GBIF_HALT_ACK					0x00003c46
2549 
2550 #define REG_A6XX_GBIF_PERF_PWR_CNT_EN				0x00003cc0
2551 
2552 #define REG_A6XX_GBIF_PERF_CNT_SEL				0x00003cc2
2553 
2554 #define REG_A6XX_GBIF_PERF_PWR_CNT_SEL				0x00003cc3
2555 
2556 #define REG_A6XX_GBIF_PERF_CNT_LOW0				0x00003cc4
2557 
2558 #define REG_A6XX_GBIF_PERF_CNT_LOW1				0x00003cc5
2559 
2560 #define REG_A6XX_GBIF_PERF_CNT_LOW2				0x00003cc6
2561 
2562 #define REG_A6XX_GBIF_PERF_CNT_LOW3				0x00003cc7
2563 
2564 #define REG_A6XX_GBIF_PERF_CNT_HIGH0				0x00003cc8
2565 
2566 #define REG_A6XX_GBIF_PERF_CNT_HIGH1				0x00003cc9
2567 
2568 #define REG_A6XX_GBIF_PERF_CNT_HIGH2				0x00003cca
2569 
2570 #define REG_A6XX_GBIF_PERF_CNT_HIGH3				0x00003ccb
2571 
2572 #define REG_A6XX_GBIF_PWR_CNT_LOW0				0x00003ccc
2573 
2574 #define REG_A6XX_GBIF_PWR_CNT_LOW1				0x00003ccd
2575 
2576 #define REG_A6XX_GBIF_PWR_CNT_LOW2				0x00003cce
2577 
2578 #define REG_A6XX_GBIF_PWR_CNT_HIGH0				0x00003ccf
2579 
2580 #define REG_A6XX_GBIF_PWR_CNT_HIGH1				0x00003cd0
2581 
2582 #define REG_A6XX_GBIF_PWR_CNT_HIGH2				0x00003cd1
2583 
2584 #define REG_A6XX_RB_WINDOW_OFFSET2				0x000088d4
2585 #define A6XX_RB_WINDOW_OFFSET2_WINDOW_OFFSET_DISABLE		0x80000000
2586 #define A6XX_RB_WINDOW_OFFSET2_X__MASK				0x00007fff
2587 #define A6XX_RB_WINDOW_OFFSET2_X__SHIFT				0
2588 static inline uint32_t A6XX_RB_WINDOW_OFFSET2_X(uint32_t val)
2589 {
2590 	return ((val) << A6XX_RB_WINDOW_OFFSET2_X__SHIFT) & A6XX_RB_WINDOW_OFFSET2_X__MASK;
2591 }
2592 #define A6XX_RB_WINDOW_OFFSET2_Y__MASK				0x7fff0000
2593 #define A6XX_RB_WINDOW_OFFSET2_Y__SHIFT				16
2594 static inline uint32_t A6XX_RB_WINDOW_OFFSET2_Y(uint32_t val)
2595 {
2596 	return ((val) << A6XX_RB_WINDOW_OFFSET2_Y__SHIFT) & A6XX_RB_WINDOW_OFFSET2_Y__MASK;
2597 }
2598 
2599 #define REG_A6XX_SP_WINDOW_OFFSET				0x0000b4d1
2600 #define A6XX_SP_WINDOW_OFFSET_WINDOW_OFFSET_DISABLE		0x80000000
2601 #define A6XX_SP_WINDOW_OFFSET_X__MASK				0x00007fff
2602 #define A6XX_SP_WINDOW_OFFSET_X__SHIFT				0
2603 static inline uint32_t A6XX_SP_WINDOW_OFFSET_X(uint32_t val)
2604 {
2605 	return ((val) << A6XX_SP_WINDOW_OFFSET_X__SHIFT) & A6XX_SP_WINDOW_OFFSET_X__MASK;
2606 }
2607 #define A6XX_SP_WINDOW_OFFSET_Y__MASK				0x7fff0000
2608 #define A6XX_SP_WINDOW_OFFSET_Y__SHIFT				16
2609 static inline uint32_t A6XX_SP_WINDOW_OFFSET_Y(uint32_t val)
2610 {
2611 	return ((val) << A6XX_SP_WINDOW_OFFSET_Y__SHIFT) & A6XX_SP_WINDOW_OFFSET_Y__MASK;
2612 }
2613 
2614 #define REG_A6XX_SP_TP_WINDOW_OFFSET				0x0000b307
2615 #define A6XX_SP_TP_WINDOW_OFFSET_WINDOW_OFFSET_DISABLE		0x80000000
2616 #define A6XX_SP_TP_WINDOW_OFFSET_X__MASK			0x00007fff
2617 #define A6XX_SP_TP_WINDOW_OFFSET_X__SHIFT			0
2618 static inline uint32_t A6XX_SP_TP_WINDOW_OFFSET_X(uint32_t val)
2619 {
2620 	return ((val) << A6XX_SP_TP_WINDOW_OFFSET_X__SHIFT) & A6XX_SP_TP_WINDOW_OFFSET_X__MASK;
2621 }
2622 #define A6XX_SP_TP_WINDOW_OFFSET_Y__MASK			0x7fff0000
2623 #define A6XX_SP_TP_WINDOW_OFFSET_Y__SHIFT			16
2624 static inline uint32_t A6XX_SP_TP_WINDOW_OFFSET_Y(uint32_t val)
2625 {
2626 	return ((val) << A6XX_SP_TP_WINDOW_OFFSET_Y__SHIFT) & A6XX_SP_TP_WINDOW_OFFSET_Y__MASK;
2627 }
2628 
2629 #define REG_A6XX_GRAS_BIN_CONTROL				0x000080a1
2630 #define A6XX_GRAS_BIN_CONTROL_BINW__MASK			0x000000ff
2631 #define A6XX_GRAS_BIN_CONTROL_BINW__SHIFT			0
2632 static inline uint32_t A6XX_GRAS_BIN_CONTROL_BINW(uint32_t val)
2633 {
2634 	return ((val >> 5) << A6XX_GRAS_BIN_CONTROL_BINW__SHIFT) & A6XX_GRAS_BIN_CONTROL_BINW__MASK;
2635 }
2636 #define A6XX_GRAS_BIN_CONTROL_BINH__MASK			0x0001ff00
2637 #define A6XX_GRAS_BIN_CONTROL_BINH__SHIFT			8
2638 static inline uint32_t A6XX_GRAS_BIN_CONTROL_BINH(uint32_t val)
2639 {
2640 	return ((val >> 4) << A6XX_GRAS_BIN_CONTROL_BINH__SHIFT) & A6XX_GRAS_BIN_CONTROL_BINH__MASK;
2641 }
2642 #define A6XX_GRAS_BIN_CONTROL_BINNING_PASS			0x00040000
2643 #define A6XX_GRAS_BIN_CONTROL_USE_VIZ				0x00200000
2644 
2645 #define REG_A6XX_RB_BIN_CONTROL2				0x000088d3
2646 #define A6XX_RB_BIN_CONTROL2_BINW__MASK				0x000000ff
2647 #define A6XX_RB_BIN_CONTROL2_BINW__SHIFT			0
2648 static inline uint32_t A6XX_RB_BIN_CONTROL2_BINW(uint32_t val)
2649 {
2650 	return ((val >> 5) << A6XX_RB_BIN_CONTROL2_BINW__SHIFT) & A6XX_RB_BIN_CONTROL2_BINW__MASK;
2651 }
2652 #define A6XX_RB_BIN_CONTROL2_BINH__MASK				0x0001ff00
2653 #define A6XX_RB_BIN_CONTROL2_BINH__SHIFT			8
2654 static inline uint32_t A6XX_RB_BIN_CONTROL2_BINH(uint32_t val)
2655 {
2656 	return ((val >> 4) << A6XX_RB_BIN_CONTROL2_BINH__SHIFT) & A6XX_RB_BIN_CONTROL2_BINH__MASK;
2657 }
2658 
2659 #define REG_A6XX_VSC_BIN_SIZE					0x00000c02
2660 #define A6XX_VSC_BIN_SIZE_WIDTH__MASK				0x000000ff
2661 #define A6XX_VSC_BIN_SIZE_WIDTH__SHIFT				0
2662 static inline uint32_t A6XX_VSC_BIN_SIZE_WIDTH(uint32_t val)
2663 {
2664 	return ((val >> 5) << A6XX_VSC_BIN_SIZE_WIDTH__SHIFT) & A6XX_VSC_BIN_SIZE_WIDTH__MASK;
2665 }
2666 #define A6XX_VSC_BIN_SIZE_HEIGHT__MASK				0x0001ff00
2667 #define A6XX_VSC_BIN_SIZE_HEIGHT__SHIFT				8
2668 static inline uint32_t A6XX_VSC_BIN_SIZE_HEIGHT(uint32_t val)
2669 {
2670 	return ((val >> 4) << A6XX_VSC_BIN_SIZE_HEIGHT__SHIFT) & A6XX_VSC_BIN_SIZE_HEIGHT__MASK;
2671 }
2672 
2673 #define REG_A6XX_VSC_SIZE_ADDRESS_LO				0x00000c03
2674 
2675 #define REG_A6XX_VSC_SIZE_ADDRESS_HI				0x00000c04
2676 
2677 #define REG_A6XX_VSC_BIN_COUNT					0x00000c06
2678 #define A6XX_VSC_BIN_COUNT_NX__MASK				0x000007fe
2679 #define A6XX_VSC_BIN_COUNT_NX__SHIFT				1
2680 static inline uint32_t A6XX_VSC_BIN_COUNT_NX(uint32_t val)
2681 {
2682 	return ((val) << A6XX_VSC_BIN_COUNT_NX__SHIFT) & A6XX_VSC_BIN_COUNT_NX__MASK;
2683 }
2684 #define A6XX_VSC_BIN_COUNT_NY__MASK				0x001ff800
2685 #define A6XX_VSC_BIN_COUNT_NY__SHIFT				11
2686 static inline uint32_t A6XX_VSC_BIN_COUNT_NY(uint32_t val)
2687 {
2688 	return ((val) << A6XX_VSC_BIN_COUNT_NY__SHIFT) & A6XX_VSC_BIN_COUNT_NY__MASK;
2689 }
2690 
2691 static inline uint32_t REG_A6XX_VSC_PIPE_CONFIG(uint32_t i0) { return 0x00000c10 + 0x1*i0; }
2692 
2693 static inline uint32_t REG_A6XX_VSC_PIPE_CONFIG_REG(uint32_t i0) { return 0x00000c10 + 0x1*i0; }
2694 #define A6XX_VSC_PIPE_CONFIG_REG_X__MASK			0x000003ff
2695 #define A6XX_VSC_PIPE_CONFIG_REG_X__SHIFT			0
2696 static inline uint32_t A6XX_VSC_PIPE_CONFIG_REG_X(uint32_t val)
2697 {
2698 	return ((val) << A6XX_VSC_PIPE_CONFIG_REG_X__SHIFT) & A6XX_VSC_PIPE_CONFIG_REG_X__MASK;
2699 }
2700 #define A6XX_VSC_PIPE_CONFIG_REG_Y__MASK			0x000ffc00
2701 #define A6XX_VSC_PIPE_CONFIG_REG_Y__SHIFT			10
2702 static inline uint32_t A6XX_VSC_PIPE_CONFIG_REG_Y(uint32_t val)
2703 {
2704 	return ((val) << A6XX_VSC_PIPE_CONFIG_REG_Y__SHIFT) & A6XX_VSC_PIPE_CONFIG_REG_Y__MASK;
2705 }
2706 #define A6XX_VSC_PIPE_CONFIG_REG_W__MASK			0x03f00000
2707 #define A6XX_VSC_PIPE_CONFIG_REG_W__SHIFT			20
2708 static inline uint32_t A6XX_VSC_PIPE_CONFIG_REG_W(uint32_t val)
2709 {
2710 	return ((val) << A6XX_VSC_PIPE_CONFIG_REG_W__SHIFT) & A6XX_VSC_PIPE_CONFIG_REG_W__MASK;
2711 }
2712 #define A6XX_VSC_PIPE_CONFIG_REG_H__MASK			0xfc000000
2713 #define A6XX_VSC_PIPE_CONFIG_REG_H__SHIFT			26
2714 static inline uint32_t A6XX_VSC_PIPE_CONFIG_REG_H(uint32_t val)
2715 {
2716 	return ((val) << A6XX_VSC_PIPE_CONFIG_REG_H__SHIFT) & A6XX_VSC_PIPE_CONFIG_REG_H__MASK;
2717 }
2718 
2719 #define REG_A6XX_VSC_PIPE_DATA2_ADDRESS_LO			0x00000c30
2720 
2721 #define REG_A6XX_VSC_PIPE_DATA2_ADDRESS_HI			0x00000c31
2722 
2723 #define REG_A6XX_VSC_PIPE_DATA2_PITCH				0x00000c32
2724 
2725 #define REG_A6XX_VSC_PIPE_DATA2_ARRAY_PITCH			0x00000c33
2726 #define A6XX_VSC_PIPE_DATA2_ARRAY_PITCH__MASK			0xffffffff
2727 #define A6XX_VSC_PIPE_DATA2_ARRAY_PITCH__SHIFT			0
2728 static inline uint32_t A6XX_VSC_PIPE_DATA2_ARRAY_PITCH(uint32_t val)
2729 {
2730 	return ((val >> 4) << A6XX_VSC_PIPE_DATA2_ARRAY_PITCH__SHIFT) & A6XX_VSC_PIPE_DATA2_ARRAY_PITCH__MASK;
2731 }
2732 
2733 #define REG_A6XX_VSC_PIPE_DATA_ADDRESS_LO			0x00000c34
2734 
2735 #define REG_A6XX_VSC_PIPE_DATA_ADDRESS_HI			0x00000c35
2736 
2737 #define REG_A6XX_VSC_PIPE_DATA_PITCH				0x00000c36
2738 
2739 #define REG_A6XX_VSC_PIPE_DATA_ARRAY_PITCH			0x00000c37
2740 #define A6XX_VSC_PIPE_DATA_ARRAY_PITCH__MASK			0xffffffff
2741 #define A6XX_VSC_PIPE_DATA_ARRAY_PITCH__SHIFT			0
2742 static inline uint32_t A6XX_VSC_PIPE_DATA_ARRAY_PITCH(uint32_t val)
2743 {
2744 	return ((val >> 4) << A6XX_VSC_PIPE_DATA_ARRAY_PITCH__SHIFT) & A6XX_VSC_PIPE_DATA_ARRAY_PITCH__MASK;
2745 }
2746 
2747 static inline uint32_t REG_A6XX_VSC_SIZE(uint32_t i0) { return 0x00000c78 + 0x1*i0; }
2748 
2749 static inline uint32_t REG_A6XX_VSC_SIZE_REG(uint32_t i0) { return 0x00000c78 + 0x1*i0; }
2750 
2751 #define REG_A6XX_UCHE_UNKNOWN_0E12				0x00000e12
2752 
2753 #define REG_A6XX_GRAS_UNKNOWN_8000				0x00008000
2754 
2755 #define REG_A6XX_GRAS_UNKNOWN_8001				0x00008001
2756 
2757 #define REG_A6XX_GRAS_UNKNOWN_8004				0x00008004
2758 
2759 #define REG_A6XX_GRAS_CNTL					0x00008005
2760 #define A6XX_GRAS_CNTL_VARYING					0x00000001
2761 #define A6XX_GRAS_CNTL_UNK3					0x00000008
2762 #define A6XX_GRAS_CNTL_XCOORD					0x00000040
2763 #define A6XX_GRAS_CNTL_YCOORD					0x00000080
2764 #define A6XX_GRAS_CNTL_ZCOORD					0x00000100
2765 #define A6XX_GRAS_CNTL_WCOORD					0x00000200
2766 
2767 #define REG_A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ			0x00008006
2768 #define A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__MASK		0x000003ff
2769 #define A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__SHIFT		0
2770 static inline uint32_t A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ(uint32_t val)
2771 {
2772 	return ((val) << A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__SHIFT) & A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__MASK;
2773 }
2774 #define A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__MASK		0x000ffc00
2775 #define A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__SHIFT		10
2776 static inline uint32_t A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT(uint32_t val)
2777 {
2778 	return ((val) << A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__SHIFT) & A6XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__MASK;
2779 }
2780 
2781 #define REG_A6XX_GRAS_CL_VPORT_XOFFSET_0			0x00008010
2782 #define A6XX_GRAS_CL_VPORT_XOFFSET_0__MASK			0xffffffff
2783 #define A6XX_GRAS_CL_VPORT_XOFFSET_0__SHIFT			0
2784 static inline uint32_t A6XX_GRAS_CL_VPORT_XOFFSET_0(float val)
2785 {
2786 	return ((fui(val)) << A6XX_GRAS_CL_VPORT_XOFFSET_0__SHIFT) & A6XX_GRAS_CL_VPORT_XOFFSET_0__MASK;
2787 }
2788 
2789 #define REG_A6XX_GRAS_CL_VPORT_XSCALE_0				0x00008011
2790 #define A6XX_GRAS_CL_VPORT_XSCALE_0__MASK			0xffffffff
2791 #define A6XX_GRAS_CL_VPORT_XSCALE_0__SHIFT			0
2792 static inline uint32_t A6XX_GRAS_CL_VPORT_XSCALE_0(float val)
2793 {
2794 	return ((fui(val)) << A6XX_GRAS_CL_VPORT_XSCALE_0__SHIFT) & A6XX_GRAS_CL_VPORT_XSCALE_0__MASK;
2795 }
2796 
2797 #define REG_A6XX_GRAS_CL_VPORT_YOFFSET_0			0x00008012
2798 #define A6XX_GRAS_CL_VPORT_YOFFSET_0__MASK			0xffffffff
2799 #define A6XX_GRAS_CL_VPORT_YOFFSET_0__SHIFT			0
2800 static inline uint32_t A6XX_GRAS_CL_VPORT_YOFFSET_0(float val)
2801 {
2802 	return ((fui(val)) << A6XX_GRAS_CL_VPORT_YOFFSET_0__SHIFT) & A6XX_GRAS_CL_VPORT_YOFFSET_0__MASK;
2803 }
2804 
2805 #define REG_A6XX_GRAS_CL_VPORT_YSCALE_0				0x00008013
2806 #define A6XX_GRAS_CL_VPORT_YSCALE_0__MASK			0xffffffff
2807 #define A6XX_GRAS_CL_VPORT_YSCALE_0__SHIFT			0
2808 static inline uint32_t A6XX_GRAS_CL_VPORT_YSCALE_0(float val)
2809 {
2810 	return ((fui(val)) << A6XX_GRAS_CL_VPORT_YSCALE_0__SHIFT) & A6XX_GRAS_CL_VPORT_YSCALE_0__MASK;
2811 }
2812 
2813 #define REG_A6XX_GRAS_CL_VPORT_ZOFFSET_0			0x00008014
2814 #define A6XX_GRAS_CL_VPORT_ZOFFSET_0__MASK			0xffffffff
2815 #define A6XX_GRAS_CL_VPORT_ZOFFSET_0__SHIFT			0
2816 static inline uint32_t A6XX_GRAS_CL_VPORT_ZOFFSET_0(float val)
2817 {
2818 	return ((fui(val)) << A6XX_GRAS_CL_VPORT_ZOFFSET_0__SHIFT) & A6XX_GRAS_CL_VPORT_ZOFFSET_0__MASK;
2819 }
2820 
2821 #define REG_A6XX_GRAS_CL_VPORT_ZSCALE_0				0x00008015
2822 #define A6XX_GRAS_CL_VPORT_ZSCALE_0__MASK			0xffffffff
2823 #define A6XX_GRAS_CL_VPORT_ZSCALE_0__SHIFT			0
2824 static inline uint32_t A6XX_GRAS_CL_VPORT_ZSCALE_0(float val)
2825 {
2826 	return ((fui(val)) << A6XX_GRAS_CL_VPORT_ZSCALE_0__SHIFT) & A6XX_GRAS_CL_VPORT_ZSCALE_0__MASK;
2827 }
2828 
2829 #define REG_A6XX_GRAS_SU_CNTL					0x00008090
2830 #define A6XX_GRAS_SU_CNTL_CULL_FRONT				0x00000001
2831 #define A6XX_GRAS_SU_CNTL_CULL_BACK				0x00000002
2832 #define A6XX_GRAS_SU_CNTL_FRONT_CW				0x00000004
2833 #define A6XX_GRAS_SU_CNTL_LINEHALFWIDTH__MASK			0x000007f8
2834 #define A6XX_GRAS_SU_CNTL_LINEHALFWIDTH__SHIFT			3
2835 static inline uint32_t A6XX_GRAS_SU_CNTL_LINEHALFWIDTH(float val)
2836 {
2837 	return ((((int32_t)(val * 4.0))) << A6XX_GRAS_SU_CNTL_LINEHALFWIDTH__SHIFT) & A6XX_GRAS_SU_CNTL_LINEHALFWIDTH__MASK;
2838 }
2839 #define A6XX_GRAS_SU_CNTL_POLY_OFFSET				0x00000800
2840 #define A6XX_GRAS_SU_CNTL_MSAA_ENABLE				0x00002000
2841 
2842 #define REG_A6XX_GRAS_SU_POINT_MINMAX				0x00008091
2843 #define A6XX_GRAS_SU_POINT_MINMAX_MIN__MASK			0x0000ffff
2844 #define A6XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT			0
2845 static inline uint32_t A6XX_GRAS_SU_POINT_MINMAX_MIN(float val)
2846 {
2847 	return ((((uint32_t)(val * 16.0))) << A6XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT) & A6XX_GRAS_SU_POINT_MINMAX_MIN__MASK;
2848 }
2849 #define A6XX_GRAS_SU_POINT_MINMAX_MAX__MASK			0xffff0000
2850 #define A6XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT			16
2851 static inline uint32_t A6XX_GRAS_SU_POINT_MINMAX_MAX(float val)
2852 {
2853 	return ((((uint32_t)(val * 16.0))) << A6XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT) & A6XX_GRAS_SU_POINT_MINMAX_MAX__MASK;
2854 }
2855 
2856 #define REG_A6XX_GRAS_SU_POINT_SIZE				0x00008092
2857 #define A6XX_GRAS_SU_POINT_SIZE__MASK				0xffffffff
2858 #define A6XX_GRAS_SU_POINT_SIZE__SHIFT				0
2859 static inline uint32_t A6XX_GRAS_SU_POINT_SIZE(float val)
2860 {
2861 	return ((((int32_t)(val * 16.0))) << A6XX_GRAS_SU_POINT_SIZE__SHIFT) & A6XX_GRAS_SU_POINT_SIZE__MASK;
2862 }
2863 
2864 #define REG_A6XX_GRAS_SU_DEPTH_PLANE_CNTL			0x00008094
2865 #define A6XX_GRAS_SU_DEPTH_PLANE_CNTL_FRAG_WRITES_Z		0x00000001
2866 
2867 #define REG_A6XX_GRAS_SU_POLY_OFFSET_SCALE			0x00008095
2868 #define A6XX_GRAS_SU_POLY_OFFSET_SCALE__MASK			0xffffffff
2869 #define A6XX_GRAS_SU_POLY_OFFSET_SCALE__SHIFT			0
2870 static inline uint32_t A6XX_GRAS_SU_POLY_OFFSET_SCALE(float val)
2871 {
2872 	return ((fui(val)) << A6XX_GRAS_SU_POLY_OFFSET_SCALE__SHIFT) & A6XX_GRAS_SU_POLY_OFFSET_SCALE__MASK;
2873 }
2874 
2875 #define REG_A6XX_GRAS_SU_POLY_OFFSET_OFFSET			0x00008096
2876 #define A6XX_GRAS_SU_POLY_OFFSET_OFFSET__MASK			0xffffffff
2877 #define A6XX_GRAS_SU_POLY_OFFSET_OFFSET__SHIFT			0
2878 static inline uint32_t A6XX_GRAS_SU_POLY_OFFSET_OFFSET(float val)
2879 {
2880 	return ((fui(val)) << A6XX_GRAS_SU_POLY_OFFSET_OFFSET__SHIFT) & A6XX_GRAS_SU_POLY_OFFSET_OFFSET__MASK;
2881 }
2882 
2883 #define REG_A6XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP		0x00008097
2884 #define A6XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__MASK		0xffffffff
2885 #define A6XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__SHIFT		0
2886 static inline uint32_t A6XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP(float val)
2887 {
2888 	return ((fui(val)) << A6XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__SHIFT) & A6XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__MASK;
2889 }
2890 
2891 #define REG_A6XX_GRAS_SU_DEPTH_BUFFER_INFO			0x00008098
2892 #define A6XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK	0x00000007
2893 #define A6XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT	0
2894 static inline uint32_t A6XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT(enum a6xx_depth_format val)
2895 {
2896 	return ((val) << A6XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT) & A6XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK;
2897 }
2898 
2899 #define REG_A6XX_GRAS_UNKNOWN_8099				0x00008099
2900 
2901 #define REG_A6XX_GRAS_UNKNOWN_809B				0x0000809b
2902 
2903 #define REG_A6XX_GRAS_UNKNOWN_80A0				0x000080a0
2904 
2905 #define REG_A6XX_GRAS_RAS_MSAA_CNTL				0x000080a2
2906 #define A6XX_GRAS_RAS_MSAA_CNTL_SAMPLES__MASK			0x00000003
2907 #define A6XX_GRAS_RAS_MSAA_CNTL_SAMPLES__SHIFT			0
2908 static inline uint32_t A6XX_GRAS_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
2909 {
2910 	return ((val) << A6XX_GRAS_RAS_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_GRAS_RAS_MSAA_CNTL_SAMPLES__MASK;
2911 }
2912 
2913 #define REG_A6XX_GRAS_DEST_MSAA_CNTL				0x000080a3
2914 #define A6XX_GRAS_DEST_MSAA_CNTL_SAMPLES__MASK			0x00000003
2915 #define A6XX_GRAS_DEST_MSAA_CNTL_SAMPLES__SHIFT			0
2916 static inline uint32_t A6XX_GRAS_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
2917 {
2918 	return ((val) << A6XX_GRAS_DEST_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_GRAS_DEST_MSAA_CNTL_SAMPLES__MASK;
2919 }
2920 #define A6XX_GRAS_DEST_MSAA_CNTL_MSAA_DISABLE			0x00000004
2921 
2922 #define REG_A6XX_GRAS_UNKNOWN_80A4				0x000080a4
2923 
2924 #define REG_A6XX_GRAS_UNKNOWN_80A5				0x000080a5
2925 
2926 #define REG_A6XX_GRAS_UNKNOWN_80A6				0x000080a6
2927 
2928 #define REG_A6XX_GRAS_UNKNOWN_80AF				0x000080af
2929 
2930 #define REG_A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0			0x000080b0
2931 #define A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_WINDOW_OFFSET_DISABLE	0x80000000
2932 #define A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__MASK		0x00007fff
2933 #define A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__SHIFT		0
2934 static inline uint32_t A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X(uint32_t val)
2935 {
2936 	return ((val) << A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__SHIFT) & A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__MASK;
2937 }
2938 #define A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__MASK		0x7fff0000
2939 #define A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__SHIFT		16
2940 static inline uint32_t A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y(uint32_t val)
2941 {
2942 	return ((val) << A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__SHIFT) & A6XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__MASK;
2943 }
2944 
2945 #define REG_A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0			0x000080b1
2946 #define A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_WINDOW_OFFSET_DISABLE	0x80000000
2947 #define A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__MASK		0x00007fff
2948 #define A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__SHIFT		0
2949 static inline uint32_t A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X(uint32_t val)
2950 {
2951 	return ((val) << A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__SHIFT) & A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__MASK;
2952 }
2953 #define A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__MASK		0x7fff0000
2954 #define A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__SHIFT		16
2955 static inline uint32_t A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y(uint32_t val)
2956 {
2957 	return ((val) << A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__SHIFT) & A6XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__MASK;
2958 }
2959 
2960 #define REG_A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0			0x000080d0
2961 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_WINDOW_OFFSET_DISABLE	0x80000000
2962 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__MASK		0x00007fff
2963 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__SHIFT		0
2964 static inline uint32_t A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X(uint32_t val)
2965 {
2966 	return ((val) << A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__SHIFT) & A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__MASK;
2967 }
2968 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__MASK		0x7fff0000
2969 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__SHIFT		16
2970 static inline uint32_t A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y(uint32_t val)
2971 {
2972 	return ((val) << A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__SHIFT) & A6XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__MASK;
2973 }
2974 
2975 #define REG_A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0			0x000080d1
2976 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_WINDOW_OFFSET_DISABLE	0x80000000
2977 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__MASK		0x00007fff
2978 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__SHIFT		0
2979 static inline uint32_t A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X(uint32_t val)
2980 {
2981 	return ((val) << A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__SHIFT) & A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__MASK;
2982 }
2983 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__MASK		0x7fff0000
2984 #define A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__SHIFT		16
2985 static inline uint32_t A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y(uint32_t val)
2986 {
2987 	return ((val) << A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__SHIFT) & A6XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__MASK;
2988 }
2989 
2990 #define REG_A6XX_GRAS_SC_WINDOW_SCISSOR_TL			0x000080f0
2991 #define A6XX_GRAS_SC_WINDOW_SCISSOR_TL_WINDOW_OFFSET_DISABLE	0x80000000
2992 #define A6XX_GRAS_SC_WINDOW_SCISSOR_TL_X__MASK			0x00007fff
2993 #define A6XX_GRAS_SC_WINDOW_SCISSOR_TL_X__SHIFT			0
2994 static inline uint32_t A6XX_GRAS_SC_WINDOW_SCISSOR_TL_X(uint32_t val)
2995 {
2996 	return ((val) << A6XX_GRAS_SC_WINDOW_SCISSOR_TL_X__SHIFT) & A6XX_GRAS_SC_WINDOW_SCISSOR_TL_X__MASK;
2997 }
2998 #define A6XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__MASK			0x7fff0000
2999 #define A6XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__SHIFT			16
3000 static inline uint32_t A6XX_GRAS_SC_WINDOW_SCISSOR_TL_Y(uint32_t val)
3001 {
3002 	return ((val) << A6XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__SHIFT) & A6XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__MASK;
3003 }
3004 
3005 #define REG_A6XX_GRAS_SC_WINDOW_SCISSOR_BR			0x000080f1
3006 #define A6XX_GRAS_SC_WINDOW_SCISSOR_BR_WINDOW_OFFSET_DISABLE	0x80000000
3007 #define A6XX_GRAS_SC_WINDOW_SCISSOR_BR_X__MASK			0x00007fff
3008 #define A6XX_GRAS_SC_WINDOW_SCISSOR_BR_X__SHIFT			0
3009 static inline uint32_t A6XX_GRAS_SC_WINDOW_SCISSOR_BR_X(uint32_t val)
3010 {
3011 	return ((val) << A6XX_GRAS_SC_WINDOW_SCISSOR_BR_X__SHIFT) & A6XX_GRAS_SC_WINDOW_SCISSOR_BR_X__MASK;
3012 }
3013 #define A6XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__MASK			0x7fff0000
3014 #define A6XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__SHIFT			16
3015 static inline uint32_t A6XX_GRAS_SC_WINDOW_SCISSOR_BR_Y(uint32_t val)
3016 {
3017 	return ((val) << A6XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__SHIFT) & A6XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__MASK;
3018 }
3019 
3020 #define REG_A6XX_GRAS_LRZ_CNTL					0x00008100
3021 #define A6XX_GRAS_LRZ_CNTL_ENABLE				0x00000001
3022 #define A6XX_GRAS_LRZ_CNTL_LRZ_WRITE				0x00000002
3023 #define A6XX_GRAS_LRZ_CNTL_GREATER				0x00000004
3024 #define A6XX_GRAS_LRZ_CNTL_UNK3					0x00000008
3025 #define A6XX_GRAS_LRZ_CNTL_UNK4					0x00000010
3026 
3027 #define REG_A6XX_GRAS_UNKNOWN_8101				0x00008101
3028 
3029 #define REG_A6XX_GRAS_2D_BLIT_INFO				0x00008102
3030 #define A6XX_GRAS_2D_BLIT_INFO_COLOR_FORMAT__MASK		0x000000ff
3031 #define A6XX_GRAS_2D_BLIT_INFO_COLOR_FORMAT__SHIFT		0
3032 static inline uint32_t A6XX_GRAS_2D_BLIT_INFO_COLOR_FORMAT(enum a6xx_color_fmt val)
3033 {
3034 	return ((val) << A6XX_GRAS_2D_BLIT_INFO_COLOR_FORMAT__SHIFT) & A6XX_GRAS_2D_BLIT_INFO_COLOR_FORMAT__MASK;
3035 }
3036 
3037 #define REG_A6XX_GRAS_LRZ_BUFFER_BASE_LO			0x00008103
3038 
3039 #define REG_A6XX_GRAS_LRZ_BUFFER_BASE_HI			0x00008104
3040 
3041 #define REG_A6XX_GRAS_LRZ_BUFFER_PITCH				0x00008105
3042 #define A6XX_GRAS_LRZ_BUFFER_PITCH_PITCH__MASK			0x000007ff
3043 #define A6XX_GRAS_LRZ_BUFFER_PITCH_PITCH__SHIFT			0
3044 static inline uint32_t A6XX_GRAS_LRZ_BUFFER_PITCH_PITCH(uint32_t val)
3045 {
3046 	return ((val >> 5) << A6XX_GRAS_LRZ_BUFFER_PITCH_PITCH__SHIFT) & A6XX_GRAS_LRZ_BUFFER_PITCH_PITCH__MASK;
3047 }
3048 #define A6XX_GRAS_LRZ_BUFFER_PITCH_ARRAY_PITCH__MASK		0x003ff800
3049 #define A6XX_GRAS_LRZ_BUFFER_PITCH_ARRAY_PITCH__SHIFT		11
3050 static inline uint32_t A6XX_GRAS_LRZ_BUFFER_PITCH_ARRAY_PITCH(uint32_t val)
3051 {
3052 	return ((val >> 5) << A6XX_GRAS_LRZ_BUFFER_PITCH_ARRAY_PITCH__SHIFT) & A6XX_GRAS_LRZ_BUFFER_PITCH_ARRAY_PITCH__MASK;
3053 }
3054 
3055 #define REG_A6XX_GRAS_LRZ_FAST_CLEAR_BUFFER_BASE_LO		0x00008106
3056 
3057 #define REG_A6XX_GRAS_LRZ_FAST_CLEAR_BUFFER_BASE_HI		0x00008107
3058 
3059 #define REG_A6XX_GRAS_UNKNOWN_8109				0x00008109
3060 
3061 #define REG_A6XX_GRAS_UNKNOWN_8110				0x00008110
3062 
3063 #define REG_A6XX_GRAS_2D_BLIT_CNTL				0x00008400
3064 #define A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT__MASK		0x0000ff00
3065 #define A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT__SHIFT		8
3066 static inline uint32_t A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT(enum a6xx_color_fmt val)
3067 {
3068 	return ((val) << A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT__SHIFT) & A6XX_GRAS_2D_BLIT_CNTL_COLOR_FORMAT__MASK;
3069 }
3070 #define A6XX_GRAS_2D_BLIT_CNTL_SCISSOR				0x00010000
3071 
3072 #define REG_A6XX_GRAS_2D_SRC_TL_X				0x00008401
3073 #define A6XX_GRAS_2D_SRC_TL_X_X__MASK				0x00ffff00
3074 #define A6XX_GRAS_2D_SRC_TL_X_X__SHIFT				8
3075 static inline uint32_t A6XX_GRAS_2D_SRC_TL_X_X(uint32_t val)
3076 {
3077 	return ((val) << A6XX_GRAS_2D_SRC_TL_X_X__SHIFT) & A6XX_GRAS_2D_SRC_TL_X_X__MASK;
3078 }
3079 
3080 #define REG_A6XX_GRAS_2D_SRC_BR_X				0x00008402
3081 #define A6XX_GRAS_2D_SRC_BR_X_X__MASK				0x00ffff00
3082 #define A6XX_GRAS_2D_SRC_BR_X_X__SHIFT				8
3083 static inline uint32_t A6XX_GRAS_2D_SRC_BR_X_X(uint32_t val)
3084 {
3085 	return ((val) << A6XX_GRAS_2D_SRC_BR_X_X__SHIFT) & A6XX_GRAS_2D_SRC_BR_X_X__MASK;
3086 }
3087 
3088 #define REG_A6XX_GRAS_2D_SRC_TL_Y				0x00008403
3089 #define A6XX_GRAS_2D_SRC_TL_Y_Y__MASK				0x00ffff00
3090 #define A6XX_GRAS_2D_SRC_TL_Y_Y__SHIFT				8
3091 static inline uint32_t A6XX_GRAS_2D_SRC_TL_Y_Y(uint32_t val)
3092 {
3093 	return ((val) << A6XX_GRAS_2D_SRC_TL_Y_Y__SHIFT) & A6XX_GRAS_2D_SRC_TL_Y_Y__MASK;
3094 }
3095 
3096 #define REG_A6XX_GRAS_2D_SRC_BR_Y				0x00008404
3097 #define A6XX_GRAS_2D_SRC_BR_Y_Y__MASK				0x00ffff00
3098 #define A6XX_GRAS_2D_SRC_BR_Y_Y__SHIFT				8
3099 static inline uint32_t A6XX_GRAS_2D_SRC_BR_Y_Y(uint32_t val)
3100 {
3101 	return ((val) << A6XX_GRAS_2D_SRC_BR_Y_Y__SHIFT) & A6XX_GRAS_2D_SRC_BR_Y_Y__MASK;
3102 }
3103 
3104 #define REG_A6XX_GRAS_2D_DST_TL					0x00008405
3105 #define A6XX_GRAS_2D_DST_TL_WINDOW_OFFSET_DISABLE		0x80000000
3106 #define A6XX_GRAS_2D_DST_TL_X__MASK				0x00007fff
3107 #define A6XX_GRAS_2D_DST_TL_X__SHIFT				0
3108 static inline uint32_t A6XX_GRAS_2D_DST_TL_X(uint32_t val)
3109 {
3110 	return ((val) << A6XX_GRAS_2D_DST_TL_X__SHIFT) & A6XX_GRAS_2D_DST_TL_X__MASK;
3111 }
3112 #define A6XX_GRAS_2D_DST_TL_Y__MASK				0x7fff0000
3113 #define A6XX_GRAS_2D_DST_TL_Y__SHIFT				16
3114 static inline uint32_t A6XX_GRAS_2D_DST_TL_Y(uint32_t val)
3115 {
3116 	return ((val) << A6XX_GRAS_2D_DST_TL_Y__SHIFT) & A6XX_GRAS_2D_DST_TL_Y__MASK;
3117 }
3118 
3119 #define REG_A6XX_GRAS_2D_DST_BR					0x00008406
3120 #define A6XX_GRAS_2D_DST_BR_WINDOW_OFFSET_DISABLE		0x80000000
3121 #define A6XX_GRAS_2D_DST_BR_X__MASK				0x00007fff
3122 #define A6XX_GRAS_2D_DST_BR_X__SHIFT				0
3123 static inline uint32_t A6XX_GRAS_2D_DST_BR_X(uint32_t val)
3124 {
3125 	return ((val) << A6XX_GRAS_2D_DST_BR_X__SHIFT) & A6XX_GRAS_2D_DST_BR_X__MASK;
3126 }
3127 #define A6XX_GRAS_2D_DST_BR_Y__MASK				0x7fff0000
3128 #define A6XX_GRAS_2D_DST_BR_Y__SHIFT				16
3129 static inline uint32_t A6XX_GRAS_2D_DST_BR_Y(uint32_t val)
3130 {
3131 	return ((val) << A6XX_GRAS_2D_DST_BR_Y__SHIFT) & A6XX_GRAS_2D_DST_BR_Y__MASK;
3132 }
3133 
3134 #define REG_A6XX_GRAS_RESOLVE_CNTL_1				0x0000840a
3135 #define A6XX_GRAS_RESOLVE_CNTL_1_WINDOW_OFFSET_DISABLE		0x80000000
3136 #define A6XX_GRAS_RESOLVE_CNTL_1_X__MASK			0x00007fff
3137 #define A6XX_GRAS_RESOLVE_CNTL_1_X__SHIFT			0
3138 static inline uint32_t A6XX_GRAS_RESOLVE_CNTL_1_X(uint32_t val)
3139 {
3140 	return ((val) << A6XX_GRAS_RESOLVE_CNTL_1_X__SHIFT) & A6XX_GRAS_RESOLVE_CNTL_1_X__MASK;
3141 }
3142 #define A6XX_GRAS_RESOLVE_CNTL_1_Y__MASK			0x7fff0000
3143 #define A6XX_GRAS_RESOLVE_CNTL_1_Y__SHIFT			16
3144 static inline uint32_t A6XX_GRAS_RESOLVE_CNTL_1_Y(uint32_t val)
3145 {
3146 	return ((val) << A6XX_GRAS_RESOLVE_CNTL_1_Y__SHIFT) & A6XX_GRAS_RESOLVE_CNTL_1_Y__MASK;
3147 }
3148 
3149 #define REG_A6XX_GRAS_RESOLVE_CNTL_2				0x0000840b
3150 #define A6XX_GRAS_RESOLVE_CNTL_2_WINDOW_OFFSET_DISABLE		0x80000000
3151 #define A6XX_GRAS_RESOLVE_CNTL_2_X__MASK			0x00007fff
3152 #define A6XX_GRAS_RESOLVE_CNTL_2_X__SHIFT			0
3153 static inline uint32_t A6XX_GRAS_RESOLVE_CNTL_2_X(uint32_t val)
3154 {
3155 	return ((val) << A6XX_GRAS_RESOLVE_CNTL_2_X__SHIFT) & A6XX_GRAS_RESOLVE_CNTL_2_X__MASK;
3156 }
3157 #define A6XX_GRAS_RESOLVE_CNTL_2_Y__MASK			0x7fff0000
3158 #define A6XX_GRAS_RESOLVE_CNTL_2_Y__SHIFT			16
3159 static inline uint32_t A6XX_GRAS_RESOLVE_CNTL_2_Y(uint32_t val)
3160 {
3161 	return ((val) << A6XX_GRAS_RESOLVE_CNTL_2_Y__SHIFT) & A6XX_GRAS_RESOLVE_CNTL_2_Y__MASK;
3162 }
3163 
3164 #define REG_A6XX_GRAS_UNKNOWN_8600				0x00008600
3165 
3166 #define REG_A6XX_RB_BIN_CONTROL					0x00008800
3167 #define A6XX_RB_BIN_CONTROL_BINW__MASK				0x000000ff
3168 #define A6XX_RB_BIN_CONTROL_BINW__SHIFT				0
3169 static inline uint32_t A6XX_RB_BIN_CONTROL_BINW(uint32_t val)
3170 {
3171 	return ((val >> 5) << A6XX_RB_BIN_CONTROL_BINW__SHIFT) & A6XX_RB_BIN_CONTROL_BINW__MASK;
3172 }
3173 #define A6XX_RB_BIN_CONTROL_BINH__MASK				0x0001ff00
3174 #define A6XX_RB_BIN_CONTROL_BINH__SHIFT				8
3175 static inline uint32_t A6XX_RB_BIN_CONTROL_BINH(uint32_t val)
3176 {
3177 	return ((val >> 4) << A6XX_RB_BIN_CONTROL_BINH__SHIFT) & A6XX_RB_BIN_CONTROL_BINH__MASK;
3178 }
3179 #define A6XX_RB_BIN_CONTROL_BINNING_PASS			0x00040000
3180 #define A6XX_RB_BIN_CONTROL_USE_VIZ				0x00200000
3181 
3182 #define REG_A6XX_RB_RENDER_CNTL					0x00008801
3183 #define A6XX_RB_RENDER_CNTL_UNK4				0x00000010
3184 #define A6XX_RB_RENDER_CNTL_BINNING				0x00000080
3185 #define A6XX_RB_RENDER_CNTL_FLAG_DEPTH				0x00004000
3186 #define A6XX_RB_RENDER_CNTL_FLAG_MRTS__MASK			0x00ff0000
3187 #define A6XX_RB_RENDER_CNTL_FLAG_MRTS__SHIFT			16
3188 static inline uint32_t A6XX_RB_RENDER_CNTL_FLAG_MRTS(uint32_t val)
3189 {
3190 	return ((val) << A6XX_RB_RENDER_CNTL_FLAG_MRTS__SHIFT) & A6XX_RB_RENDER_CNTL_FLAG_MRTS__MASK;
3191 }
3192 
3193 #define REG_A6XX_RB_RAS_MSAA_CNTL				0x00008802
3194 #define A6XX_RB_RAS_MSAA_CNTL_SAMPLES__MASK			0x00000003
3195 #define A6XX_RB_RAS_MSAA_CNTL_SAMPLES__SHIFT			0
3196 static inline uint32_t A6XX_RB_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
3197 {
3198 	return ((val) << A6XX_RB_RAS_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_RB_RAS_MSAA_CNTL_SAMPLES__MASK;
3199 }
3200 
3201 #define REG_A6XX_RB_DEST_MSAA_CNTL				0x00008803
3202 #define A6XX_RB_DEST_MSAA_CNTL_SAMPLES__MASK			0x00000003
3203 #define A6XX_RB_DEST_MSAA_CNTL_SAMPLES__SHIFT			0
3204 static inline uint32_t A6XX_RB_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
3205 {
3206 	return ((val) << A6XX_RB_DEST_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_RB_DEST_MSAA_CNTL_SAMPLES__MASK;
3207 }
3208 #define A6XX_RB_DEST_MSAA_CNTL_MSAA_DISABLE			0x00000004
3209 
3210 #define REG_A6XX_RB_UNKNOWN_8804				0x00008804
3211 
3212 #define REG_A6XX_RB_UNKNOWN_8805				0x00008805
3213 
3214 #define REG_A6XX_RB_UNKNOWN_8806				0x00008806
3215 
3216 #define REG_A6XX_RB_RENDER_CONTROL0				0x00008809
3217 #define A6XX_RB_RENDER_CONTROL0_VARYING				0x00000001
3218 #define A6XX_RB_RENDER_CONTROL0_UNK3				0x00000008
3219 #define A6XX_RB_RENDER_CONTROL0_XCOORD				0x00000040
3220 #define A6XX_RB_RENDER_CONTROL0_YCOORD				0x00000080
3221 #define A6XX_RB_RENDER_CONTROL0_ZCOORD				0x00000100
3222 #define A6XX_RB_RENDER_CONTROL0_WCOORD				0x00000200
3223 #define A6XX_RB_RENDER_CONTROL0_UNK10				0x00000400
3224 
3225 #define REG_A6XX_RB_RENDER_CONTROL1				0x0000880a
3226 #define A6XX_RB_RENDER_CONTROL1_SAMPLEMASK			0x00000001
3227 #define A6XX_RB_RENDER_CONTROL1_FACENESS			0x00000002
3228 #define A6XX_RB_RENDER_CONTROL1_SAMPLEID			0x00000008
3229 
3230 #define REG_A6XX_RB_FS_OUTPUT_CNTL0				0x0000880b
3231 #define A6XX_RB_FS_OUTPUT_CNTL0_FRAG_WRITES_Z			0x00000002
3232 
3233 #define REG_A6XX_RB_FS_OUTPUT_CNTL1				0x0000880c
3234 #define A6XX_RB_FS_OUTPUT_CNTL1_MRT__MASK			0x0000000f
3235 #define A6XX_RB_FS_OUTPUT_CNTL1_MRT__SHIFT			0
3236 static inline uint32_t A6XX_RB_FS_OUTPUT_CNTL1_MRT(uint32_t val)
3237 {
3238 	return ((val) << A6XX_RB_FS_OUTPUT_CNTL1_MRT__SHIFT) & A6XX_RB_FS_OUTPUT_CNTL1_MRT__MASK;
3239 }
3240 
3241 #define REG_A6XX_RB_RENDER_COMPONENTS				0x0000880d
3242 #define A6XX_RB_RENDER_COMPONENTS_RT0__MASK			0x0000000f
3243 #define A6XX_RB_RENDER_COMPONENTS_RT0__SHIFT			0
3244 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT0(uint32_t val)
3245 {
3246 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT0__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT0__MASK;
3247 }
3248 #define A6XX_RB_RENDER_COMPONENTS_RT1__MASK			0x000000f0
3249 #define A6XX_RB_RENDER_COMPONENTS_RT1__SHIFT			4
3250 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT1(uint32_t val)
3251 {
3252 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT1__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT1__MASK;
3253 }
3254 #define A6XX_RB_RENDER_COMPONENTS_RT2__MASK			0x00000f00
3255 #define A6XX_RB_RENDER_COMPONENTS_RT2__SHIFT			8
3256 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT2(uint32_t val)
3257 {
3258 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT2__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT2__MASK;
3259 }
3260 #define A6XX_RB_RENDER_COMPONENTS_RT3__MASK			0x0000f000
3261 #define A6XX_RB_RENDER_COMPONENTS_RT3__SHIFT			12
3262 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT3(uint32_t val)
3263 {
3264 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT3__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT3__MASK;
3265 }
3266 #define A6XX_RB_RENDER_COMPONENTS_RT4__MASK			0x000f0000
3267 #define A6XX_RB_RENDER_COMPONENTS_RT4__SHIFT			16
3268 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT4(uint32_t val)
3269 {
3270 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT4__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT4__MASK;
3271 }
3272 #define A6XX_RB_RENDER_COMPONENTS_RT5__MASK			0x00f00000
3273 #define A6XX_RB_RENDER_COMPONENTS_RT5__SHIFT			20
3274 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT5(uint32_t val)
3275 {
3276 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT5__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT5__MASK;
3277 }
3278 #define A6XX_RB_RENDER_COMPONENTS_RT6__MASK			0x0f000000
3279 #define A6XX_RB_RENDER_COMPONENTS_RT6__SHIFT			24
3280 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT6(uint32_t val)
3281 {
3282 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT6__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT6__MASK;
3283 }
3284 #define A6XX_RB_RENDER_COMPONENTS_RT7__MASK			0xf0000000
3285 #define A6XX_RB_RENDER_COMPONENTS_RT7__SHIFT			28
3286 static inline uint32_t A6XX_RB_RENDER_COMPONENTS_RT7(uint32_t val)
3287 {
3288 	return ((val) << A6XX_RB_RENDER_COMPONENTS_RT7__SHIFT) & A6XX_RB_RENDER_COMPONENTS_RT7__MASK;
3289 }
3290 
3291 #define REG_A6XX_RB_DITHER_CNTL					0x0000880e
3292 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT0__MASK		0x00000003
3293 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT0__SHIFT		0
3294 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT0(enum adreno_rb_dither_mode val)
3295 {
3296 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT0__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT0__MASK;
3297 }
3298 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT1__MASK		0x0000000c
3299 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT1__SHIFT		2
3300 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT1(enum adreno_rb_dither_mode val)
3301 {
3302 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT1__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT1__MASK;
3303 }
3304 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT2__MASK		0x00000030
3305 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT2__SHIFT		4
3306 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT2(enum adreno_rb_dither_mode val)
3307 {
3308 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT2__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT2__MASK;
3309 }
3310 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT3__MASK		0x000000c0
3311 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT3__SHIFT		6
3312 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT3(enum adreno_rb_dither_mode val)
3313 {
3314 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT3__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT3__MASK;
3315 }
3316 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT4__MASK		0x00000300
3317 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT4__SHIFT		8
3318 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT4(enum adreno_rb_dither_mode val)
3319 {
3320 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT4__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT4__MASK;
3321 }
3322 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT5__MASK		0x00000c00
3323 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT5__SHIFT		10
3324 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT5(enum adreno_rb_dither_mode val)
3325 {
3326 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT5__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT5__MASK;
3327 }
3328 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT6__MASK		0x00001000
3329 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT6__SHIFT		12
3330 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT6(enum adreno_rb_dither_mode val)
3331 {
3332 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT6__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT6__MASK;
3333 }
3334 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT7__MASK		0x0000c000
3335 #define A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT7__SHIFT		14
3336 static inline uint32_t A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT7(enum adreno_rb_dither_mode val)
3337 {
3338 	return ((val) << A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT7__SHIFT) & A6XX_RB_DITHER_CNTL_DITHER_MODE_MRT7__MASK;
3339 }
3340 
3341 #define REG_A6XX_RB_SRGB_CNTL					0x0000880f
3342 #define A6XX_RB_SRGB_CNTL_SRGB_MRT0				0x00000001
3343 #define A6XX_RB_SRGB_CNTL_SRGB_MRT1				0x00000002
3344 #define A6XX_RB_SRGB_CNTL_SRGB_MRT2				0x00000004
3345 #define A6XX_RB_SRGB_CNTL_SRGB_MRT3				0x00000008
3346 #define A6XX_RB_SRGB_CNTL_SRGB_MRT4				0x00000010
3347 #define A6XX_RB_SRGB_CNTL_SRGB_MRT5				0x00000020
3348 #define A6XX_RB_SRGB_CNTL_SRGB_MRT6				0x00000040
3349 #define A6XX_RB_SRGB_CNTL_SRGB_MRT7				0x00000080
3350 
3351 #define REG_A6XX_RB_UNKNOWN_8810				0x00008810
3352 
3353 #define REG_A6XX_RB_UNKNOWN_8811				0x00008811
3354 
3355 #define REG_A6XX_RB_UNKNOWN_8818				0x00008818
3356 
3357 #define REG_A6XX_RB_UNKNOWN_8819				0x00008819
3358 
3359 #define REG_A6XX_RB_UNKNOWN_881A				0x0000881a
3360 
3361 #define REG_A6XX_RB_UNKNOWN_881B				0x0000881b
3362 
3363 #define REG_A6XX_RB_UNKNOWN_881C				0x0000881c
3364 
3365 #define REG_A6XX_RB_UNKNOWN_881D				0x0000881d
3366 
3367 #define REG_A6XX_RB_UNKNOWN_881E				0x0000881e
3368 
3369 static inline uint32_t REG_A6XX_RB_MRT(uint32_t i0) { return 0x00008820 + 0x8*i0; }
3370 
3371 static inline uint32_t REG_A6XX_RB_MRT_CONTROL(uint32_t i0) { return 0x00008820 + 0x8*i0; }
3372 #define A6XX_RB_MRT_CONTROL_BLEND				0x00000001
3373 #define A6XX_RB_MRT_CONTROL_BLEND2				0x00000002
3374 #define A6XX_RB_MRT_CONTROL_ROP_ENABLE				0x00000004
3375 #define A6XX_RB_MRT_CONTROL_ROP_CODE__MASK			0x00000078
3376 #define A6XX_RB_MRT_CONTROL_ROP_CODE__SHIFT			3
3377 static inline uint32_t A6XX_RB_MRT_CONTROL_ROP_CODE(enum a3xx_rop_code val)
3378 {
3379 	return ((val) << A6XX_RB_MRT_CONTROL_ROP_CODE__SHIFT) & A6XX_RB_MRT_CONTROL_ROP_CODE__MASK;
3380 }
3381 #define A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK		0x00000780
3382 #define A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT		7
3383 static inline uint32_t A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE(uint32_t val)
3384 {
3385 	return ((val) << A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT) & A6XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK;
3386 }
3387 
3388 static inline uint32_t REG_A6XX_RB_MRT_BLEND_CONTROL(uint32_t i0) { return 0x00008821 + 0x8*i0; }
3389 #define A6XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__MASK		0x0000001f
3390 #define A6XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__SHIFT		0
3391 static inline uint32_t A6XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(enum adreno_rb_blend_factor val)
3392 {
3393 	return ((val) << A6XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__SHIFT) & A6XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__MASK;
3394 }
3395 #define A6XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK	0x000000e0
3396 #define A6XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT	5
3397 static inline uint32_t A6XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
3398 {
3399 	return ((val) << A6XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT) & A6XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK;
3400 }
3401 #define A6XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__MASK		0x00001f00
3402 #define A6XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__SHIFT	8
3403 static inline uint32_t A6XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(enum adreno_rb_blend_factor val)
3404 {
3405 	return ((val) << A6XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__SHIFT) & A6XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__MASK;
3406 }
3407 #define A6XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__MASK	0x001f0000
3408 #define A6XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__SHIFT	16
3409 static inline uint32_t A6XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(enum adreno_rb_blend_factor val)
3410 {
3411 	return ((val) << A6XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__SHIFT) & A6XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__MASK;
3412 }
3413 #define A6XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK	0x00e00000
3414 #define A6XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT	21
3415 static inline uint32_t A6XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
3416 {
3417 	return ((val) << A6XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT) & A6XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK;
3418 }
3419 #define A6XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__MASK	0x1f000000
3420 #define A6XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__SHIFT	24
3421 static inline uint32_t A6XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(enum adreno_rb_blend_factor val)
3422 {
3423 	return ((val) << A6XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__SHIFT) & A6XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__MASK;
3424 }
3425 
3426 static inline uint32_t REG_A6XX_RB_MRT_BUF_INFO(uint32_t i0) { return 0x00008822 + 0x8*i0; }
3427 #define A6XX_RB_MRT_BUF_INFO_COLOR_FORMAT__MASK			0x000000ff
3428 #define A6XX_RB_MRT_BUF_INFO_COLOR_FORMAT__SHIFT		0
3429 static inline uint32_t A6XX_RB_MRT_BUF_INFO_COLOR_FORMAT(enum a6xx_color_fmt val)
3430 {
3431 	return ((val) << A6XX_RB_MRT_BUF_INFO_COLOR_FORMAT__SHIFT) & A6XX_RB_MRT_BUF_INFO_COLOR_FORMAT__MASK;
3432 }
3433 #define A6XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__MASK		0x00000300
3434 #define A6XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__SHIFT		8
3435 static inline uint32_t A6XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE(enum a6xx_tile_mode val)
3436 {
3437 	return ((val) << A6XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__SHIFT) & A6XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__MASK;
3438 }
3439 #define A6XX_RB_MRT_BUF_INFO_COLOR_SWAP__MASK			0x00006000
3440 #define A6XX_RB_MRT_BUF_INFO_COLOR_SWAP__SHIFT			13
3441 static inline uint32_t A6XX_RB_MRT_BUF_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3442 {
3443 	return ((val) << A6XX_RB_MRT_BUF_INFO_COLOR_SWAP__SHIFT) & A6XX_RB_MRT_BUF_INFO_COLOR_SWAP__MASK;
3444 }
3445 
3446 static inline uint32_t REG_A6XX_RB_MRT_PITCH(uint32_t i0) { return 0x00008823 + 0x8*i0; }
3447 #define A6XX_RB_MRT_PITCH__MASK					0xffffffff
3448 #define A6XX_RB_MRT_PITCH__SHIFT				0
3449 static inline uint32_t A6XX_RB_MRT_PITCH(uint32_t val)
3450 {
3451 	return ((val >> 6) << A6XX_RB_MRT_PITCH__SHIFT) & A6XX_RB_MRT_PITCH__MASK;
3452 }
3453 
3454 static inline uint32_t REG_A6XX_RB_MRT_ARRAY_PITCH(uint32_t i0) { return 0x00008824 + 0x8*i0; }
3455 #define A6XX_RB_MRT_ARRAY_PITCH__MASK				0xffffffff
3456 #define A6XX_RB_MRT_ARRAY_PITCH__SHIFT				0
3457 static inline uint32_t A6XX_RB_MRT_ARRAY_PITCH(uint32_t val)
3458 {
3459 	return ((val >> 6) << A6XX_RB_MRT_ARRAY_PITCH__SHIFT) & A6XX_RB_MRT_ARRAY_PITCH__MASK;
3460 }
3461 
3462 static inline uint32_t REG_A6XX_RB_MRT_BASE_LO(uint32_t i0) { return 0x00008825 + 0x8*i0; }
3463 
3464 static inline uint32_t REG_A6XX_RB_MRT_BASE_HI(uint32_t i0) { return 0x00008826 + 0x8*i0; }
3465 
3466 static inline uint32_t REG_A6XX_RB_MRT_BASE_GMEM(uint32_t i0) { return 0x00008827 + 0x8*i0; }
3467 
3468 #define REG_A6XX_RB_BLEND_RED_F32				0x00008860
3469 #define A6XX_RB_BLEND_RED_F32__MASK				0xffffffff
3470 #define A6XX_RB_BLEND_RED_F32__SHIFT				0
3471 static inline uint32_t A6XX_RB_BLEND_RED_F32(float val)
3472 {
3473 	return ((fui(val)) << A6XX_RB_BLEND_RED_F32__SHIFT) & A6XX_RB_BLEND_RED_F32__MASK;
3474 }
3475 
3476 #define REG_A6XX_RB_BLEND_GREEN_F32				0x00008861
3477 #define A6XX_RB_BLEND_GREEN_F32__MASK				0xffffffff
3478 #define A6XX_RB_BLEND_GREEN_F32__SHIFT				0
3479 static inline uint32_t A6XX_RB_BLEND_GREEN_F32(float val)
3480 {
3481 	return ((fui(val)) << A6XX_RB_BLEND_GREEN_F32__SHIFT) & A6XX_RB_BLEND_GREEN_F32__MASK;
3482 }
3483 
3484 #define REG_A6XX_RB_BLEND_BLUE_F32				0x00008862
3485 #define A6XX_RB_BLEND_BLUE_F32__MASK				0xffffffff
3486 #define A6XX_RB_BLEND_BLUE_F32__SHIFT				0
3487 static inline uint32_t A6XX_RB_BLEND_BLUE_F32(float val)
3488 {
3489 	return ((fui(val)) << A6XX_RB_BLEND_BLUE_F32__SHIFT) & A6XX_RB_BLEND_BLUE_F32__MASK;
3490 }
3491 
3492 #define REG_A6XX_RB_BLEND_ALPHA_F32				0x00008863
3493 #define A6XX_RB_BLEND_ALPHA_F32__MASK				0xffffffff
3494 #define A6XX_RB_BLEND_ALPHA_F32__SHIFT				0
3495 static inline uint32_t A6XX_RB_BLEND_ALPHA_F32(float val)
3496 {
3497 	return ((fui(val)) << A6XX_RB_BLEND_ALPHA_F32__SHIFT) & A6XX_RB_BLEND_ALPHA_F32__MASK;
3498 }
3499 
3500 #define REG_A6XX_RB_ALPHA_CONTROL				0x00008864
3501 #define A6XX_RB_ALPHA_CONTROL_ALPHA_REF__MASK			0x000000ff
3502 #define A6XX_RB_ALPHA_CONTROL_ALPHA_REF__SHIFT			0
3503 static inline uint32_t A6XX_RB_ALPHA_CONTROL_ALPHA_REF(uint32_t val)
3504 {
3505 	return ((val) << A6XX_RB_ALPHA_CONTROL_ALPHA_REF__SHIFT) & A6XX_RB_ALPHA_CONTROL_ALPHA_REF__MASK;
3506 }
3507 #define A6XX_RB_ALPHA_CONTROL_ALPHA_TEST			0x00000100
3508 #define A6XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__MASK		0x00000e00
3509 #define A6XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__SHIFT		9
3510 static inline uint32_t A6XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC(enum adreno_compare_func val)
3511 {
3512 	return ((val) << A6XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__SHIFT) & A6XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__MASK;
3513 }
3514 
3515 #define REG_A6XX_RB_BLEND_CNTL					0x00008865
3516 #define A6XX_RB_BLEND_CNTL_ENABLE_BLEND__MASK			0x000000ff
3517 #define A6XX_RB_BLEND_CNTL_ENABLE_BLEND__SHIFT			0
3518 static inline uint32_t A6XX_RB_BLEND_CNTL_ENABLE_BLEND(uint32_t val)
3519 {
3520 	return ((val) << A6XX_RB_BLEND_CNTL_ENABLE_BLEND__SHIFT) & A6XX_RB_BLEND_CNTL_ENABLE_BLEND__MASK;
3521 }
3522 #define A6XX_RB_BLEND_CNTL_INDEPENDENT_BLEND			0x00000100
3523 #define A6XX_RB_BLEND_CNTL_ALPHA_TO_COVERAGE			0x00000400
3524 #define A6XX_RB_BLEND_CNTL_SAMPLE_MASK__MASK			0xffff0000
3525 #define A6XX_RB_BLEND_CNTL_SAMPLE_MASK__SHIFT			16
3526 static inline uint32_t A6XX_RB_BLEND_CNTL_SAMPLE_MASK(uint32_t val)
3527 {
3528 	return ((val) << A6XX_RB_BLEND_CNTL_SAMPLE_MASK__SHIFT) & A6XX_RB_BLEND_CNTL_SAMPLE_MASK__MASK;
3529 }
3530 
3531 #define REG_A6XX_RB_DEPTH_PLANE_CNTL				0x00008870
3532 #define A6XX_RB_DEPTH_PLANE_CNTL_FRAG_WRITES_Z			0x00000001
3533 
3534 #define REG_A6XX_RB_DEPTH_CNTL					0x00008871
3535 #define A6XX_RB_DEPTH_CNTL_Z_ENABLE				0x00000001
3536 #define A6XX_RB_DEPTH_CNTL_Z_WRITE_ENABLE			0x00000002
3537 #define A6XX_RB_DEPTH_CNTL_ZFUNC__MASK				0x0000001c
3538 #define A6XX_RB_DEPTH_CNTL_ZFUNC__SHIFT				2
3539 static inline uint32_t A6XX_RB_DEPTH_CNTL_ZFUNC(enum adreno_compare_func val)
3540 {
3541 	return ((val) << A6XX_RB_DEPTH_CNTL_ZFUNC__SHIFT) & A6XX_RB_DEPTH_CNTL_ZFUNC__MASK;
3542 }
3543 #define A6XX_RB_DEPTH_CNTL_Z_TEST_ENABLE			0x00000040
3544 
3545 #define REG_A6XX_RB_DEPTH_BUFFER_INFO				0x00008872
3546 #define A6XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK		0x00000007
3547 #define A6XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT		0
3548 static inline uint32_t A6XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT(enum a6xx_depth_format val)
3549 {
3550 	return ((val) << A6XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT) & A6XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK;
3551 }
3552 
3553 #define REG_A6XX_RB_DEPTH_BUFFER_PITCH				0x00008873
3554 #define A6XX_RB_DEPTH_BUFFER_PITCH__MASK			0xffffffff
3555 #define A6XX_RB_DEPTH_BUFFER_PITCH__SHIFT			0
3556 static inline uint32_t A6XX_RB_DEPTH_BUFFER_PITCH(uint32_t val)
3557 {
3558 	return ((val >> 6) << A6XX_RB_DEPTH_BUFFER_PITCH__SHIFT) & A6XX_RB_DEPTH_BUFFER_PITCH__MASK;
3559 }
3560 
3561 #define REG_A6XX_RB_DEPTH_BUFFER_ARRAY_PITCH			0x00008874
3562 #define A6XX_RB_DEPTH_BUFFER_ARRAY_PITCH__MASK			0xffffffff
3563 #define A6XX_RB_DEPTH_BUFFER_ARRAY_PITCH__SHIFT			0
3564 static inline uint32_t A6XX_RB_DEPTH_BUFFER_ARRAY_PITCH(uint32_t val)
3565 {
3566 	return ((val >> 6) << A6XX_RB_DEPTH_BUFFER_ARRAY_PITCH__SHIFT) & A6XX_RB_DEPTH_BUFFER_ARRAY_PITCH__MASK;
3567 }
3568 
3569 #define REG_A6XX_RB_DEPTH_BUFFER_BASE_LO			0x00008875
3570 
3571 #define REG_A6XX_RB_DEPTH_BUFFER_BASE_HI			0x00008876
3572 
3573 #define REG_A6XX_RB_DEPTH_BUFFER_BASE_GMEM			0x00008877
3574 
3575 #define REG_A6XX_RB_UNKNOWN_8878				0x00008878
3576 
3577 #define REG_A6XX_RB_UNKNOWN_8879				0x00008879
3578 
3579 #define REG_A6XX_RB_STENCIL_CONTROL				0x00008880
3580 #define A6XX_RB_STENCIL_CONTROL_STENCIL_ENABLE			0x00000001
3581 #define A6XX_RB_STENCIL_CONTROL_STENCIL_ENABLE_BF		0x00000002
3582 #define A6XX_RB_STENCIL_CONTROL_STENCIL_READ			0x00000004
3583 #define A6XX_RB_STENCIL_CONTROL_FUNC__MASK			0x00000700
3584 #define A6XX_RB_STENCIL_CONTROL_FUNC__SHIFT			8
3585 static inline uint32_t A6XX_RB_STENCIL_CONTROL_FUNC(enum adreno_compare_func val)
3586 {
3587 	return ((val) << A6XX_RB_STENCIL_CONTROL_FUNC__SHIFT) & A6XX_RB_STENCIL_CONTROL_FUNC__MASK;
3588 }
3589 #define A6XX_RB_STENCIL_CONTROL_FAIL__MASK			0x00003800
3590 #define A6XX_RB_STENCIL_CONTROL_FAIL__SHIFT			11
3591 static inline uint32_t A6XX_RB_STENCIL_CONTROL_FAIL(enum adreno_stencil_op val)
3592 {
3593 	return ((val) << A6XX_RB_STENCIL_CONTROL_FAIL__SHIFT) & A6XX_RB_STENCIL_CONTROL_FAIL__MASK;
3594 }
3595 #define A6XX_RB_STENCIL_CONTROL_ZPASS__MASK			0x0001c000
3596 #define A6XX_RB_STENCIL_CONTROL_ZPASS__SHIFT			14
3597 static inline uint32_t A6XX_RB_STENCIL_CONTROL_ZPASS(enum adreno_stencil_op val)
3598 {
3599 	return ((val) << A6XX_RB_STENCIL_CONTROL_ZPASS__SHIFT) & A6XX_RB_STENCIL_CONTROL_ZPASS__MASK;
3600 }
3601 #define A6XX_RB_STENCIL_CONTROL_ZFAIL__MASK			0x000e0000
3602 #define A6XX_RB_STENCIL_CONTROL_ZFAIL__SHIFT			17
3603 static inline uint32_t A6XX_RB_STENCIL_CONTROL_ZFAIL(enum adreno_stencil_op val)
3604 {
3605 	return ((val) << A6XX_RB_STENCIL_CONTROL_ZFAIL__SHIFT) & A6XX_RB_STENCIL_CONTROL_ZFAIL__MASK;
3606 }
3607 #define A6XX_RB_STENCIL_CONTROL_FUNC_BF__MASK			0x00700000
3608 #define A6XX_RB_STENCIL_CONTROL_FUNC_BF__SHIFT			20
3609 static inline uint32_t A6XX_RB_STENCIL_CONTROL_FUNC_BF(enum adreno_compare_func val)
3610 {
3611 	return ((val) << A6XX_RB_STENCIL_CONTROL_FUNC_BF__SHIFT) & A6XX_RB_STENCIL_CONTROL_FUNC_BF__MASK;
3612 }
3613 #define A6XX_RB_STENCIL_CONTROL_FAIL_BF__MASK			0x03800000
3614 #define A6XX_RB_STENCIL_CONTROL_FAIL_BF__SHIFT			23
3615 static inline uint32_t A6XX_RB_STENCIL_CONTROL_FAIL_BF(enum adreno_stencil_op val)
3616 {
3617 	return ((val) << A6XX_RB_STENCIL_CONTROL_FAIL_BF__SHIFT) & A6XX_RB_STENCIL_CONTROL_FAIL_BF__MASK;
3618 }
3619 #define A6XX_RB_STENCIL_CONTROL_ZPASS_BF__MASK			0x1c000000
3620 #define A6XX_RB_STENCIL_CONTROL_ZPASS_BF__SHIFT			26
3621 static inline uint32_t A6XX_RB_STENCIL_CONTROL_ZPASS_BF(enum adreno_stencil_op val)
3622 {
3623 	return ((val) << A6XX_RB_STENCIL_CONTROL_ZPASS_BF__SHIFT) & A6XX_RB_STENCIL_CONTROL_ZPASS_BF__MASK;
3624 }
3625 #define A6XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK			0xe0000000
3626 #define A6XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT			29
3627 static inline uint32_t A6XX_RB_STENCIL_CONTROL_ZFAIL_BF(enum adreno_stencil_op val)
3628 {
3629 	return ((val) << A6XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT) & A6XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK;
3630 }
3631 
3632 #define REG_A6XX_RB_STENCIL_INFO				0x00008881
3633 #define A6XX_RB_STENCIL_INFO_SEPARATE_STENCIL			0x00000001
3634 
3635 #define REG_A6XX_RB_STENCIL_BUFFER_PITCH			0x00008882
3636 #define A6XX_RB_STENCIL_BUFFER_PITCH__MASK			0xffffffff
3637 #define A6XX_RB_STENCIL_BUFFER_PITCH__SHIFT			0
3638 static inline uint32_t A6XX_RB_STENCIL_BUFFER_PITCH(uint32_t val)
3639 {
3640 	return ((val >> 6) << A6XX_RB_STENCIL_BUFFER_PITCH__SHIFT) & A6XX_RB_STENCIL_BUFFER_PITCH__MASK;
3641 }
3642 
3643 #define REG_A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH			0x00008883
3644 #define A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH__MASK		0xffffffff
3645 #define A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH__SHIFT		0
3646 static inline uint32_t A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH(uint32_t val)
3647 {
3648 	return ((val >> 6) << A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH__SHIFT) & A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH__MASK;
3649 }
3650 
3651 #define REG_A6XX_RB_STENCIL_BUFFER_BASE_LO			0x00008884
3652 
3653 #define REG_A6XX_RB_STENCIL_BUFFER_BASE_HI			0x00008885
3654 
3655 #define REG_A6XX_RB_STENCIL_BUFFER_BASE_GMEM			0x00008886
3656 
3657 #define REG_A6XX_RB_STENCILREF					0x00008887
3658 #define A6XX_RB_STENCILREF_REF__MASK				0x000000ff
3659 #define A6XX_RB_STENCILREF_REF__SHIFT				0
3660 static inline uint32_t A6XX_RB_STENCILREF_REF(uint32_t val)
3661 {
3662 	return ((val) << A6XX_RB_STENCILREF_REF__SHIFT) & A6XX_RB_STENCILREF_REF__MASK;
3663 }
3664 #define A6XX_RB_STENCILREF_BFREF__MASK				0x0000ff00
3665 #define A6XX_RB_STENCILREF_BFREF__SHIFT				8
3666 static inline uint32_t A6XX_RB_STENCILREF_BFREF(uint32_t val)
3667 {
3668 	return ((val) << A6XX_RB_STENCILREF_BFREF__SHIFT) & A6XX_RB_STENCILREF_BFREF__MASK;
3669 }
3670 
3671 #define REG_A6XX_RB_STENCILMASK					0x00008888
3672 #define A6XX_RB_STENCILMASK_MASK__MASK				0x000000ff
3673 #define A6XX_RB_STENCILMASK_MASK__SHIFT				0
3674 static inline uint32_t A6XX_RB_STENCILMASK_MASK(uint32_t val)
3675 {
3676 	return ((val) << A6XX_RB_STENCILMASK_MASK__SHIFT) & A6XX_RB_STENCILMASK_MASK__MASK;
3677 }
3678 #define A6XX_RB_STENCILMASK_BFMASK__MASK			0x0000ff00
3679 #define A6XX_RB_STENCILMASK_BFMASK__SHIFT			8
3680 static inline uint32_t A6XX_RB_STENCILMASK_BFMASK(uint32_t val)
3681 {
3682 	return ((val) << A6XX_RB_STENCILMASK_BFMASK__SHIFT) & A6XX_RB_STENCILMASK_BFMASK__MASK;
3683 }
3684 
3685 #define REG_A6XX_RB_STENCILWRMASK				0x00008889
3686 #define A6XX_RB_STENCILWRMASK_WRMASK__MASK			0x000000ff
3687 #define A6XX_RB_STENCILWRMASK_WRMASK__SHIFT			0
3688 static inline uint32_t A6XX_RB_STENCILWRMASK_WRMASK(uint32_t val)
3689 {
3690 	return ((val) << A6XX_RB_STENCILWRMASK_WRMASK__SHIFT) & A6XX_RB_STENCILWRMASK_WRMASK__MASK;
3691 }
3692 #define A6XX_RB_STENCILWRMASK_BFWRMASK__MASK			0x0000ff00
3693 #define A6XX_RB_STENCILWRMASK_BFWRMASK__SHIFT			8
3694 static inline uint32_t A6XX_RB_STENCILWRMASK_BFWRMASK(uint32_t val)
3695 {
3696 	return ((val) << A6XX_RB_STENCILWRMASK_BFWRMASK__SHIFT) & A6XX_RB_STENCILWRMASK_BFWRMASK__MASK;
3697 }
3698 
3699 #define REG_A6XX_RB_WINDOW_OFFSET				0x00008890
3700 #define A6XX_RB_WINDOW_OFFSET_WINDOW_OFFSET_DISABLE		0x80000000
3701 #define A6XX_RB_WINDOW_OFFSET_X__MASK				0x00007fff
3702 #define A6XX_RB_WINDOW_OFFSET_X__SHIFT				0
3703 static inline uint32_t A6XX_RB_WINDOW_OFFSET_X(uint32_t val)
3704 {
3705 	return ((val) << A6XX_RB_WINDOW_OFFSET_X__SHIFT) & A6XX_RB_WINDOW_OFFSET_X__MASK;
3706 }
3707 #define A6XX_RB_WINDOW_OFFSET_Y__MASK				0x7fff0000
3708 #define A6XX_RB_WINDOW_OFFSET_Y__SHIFT				16
3709 static inline uint32_t A6XX_RB_WINDOW_OFFSET_Y(uint32_t val)
3710 {
3711 	return ((val) << A6XX_RB_WINDOW_OFFSET_Y__SHIFT) & A6XX_RB_WINDOW_OFFSET_Y__MASK;
3712 }
3713 
3714 #define REG_A6XX_RB_SAMPLE_COUNT_CONTROL			0x00008891
3715 #define A6XX_RB_SAMPLE_COUNT_CONTROL_COPY			0x00000002
3716 
3717 #define REG_A6XX_RB_LRZ_CNTL					0x00008898
3718 #define A6XX_RB_LRZ_CNTL_ENABLE					0x00000001
3719 
3720 #define REG_A6XX_RB_UNKNOWN_88D0				0x000088d0
3721 
3722 #define REG_A6XX_RB_BLIT_SCISSOR_TL				0x000088d1
3723 #define A6XX_RB_BLIT_SCISSOR_TL_WINDOW_OFFSET_DISABLE		0x80000000
3724 #define A6XX_RB_BLIT_SCISSOR_TL_X__MASK				0x00007fff
3725 #define A6XX_RB_BLIT_SCISSOR_TL_X__SHIFT			0
3726 static inline uint32_t A6XX_RB_BLIT_SCISSOR_TL_X(uint32_t val)
3727 {
3728 	return ((val) << A6XX_RB_BLIT_SCISSOR_TL_X__SHIFT) & A6XX_RB_BLIT_SCISSOR_TL_X__MASK;
3729 }
3730 #define A6XX_RB_BLIT_SCISSOR_TL_Y__MASK				0x7fff0000
3731 #define A6XX_RB_BLIT_SCISSOR_TL_Y__SHIFT			16
3732 static inline uint32_t A6XX_RB_BLIT_SCISSOR_TL_Y(uint32_t val)
3733 {
3734 	return ((val) << A6XX_RB_BLIT_SCISSOR_TL_Y__SHIFT) & A6XX_RB_BLIT_SCISSOR_TL_Y__MASK;
3735 }
3736 
3737 #define REG_A6XX_RB_BLIT_SCISSOR_BR				0x000088d2
3738 #define A6XX_RB_BLIT_SCISSOR_BR_WINDOW_OFFSET_DISABLE		0x80000000
3739 #define A6XX_RB_BLIT_SCISSOR_BR_X__MASK				0x00007fff
3740 #define A6XX_RB_BLIT_SCISSOR_BR_X__SHIFT			0
3741 static inline uint32_t A6XX_RB_BLIT_SCISSOR_BR_X(uint32_t val)
3742 {
3743 	return ((val) << A6XX_RB_BLIT_SCISSOR_BR_X__SHIFT) & A6XX_RB_BLIT_SCISSOR_BR_X__MASK;
3744 }
3745 #define A6XX_RB_BLIT_SCISSOR_BR_Y__MASK				0x7fff0000
3746 #define A6XX_RB_BLIT_SCISSOR_BR_Y__SHIFT			16
3747 static inline uint32_t A6XX_RB_BLIT_SCISSOR_BR_Y(uint32_t val)
3748 {
3749 	return ((val) << A6XX_RB_BLIT_SCISSOR_BR_Y__SHIFT) & A6XX_RB_BLIT_SCISSOR_BR_Y__MASK;
3750 }
3751 
3752 #define REG_A6XX_RB_MSAA_CNTL					0x000088d5
3753 #define A6XX_RB_MSAA_CNTL_SAMPLES__MASK				0x00000018
3754 #define A6XX_RB_MSAA_CNTL_SAMPLES__SHIFT			3
3755 static inline uint32_t A6XX_RB_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
3756 {
3757 	return ((val) << A6XX_RB_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_RB_MSAA_CNTL_SAMPLES__MASK;
3758 }
3759 
3760 #define REG_A6XX_RB_BLIT_BASE_GMEM				0x000088d6
3761 
3762 #define REG_A6XX_RB_BLIT_DST_INFO				0x000088d7
3763 #define A6XX_RB_BLIT_DST_INFO_TILE_MODE__MASK			0x00000003
3764 #define A6XX_RB_BLIT_DST_INFO_TILE_MODE__SHIFT			0
3765 static inline uint32_t A6XX_RB_BLIT_DST_INFO_TILE_MODE(enum a6xx_tile_mode val)
3766 {
3767 	return ((val) << A6XX_RB_BLIT_DST_INFO_TILE_MODE__SHIFT) & A6XX_RB_BLIT_DST_INFO_TILE_MODE__MASK;
3768 }
3769 #define A6XX_RB_BLIT_DST_INFO_FLAGS				0x00000004
3770 #define A6XX_RB_BLIT_DST_INFO_SAMPLES__MASK			0x00000018
3771 #define A6XX_RB_BLIT_DST_INFO_SAMPLES__SHIFT			3
3772 static inline uint32_t A6XX_RB_BLIT_DST_INFO_SAMPLES(enum a3xx_msaa_samples val)
3773 {
3774 	return ((val) << A6XX_RB_BLIT_DST_INFO_SAMPLES__SHIFT) & A6XX_RB_BLIT_DST_INFO_SAMPLES__MASK;
3775 }
3776 #define A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT__MASK		0x00007f80
3777 #define A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT__SHIFT		7
3778 static inline uint32_t A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT(enum a6xx_color_fmt val)
3779 {
3780 	return ((val) << A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT__SHIFT) & A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT__MASK;
3781 }
3782 #define A6XX_RB_BLIT_DST_INFO_COLOR_SWAP__MASK			0x00000060
3783 #define A6XX_RB_BLIT_DST_INFO_COLOR_SWAP__SHIFT			5
3784 static inline uint32_t A6XX_RB_BLIT_DST_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3785 {
3786 	return ((val) << A6XX_RB_BLIT_DST_INFO_COLOR_SWAP__SHIFT) & A6XX_RB_BLIT_DST_INFO_COLOR_SWAP__MASK;
3787 }
3788 
3789 #define REG_A6XX_RB_BLIT_DST_LO					0x000088d8
3790 
3791 #define REG_A6XX_RB_BLIT_DST_HI					0x000088d9
3792 
3793 #define REG_A6XX_RB_BLIT_DST_PITCH				0x000088da
3794 #define A6XX_RB_BLIT_DST_PITCH__MASK				0xffffffff
3795 #define A6XX_RB_BLIT_DST_PITCH__SHIFT				0
3796 static inline uint32_t A6XX_RB_BLIT_DST_PITCH(uint32_t val)
3797 {
3798 	return ((val >> 6) << A6XX_RB_BLIT_DST_PITCH__SHIFT) & A6XX_RB_BLIT_DST_PITCH__MASK;
3799 }
3800 
3801 #define REG_A6XX_RB_BLIT_DST_ARRAY_PITCH			0x000088db
3802 #define A6XX_RB_BLIT_DST_ARRAY_PITCH__MASK			0xffffffff
3803 #define A6XX_RB_BLIT_DST_ARRAY_PITCH__SHIFT			0
3804 static inline uint32_t A6XX_RB_BLIT_DST_ARRAY_PITCH(uint32_t val)
3805 {
3806 	return ((val >> 6) << A6XX_RB_BLIT_DST_ARRAY_PITCH__SHIFT) & A6XX_RB_BLIT_DST_ARRAY_PITCH__MASK;
3807 }
3808 
3809 #define REG_A6XX_RB_BLIT_FLAG_DST_LO				0x000088dc
3810 
3811 #define REG_A6XX_RB_BLIT_FLAG_DST_HI				0x000088dd
3812 
3813 #define REG_A6XX_RB_BLIT_CLEAR_COLOR_DW0			0x000088df
3814 
3815 #define REG_A6XX_RB_BLIT_CLEAR_COLOR_DW1			0x000088e0
3816 
3817 #define REG_A6XX_RB_BLIT_CLEAR_COLOR_DW2			0x000088e1
3818 
3819 #define REG_A6XX_RB_BLIT_CLEAR_COLOR_DW3			0x000088e2
3820 
3821 #define REG_A6XX_RB_BLIT_INFO					0x000088e3
3822 #define A6XX_RB_BLIT_INFO_UNK0					0x00000001
3823 #define A6XX_RB_BLIT_INFO_GMEM					0x00000002
3824 #define A6XX_RB_BLIT_INFO_INTEGER				0x00000004
3825 #define A6XX_RB_BLIT_INFO_DEPTH					0x00000008
3826 #define A6XX_RB_BLIT_INFO_CLEAR_MASK__MASK			0x000000f0
3827 #define A6XX_RB_BLIT_INFO_CLEAR_MASK__SHIFT			4
3828 static inline uint32_t A6XX_RB_BLIT_INFO_CLEAR_MASK(uint32_t val)
3829 {
3830 	return ((val) << A6XX_RB_BLIT_INFO_CLEAR_MASK__SHIFT) & A6XX_RB_BLIT_INFO_CLEAR_MASK__MASK;
3831 }
3832 
3833 #define REG_A6XX_RB_UNKNOWN_88F0				0x000088f0
3834 
3835 #define REG_A6XX_RB_DEPTH_FLAG_BUFFER_BASE_LO			0x00008900
3836 
3837 #define REG_A6XX_RB_DEPTH_FLAG_BUFFER_BASE_HI			0x00008901
3838 
3839 #define REG_A6XX_RB_DEPTH_FLAG_BUFFER_PITCH			0x00008902
3840 
3841 static inline uint32_t REG_A6XX_RB_MRT_FLAG_BUFFER(uint32_t i0) { return 0x00008903 + 0x3*i0; }
3842 
3843 static inline uint32_t REG_A6XX_RB_MRT_FLAG_BUFFER_ADDR_LO(uint32_t i0) { return 0x00008903 + 0x3*i0; }
3844 
3845 static inline uint32_t REG_A6XX_RB_MRT_FLAG_BUFFER_ADDR_HI(uint32_t i0) { return 0x00008904 + 0x3*i0; }
3846 
3847 static inline uint32_t REG_A6XX_RB_MRT_FLAG_BUFFER_PITCH(uint32_t i0) { return 0x00008905 + 0x3*i0; }
3848 #define A6XX_RB_MRT_FLAG_BUFFER_PITCH_PITCH__MASK		0x000007ff
3849 #define A6XX_RB_MRT_FLAG_BUFFER_PITCH_PITCH__SHIFT		0
3850 static inline uint32_t A6XX_RB_MRT_FLAG_BUFFER_PITCH_PITCH(uint32_t val)
3851 {
3852 	return ((val >> 5) << A6XX_RB_MRT_FLAG_BUFFER_PITCH_PITCH__SHIFT) & A6XX_RB_MRT_FLAG_BUFFER_PITCH_PITCH__MASK;
3853 }
3854 #define A6XX_RB_MRT_FLAG_BUFFER_PITCH_ARRAY_PITCH__MASK		0x003ff800
3855 #define A6XX_RB_MRT_FLAG_BUFFER_PITCH_ARRAY_PITCH__SHIFT	11
3856 static inline uint32_t A6XX_RB_MRT_FLAG_BUFFER_PITCH_ARRAY_PITCH(uint32_t val)
3857 {
3858 	return ((val >> 5) << A6XX_RB_MRT_FLAG_BUFFER_PITCH_ARRAY_PITCH__SHIFT) & A6XX_RB_MRT_FLAG_BUFFER_PITCH_ARRAY_PITCH__MASK;
3859 }
3860 
3861 #define REG_A6XX_RB_SAMPLE_COUNT_ADDR_LO			0x00008927
3862 
3863 #define REG_A6XX_RB_SAMPLE_COUNT_ADDR_HI			0x00008928
3864 
3865 #define REG_A6XX_RB_2D_BLIT_CNTL				0x00008c00
3866 #define A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT__MASK			0x0000ff00
3867 #define A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT__SHIFT		8
3868 static inline uint32_t A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT(enum a6xx_color_fmt val)
3869 {
3870 	return ((val) << A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT__SHIFT) & A6XX_RB_2D_BLIT_CNTL_COLOR_FORMAT__MASK;
3871 }
3872 #define A6XX_RB_2D_BLIT_CNTL_SCISSOR				0x00010000
3873 
3874 #define REG_A6XX_RB_UNKNOWN_8C01				0x00008c01
3875 
3876 #define REG_A6XX_RB_2D_DST_INFO					0x00008c17
3877 #define A6XX_RB_2D_DST_INFO_COLOR_FORMAT__MASK			0x000000ff
3878 #define A6XX_RB_2D_DST_INFO_COLOR_FORMAT__SHIFT			0
3879 static inline uint32_t A6XX_RB_2D_DST_INFO_COLOR_FORMAT(enum a6xx_color_fmt val)
3880 {
3881 	return ((val) << A6XX_RB_2D_DST_INFO_COLOR_FORMAT__SHIFT) & A6XX_RB_2D_DST_INFO_COLOR_FORMAT__MASK;
3882 }
3883 #define A6XX_RB_2D_DST_INFO_TILE_MODE__MASK			0x00000300
3884 #define A6XX_RB_2D_DST_INFO_TILE_MODE__SHIFT			8
3885 static inline uint32_t A6XX_RB_2D_DST_INFO_TILE_MODE(enum a6xx_tile_mode val)
3886 {
3887 	return ((val) << A6XX_RB_2D_DST_INFO_TILE_MODE__SHIFT) & A6XX_RB_2D_DST_INFO_TILE_MODE__MASK;
3888 }
3889 #define A6XX_RB_2D_DST_INFO_COLOR_SWAP__MASK			0x00000c00
3890 #define A6XX_RB_2D_DST_INFO_COLOR_SWAP__SHIFT			10
3891 static inline uint32_t A6XX_RB_2D_DST_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3892 {
3893 	return ((val) << A6XX_RB_2D_DST_INFO_COLOR_SWAP__SHIFT) & A6XX_RB_2D_DST_INFO_COLOR_SWAP__MASK;
3894 }
3895 #define A6XX_RB_2D_DST_INFO_FLAGS				0x00001000
3896 
3897 #define REG_A6XX_RB_2D_DST_LO					0x00008c18
3898 
3899 #define REG_A6XX_RB_2D_DST_HI					0x00008c19
3900 
3901 #define REG_A6XX_RB_2D_DST_SIZE					0x00008c1a
3902 #define A6XX_RB_2D_DST_SIZE_PITCH__MASK				0x0000ffff
3903 #define A6XX_RB_2D_DST_SIZE_PITCH__SHIFT			0
3904 static inline uint32_t A6XX_RB_2D_DST_SIZE_PITCH(uint32_t val)
3905 {
3906 	return ((val >> 6) << A6XX_RB_2D_DST_SIZE_PITCH__SHIFT) & A6XX_RB_2D_DST_SIZE_PITCH__MASK;
3907 }
3908 
3909 #define REG_A6XX_RB_2D_DST_FLAGS_LO				0x00008c20
3910 
3911 #define REG_A6XX_RB_2D_DST_FLAGS_HI				0x00008c21
3912 
3913 #define REG_A6XX_RB_2D_SRC_SOLID_C0				0x00008c2c
3914 
3915 #define REG_A6XX_RB_2D_SRC_SOLID_C1				0x00008c2d
3916 
3917 #define REG_A6XX_RB_2D_SRC_SOLID_C2				0x00008c2e
3918 
3919 #define REG_A6XX_RB_2D_SRC_SOLID_C3				0x00008c2f
3920 
3921 #define REG_A6XX_RB_UNKNOWN_8E01				0x00008e01
3922 
3923 #define REG_A6XX_RB_UNKNOWN_8E04				0x00008e04
3924 
3925 #define REG_A6XX_RB_CCU_CNTL					0x00008e07
3926 
3927 #define REG_A6XX_VPC_UNKNOWN_9101				0x00009101
3928 
3929 #define REG_A6XX_VPC_GS_SIV_CNTL				0x00009104
3930 
3931 #define REG_A6XX_VPC_UNKNOWN_9107				0x00009107
3932 
3933 #define REG_A6XX_VPC_UNKNOWN_9108				0x00009108
3934 
3935 static inline uint32_t REG_A6XX_VPC_VARYING_INTERP(uint32_t i0) { return 0x00009200 + 0x1*i0; }
3936 
3937 static inline uint32_t REG_A6XX_VPC_VARYING_INTERP_MODE(uint32_t i0) { return 0x00009200 + 0x1*i0; }
3938 
3939 static inline uint32_t REG_A6XX_VPC_VARYING_PS_REPL(uint32_t i0) { return 0x00009208 + 0x1*i0; }
3940 
3941 static inline uint32_t REG_A6XX_VPC_VARYING_PS_REPL_MODE(uint32_t i0) { return 0x00009208 + 0x1*i0; }
3942 
3943 #define REG_A6XX_VPC_UNKNOWN_9210				0x00009210
3944 
3945 #define REG_A6XX_VPC_UNKNOWN_9211				0x00009211
3946 
3947 static inline uint32_t REG_A6XX_VPC_VAR(uint32_t i0) { return 0x00009212 + 0x1*i0; }
3948 
3949 static inline uint32_t REG_A6XX_VPC_VAR_DISABLE(uint32_t i0) { return 0x00009212 + 0x1*i0; }
3950 
3951 #define REG_A6XX_VPC_SO_CNTL					0x00009216
3952 #define A6XX_VPC_SO_CNTL_ENABLE					0x00010000
3953 
3954 #define REG_A6XX_VPC_SO_PROG					0x00009217
3955 #define A6XX_VPC_SO_PROG_A_BUF__MASK				0x00000003
3956 #define A6XX_VPC_SO_PROG_A_BUF__SHIFT				0
3957 static inline uint32_t A6XX_VPC_SO_PROG_A_BUF(uint32_t val)
3958 {
3959 	return ((val) << A6XX_VPC_SO_PROG_A_BUF__SHIFT) & A6XX_VPC_SO_PROG_A_BUF__MASK;
3960 }
3961 #define A6XX_VPC_SO_PROG_A_OFF__MASK				0x000007fc
3962 #define A6XX_VPC_SO_PROG_A_OFF__SHIFT				2
3963 static inline uint32_t A6XX_VPC_SO_PROG_A_OFF(uint32_t val)
3964 {
3965 	return ((val >> 2) << A6XX_VPC_SO_PROG_A_OFF__SHIFT) & A6XX_VPC_SO_PROG_A_OFF__MASK;
3966 }
3967 #define A6XX_VPC_SO_PROG_A_EN					0x00000800
3968 #define A6XX_VPC_SO_PROG_B_BUF__MASK				0x00003000
3969 #define A6XX_VPC_SO_PROG_B_BUF__SHIFT				12
3970 static inline uint32_t A6XX_VPC_SO_PROG_B_BUF(uint32_t val)
3971 {
3972 	return ((val) << A6XX_VPC_SO_PROG_B_BUF__SHIFT) & A6XX_VPC_SO_PROG_B_BUF__MASK;
3973 }
3974 #define A6XX_VPC_SO_PROG_B_OFF__MASK				0x007fc000
3975 #define A6XX_VPC_SO_PROG_B_OFF__SHIFT				14
3976 static inline uint32_t A6XX_VPC_SO_PROG_B_OFF(uint32_t val)
3977 {
3978 	return ((val >> 2) << A6XX_VPC_SO_PROG_B_OFF__SHIFT) & A6XX_VPC_SO_PROG_B_OFF__MASK;
3979 }
3980 #define A6XX_VPC_SO_PROG_B_EN					0x00800000
3981 
3982 static inline uint32_t REG_A6XX_VPC_SO(uint32_t i0) { return 0x0000921a + 0x7*i0; }
3983 
3984 static inline uint32_t REG_A6XX_VPC_SO_BUFFER_BASE_LO(uint32_t i0) { return 0x0000921a + 0x7*i0; }
3985 
3986 static inline uint32_t REG_A6XX_VPC_SO_BUFFER_BASE_HI(uint32_t i0) { return 0x0000921b + 0x7*i0; }
3987 
3988 static inline uint32_t REG_A6XX_VPC_SO_BUFFER_SIZE(uint32_t i0) { return 0x0000921c + 0x7*i0; }
3989 
3990 static inline uint32_t REG_A6XX_VPC_SO_NCOMP(uint32_t i0) { return 0x0000921d + 0x7*i0; }
3991 
3992 static inline uint32_t REG_A6XX_VPC_SO_BUFFER_OFFSET(uint32_t i0) { return 0x0000921e + 0x7*i0; }
3993 
3994 static inline uint32_t REG_A6XX_VPC_SO_FLUSH_BASE_LO(uint32_t i0) { return 0x0000921f + 0x7*i0; }
3995 
3996 static inline uint32_t REG_A6XX_VPC_SO_FLUSH_BASE_HI(uint32_t i0) { return 0x00009220 + 0x7*i0; }
3997 
3998 #define REG_A6XX_VPC_UNKNOWN_9236				0x00009236
3999 
4000 #define REG_A6XX_VPC_UNKNOWN_9300				0x00009300
4001 
4002 #define REG_A6XX_VPC_PACK					0x00009301
4003 #define A6XX_VPC_PACK_STRIDE_IN_VPC__MASK			0x000000ff
4004 #define A6XX_VPC_PACK_STRIDE_IN_VPC__SHIFT			0
4005 static inline uint32_t A6XX_VPC_PACK_STRIDE_IN_VPC(uint32_t val)
4006 {
4007 	return ((val) << A6XX_VPC_PACK_STRIDE_IN_VPC__SHIFT) & A6XX_VPC_PACK_STRIDE_IN_VPC__MASK;
4008 }
4009 #define A6XX_VPC_PACK_NUMNONPOSVAR__MASK			0x0000ff00
4010 #define A6XX_VPC_PACK_NUMNONPOSVAR__SHIFT			8
4011 static inline uint32_t A6XX_VPC_PACK_NUMNONPOSVAR(uint32_t val)
4012 {
4013 	return ((val) << A6XX_VPC_PACK_NUMNONPOSVAR__SHIFT) & A6XX_VPC_PACK_NUMNONPOSVAR__MASK;
4014 }
4015 #define A6XX_VPC_PACK_PSIZELOC__MASK				0x00ff0000
4016 #define A6XX_VPC_PACK_PSIZELOC__SHIFT				16
4017 static inline uint32_t A6XX_VPC_PACK_PSIZELOC(uint32_t val)
4018 {
4019 	return ((val) << A6XX_VPC_PACK_PSIZELOC__SHIFT) & A6XX_VPC_PACK_PSIZELOC__MASK;
4020 }
4021 
4022 #define REG_A6XX_VPC_CNTL_0					0x00009304
4023 #define A6XX_VPC_CNTL_0_NUMNONPOSVAR__MASK			0x000000ff
4024 #define A6XX_VPC_CNTL_0_NUMNONPOSVAR__SHIFT			0
4025 static inline uint32_t A6XX_VPC_CNTL_0_NUMNONPOSVAR(uint32_t val)
4026 {
4027 	return ((val) << A6XX_VPC_CNTL_0_NUMNONPOSVAR__SHIFT) & A6XX_VPC_CNTL_0_NUMNONPOSVAR__MASK;
4028 }
4029 #define A6XX_VPC_CNTL_0_VARYING					0x00010000
4030 
4031 #define REG_A6XX_VPC_SO_BUF_CNTL				0x00009305
4032 #define A6XX_VPC_SO_BUF_CNTL_BUF0				0x00000001
4033 #define A6XX_VPC_SO_BUF_CNTL_BUF1				0x00000008
4034 #define A6XX_VPC_SO_BUF_CNTL_BUF2				0x00000040
4035 #define A6XX_VPC_SO_BUF_CNTL_BUF3				0x00000200
4036 #define A6XX_VPC_SO_BUF_CNTL_ENABLE				0x00008000
4037 
4038 #define REG_A6XX_VPC_SO_OVERRIDE				0x00009306
4039 #define A6XX_VPC_SO_OVERRIDE_SO_DISABLE				0x00000001
4040 
4041 #define REG_A6XX_VPC_UNKNOWN_9600				0x00009600
4042 
4043 #define REG_A6XX_VPC_UNKNOWN_9602				0x00009602
4044 
4045 #define REG_A6XX_PC_UNKNOWN_9801				0x00009801
4046 
4047 #define REG_A6XX_PC_RESTART_INDEX				0x00009803
4048 
4049 #define REG_A6XX_PC_MODE_CNTL					0x00009804
4050 
4051 #define REG_A6XX_PC_UNKNOWN_9805				0x00009805
4052 
4053 #define REG_A6XX_PC_UNKNOWN_9806				0x00009806
4054 
4055 #define REG_A6XX_PC_UNKNOWN_9980				0x00009980
4056 
4057 #define REG_A6XX_PC_UNKNOWN_9981				0x00009981
4058 
4059 #define REG_A6XX_PC_UNKNOWN_9990				0x00009990
4060 
4061 #define REG_A6XX_PC_PRIMITIVE_CNTL_0				0x00009b00
4062 #define A6XX_PC_PRIMITIVE_CNTL_0_PRIMITIVE_RESTART		0x00000001
4063 #define A6XX_PC_PRIMITIVE_CNTL_0_PROVOKING_VTX_LAST		0x00000002
4064 
4065 #define REG_A6XX_PC_PRIMITIVE_CNTL_1				0x00009b01
4066 #define A6XX_PC_PRIMITIVE_CNTL_1_STRIDE_IN_VPC__MASK		0x0000007f
4067 #define A6XX_PC_PRIMITIVE_CNTL_1_STRIDE_IN_VPC__SHIFT		0
4068 static inline uint32_t A6XX_PC_PRIMITIVE_CNTL_1_STRIDE_IN_VPC(uint32_t val)
4069 {
4070 	return ((val) << A6XX_PC_PRIMITIVE_CNTL_1_STRIDE_IN_VPC__SHIFT) & A6XX_PC_PRIMITIVE_CNTL_1_STRIDE_IN_VPC__MASK;
4071 }
4072 #define A6XX_PC_PRIMITIVE_CNTL_1_PSIZE				0x00000100
4073 
4074 #define REG_A6XX_PC_UNKNOWN_9B06				0x00009b06
4075 
4076 #define REG_A6XX_PC_UNKNOWN_9B07				0x00009b07
4077 
4078 #define REG_A6XX_PC_TESSFACTOR_ADDR_LO				0x00009e08
4079 
4080 #define REG_A6XX_PC_TESSFACTOR_ADDR_HI				0x00009e09
4081 
4082 #define REG_A6XX_PC_UNKNOWN_9E72				0x00009e72
4083 
4084 #define REG_A6XX_VFD_CONTROL_0					0x0000a000
4085 #define A6XX_VFD_CONTROL_0_VTXCNT__MASK				0x0000003f
4086 #define A6XX_VFD_CONTROL_0_VTXCNT__SHIFT			0
4087 static inline uint32_t A6XX_VFD_CONTROL_0_VTXCNT(uint32_t val)
4088 {
4089 	return ((val) << A6XX_VFD_CONTROL_0_VTXCNT__SHIFT) & A6XX_VFD_CONTROL_0_VTXCNT__MASK;
4090 }
4091 
4092 #define REG_A6XX_VFD_CONTROL_1					0x0000a001
4093 #define A6XX_VFD_CONTROL_1_REGID4VTX__MASK			0x000000ff
4094 #define A6XX_VFD_CONTROL_1_REGID4VTX__SHIFT			0
4095 static inline uint32_t A6XX_VFD_CONTROL_1_REGID4VTX(uint32_t val)
4096 {
4097 	return ((val) << A6XX_VFD_CONTROL_1_REGID4VTX__SHIFT) & A6XX_VFD_CONTROL_1_REGID4VTX__MASK;
4098 }
4099 #define A6XX_VFD_CONTROL_1_REGID4INST__MASK			0x0000ff00
4100 #define A6XX_VFD_CONTROL_1_REGID4INST__SHIFT			8
4101 static inline uint32_t A6XX_VFD_CONTROL_1_REGID4INST(uint32_t val)
4102 {
4103 	return ((val) << A6XX_VFD_CONTROL_1_REGID4INST__SHIFT) & A6XX_VFD_CONTROL_1_REGID4INST__MASK;
4104 }
4105 #define A6XX_VFD_CONTROL_1_REGID4PRIMID__MASK			0x00ff0000
4106 #define A6XX_VFD_CONTROL_1_REGID4PRIMID__SHIFT			16
4107 static inline uint32_t A6XX_VFD_CONTROL_1_REGID4PRIMID(uint32_t val)
4108 {
4109 	return ((val) << A6XX_VFD_CONTROL_1_REGID4PRIMID__SHIFT) & A6XX_VFD_CONTROL_1_REGID4PRIMID__MASK;
4110 }
4111 
4112 #define REG_A6XX_VFD_CONTROL_2					0x0000a002
4113 #define A6XX_VFD_CONTROL_2_REGID_PATCHID__MASK			0x000000ff
4114 #define A6XX_VFD_CONTROL_2_REGID_PATCHID__SHIFT			0
4115 static inline uint32_t A6XX_VFD_CONTROL_2_REGID_PATCHID(uint32_t val)
4116 {
4117 	return ((val) << A6XX_VFD_CONTROL_2_REGID_PATCHID__SHIFT) & A6XX_VFD_CONTROL_2_REGID_PATCHID__MASK;
4118 }
4119 
4120 #define REG_A6XX_VFD_CONTROL_3					0x0000a003
4121 #define A6XX_VFD_CONTROL_3_REGID_PATCHID__MASK			0x0000ff00
4122 #define A6XX_VFD_CONTROL_3_REGID_PATCHID__SHIFT			8
4123 static inline uint32_t A6XX_VFD_CONTROL_3_REGID_PATCHID(uint32_t val)
4124 {
4125 	return ((val) << A6XX_VFD_CONTROL_3_REGID_PATCHID__SHIFT) & A6XX_VFD_CONTROL_3_REGID_PATCHID__MASK;
4126 }
4127 #define A6XX_VFD_CONTROL_3_REGID_TESSX__MASK			0x00ff0000
4128 #define A6XX_VFD_CONTROL_3_REGID_TESSX__SHIFT			16
4129 static inline uint32_t A6XX_VFD_CONTROL_3_REGID_TESSX(uint32_t val)
4130 {
4131 	return ((val) << A6XX_VFD_CONTROL_3_REGID_TESSX__SHIFT) & A6XX_VFD_CONTROL_3_REGID_TESSX__MASK;
4132 }
4133 #define A6XX_VFD_CONTROL_3_REGID_TESSY__MASK			0xff000000
4134 #define A6XX_VFD_CONTROL_3_REGID_TESSY__SHIFT			24
4135 static inline uint32_t A6XX_VFD_CONTROL_3_REGID_TESSY(uint32_t val)
4136 {
4137 	return ((val) << A6XX_VFD_CONTROL_3_REGID_TESSY__SHIFT) & A6XX_VFD_CONTROL_3_REGID_TESSY__MASK;
4138 }
4139 
4140 #define REG_A6XX_VFD_CONTROL_4					0x0000a004
4141 
4142 #define REG_A6XX_VFD_CONTROL_5					0x0000a005
4143 
4144 #define REG_A6XX_VFD_CONTROL_6					0x0000a006
4145 
4146 #define REG_A6XX_VFD_MODE_CNTL					0x0000a007
4147 #define A6XX_VFD_MODE_CNTL_BINNING_PASS				0x00000001
4148 
4149 #define REG_A6XX_VFD_UNKNOWN_A008				0x0000a008
4150 
4151 #define REG_A6XX_VFD_UNKNOWN_A009				0x0000a009
4152 
4153 #define REG_A6XX_VFD_INDEX_OFFSET				0x0000a00e
4154 
4155 #define REG_A6XX_VFD_INSTANCE_START_OFFSET			0x0000a00f
4156 
4157 static inline uint32_t REG_A6XX_VFD_FETCH(uint32_t i0) { return 0x0000a010 + 0x4*i0; }
4158 
4159 static inline uint32_t REG_A6XX_VFD_FETCH_BASE_LO(uint32_t i0) { return 0x0000a010 + 0x4*i0; }
4160 
4161 static inline uint32_t REG_A6XX_VFD_FETCH_BASE_HI(uint32_t i0) { return 0x0000a011 + 0x4*i0; }
4162 
4163 static inline uint32_t REG_A6XX_VFD_FETCH_SIZE(uint32_t i0) { return 0x0000a012 + 0x4*i0; }
4164 
4165 static inline uint32_t REG_A6XX_VFD_FETCH_STRIDE(uint32_t i0) { return 0x0000a013 + 0x4*i0; }
4166 
4167 static inline uint32_t REG_A6XX_VFD_DECODE(uint32_t i0) { return 0x0000a090 + 0x2*i0; }
4168 
4169 static inline uint32_t REG_A6XX_VFD_DECODE_INSTR(uint32_t i0) { return 0x0000a090 + 0x2*i0; }
4170 #define A6XX_VFD_DECODE_INSTR_IDX__MASK				0x0000001f
4171 #define A6XX_VFD_DECODE_INSTR_IDX__SHIFT			0
4172 static inline uint32_t A6XX_VFD_DECODE_INSTR_IDX(uint32_t val)
4173 {
4174 	return ((val) << A6XX_VFD_DECODE_INSTR_IDX__SHIFT) & A6XX_VFD_DECODE_INSTR_IDX__MASK;
4175 }
4176 #define A6XX_VFD_DECODE_INSTR_INSTANCED				0x00020000
4177 #define A6XX_VFD_DECODE_INSTR_FORMAT__MASK			0x0ff00000
4178 #define A6XX_VFD_DECODE_INSTR_FORMAT__SHIFT			20
4179 static inline uint32_t A6XX_VFD_DECODE_INSTR_FORMAT(enum a6xx_vtx_fmt val)
4180 {
4181 	return ((val) << A6XX_VFD_DECODE_INSTR_FORMAT__SHIFT) & A6XX_VFD_DECODE_INSTR_FORMAT__MASK;
4182 }
4183 #define A6XX_VFD_DECODE_INSTR_SWAP__MASK			0x30000000
4184 #define A6XX_VFD_DECODE_INSTR_SWAP__SHIFT			28
4185 static inline uint32_t A6XX_VFD_DECODE_INSTR_SWAP(enum a3xx_color_swap val)
4186 {
4187 	return ((val) << A6XX_VFD_DECODE_INSTR_SWAP__SHIFT) & A6XX_VFD_DECODE_INSTR_SWAP__MASK;
4188 }
4189 #define A6XX_VFD_DECODE_INSTR_UNK30				0x40000000
4190 #define A6XX_VFD_DECODE_INSTR_FLOAT				0x80000000
4191 
4192 static inline uint32_t REG_A6XX_VFD_DECODE_STEP_RATE(uint32_t i0) { return 0x0000a091 + 0x2*i0; }
4193 
4194 static inline uint32_t REG_A6XX_VFD_DEST_CNTL(uint32_t i0) { return 0x0000a0d0 + 0x1*i0; }
4195 
4196 static inline uint32_t REG_A6XX_VFD_DEST_CNTL_INSTR(uint32_t i0) { return 0x0000a0d0 + 0x1*i0; }
4197 #define A6XX_VFD_DEST_CNTL_INSTR_WRITEMASK__MASK		0x0000000f
4198 #define A6XX_VFD_DEST_CNTL_INSTR_WRITEMASK__SHIFT		0
4199 static inline uint32_t A6XX_VFD_DEST_CNTL_INSTR_WRITEMASK(uint32_t val)
4200 {
4201 	return ((val) << A6XX_VFD_DEST_CNTL_INSTR_WRITEMASK__SHIFT) & A6XX_VFD_DEST_CNTL_INSTR_WRITEMASK__MASK;
4202 }
4203 #define A6XX_VFD_DEST_CNTL_INSTR_REGID__MASK			0x00000ff0
4204 #define A6XX_VFD_DEST_CNTL_INSTR_REGID__SHIFT			4
4205 static inline uint32_t A6XX_VFD_DEST_CNTL_INSTR_REGID(uint32_t val)
4206 {
4207 	return ((val) << A6XX_VFD_DEST_CNTL_INSTR_REGID__SHIFT) & A6XX_VFD_DEST_CNTL_INSTR_REGID__MASK;
4208 }
4209 
4210 #define REG_A6XX_SP_UNKNOWN_A0F8				0x0000a0f8
4211 
4212 #define REG_A6XX_SP_PRIMITIVE_CNTL				0x0000a802
4213 #define A6XX_SP_PRIMITIVE_CNTL_VSOUT__MASK			0x0000001f
4214 #define A6XX_SP_PRIMITIVE_CNTL_VSOUT__SHIFT			0
4215 static inline uint32_t A6XX_SP_PRIMITIVE_CNTL_VSOUT(uint32_t val)
4216 {
4217 	return ((val) << A6XX_SP_PRIMITIVE_CNTL_VSOUT__SHIFT) & A6XX_SP_PRIMITIVE_CNTL_VSOUT__MASK;
4218 }
4219 
4220 static inline uint32_t REG_A6XX_SP_VS_OUT(uint32_t i0) { return 0x0000a803 + 0x1*i0; }
4221 
4222 static inline uint32_t REG_A6XX_SP_VS_OUT_REG(uint32_t i0) { return 0x0000a803 + 0x1*i0; }
4223 #define A6XX_SP_VS_OUT_REG_A_REGID__MASK			0x000000ff
4224 #define A6XX_SP_VS_OUT_REG_A_REGID__SHIFT			0
4225 static inline uint32_t A6XX_SP_VS_OUT_REG_A_REGID(uint32_t val)
4226 {
4227 	return ((val) << A6XX_SP_VS_OUT_REG_A_REGID__SHIFT) & A6XX_SP_VS_OUT_REG_A_REGID__MASK;
4228 }
4229 #define A6XX_SP_VS_OUT_REG_A_COMPMASK__MASK			0x00000f00
4230 #define A6XX_SP_VS_OUT_REG_A_COMPMASK__SHIFT			8
4231 static inline uint32_t A6XX_SP_VS_OUT_REG_A_COMPMASK(uint32_t val)
4232 {
4233 	return ((val) << A6XX_SP_VS_OUT_REG_A_COMPMASK__SHIFT) & A6XX_SP_VS_OUT_REG_A_COMPMASK__MASK;
4234 }
4235 #define A6XX_SP_VS_OUT_REG_B_REGID__MASK			0x00ff0000
4236 #define A6XX_SP_VS_OUT_REG_B_REGID__SHIFT			16
4237 static inline uint32_t A6XX_SP_VS_OUT_REG_B_REGID(uint32_t val)
4238 {
4239 	return ((val) << A6XX_SP_VS_OUT_REG_B_REGID__SHIFT) & A6XX_SP_VS_OUT_REG_B_REGID__MASK;
4240 }
4241 #define A6XX_SP_VS_OUT_REG_B_COMPMASK__MASK			0x0f000000
4242 #define A6XX_SP_VS_OUT_REG_B_COMPMASK__SHIFT			24
4243 static inline uint32_t A6XX_SP_VS_OUT_REG_B_COMPMASK(uint32_t val)
4244 {
4245 	return ((val) << A6XX_SP_VS_OUT_REG_B_COMPMASK__SHIFT) & A6XX_SP_VS_OUT_REG_B_COMPMASK__MASK;
4246 }
4247 
4248 static inline uint32_t REG_A6XX_SP_VS_VPC_DST(uint32_t i0) { return 0x0000a813 + 0x1*i0; }
4249 
4250 static inline uint32_t REG_A6XX_SP_VS_VPC_DST_REG(uint32_t i0) { return 0x0000a813 + 0x1*i0; }
4251 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC0__MASK			0x000000ff
4252 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC0__SHIFT			0
4253 static inline uint32_t A6XX_SP_VS_VPC_DST_REG_OUTLOC0(uint32_t val)
4254 {
4255 	return ((val) << A6XX_SP_VS_VPC_DST_REG_OUTLOC0__SHIFT) & A6XX_SP_VS_VPC_DST_REG_OUTLOC0__MASK;
4256 }
4257 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC1__MASK			0x0000ff00
4258 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC1__SHIFT			8
4259 static inline uint32_t A6XX_SP_VS_VPC_DST_REG_OUTLOC1(uint32_t val)
4260 {
4261 	return ((val) << A6XX_SP_VS_VPC_DST_REG_OUTLOC1__SHIFT) & A6XX_SP_VS_VPC_DST_REG_OUTLOC1__MASK;
4262 }
4263 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC2__MASK			0x00ff0000
4264 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC2__SHIFT			16
4265 static inline uint32_t A6XX_SP_VS_VPC_DST_REG_OUTLOC2(uint32_t val)
4266 {
4267 	return ((val) << A6XX_SP_VS_VPC_DST_REG_OUTLOC2__SHIFT) & A6XX_SP_VS_VPC_DST_REG_OUTLOC2__MASK;
4268 }
4269 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC3__MASK			0xff000000
4270 #define A6XX_SP_VS_VPC_DST_REG_OUTLOC3__SHIFT			24
4271 static inline uint32_t A6XX_SP_VS_VPC_DST_REG_OUTLOC3(uint32_t val)
4272 {
4273 	return ((val) << A6XX_SP_VS_VPC_DST_REG_OUTLOC3__SHIFT) & A6XX_SP_VS_VPC_DST_REG_OUTLOC3__MASK;
4274 }
4275 
4276 #define REG_A6XX_SP_VS_CTRL_REG0				0x0000a800
4277 #define A6XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x0000007e
4278 #define A6XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		1
4279 static inline uint32_t A6XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
4280 {
4281 	return ((val) << A6XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A6XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
4282 }
4283 #define A6XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x00001f80
4284 #define A6XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		7
4285 static inline uint32_t A6XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
4286 {
4287 	return ((val) << A6XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A6XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
4288 }
4289 #define A6XX_SP_VS_CTRL_REG0_BRANCHSTACK__MASK			0x000fc000
4290 #define A6XX_SP_VS_CTRL_REG0_BRANCHSTACK__SHIFT			14
4291 static inline uint32_t A6XX_SP_VS_CTRL_REG0_BRANCHSTACK(uint32_t val)
4292 {
4293 	return ((val) << A6XX_SP_VS_CTRL_REG0_BRANCHSTACK__SHIFT) & A6XX_SP_VS_CTRL_REG0_BRANCHSTACK__MASK;
4294 }
4295 #define A6XX_SP_VS_CTRL_REG0_THREADSIZE__MASK			0x00100000
4296 #define A6XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT			20
4297 static inline uint32_t A6XX_SP_VS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
4298 {
4299 	return ((val) << A6XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT) & A6XX_SP_VS_CTRL_REG0_THREADSIZE__MASK;
4300 }
4301 #define A6XX_SP_VS_CTRL_REG0_VARYING				0x00400000
4302 #define A6XX_SP_VS_CTRL_REG0_PIXLODENABLE			0x04000000
4303 #define A6XX_SP_VS_CTRL_REG0_MERGEDREGS				0x80000000
4304 
4305 #define REG_A6XX_SP_UNKNOWN_A81B				0x0000a81b
4306 
4307 #define REG_A6XX_SP_VS_OBJ_START_LO				0x0000a81c
4308 
4309 #define REG_A6XX_SP_VS_OBJ_START_HI				0x0000a81d
4310 
4311 #define REG_A6XX_SP_VS_TEX_COUNT				0x0000a822
4312 
4313 #define REG_A6XX_SP_VS_CONFIG					0x0000a823
4314 #define A6XX_SP_VS_CONFIG_ENABLED				0x00000100
4315 #define A6XX_SP_VS_CONFIG_NTEX__MASK				0x0001fe00
4316 #define A6XX_SP_VS_CONFIG_NTEX__SHIFT				9
4317 static inline uint32_t A6XX_SP_VS_CONFIG_NTEX(uint32_t val)
4318 {
4319 	return ((val) << A6XX_SP_VS_CONFIG_NTEX__SHIFT) & A6XX_SP_VS_CONFIG_NTEX__MASK;
4320 }
4321 #define A6XX_SP_VS_CONFIG_NSAMP__MASK				0x01fe0000
4322 #define A6XX_SP_VS_CONFIG_NSAMP__SHIFT				17
4323 static inline uint32_t A6XX_SP_VS_CONFIG_NSAMP(uint32_t val)
4324 {
4325 	return ((val) << A6XX_SP_VS_CONFIG_NSAMP__SHIFT) & A6XX_SP_VS_CONFIG_NSAMP__MASK;
4326 }
4327 
4328 #define REG_A6XX_SP_VS_INSTRLEN					0x0000a824
4329 
4330 #define REG_A6XX_SP_HS_CTRL_REG0				0x0000a830
4331 #define A6XX_SP_HS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x0000007e
4332 #define A6XX_SP_HS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		1
4333 static inline uint32_t A6XX_SP_HS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
4334 {
4335 	return ((val) << A6XX_SP_HS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A6XX_SP_HS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
4336 }
4337 #define A6XX_SP_HS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x00001f80
4338 #define A6XX_SP_HS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		7
4339 static inline uint32_t A6XX_SP_HS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
4340 {
4341 	return ((val) << A6XX_SP_HS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A6XX_SP_HS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
4342 }
4343 #define A6XX_SP_HS_CTRL_REG0_BRANCHSTACK__MASK			0x000fc000
4344 #define A6XX_SP_HS_CTRL_REG0_BRANCHSTACK__SHIFT			14
4345 static inline uint32_t A6XX_SP_HS_CTRL_REG0_BRANCHSTACK(uint32_t val)
4346 {
4347 	return ((val) << A6XX_SP_HS_CTRL_REG0_BRANCHSTACK__SHIFT) & A6XX_SP_HS_CTRL_REG0_BRANCHSTACK__MASK;
4348 }
4349 #define A6XX_SP_HS_CTRL_REG0_THREADSIZE__MASK			0x00100000
4350 #define A6XX_SP_HS_CTRL_REG0_THREADSIZE__SHIFT			20
4351 static inline uint32_t A6XX_SP_HS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
4352 {
4353 	return ((val) << A6XX_SP_HS_CTRL_REG0_THREADSIZE__SHIFT) & A6XX_SP_HS_CTRL_REG0_THREADSIZE__MASK;
4354 }
4355 #define A6XX_SP_HS_CTRL_REG0_VARYING				0x00400000
4356 #define A6XX_SP_HS_CTRL_REG0_PIXLODENABLE			0x04000000
4357 #define A6XX_SP_HS_CTRL_REG0_MERGEDREGS				0x80000000
4358 
4359 #define REG_A6XX_SP_HS_UNKNOWN_A831				0x0000a831
4360 
4361 #define REG_A6XX_SP_HS_OBJ_START_LO				0x0000a834
4362 
4363 #define REG_A6XX_SP_HS_OBJ_START_HI				0x0000a835
4364 
4365 #define REG_A6XX_SP_HS_TEX_COUNT				0x0000a83a
4366 
4367 #define REG_A6XX_SP_HS_CONFIG					0x0000a83b
4368 #define A6XX_SP_HS_CONFIG_ENABLED				0x00000100
4369 #define A6XX_SP_HS_CONFIG_NTEX__MASK				0x0001fe00
4370 #define A6XX_SP_HS_CONFIG_NTEX__SHIFT				9
4371 static inline uint32_t A6XX_SP_HS_CONFIG_NTEX(uint32_t val)
4372 {
4373 	return ((val) << A6XX_SP_HS_CONFIG_NTEX__SHIFT) & A6XX_SP_HS_CONFIG_NTEX__MASK;
4374 }
4375 #define A6XX_SP_HS_CONFIG_NSAMP__MASK				0x01fe0000
4376 #define A6XX_SP_HS_CONFIG_NSAMP__SHIFT				17
4377 static inline uint32_t A6XX_SP_HS_CONFIG_NSAMP(uint32_t val)
4378 {
4379 	return ((val) << A6XX_SP_HS_CONFIG_NSAMP__SHIFT) & A6XX_SP_HS_CONFIG_NSAMP__MASK;
4380 }
4381 
4382 #define REG_A6XX_SP_HS_INSTRLEN					0x0000a83c
4383 
4384 #define REG_A6XX_SP_DS_CTRL_REG0				0x0000a840
4385 #define A6XX_SP_DS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x0000007e
4386 #define A6XX_SP_DS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		1
4387 static inline uint32_t A6XX_SP_DS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
4388 {
4389 	return ((val) << A6XX_SP_DS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A6XX_SP_DS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
4390 }
4391 #define A6XX_SP_DS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x00001f80
4392 #define A6XX_SP_DS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		7
4393 static inline uint32_t A6XX_SP_DS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
4394 {
4395 	return ((val) << A6XX_SP_DS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A6XX_SP_DS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
4396 }
4397 #define A6XX_SP_DS_CTRL_REG0_BRANCHSTACK__MASK			0x000fc000
4398 #define A6XX_SP_DS_CTRL_REG0_BRANCHSTACK__SHIFT			14
4399 static inline uint32_t A6XX_SP_DS_CTRL_REG0_BRANCHSTACK(uint32_t val)
4400 {
4401 	return ((val) << A6XX_SP_DS_CTRL_REG0_BRANCHSTACK__SHIFT) & A6XX_SP_DS_CTRL_REG0_BRANCHSTACK__MASK;
4402 }
4403 #define A6XX_SP_DS_CTRL_REG0_THREADSIZE__MASK			0x00100000
4404 #define A6XX_SP_DS_CTRL_REG0_THREADSIZE__SHIFT			20
4405 static inline uint32_t A6XX_SP_DS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
4406 {
4407 	return ((val) << A6XX_SP_DS_CTRL_REG0_THREADSIZE__SHIFT) & A6XX_SP_DS_CTRL_REG0_THREADSIZE__MASK;
4408 }
4409 #define A6XX_SP_DS_CTRL_REG0_VARYING				0x00400000
4410 #define A6XX_SP_DS_CTRL_REG0_PIXLODENABLE			0x04000000
4411 #define A6XX_SP_DS_CTRL_REG0_MERGEDREGS				0x80000000
4412 
4413 #define REG_A6XX_SP_DS_OBJ_START_LO				0x0000a85c
4414 
4415 #define REG_A6XX_SP_DS_OBJ_START_HI				0x0000a85d
4416 
4417 #define REG_A6XX_SP_DS_TEX_COUNT				0x0000a862
4418 
4419 #define REG_A6XX_SP_DS_CONFIG					0x0000a863
4420 #define A6XX_SP_DS_CONFIG_ENABLED				0x00000100
4421 #define A6XX_SP_DS_CONFIG_NTEX__MASK				0x0001fe00
4422 #define A6XX_SP_DS_CONFIG_NTEX__SHIFT				9
4423 static inline uint32_t A6XX_SP_DS_CONFIG_NTEX(uint32_t val)
4424 {
4425 	return ((val) << A6XX_SP_DS_CONFIG_NTEX__SHIFT) & A6XX_SP_DS_CONFIG_NTEX__MASK;
4426 }
4427 #define A6XX_SP_DS_CONFIG_NSAMP__MASK				0x01fe0000
4428 #define A6XX_SP_DS_CONFIG_NSAMP__SHIFT				17
4429 static inline uint32_t A6XX_SP_DS_CONFIG_NSAMP(uint32_t val)
4430 {
4431 	return ((val) << A6XX_SP_DS_CONFIG_NSAMP__SHIFT) & A6XX_SP_DS_CONFIG_NSAMP__MASK;
4432 }
4433 
4434 #define REG_A6XX_SP_DS_INSTRLEN					0x0000a864
4435 
4436 #define REG_A6XX_SP_GS_CTRL_REG0				0x0000a870
4437 #define A6XX_SP_GS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x0000007e
4438 #define A6XX_SP_GS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		1
4439 static inline uint32_t A6XX_SP_GS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
4440 {
4441 	return ((val) << A6XX_SP_GS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A6XX_SP_GS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
4442 }
4443 #define A6XX_SP_GS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x00001f80
4444 #define A6XX_SP_GS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		7
4445 static inline uint32_t A6XX_SP_GS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
4446 {
4447 	return ((val) << A6XX_SP_GS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A6XX_SP_GS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
4448 }
4449 #define A6XX_SP_GS_CTRL_REG0_BRANCHSTACK__MASK			0x000fc000
4450 #define A6XX_SP_GS_CTRL_REG0_BRANCHSTACK__SHIFT			14
4451 static inline uint32_t A6XX_SP_GS_CTRL_REG0_BRANCHSTACK(uint32_t val)
4452 {
4453 	return ((val) << A6XX_SP_GS_CTRL_REG0_BRANCHSTACK__SHIFT) & A6XX_SP_GS_CTRL_REG0_BRANCHSTACK__MASK;
4454 }
4455 #define A6XX_SP_GS_CTRL_REG0_THREADSIZE__MASK			0x00100000
4456 #define A6XX_SP_GS_CTRL_REG0_THREADSIZE__SHIFT			20
4457 static inline uint32_t A6XX_SP_GS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
4458 {
4459 	return ((val) << A6XX_SP_GS_CTRL_REG0_THREADSIZE__SHIFT) & A6XX_SP_GS_CTRL_REG0_THREADSIZE__MASK;
4460 }
4461 #define A6XX_SP_GS_CTRL_REG0_VARYING				0x00400000
4462 #define A6XX_SP_GS_CTRL_REG0_PIXLODENABLE			0x04000000
4463 #define A6XX_SP_GS_CTRL_REG0_MERGEDREGS				0x80000000
4464 
4465 #define REG_A6XX_SP_GS_UNKNOWN_A871				0x0000a871
4466 
4467 #define REG_A6XX_SP_GS_OBJ_START_LO				0x0000a88d
4468 
4469 #define REG_A6XX_SP_GS_OBJ_START_HI				0x0000a88e
4470 
4471 #define REG_A6XX_SP_GS_TEX_COUNT				0x0000a893
4472 
4473 #define REG_A6XX_SP_GS_CONFIG					0x0000a894
4474 #define A6XX_SP_GS_CONFIG_ENABLED				0x00000100
4475 #define A6XX_SP_GS_CONFIG_NTEX__MASK				0x0001fe00
4476 #define A6XX_SP_GS_CONFIG_NTEX__SHIFT				9
4477 static inline uint32_t A6XX_SP_GS_CONFIG_NTEX(uint32_t val)
4478 {
4479 	return ((val) << A6XX_SP_GS_CONFIG_NTEX__SHIFT) & A6XX_SP_GS_CONFIG_NTEX__MASK;
4480 }
4481 #define A6XX_SP_GS_CONFIG_NSAMP__MASK				0x01fe0000
4482 #define A6XX_SP_GS_CONFIG_NSAMP__SHIFT				17
4483 static inline uint32_t A6XX_SP_GS_CONFIG_NSAMP(uint32_t val)
4484 {
4485 	return ((val) << A6XX_SP_GS_CONFIG_NSAMP__SHIFT) & A6XX_SP_GS_CONFIG_NSAMP__MASK;
4486 }
4487 
4488 #define REG_A6XX_SP_GS_INSTRLEN					0x0000a895
4489 
4490 #define REG_A6XX_SP_VS_TEX_SAMP_LO				0x0000a8a0
4491 
4492 #define REG_A6XX_SP_VS_TEX_SAMP_HI				0x0000a8a1
4493 
4494 #define REG_A6XX_SP_HS_TEX_SAMP_LO				0x0000a8a2
4495 
4496 #define REG_A6XX_SP_HS_TEX_SAMP_HI				0x0000a8a3
4497 
4498 #define REG_A6XX_SP_DS_TEX_SAMP_LO				0x0000a8a4
4499 
4500 #define REG_A6XX_SP_DS_TEX_SAMP_HI				0x0000a8a5
4501 
4502 #define REG_A6XX_SP_GS_TEX_SAMP_LO				0x0000a8a6
4503 
4504 #define REG_A6XX_SP_GS_TEX_SAMP_HI				0x0000a8a7
4505 
4506 #define REG_A6XX_SP_VS_TEX_CONST_LO				0x0000a8a8
4507 
4508 #define REG_A6XX_SP_VS_TEX_CONST_HI				0x0000a8a9
4509 
4510 #define REG_A6XX_SP_HS_TEX_CONST_LO				0x0000a8aa
4511 
4512 #define REG_A6XX_SP_HS_TEX_CONST_HI				0x0000a8ab
4513 
4514 #define REG_A6XX_SP_DS_TEX_CONST_LO				0x0000a8ac
4515 
4516 #define REG_A6XX_SP_DS_TEX_CONST_HI				0x0000a8ad
4517 
4518 #define REG_A6XX_SP_GS_TEX_CONST_LO				0x0000a8ae
4519 
4520 #define REG_A6XX_SP_GS_TEX_CONST_HI				0x0000a8af
4521 
4522 #define REG_A6XX_SP_FS_CTRL_REG0				0x0000a980
4523 #define A6XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x0000007e
4524 #define A6XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		1
4525 static inline uint32_t A6XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
4526 {
4527 	return ((val) << A6XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A6XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
4528 }
4529 #define A6XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x00001f80
4530 #define A6XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		7
4531 static inline uint32_t A6XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
4532 {
4533 	return ((val) << A6XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A6XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
4534 }
4535 #define A6XX_SP_FS_CTRL_REG0_BRANCHSTACK__MASK			0x000fc000
4536 #define A6XX_SP_FS_CTRL_REG0_BRANCHSTACK__SHIFT			14
4537 static inline uint32_t A6XX_SP_FS_CTRL_REG0_BRANCHSTACK(uint32_t val)
4538 {
4539 	return ((val) << A6XX_SP_FS_CTRL_REG0_BRANCHSTACK__SHIFT) & A6XX_SP_FS_CTRL_REG0_BRANCHSTACK__MASK;
4540 }
4541 #define A6XX_SP_FS_CTRL_REG0_THREADSIZE__MASK			0x00100000
4542 #define A6XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT			20
4543 static inline uint32_t A6XX_SP_FS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
4544 {
4545 	return ((val) << A6XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT) & A6XX_SP_FS_CTRL_REG0_THREADSIZE__MASK;
4546 }
4547 #define A6XX_SP_FS_CTRL_REG0_VARYING				0x00400000
4548 #define A6XX_SP_FS_CTRL_REG0_PIXLODENABLE			0x04000000
4549 #define A6XX_SP_FS_CTRL_REG0_MERGEDREGS				0x80000000
4550 
4551 #define REG_A6XX_SP_UNKNOWN_A982				0x0000a982
4552 
4553 #define REG_A6XX_SP_FS_OBJ_START_LO				0x0000a983
4554 
4555 #define REG_A6XX_SP_FS_OBJ_START_HI				0x0000a984
4556 
4557 #define REG_A6XX_SP_BLEND_CNTL					0x0000a989
4558 #define A6XX_SP_BLEND_CNTL_ENABLED				0x00000001
4559 #define A6XX_SP_BLEND_CNTL_UNK8					0x00000100
4560 #define A6XX_SP_BLEND_CNTL_ALPHA_TO_COVERAGE			0x00000400
4561 
4562 #define REG_A6XX_SP_SRGB_CNTL					0x0000a98a
4563 #define A6XX_SP_SRGB_CNTL_SRGB_MRT0				0x00000001
4564 #define A6XX_SP_SRGB_CNTL_SRGB_MRT1				0x00000002
4565 #define A6XX_SP_SRGB_CNTL_SRGB_MRT2				0x00000004
4566 #define A6XX_SP_SRGB_CNTL_SRGB_MRT3				0x00000008
4567 #define A6XX_SP_SRGB_CNTL_SRGB_MRT4				0x00000010
4568 #define A6XX_SP_SRGB_CNTL_SRGB_MRT5				0x00000020
4569 #define A6XX_SP_SRGB_CNTL_SRGB_MRT6				0x00000040
4570 #define A6XX_SP_SRGB_CNTL_SRGB_MRT7				0x00000080
4571 
4572 #define REG_A6XX_SP_FS_RENDER_COMPONENTS			0x0000a98b
4573 #define A6XX_SP_FS_RENDER_COMPONENTS_RT0__MASK			0x0000000f
4574 #define A6XX_SP_FS_RENDER_COMPONENTS_RT0__SHIFT			0
4575 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT0(uint32_t val)
4576 {
4577 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT0__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT0__MASK;
4578 }
4579 #define A6XX_SP_FS_RENDER_COMPONENTS_RT1__MASK			0x000000f0
4580 #define A6XX_SP_FS_RENDER_COMPONENTS_RT1__SHIFT			4
4581 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT1(uint32_t val)
4582 {
4583 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT1__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT1__MASK;
4584 }
4585 #define A6XX_SP_FS_RENDER_COMPONENTS_RT2__MASK			0x00000f00
4586 #define A6XX_SP_FS_RENDER_COMPONENTS_RT2__SHIFT			8
4587 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT2(uint32_t val)
4588 {
4589 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT2__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT2__MASK;
4590 }
4591 #define A6XX_SP_FS_RENDER_COMPONENTS_RT3__MASK			0x0000f000
4592 #define A6XX_SP_FS_RENDER_COMPONENTS_RT3__SHIFT			12
4593 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT3(uint32_t val)
4594 {
4595 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT3__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT3__MASK;
4596 }
4597 #define A6XX_SP_FS_RENDER_COMPONENTS_RT4__MASK			0x000f0000
4598 #define A6XX_SP_FS_RENDER_COMPONENTS_RT4__SHIFT			16
4599 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT4(uint32_t val)
4600 {
4601 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT4__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT4__MASK;
4602 }
4603 #define A6XX_SP_FS_RENDER_COMPONENTS_RT5__MASK			0x00f00000
4604 #define A6XX_SP_FS_RENDER_COMPONENTS_RT5__SHIFT			20
4605 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT5(uint32_t val)
4606 {
4607 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT5__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT5__MASK;
4608 }
4609 #define A6XX_SP_FS_RENDER_COMPONENTS_RT6__MASK			0x0f000000
4610 #define A6XX_SP_FS_RENDER_COMPONENTS_RT6__SHIFT			24
4611 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT6(uint32_t val)
4612 {
4613 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT6__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT6__MASK;
4614 }
4615 #define A6XX_SP_FS_RENDER_COMPONENTS_RT7__MASK			0xf0000000
4616 #define A6XX_SP_FS_RENDER_COMPONENTS_RT7__SHIFT			28
4617 static inline uint32_t A6XX_SP_FS_RENDER_COMPONENTS_RT7(uint32_t val)
4618 {
4619 	return ((val) << A6XX_SP_FS_RENDER_COMPONENTS_RT7__SHIFT) & A6XX_SP_FS_RENDER_COMPONENTS_RT7__MASK;
4620 }
4621 
4622 #define REG_A6XX_SP_FS_OUTPUT_CNTL0				0x0000a98c
4623 #define A6XX_SP_FS_OUTPUT_CNTL0_DEPTH_REGID__MASK		0x0000ff00
4624 #define A6XX_SP_FS_OUTPUT_CNTL0_DEPTH_REGID__SHIFT		8
4625 static inline uint32_t A6XX_SP_FS_OUTPUT_CNTL0_DEPTH_REGID(uint32_t val)
4626 {
4627 	return ((val) << A6XX_SP_FS_OUTPUT_CNTL0_DEPTH_REGID__SHIFT) & A6XX_SP_FS_OUTPUT_CNTL0_DEPTH_REGID__MASK;
4628 }
4629 
4630 #define REG_A6XX_SP_FS_OUTPUT_CNTL1				0x0000a98d
4631 #define A6XX_SP_FS_OUTPUT_CNTL1_MRT__MASK			0x0000000f
4632 #define A6XX_SP_FS_OUTPUT_CNTL1_MRT__SHIFT			0
4633 static inline uint32_t A6XX_SP_FS_OUTPUT_CNTL1_MRT(uint32_t val)
4634 {
4635 	return ((val) << A6XX_SP_FS_OUTPUT_CNTL1_MRT__SHIFT) & A6XX_SP_FS_OUTPUT_CNTL1_MRT__MASK;
4636 }
4637 
4638 static inline uint32_t REG_A6XX_SP_FS_MRT(uint32_t i0) { return 0x0000a996 + 0x1*i0; }
4639 
4640 static inline uint32_t REG_A6XX_SP_FS_MRT_REG(uint32_t i0) { return 0x0000a996 + 0x1*i0; }
4641 #define A6XX_SP_FS_MRT_REG_COLOR_FORMAT__MASK			0x000000ff
4642 #define A6XX_SP_FS_MRT_REG_COLOR_FORMAT__SHIFT			0
4643 static inline uint32_t A6XX_SP_FS_MRT_REG_COLOR_FORMAT(enum a6xx_color_fmt val)
4644 {
4645 	return ((val) << A6XX_SP_FS_MRT_REG_COLOR_FORMAT__SHIFT) & A6XX_SP_FS_MRT_REG_COLOR_FORMAT__MASK;
4646 }
4647 #define A6XX_SP_FS_MRT_REG_COLOR_SINT				0x00000100
4648 #define A6XX_SP_FS_MRT_REG_COLOR_UINT				0x00000200
4649 
4650 #define REG_A6XX_SP_UNKNOWN_A99E				0x0000a99e
4651 
4652 #define REG_A6XX_SP_FS_TEX_COUNT				0x0000a9a7
4653 
4654 #define REG_A6XX_SP_UNKNOWN_A9A8				0x0000a9a8
4655 
4656 #define REG_A6XX_SP_FS_TEX_SAMP_LO				0x0000a9e0
4657 
4658 #define REG_A6XX_SP_FS_TEX_SAMP_HI				0x0000a9e1
4659 
4660 #define REG_A6XX_SP_CS_TEX_SAMP_LO				0x0000a9e2
4661 
4662 #define REG_A6XX_SP_CS_TEX_SAMP_HI				0x0000a9e3
4663 
4664 #define REG_A6XX_SP_FS_TEX_CONST_LO				0x0000a9e4
4665 
4666 #define REG_A6XX_SP_FS_TEX_CONST_HI				0x0000a9e5
4667 
4668 #define REG_A6XX_SP_CS_TEX_CONST_LO				0x0000a9e6
4669 
4670 #define REG_A6XX_SP_CS_TEX_CONST_HI				0x0000a9e7
4671 
4672 static inline uint32_t REG_A6XX_SP_FS_OUTPUT(uint32_t i0) { return 0x0000a98e + 0x1*i0; }
4673 
4674 static inline uint32_t REG_A6XX_SP_FS_OUTPUT_REG(uint32_t i0) { return 0x0000a98e + 0x1*i0; }
4675 #define A6XX_SP_FS_OUTPUT_REG_REGID__MASK			0x000000ff
4676 #define A6XX_SP_FS_OUTPUT_REG_REGID__SHIFT			0
4677 static inline uint32_t A6XX_SP_FS_OUTPUT_REG_REGID(uint32_t val)
4678 {
4679 	return ((val) << A6XX_SP_FS_OUTPUT_REG_REGID__SHIFT) & A6XX_SP_FS_OUTPUT_REG_REGID__MASK;
4680 }
4681 #define A6XX_SP_FS_OUTPUT_REG_HALF_PRECISION			0x00000100
4682 
4683 #define REG_A6XX_SP_CS_CTRL_REG0				0x0000a9b0
4684 #define A6XX_SP_CS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x0000007e
4685 #define A6XX_SP_CS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		1
4686 static inline uint32_t A6XX_SP_CS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
4687 {
4688 	return ((val) << A6XX_SP_CS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A6XX_SP_CS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
4689 }
4690 #define A6XX_SP_CS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x00001f80
4691 #define A6XX_SP_CS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		7
4692 static inline uint32_t A6XX_SP_CS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
4693 {
4694 	return ((val) << A6XX_SP_CS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A6XX_SP_CS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
4695 }
4696 #define A6XX_SP_CS_CTRL_REG0_BRANCHSTACK__MASK			0x000fc000
4697 #define A6XX_SP_CS_CTRL_REG0_BRANCHSTACK__SHIFT			14
4698 static inline uint32_t A6XX_SP_CS_CTRL_REG0_BRANCHSTACK(uint32_t val)
4699 {
4700 	return ((val) << A6XX_SP_CS_CTRL_REG0_BRANCHSTACK__SHIFT) & A6XX_SP_CS_CTRL_REG0_BRANCHSTACK__MASK;
4701 }
4702 #define A6XX_SP_CS_CTRL_REG0_THREADSIZE__MASK			0x00100000
4703 #define A6XX_SP_CS_CTRL_REG0_THREADSIZE__SHIFT			20
4704 static inline uint32_t A6XX_SP_CS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
4705 {
4706 	return ((val) << A6XX_SP_CS_CTRL_REG0_THREADSIZE__SHIFT) & A6XX_SP_CS_CTRL_REG0_THREADSIZE__MASK;
4707 }
4708 #define A6XX_SP_CS_CTRL_REG0_VARYING				0x00400000
4709 #define A6XX_SP_CS_CTRL_REG0_PIXLODENABLE			0x04000000
4710 #define A6XX_SP_CS_CTRL_REG0_MERGEDREGS				0x80000000
4711 
4712 #define REG_A6XX_SP_CS_OBJ_START_LO				0x0000a9b4
4713 
4714 #define REG_A6XX_SP_CS_OBJ_START_HI				0x0000a9b5
4715 
4716 #define REG_A6XX_SP_CS_INSTRLEN					0x0000a9bc
4717 
4718 #define REG_A6XX_SP_UNKNOWN_AB00				0x0000ab00
4719 
4720 #define REG_A6XX_SP_FS_CONFIG					0x0000ab04
4721 #define A6XX_SP_FS_CONFIG_ENABLED				0x00000100
4722 #define A6XX_SP_FS_CONFIG_NTEX__MASK				0x0001fe00
4723 #define A6XX_SP_FS_CONFIG_NTEX__SHIFT				9
4724 static inline uint32_t A6XX_SP_FS_CONFIG_NTEX(uint32_t val)
4725 {
4726 	return ((val) << A6XX_SP_FS_CONFIG_NTEX__SHIFT) & A6XX_SP_FS_CONFIG_NTEX__MASK;
4727 }
4728 #define A6XX_SP_FS_CONFIG_NSAMP__MASK				0x01fe0000
4729 #define A6XX_SP_FS_CONFIG_NSAMP__SHIFT				17
4730 static inline uint32_t A6XX_SP_FS_CONFIG_NSAMP(uint32_t val)
4731 {
4732 	return ((val) << A6XX_SP_FS_CONFIG_NSAMP__SHIFT) & A6XX_SP_FS_CONFIG_NSAMP__MASK;
4733 }
4734 
4735 #define REG_A6XX_SP_FS_INSTRLEN					0x0000ab05
4736 
4737 #define REG_A6XX_SP_UNKNOWN_AB20				0x0000ab20
4738 
4739 #define REG_A6XX_SP_UNKNOWN_ACC0				0x0000acc0
4740 
4741 #define REG_A6XX_SP_UNKNOWN_AE00				0x0000ae00
4742 
4743 #define REG_A6XX_SP_UNKNOWN_AE03				0x0000ae03
4744 
4745 #define REG_A6XX_SP_UNKNOWN_AE04				0x0000ae04
4746 
4747 #define REG_A6XX_SP_UNKNOWN_AE0F				0x0000ae0f
4748 
4749 #define REG_A6XX_SP_UNKNOWN_B182				0x0000b182
4750 
4751 #define REG_A6XX_SP_UNKNOWN_B183				0x0000b183
4752 
4753 #define REG_A6XX_SP_TP_RAS_MSAA_CNTL				0x0000b300
4754 #define A6XX_SP_TP_RAS_MSAA_CNTL_SAMPLES__MASK			0x00000003
4755 #define A6XX_SP_TP_RAS_MSAA_CNTL_SAMPLES__SHIFT			0
4756 static inline uint32_t A6XX_SP_TP_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
4757 {
4758 	return ((val) << A6XX_SP_TP_RAS_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_SP_TP_RAS_MSAA_CNTL_SAMPLES__MASK;
4759 }
4760 
4761 #define REG_A6XX_SP_TP_DEST_MSAA_CNTL				0x0000b301
4762 #define A6XX_SP_TP_DEST_MSAA_CNTL_SAMPLES__MASK			0x00000003
4763 #define A6XX_SP_TP_DEST_MSAA_CNTL_SAMPLES__SHIFT		0
4764 static inline uint32_t A6XX_SP_TP_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
4765 {
4766 	return ((val) << A6XX_SP_TP_DEST_MSAA_CNTL_SAMPLES__SHIFT) & A6XX_SP_TP_DEST_MSAA_CNTL_SAMPLES__MASK;
4767 }
4768 #define A6XX_SP_TP_DEST_MSAA_CNTL_MSAA_DISABLE			0x00000004
4769 
4770 #define REG_A6XX_SP_TP_BORDER_COLOR_BASE_ADDR_LO		0x0000b302
4771 
4772 #define REG_A6XX_SP_TP_BORDER_COLOR_BASE_ADDR_HI		0x0000b303
4773 
4774 #define REG_A6XX_SP_TP_UNKNOWN_B304				0x0000b304
4775 
4776 #define REG_A6XX_SP_TP_UNKNOWN_B309				0x0000b309
4777 
4778 #define REG_A6XX_SP_PS_2D_SRC_INFO				0x0000b4c0
4779 #define A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT__MASK		0x000000ff
4780 #define A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT__SHIFT		0
4781 static inline uint32_t A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT(enum a6xx_color_fmt val)
4782 {
4783 	return ((val) << A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT__SHIFT) & A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT__MASK;
4784 }
4785 #define A6XX_SP_PS_2D_SRC_INFO_TILE_MODE__MASK			0x00000300
4786 #define A6XX_SP_PS_2D_SRC_INFO_TILE_MODE__SHIFT			8
4787 static inline uint32_t A6XX_SP_PS_2D_SRC_INFO_TILE_MODE(enum a6xx_tile_mode val)
4788 {
4789 	return ((val) << A6XX_SP_PS_2D_SRC_INFO_TILE_MODE__SHIFT) & A6XX_SP_PS_2D_SRC_INFO_TILE_MODE__MASK;
4790 }
4791 #define A6XX_SP_PS_2D_SRC_INFO_COLOR_SWAP__MASK			0x00000c00
4792 #define A6XX_SP_PS_2D_SRC_INFO_COLOR_SWAP__SHIFT		10
4793 static inline uint32_t A6XX_SP_PS_2D_SRC_INFO_COLOR_SWAP(enum a3xx_color_swap val)
4794 {
4795 	return ((val) << A6XX_SP_PS_2D_SRC_INFO_COLOR_SWAP__SHIFT) & A6XX_SP_PS_2D_SRC_INFO_COLOR_SWAP__MASK;
4796 }
4797 #define A6XX_SP_PS_2D_SRC_INFO_FLAGS				0x00001000
4798 #define A6XX_SP_PS_2D_SRC_INFO_FILTER				0x00010000
4799 
4800 #define REG_A6XX_SP_PS_2D_SRC_SIZE				0x0000b4c1
4801 #define A6XX_SP_PS_2D_SRC_SIZE_WIDTH__MASK			0x00007fff
4802 #define A6XX_SP_PS_2D_SRC_SIZE_WIDTH__SHIFT			0
4803 static inline uint32_t A6XX_SP_PS_2D_SRC_SIZE_WIDTH(uint32_t val)
4804 {
4805 	return ((val) << A6XX_SP_PS_2D_SRC_SIZE_WIDTH__SHIFT) & A6XX_SP_PS_2D_SRC_SIZE_WIDTH__MASK;
4806 }
4807 #define A6XX_SP_PS_2D_SRC_SIZE_HEIGHT__MASK			0x3fff8000
4808 #define A6XX_SP_PS_2D_SRC_SIZE_HEIGHT__SHIFT			15
4809 static inline uint32_t A6XX_SP_PS_2D_SRC_SIZE_HEIGHT(uint32_t val)
4810 {
4811 	return ((val) << A6XX_SP_PS_2D_SRC_SIZE_HEIGHT__SHIFT) & A6XX_SP_PS_2D_SRC_SIZE_HEIGHT__MASK;
4812 }
4813 
4814 #define REG_A6XX_SP_PS_2D_SRC_LO				0x0000b4c2
4815 
4816 #define REG_A6XX_SP_PS_2D_SRC_HI				0x0000b4c3
4817 
4818 #define REG_A6XX_SP_PS_2D_SRC_PITCH				0x0000b4c4
4819 #define A6XX_SP_PS_2D_SRC_PITCH_PITCH__MASK			0x01fffe00
4820 #define A6XX_SP_PS_2D_SRC_PITCH_PITCH__SHIFT			9
4821 static inline uint32_t A6XX_SP_PS_2D_SRC_PITCH_PITCH(uint32_t val)
4822 {
4823 	return ((val >> 6) << A6XX_SP_PS_2D_SRC_PITCH_PITCH__SHIFT) & A6XX_SP_PS_2D_SRC_PITCH_PITCH__MASK;
4824 }
4825 
4826 #define REG_A6XX_SP_PS_2D_SRC_FLAGS_LO				0x0000b4ca
4827 
4828 #define REG_A6XX_SP_PS_2D_SRC_FLAGS_HI				0x0000b4cb
4829 
4830 #define REG_A6XX_SP_UNKNOWN_B600				0x0000b600
4831 
4832 #define REG_A6XX_SP_UNKNOWN_B605				0x0000b605
4833 
4834 #define REG_A6XX_HLSQ_VS_CNTL					0x0000b800
4835 #define A6XX_HLSQ_VS_CNTL_CONSTLEN__MASK			0x000000ff
4836 #define A6XX_HLSQ_VS_CNTL_CONSTLEN__SHIFT			0
4837 static inline uint32_t A6XX_HLSQ_VS_CNTL_CONSTLEN(uint32_t val)
4838 {
4839 	return ((val >> 2) << A6XX_HLSQ_VS_CNTL_CONSTLEN__SHIFT) & A6XX_HLSQ_VS_CNTL_CONSTLEN__MASK;
4840 }
4841 
4842 #define REG_A6XX_HLSQ_HS_CNTL					0x0000b801
4843 #define A6XX_HLSQ_HS_CNTL_CONSTLEN__MASK			0x000000ff
4844 #define A6XX_HLSQ_HS_CNTL_CONSTLEN__SHIFT			0
4845 static inline uint32_t A6XX_HLSQ_HS_CNTL_CONSTLEN(uint32_t val)
4846 {
4847 	return ((val >> 2) << A6XX_HLSQ_HS_CNTL_CONSTLEN__SHIFT) & A6XX_HLSQ_HS_CNTL_CONSTLEN__MASK;
4848 }
4849 
4850 #define REG_A6XX_HLSQ_DS_CNTL					0x0000b802
4851 #define A6XX_HLSQ_DS_CNTL_CONSTLEN__MASK			0x000000ff
4852 #define A6XX_HLSQ_DS_CNTL_CONSTLEN__SHIFT			0
4853 static inline uint32_t A6XX_HLSQ_DS_CNTL_CONSTLEN(uint32_t val)
4854 {
4855 	return ((val >> 2) << A6XX_HLSQ_DS_CNTL_CONSTLEN__SHIFT) & A6XX_HLSQ_DS_CNTL_CONSTLEN__MASK;
4856 }
4857 
4858 #define REG_A6XX_HLSQ_GS_CNTL					0x0000b803
4859 #define A6XX_HLSQ_GS_CNTL_CONSTLEN__MASK			0x000000ff
4860 #define A6XX_HLSQ_GS_CNTL_CONSTLEN__SHIFT			0
4861 static inline uint32_t A6XX_HLSQ_GS_CNTL_CONSTLEN(uint32_t val)
4862 {
4863 	return ((val >> 2) << A6XX_HLSQ_GS_CNTL_CONSTLEN__SHIFT) & A6XX_HLSQ_GS_CNTL_CONSTLEN__MASK;
4864 }
4865 
4866 #define REG_A6XX_HLSQ_UNKNOWN_B980				0x0000b980
4867 
4868 #define REG_A6XX_HLSQ_CONTROL_1_REG				0x0000b982
4869 
4870 #define REG_A6XX_HLSQ_CONTROL_2_REG				0x0000b983
4871 #define A6XX_HLSQ_CONTROL_2_REG_FACEREGID__MASK			0x000000ff
4872 #define A6XX_HLSQ_CONTROL_2_REG_FACEREGID__SHIFT		0
4873 static inline uint32_t A6XX_HLSQ_CONTROL_2_REG_FACEREGID(uint32_t val)
4874 {
4875 	return ((val) << A6XX_HLSQ_CONTROL_2_REG_FACEREGID__SHIFT) & A6XX_HLSQ_CONTROL_2_REG_FACEREGID__MASK;
4876 }
4877 #define A6XX_HLSQ_CONTROL_2_REG_SAMPLEID__MASK			0x0000ff00
4878 #define A6XX_HLSQ_CONTROL_2_REG_SAMPLEID__SHIFT			8
4879 static inline uint32_t A6XX_HLSQ_CONTROL_2_REG_SAMPLEID(uint32_t val)
4880 {
4881 	return ((val) << A6XX_HLSQ_CONTROL_2_REG_SAMPLEID__SHIFT) & A6XX_HLSQ_CONTROL_2_REG_SAMPLEID__MASK;
4882 }
4883 #define A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__MASK		0x00ff0000
4884 #define A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__SHIFT		16
4885 static inline uint32_t A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK(uint32_t val)
4886 {
4887 	return ((val) << A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__SHIFT) & A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK__MASK;
4888 }
4889 
4890 #define REG_A6XX_HLSQ_CONTROL_3_REG				0x0000b984
4891 #define A6XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__MASK		0x000000ff
4892 #define A6XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__SHIFT		0
4893 static inline uint32_t A6XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID(uint32_t val)
4894 {
4895 	return ((val) << A6XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__SHIFT) & A6XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__MASK;
4896 }
4897 
4898 #define REG_A6XX_HLSQ_CONTROL_4_REG				0x0000b985
4899 #define A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__MASK		0x00ff0000
4900 #define A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__SHIFT		16
4901 static inline uint32_t A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(uint32_t val)
4902 {
4903 	return ((val) << A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__SHIFT) & A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__MASK;
4904 }
4905 #define A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__MASK		0xff000000
4906 #define A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__SHIFT		24
4907 static inline uint32_t A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID(uint32_t val)
4908 {
4909 	return ((val) << A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__SHIFT) & A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__MASK;
4910 }
4911 
4912 #define REG_A6XX_HLSQ_CONTROL_5_REG				0x0000b986
4913 
4914 #define REG_A6XX_HLSQ_CS_NDRANGE_0				0x0000b990
4915 #define A6XX_HLSQ_CS_NDRANGE_0_KERNELDIM__MASK			0x00000003
4916 #define A6XX_HLSQ_CS_NDRANGE_0_KERNELDIM__SHIFT			0
4917 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_0_KERNELDIM(uint32_t val)
4918 {
4919 	return ((val) << A6XX_HLSQ_CS_NDRANGE_0_KERNELDIM__SHIFT) & A6XX_HLSQ_CS_NDRANGE_0_KERNELDIM__MASK;
4920 }
4921 #define A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEX__MASK			0x00000ffc
4922 #define A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEX__SHIFT		2
4923 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEX(uint32_t val)
4924 {
4925 	return ((val) << A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEX__SHIFT) & A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEX__MASK;
4926 }
4927 #define A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEY__MASK			0x003ff000
4928 #define A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEY__SHIFT		12
4929 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEY(uint32_t val)
4930 {
4931 	return ((val) << A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEY__SHIFT) & A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEY__MASK;
4932 }
4933 #define A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEZ__MASK			0xffc00000
4934 #define A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEZ__SHIFT		22
4935 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEZ(uint32_t val)
4936 {
4937 	return ((val) << A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEZ__SHIFT) & A6XX_HLSQ_CS_NDRANGE_0_LOCALSIZEZ__MASK;
4938 }
4939 
4940 #define REG_A6XX_HLSQ_CS_NDRANGE_1				0x0000b991
4941 #define A6XX_HLSQ_CS_NDRANGE_1_GLOBALSIZE_X__MASK		0xffffffff
4942 #define A6XX_HLSQ_CS_NDRANGE_1_GLOBALSIZE_X__SHIFT		0
4943 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_1_GLOBALSIZE_X(uint32_t val)
4944 {
4945 	return ((val) << A6XX_HLSQ_CS_NDRANGE_1_GLOBALSIZE_X__SHIFT) & A6XX_HLSQ_CS_NDRANGE_1_GLOBALSIZE_X__MASK;
4946 }
4947 
4948 #define REG_A6XX_HLSQ_CS_NDRANGE_2				0x0000b992
4949 #define A6XX_HLSQ_CS_NDRANGE_2_GLOBALOFF_X__MASK		0xffffffff
4950 #define A6XX_HLSQ_CS_NDRANGE_2_GLOBALOFF_X__SHIFT		0
4951 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_2_GLOBALOFF_X(uint32_t val)
4952 {
4953 	return ((val) << A6XX_HLSQ_CS_NDRANGE_2_GLOBALOFF_X__SHIFT) & A6XX_HLSQ_CS_NDRANGE_2_GLOBALOFF_X__MASK;
4954 }
4955 
4956 #define REG_A6XX_HLSQ_CS_NDRANGE_3				0x0000b993
4957 #define A6XX_HLSQ_CS_NDRANGE_3_GLOBALSIZE_Y__MASK		0xffffffff
4958 #define A6XX_HLSQ_CS_NDRANGE_3_GLOBALSIZE_Y__SHIFT		0
4959 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_3_GLOBALSIZE_Y(uint32_t val)
4960 {
4961 	return ((val) << A6XX_HLSQ_CS_NDRANGE_3_GLOBALSIZE_Y__SHIFT) & A6XX_HLSQ_CS_NDRANGE_3_GLOBALSIZE_Y__MASK;
4962 }
4963 
4964 #define REG_A6XX_HLSQ_CS_NDRANGE_4				0x0000b994
4965 #define A6XX_HLSQ_CS_NDRANGE_4_GLOBALOFF_Y__MASK		0xffffffff
4966 #define A6XX_HLSQ_CS_NDRANGE_4_GLOBALOFF_Y__SHIFT		0
4967 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_4_GLOBALOFF_Y(uint32_t val)
4968 {
4969 	return ((val) << A6XX_HLSQ_CS_NDRANGE_4_GLOBALOFF_Y__SHIFT) & A6XX_HLSQ_CS_NDRANGE_4_GLOBALOFF_Y__MASK;
4970 }
4971 
4972 #define REG_A6XX_HLSQ_CS_NDRANGE_5				0x0000b995
4973 #define A6XX_HLSQ_CS_NDRANGE_5_GLOBALSIZE_Z__MASK		0xffffffff
4974 #define A6XX_HLSQ_CS_NDRANGE_5_GLOBALSIZE_Z__SHIFT		0
4975 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_5_GLOBALSIZE_Z(uint32_t val)
4976 {
4977 	return ((val) << A6XX_HLSQ_CS_NDRANGE_5_GLOBALSIZE_Z__SHIFT) & A6XX_HLSQ_CS_NDRANGE_5_GLOBALSIZE_Z__MASK;
4978 }
4979 
4980 #define REG_A6XX_HLSQ_CS_NDRANGE_6				0x0000b996
4981 #define A6XX_HLSQ_CS_NDRANGE_6_GLOBALOFF_Z__MASK		0xffffffff
4982 #define A6XX_HLSQ_CS_NDRANGE_6_GLOBALOFF_Z__SHIFT		0
4983 static inline uint32_t A6XX_HLSQ_CS_NDRANGE_6_GLOBALOFF_Z(uint32_t val)
4984 {
4985 	return ((val) << A6XX_HLSQ_CS_NDRANGE_6_GLOBALOFF_Z__SHIFT) & A6XX_HLSQ_CS_NDRANGE_6_GLOBALOFF_Z__MASK;
4986 }
4987 
4988 #define REG_A6XX_HLSQ_CS_CNTL_0					0x0000b997
4989 #define A6XX_HLSQ_CS_CNTL_0_WGIDCONSTID__MASK			0x000000ff
4990 #define A6XX_HLSQ_CS_CNTL_0_WGIDCONSTID__SHIFT			0
4991 static inline uint32_t A6XX_HLSQ_CS_CNTL_0_WGIDCONSTID(uint32_t val)
4992 {
4993 	return ((val) << A6XX_HLSQ_CS_CNTL_0_WGIDCONSTID__SHIFT) & A6XX_HLSQ_CS_CNTL_0_WGIDCONSTID__MASK;
4994 }
4995 #define A6XX_HLSQ_CS_CNTL_0_UNK0__MASK				0x0000ff00
4996 #define A6XX_HLSQ_CS_CNTL_0_UNK0__SHIFT				8
4997 static inline uint32_t A6XX_HLSQ_CS_CNTL_0_UNK0(uint32_t val)
4998 {
4999 	return ((val) << A6XX_HLSQ_CS_CNTL_0_UNK0__SHIFT) & A6XX_HLSQ_CS_CNTL_0_UNK0__MASK;
5000 }
5001 #define A6XX_HLSQ_CS_CNTL_0_UNK1__MASK				0x00ff0000
5002 #define A6XX_HLSQ_CS_CNTL_0_UNK1__SHIFT				16
5003 static inline uint32_t A6XX_HLSQ_CS_CNTL_0_UNK1(uint32_t val)
5004 {
5005 	return ((val) << A6XX_HLSQ_CS_CNTL_0_UNK1__SHIFT) & A6XX_HLSQ_CS_CNTL_0_UNK1__MASK;
5006 }
5007 #define A6XX_HLSQ_CS_CNTL_0_LOCALIDREGID__MASK			0xff000000
5008 #define A6XX_HLSQ_CS_CNTL_0_LOCALIDREGID__SHIFT			24
5009 static inline uint32_t A6XX_HLSQ_CS_CNTL_0_LOCALIDREGID(uint32_t val)
5010 {
5011 	return ((val) << A6XX_HLSQ_CS_CNTL_0_LOCALIDREGID__SHIFT) & A6XX_HLSQ_CS_CNTL_0_LOCALIDREGID__MASK;
5012 }
5013 
5014 #define REG_A6XX_HLSQ_CS_KERNEL_GROUP_X				0x0000b999
5015 
5016 #define REG_A6XX_HLSQ_CS_KERNEL_GROUP_Y				0x0000b99a
5017 
5018 #define REG_A6XX_HLSQ_CS_KERNEL_GROUP_Z				0x0000b99b
5019 
5020 #define REG_A6XX_HLSQ_UPDATE_CNTL				0x0000bb08
5021 
5022 #define REG_A6XX_HLSQ_FS_CNTL					0x0000bb10
5023 #define A6XX_HLSQ_FS_CNTL_CONSTLEN__MASK			0x000000ff
5024 #define A6XX_HLSQ_FS_CNTL_CONSTLEN__SHIFT			0
5025 static inline uint32_t A6XX_HLSQ_FS_CNTL_CONSTLEN(uint32_t val)
5026 {
5027 	return ((val >> 2) << A6XX_HLSQ_FS_CNTL_CONSTLEN__SHIFT) & A6XX_HLSQ_FS_CNTL_CONSTLEN__MASK;
5028 }
5029 
5030 #define REG_A6XX_HLSQ_UNKNOWN_BB11				0x0000bb11
5031 
5032 #define REG_A6XX_HLSQ_UNKNOWN_BE00				0x0000be00
5033 
5034 #define REG_A6XX_HLSQ_UNKNOWN_BE01				0x0000be01
5035 
5036 #define REG_A6XX_HLSQ_UNKNOWN_BE04				0x0000be04
5037 
5038 #define REG_A6XX_TEX_SAMP_0					0x00000000
5039 #define A6XX_TEX_SAMP_0_MIPFILTER_LINEAR_NEAR			0x00000001
5040 #define A6XX_TEX_SAMP_0_XY_MAG__MASK				0x00000006
5041 #define A6XX_TEX_SAMP_0_XY_MAG__SHIFT				1
5042 static inline uint32_t A6XX_TEX_SAMP_0_XY_MAG(enum a6xx_tex_filter val)
5043 {
5044 	return ((val) << A6XX_TEX_SAMP_0_XY_MAG__SHIFT) & A6XX_TEX_SAMP_0_XY_MAG__MASK;
5045 }
5046 #define A6XX_TEX_SAMP_0_XY_MIN__MASK				0x00000018
5047 #define A6XX_TEX_SAMP_0_XY_MIN__SHIFT				3
5048 static inline uint32_t A6XX_TEX_SAMP_0_XY_MIN(enum a6xx_tex_filter val)
5049 {
5050 	return ((val) << A6XX_TEX_SAMP_0_XY_MIN__SHIFT) & A6XX_TEX_SAMP_0_XY_MIN__MASK;
5051 }
5052 #define A6XX_TEX_SAMP_0_WRAP_S__MASK				0x000000e0
5053 #define A6XX_TEX_SAMP_0_WRAP_S__SHIFT				5
5054 static inline uint32_t A6XX_TEX_SAMP_0_WRAP_S(enum a6xx_tex_clamp val)
5055 {
5056 	return ((val) << A6XX_TEX_SAMP_0_WRAP_S__SHIFT) & A6XX_TEX_SAMP_0_WRAP_S__MASK;
5057 }
5058 #define A6XX_TEX_SAMP_0_WRAP_T__MASK				0x00000700
5059 #define A6XX_TEX_SAMP_0_WRAP_T__SHIFT				8
5060 static inline uint32_t A6XX_TEX_SAMP_0_WRAP_T(enum a6xx_tex_clamp val)
5061 {
5062 	return ((val) << A6XX_TEX_SAMP_0_WRAP_T__SHIFT) & A6XX_TEX_SAMP_0_WRAP_T__MASK;
5063 }
5064 #define A6XX_TEX_SAMP_0_WRAP_R__MASK				0x00003800
5065 #define A6XX_TEX_SAMP_0_WRAP_R__SHIFT				11
5066 static inline uint32_t A6XX_TEX_SAMP_0_WRAP_R(enum a6xx_tex_clamp val)
5067 {
5068 	return ((val) << A6XX_TEX_SAMP_0_WRAP_R__SHIFT) & A6XX_TEX_SAMP_0_WRAP_R__MASK;
5069 }
5070 #define A6XX_TEX_SAMP_0_ANISO__MASK				0x0001c000
5071 #define A6XX_TEX_SAMP_0_ANISO__SHIFT				14
5072 static inline uint32_t A6XX_TEX_SAMP_0_ANISO(enum a6xx_tex_aniso val)
5073 {
5074 	return ((val) << A6XX_TEX_SAMP_0_ANISO__SHIFT) & A6XX_TEX_SAMP_0_ANISO__MASK;
5075 }
5076 #define A6XX_TEX_SAMP_0_LOD_BIAS__MASK				0xfff80000
5077 #define A6XX_TEX_SAMP_0_LOD_BIAS__SHIFT				19
5078 static inline uint32_t A6XX_TEX_SAMP_0_LOD_BIAS(float val)
5079 {
5080 	return ((((int32_t)(val * 256.0))) << A6XX_TEX_SAMP_0_LOD_BIAS__SHIFT) & A6XX_TEX_SAMP_0_LOD_BIAS__MASK;
5081 }
5082 
5083 #define REG_A6XX_TEX_SAMP_1					0x00000001
5084 #define A6XX_TEX_SAMP_1_COMPARE_FUNC__MASK			0x0000000e
5085 #define A6XX_TEX_SAMP_1_COMPARE_FUNC__SHIFT			1
5086 static inline uint32_t A6XX_TEX_SAMP_1_COMPARE_FUNC(enum adreno_compare_func val)
5087 {
5088 	return ((val) << A6XX_TEX_SAMP_1_COMPARE_FUNC__SHIFT) & A6XX_TEX_SAMP_1_COMPARE_FUNC__MASK;
5089 }
5090 #define A6XX_TEX_SAMP_1_CUBEMAPSEAMLESSFILTOFF			0x00000010
5091 #define A6XX_TEX_SAMP_1_UNNORM_COORDS				0x00000020
5092 #define A6XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR			0x00000040
5093 #define A6XX_TEX_SAMP_1_MAX_LOD__MASK				0x000fff00
5094 #define A6XX_TEX_SAMP_1_MAX_LOD__SHIFT				8
5095 static inline uint32_t A6XX_TEX_SAMP_1_MAX_LOD(float val)
5096 {
5097 	return ((((uint32_t)(val * 256.0))) << A6XX_TEX_SAMP_1_MAX_LOD__SHIFT) & A6XX_TEX_SAMP_1_MAX_LOD__MASK;
5098 }
5099 #define A6XX_TEX_SAMP_1_MIN_LOD__MASK				0xfff00000
5100 #define A6XX_TEX_SAMP_1_MIN_LOD__SHIFT				20
5101 static inline uint32_t A6XX_TEX_SAMP_1_MIN_LOD(float val)
5102 {
5103 	return ((((uint32_t)(val * 256.0))) << A6XX_TEX_SAMP_1_MIN_LOD__SHIFT) & A6XX_TEX_SAMP_1_MIN_LOD__MASK;
5104 }
5105 
5106 #define REG_A6XX_TEX_SAMP_2					0x00000002
5107 #define A6XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK			0xfffffff0
5108 #define A6XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT			4
5109 static inline uint32_t A6XX_TEX_SAMP_2_BCOLOR_OFFSET(uint32_t val)
5110 {
5111 	return ((val) << A6XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT) & A6XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK;
5112 }
5113 
5114 #define REG_A6XX_TEX_SAMP_3					0x00000003
5115 
5116 #define REG_A6XX_TEX_CONST_0					0x00000000
5117 #define A6XX_TEX_CONST_0_TILE_MODE__MASK			0x00000003
5118 #define A6XX_TEX_CONST_0_TILE_MODE__SHIFT			0
5119 static inline uint32_t A6XX_TEX_CONST_0_TILE_MODE(enum a6xx_tile_mode val)
5120 {
5121 	return ((val) << A6XX_TEX_CONST_0_TILE_MODE__SHIFT) & A6XX_TEX_CONST_0_TILE_MODE__MASK;
5122 }
5123 #define A6XX_TEX_CONST_0_SRGB					0x00000004
5124 #define A6XX_TEX_CONST_0_SWIZ_X__MASK				0x00000070
5125 #define A6XX_TEX_CONST_0_SWIZ_X__SHIFT				4
5126 static inline uint32_t A6XX_TEX_CONST_0_SWIZ_X(enum a6xx_tex_swiz val)
5127 {
5128 	return ((val) << A6XX_TEX_CONST_0_SWIZ_X__SHIFT) & A6XX_TEX_CONST_0_SWIZ_X__MASK;
5129 }
5130 #define A6XX_TEX_CONST_0_SWIZ_Y__MASK				0x00000380
5131 #define A6XX_TEX_CONST_0_SWIZ_Y__SHIFT				7
5132 static inline uint32_t A6XX_TEX_CONST_0_SWIZ_Y(enum a6xx_tex_swiz val)
5133 {
5134 	return ((val) << A6XX_TEX_CONST_0_SWIZ_Y__SHIFT) & A6XX_TEX_CONST_0_SWIZ_Y__MASK;
5135 }
5136 #define A6XX_TEX_CONST_0_SWIZ_Z__MASK				0x00001c00
5137 #define A6XX_TEX_CONST_0_SWIZ_Z__SHIFT				10
5138 static inline uint32_t A6XX_TEX_CONST_0_SWIZ_Z(enum a6xx_tex_swiz val)
5139 {
5140 	return ((val) << A6XX_TEX_CONST_0_SWIZ_Z__SHIFT) & A6XX_TEX_CONST_0_SWIZ_Z__MASK;
5141 }
5142 #define A6XX_TEX_CONST_0_SWIZ_W__MASK				0x0000e000
5143 #define A6XX_TEX_CONST_0_SWIZ_W__SHIFT				13
5144 static inline uint32_t A6XX_TEX_CONST_0_SWIZ_W(enum a6xx_tex_swiz val)
5145 {
5146 	return ((val) << A6XX_TEX_CONST_0_SWIZ_W__SHIFT) & A6XX_TEX_CONST_0_SWIZ_W__MASK;
5147 }
5148 #define A6XX_TEX_CONST_0_MIPLVLS__MASK				0x000f0000
5149 #define A6XX_TEX_CONST_0_MIPLVLS__SHIFT				16
5150 static inline uint32_t A6XX_TEX_CONST_0_MIPLVLS(uint32_t val)
5151 {
5152 	return ((val) << A6XX_TEX_CONST_0_MIPLVLS__SHIFT) & A6XX_TEX_CONST_0_MIPLVLS__MASK;
5153 }
5154 #define A6XX_TEX_CONST_0_SAMPLES__MASK				0x00300000
5155 #define A6XX_TEX_CONST_0_SAMPLES__SHIFT				20
5156 static inline uint32_t A6XX_TEX_CONST_0_SAMPLES(enum a3xx_msaa_samples val)
5157 {
5158 	return ((val) << A6XX_TEX_CONST_0_SAMPLES__SHIFT) & A6XX_TEX_CONST_0_SAMPLES__MASK;
5159 }
5160 #define A6XX_TEX_CONST_0_FMT__MASK				0x3fc00000
5161 #define A6XX_TEX_CONST_0_FMT__SHIFT				22
5162 static inline uint32_t A6XX_TEX_CONST_0_FMT(enum a6xx_tex_fmt val)
5163 {
5164 	return ((val) << A6XX_TEX_CONST_0_FMT__SHIFT) & A6XX_TEX_CONST_0_FMT__MASK;
5165 }
5166 #define A6XX_TEX_CONST_0_SWAP__MASK				0xc0000000
5167 #define A6XX_TEX_CONST_0_SWAP__SHIFT				30
5168 static inline uint32_t A6XX_TEX_CONST_0_SWAP(enum a3xx_color_swap val)
5169 {
5170 	return ((val) << A6XX_TEX_CONST_0_SWAP__SHIFT) & A6XX_TEX_CONST_0_SWAP__MASK;
5171 }
5172 
5173 #define REG_A6XX_TEX_CONST_1					0x00000001
5174 #define A6XX_TEX_CONST_1_WIDTH__MASK				0x00007fff
5175 #define A6XX_TEX_CONST_1_WIDTH__SHIFT				0
5176 static inline uint32_t A6XX_TEX_CONST_1_WIDTH(uint32_t val)
5177 {
5178 	return ((val) << A6XX_TEX_CONST_1_WIDTH__SHIFT) & A6XX_TEX_CONST_1_WIDTH__MASK;
5179 }
5180 #define A6XX_TEX_CONST_1_HEIGHT__MASK				0x3fff8000
5181 #define A6XX_TEX_CONST_1_HEIGHT__SHIFT				15
5182 static inline uint32_t A6XX_TEX_CONST_1_HEIGHT(uint32_t val)
5183 {
5184 	return ((val) << A6XX_TEX_CONST_1_HEIGHT__SHIFT) & A6XX_TEX_CONST_1_HEIGHT__MASK;
5185 }
5186 
5187 #define REG_A6XX_TEX_CONST_2					0x00000002
5188 #define A6XX_TEX_CONST_2_FETCHSIZE__MASK			0x0000000f
5189 #define A6XX_TEX_CONST_2_FETCHSIZE__SHIFT			0
5190 static inline uint32_t A6XX_TEX_CONST_2_FETCHSIZE(enum a6xx_tex_fetchsize val)
5191 {
5192 	return ((val) << A6XX_TEX_CONST_2_FETCHSIZE__SHIFT) & A6XX_TEX_CONST_2_FETCHSIZE__MASK;
5193 }
5194 #define A6XX_TEX_CONST_2_PITCH__MASK				0x1fffff80
5195 #define A6XX_TEX_CONST_2_PITCH__SHIFT				7
5196 static inline uint32_t A6XX_TEX_CONST_2_PITCH(uint32_t val)
5197 {
5198 	return ((val) << A6XX_TEX_CONST_2_PITCH__SHIFT) & A6XX_TEX_CONST_2_PITCH__MASK;
5199 }
5200 #define A6XX_TEX_CONST_2_TYPE__MASK				0x60000000
5201 #define A6XX_TEX_CONST_2_TYPE__SHIFT				29
5202 static inline uint32_t A6XX_TEX_CONST_2_TYPE(enum a6xx_tex_type val)
5203 {
5204 	return ((val) << A6XX_TEX_CONST_2_TYPE__SHIFT) & A6XX_TEX_CONST_2_TYPE__MASK;
5205 }
5206 
5207 #define REG_A6XX_TEX_CONST_3					0x00000003
5208 #define A6XX_TEX_CONST_3_ARRAY_PITCH__MASK			0x00003fff
5209 #define A6XX_TEX_CONST_3_ARRAY_PITCH__SHIFT			0
5210 static inline uint32_t A6XX_TEX_CONST_3_ARRAY_PITCH(uint32_t val)
5211 {
5212 	return ((val >> 12) << A6XX_TEX_CONST_3_ARRAY_PITCH__SHIFT) & A6XX_TEX_CONST_3_ARRAY_PITCH__MASK;
5213 }
5214 #define A6XX_TEX_CONST_3_FLAG					0x10000000
5215 
5216 #define REG_A6XX_TEX_CONST_4					0x00000004
5217 #define A6XX_TEX_CONST_4_BASE_LO__MASK				0xffffffe0
5218 #define A6XX_TEX_CONST_4_BASE_LO__SHIFT				5
5219 static inline uint32_t A6XX_TEX_CONST_4_BASE_LO(uint32_t val)
5220 {
5221 	return ((val >> 5) << A6XX_TEX_CONST_4_BASE_LO__SHIFT) & A6XX_TEX_CONST_4_BASE_LO__MASK;
5222 }
5223 
5224 #define REG_A6XX_TEX_CONST_5					0x00000005
5225 #define A6XX_TEX_CONST_5_BASE_HI__MASK				0x0001ffff
5226 #define A6XX_TEX_CONST_5_BASE_HI__SHIFT				0
5227 static inline uint32_t A6XX_TEX_CONST_5_BASE_HI(uint32_t val)
5228 {
5229 	return ((val) << A6XX_TEX_CONST_5_BASE_HI__SHIFT) & A6XX_TEX_CONST_5_BASE_HI__MASK;
5230 }
5231 #define A6XX_TEX_CONST_5_DEPTH__MASK				0x3ffe0000
5232 #define A6XX_TEX_CONST_5_DEPTH__SHIFT				17
5233 static inline uint32_t A6XX_TEX_CONST_5_DEPTH(uint32_t val)
5234 {
5235 	return ((val) << A6XX_TEX_CONST_5_DEPTH__SHIFT) & A6XX_TEX_CONST_5_DEPTH__MASK;
5236 }
5237 
5238 #define REG_A6XX_TEX_CONST_6					0x00000006
5239 
5240 #define REG_A6XX_TEX_CONST_7					0x00000007
5241 #define A6XX_TEX_CONST_7_FLAG_LO__MASK				0xffffffe0
5242 #define A6XX_TEX_CONST_7_FLAG_LO__SHIFT				5
5243 static inline uint32_t A6XX_TEX_CONST_7_FLAG_LO(uint32_t val)
5244 {
5245 	return ((val >> 5) << A6XX_TEX_CONST_7_FLAG_LO__SHIFT) & A6XX_TEX_CONST_7_FLAG_LO__MASK;
5246 }
5247 
5248 #define REG_A6XX_TEX_CONST_8					0x00000008
5249 #define A6XX_TEX_CONST_8_FLAG_HI__MASK				0x0001ffff
5250 #define A6XX_TEX_CONST_8_FLAG_HI__SHIFT				0
5251 static inline uint32_t A6XX_TEX_CONST_8_FLAG_HI(uint32_t val)
5252 {
5253 	return ((val) << A6XX_TEX_CONST_8_FLAG_HI__SHIFT) & A6XX_TEX_CONST_8_FLAG_HI__MASK;
5254 }
5255 
5256 #define REG_A6XX_TEX_CONST_9					0x00000009
5257 
5258 #define REG_A6XX_TEX_CONST_10					0x0000000a
5259 
5260 #define REG_A6XX_TEX_CONST_11					0x0000000b
5261 
5262 #define REG_A6XX_TEX_CONST_12					0x0000000c
5263 
5264 #define REG_A6XX_TEX_CONST_13					0x0000000d
5265 
5266 #define REG_A6XX_TEX_CONST_14					0x0000000e
5267 
5268 #define REG_A6XX_TEX_CONST_15					0x0000000f
5269 
5270 #define REG_A6XX_PDC_GPU_ENABLE_PDC				0x00001140
5271 
5272 #define REG_A6XX_PDC_GPU_SEQ_START_ADDR				0x00001148
5273 
5274 #define REG_A6XX_PDC_GPU_TCS0_CONTROL				0x00001540
5275 
5276 #define REG_A6XX_PDC_GPU_TCS0_CMD_ENABLE_BANK			0x00001541
5277 
5278 #define REG_A6XX_PDC_GPU_TCS0_CMD_WAIT_FOR_CMPL_BANK		0x00001542
5279 
5280 #define REG_A6XX_PDC_GPU_TCS0_CMD0_MSGID			0x00001543
5281 
5282 #define REG_A6XX_PDC_GPU_TCS0_CMD0_ADDR				0x00001544
5283 
5284 #define REG_A6XX_PDC_GPU_TCS0_CMD0_DATA				0x00001545
5285 
5286 #define REG_A6XX_PDC_GPU_TCS1_CONTROL				0x00001572
5287 
5288 #define REG_A6XX_PDC_GPU_TCS1_CMD_ENABLE_BANK			0x00001573
5289 
5290 #define REG_A6XX_PDC_GPU_TCS1_CMD_WAIT_FOR_CMPL_BANK		0x00001574
5291 
5292 #define REG_A6XX_PDC_GPU_TCS1_CMD0_MSGID			0x00001575
5293 
5294 #define REG_A6XX_PDC_GPU_TCS1_CMD0_ADDR				0x00001576
5295 
5296 #define REG_A6XX_PDC_GPU_TCS1_CMD0_DATA				0x00001577
5297 
5298 #define REG_A6XX_PDC_GPU_TCS2_CONTROL				0x000015a4
5299 
5300 #define REG_A6XX_PDC_GPU_TCS2_CMD_ENABLE_BANK			0x000015a5
5301 
5302 #define REG_A6XX_PDC_GPU_TCS2_CMD_WAIT_FOR_CMPL_BANK		0x000015a6
5303 
5304 #define REG_A6XX_PDC_GPU_TCS2_CMD0_MSGID			0x000015a7
5305 
5306 #define REG_A6XX_PDC_GPU_TCS2_CMD0_ADDR				0x000015a8
5307 
5308 #define REG_A6XX_PDC_GPU_TCS2_CMD0_DATA				0x000015a9
5309 
5310 #define REG_A6XX_PDC_GPU_TCS3_CONTROL				0x000015d6
5311 
5312 #define REG_A6XX_PDC_GPU_TCS3_CMD_ENABLE_BANK			0x000015d7
5313 
5314 #define REG_A6XX_PDC_GPU_TCS3_CMD_WAIT_FOR_CMPL_BANK		0x000015d8
5315 
5316 #define REG_A6XX_PDC_GPU_TCS3_CMD0_MSGID			0x000015d9
5317 
5318 #define REG_A6XX_PDC_GPU_TCS3_CMD0_ADDR				0x000015da
5319 
5320 #define REG_A6XX_PDC_GPU_TCS3_CMD0_DATA				0x000015db
5321 
5322 #define REG_A6XX_PDC_GPU_SEQ_MEM_0				0x00000000
5323 
5324 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_SEL_A			0x00000000
5325 #define A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_INDEX__MASK		0x000000ff
5326 #define A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_INDEX__SHIFT		0
5327 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_INDEX(uint32_t val)
5328 {
5329 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_INDEX__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_INDEX__MASK;
5330 }
5331 #define A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_BLK_SEL__MASK	0x0000ff00
5332 #define A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_BLK_SEL__SHIFT	8
5333 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_BLK_SEL(uint32_t val)
5334 {
5335 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_BLK_SEL__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_SEL_A_PING_BLK_SEL__MASK;
5336 }
5337 
5338 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_SEL_B			0x00000001
5339 
5340 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_SEL_C			0x00000002
5341 
5342 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_SEL_D			0x00000003
5343 
5344 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_CNTLT			0x00000004
5345 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__MASK		0x0000003f
5346 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__SHIFT		0
5347 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN(uint32_t val)
5348 {
5349 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_TRACEEN__MASK;
5350 }
5351 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_GRANU__MASK		0x00007000
5352 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_GRANU__SHIFT		12
5353 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_GRANU(uint32_t val)
5354 {
5355 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_GRANU__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_GRANU__MASK;
5356 }
5357 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_SEGT__MASK		0xf0000000
5358 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_SEGT__SHIFT		28
5359 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_SEGT(uint32_t val)
5360 {
5361 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_SEGT__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_CNTLT_SEGT__MASK;
5362 }
5363 
5364 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_CNTLM			0x00000005
5365 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__MASK		0x0f000000
5366 #define A6XX_CX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__SHIFT		24
5367 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_CNTLM_ENABLE(uint32_t val)
5368 {
5369 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_CNTLM_ENABLE__MASK;
5370 }
5371 
5372 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_IVTL_0			0x00000008
5373 
5374 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_IVTL_1			0x00000009
5375 
5376 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_IVTL_2			0x0000000a
5377 
5378 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_IVTL_3			0x0000000b
5379 
5380 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_MASKL_0			0x0000000c
5381 
5382 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_MASKL_1			0x0000000d
5383 
5384 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_MASKL_2			0x0000000e
5385 
5386 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_MASKL_3			0x0000000f
5387 
5388 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0			0x00000010
5389 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__MASK		0x0000000f
5390 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__SHIFT		0
5391 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0(uint32_t val)
5392 {
5393 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL0__MASK;
5394 }
5395 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__MASK		0x000000f0
5396 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__SHIFT		4
5397 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1(uint32_t val)
5398 {
5399 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL1__MASK;
5400 }
5401 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__MASK		0x00000f00
5402 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__SHIFT		8
5403 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2(uint32_t val)
5404 {
5405 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL2__MASK;
5406 }
5407 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__MASK		0x0000f000
5408 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__SHIFT		12
5409 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3(uint32_t val)
5410 {
5411 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL3__MASK;
5412 }
5413 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__MASK		0x000f0000
5414 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__SHIFT		16
5415 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4(uint32_t val)
5416 {
5417 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL4__MASK;
5418 }
5419 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__MASK		0x00f00000
5420 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__SHIFT		20
5421 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5(uint32_t val)
5422 {
5423 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL5__MASK;
5424 }
5425 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__MASK		0x0f000000
5426 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__SHIFT		24
5427 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6(uint32_t val)
5428 {
5429 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL6__MASK;
5430 }
5431 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__MASK		0xf0000000
5432 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__SHIFT		28
5433 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7(uint32_t val)
5434 {
5435 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_0_BYTEL7__MASK;
5436 }
5437 
5438 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1			0x00000011
5439 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__MASK		0x0000000f
5440 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__SHIFT		0
5441 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8(uint32_t val)
5442 {
5443 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL8__MASK;
5444 }
5445 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__MASK		0x000000f0
5446 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__SHIFT		4
5447 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9(uint32_t val)
5448 {
5449 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL9__MASK;
5450 }
5451 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__MASK		0x00000f00
5452 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__SHIFT		8
5453 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10(uint32_t val)
5454 {
5455 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL10__MASK;
5456 }
5457 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__MASK		0x0000f000
5458 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__SHIFT		12
5459 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11(uint32_t val)
5460 {
5461 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL11__MASK;
5462 }
5463 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__MASK		0x000f0000
5464 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__SHIFT		16
5465 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12(uint32_t val)
5466 {
5467 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL12__MASK;
5468 }
5469 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__MASK		0x00f00000
5470 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__SHIFT		20
5471 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13(uint32_t val)
5472 {
5473 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL13__MASK;
5474 }
5475 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__MASK		0x0f000000
5476 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__SHIFT		24
5477 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14(uint32_t val)
5478 {
5479 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL14__MASK;
5480 }
5481 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__MASK		0xf0000000
5482 #define A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__SHIFT		28
5483 static inline uint32_t A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15(uint32_t val)
5484 {
5485 	return ((val) << A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__SHIFT) & A6XX_CX_DBGC_CFG_DBGBUS_BYTEL_1_BYTEL15__MASK;
5486 }
5487 
5488 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_TRACE_BUF1			0x0000002f
5489 
5490 #define REG_A6XX_CX_DBGC_CFG_DBGBUS_TRACE_BUF2			0x00000030
5491 
5492 #define REG_A6XX_CX_MISC_SYSTEM_CACHE_CNTL_0			0x00000001
5493 
5494 #define REG_A6XX_CX_MISC_SYSTEM_CACHE_CNTL_1			0x00000002
5495 
5496 
5497 #endif /* A6XX_XML */
5498