• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef A5XX_XML
2 #define A5XX_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/freedreno/envytools/rnndb/adreno.xml               (    431 bytes, from 2016-04-26 17:56:44)
12 - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml  (   1572 bytes, from 2016-02-10 17:07:21)
13 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml          (  32907 bytes, from 2016-11-26 23:01:08)
14 - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml (  12025 bytes, from 2016-11-26 23:01:08)
15 - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml    (  23277 bytes, from 2016-12-24 05:01:47)
16 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml          (  83840 bytes, from 2016-11-26 23:01:08)
17 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml          ( 110757 bytes, from 2016-12-26 17:51:07)
18 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a5xx.xml          ( 100594 bytes, from 2017-01-20 23:03:30)
19 - /home/robclark/src/freedreno/envytools/rnndb/adreno/ocmem.xml         (   1773 bytes, from 2015-09-24 17:30:00)
20 
21 Copyright (C) 2013-2017 by the following authors:
22 - Rob Clark <robdclark@gmail.com> (robclark)
23 - Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
24 
25 Permission is hereby granted, free of charge, to any person obtaining
26 a copy of this software and associated documentation files (the
27 "Software"), to deal in the Software without restriction, including
28 without limitation the rights to use, copy, modify, merge, publish,
29 distribute, sublicense, and/or sell copies of the Software, and to
30 permit persons to whom the Software is furnished to do so, subject to
31 the following conditions:
32 
33 The above copyright notice and this permission notice (including the
34 next paragraph) shall be included in all copies or substantial
35 portions of the Software.
36 
37 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
39 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
40 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
41 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
42 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
43 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44 */
45 
46 
47 enum a5xx_color_fmt {
48 	RB5_R8_UNORM = 3,
49 	RB5_R8_UINT = 5,
50 	RB5_R8_SINT = 6,
51 	RB5_R4G4B4A4_UNORM = 8,
52 	RB5_R5G5B5A1_UNORM = 10,
53 	RB5_R5G6B5_UNORM = 14,
54 	RB5_R8G8_UNORM = 15,
55 	RB5_R8G8_SNORM = 16,
56 	RB5_R8G8_UINT = 17,
57 	RB5_R8G8_SINT = 18,
58 	RB5_R16_UNORM = 21,
59 	RB5_R16_SNORM = 22,
60 	RB5_R16_FLOAT = 23,
61 	RB5_R16_UINT = 24,
62 	RB5_R16_SINT = 25,
63 	RB5_R8G8B8A8_UNORM = 48,
64 	RB5_R8G8B8_UNORM = 49,
65 	RB5_R8G8B8A8_UINT = 51,
66 	RB5_R8G8B8A8_SINT = 52,
67 	RB5_R10G10B10A2_UNORM = 55,
68 	RB5_R10G10B10A2_UINT = 58,
69 	RB5_R11G11B10_FLOAT = 66,
70 	RB5_R16G16_UNORM = 67,
71 	RB5_R16G16_SNORM = 68,
72 	RB5_R16G16_FLOAT = 69,
73 	RB5_R16G16_UINT = 70,
74 	RB5_R16G16_SINT = 71,
75 	RB5_R32_FLOAT = 74,
76 	RB5_R32_UINT = 75,
77 	RB5_R32_SINT = 76,
78 	RB5_R16G16B16A16_FLOAT = 98,
79 	RB5_R16G16B16A16_UINT = 99,
80 	RB5_R16G16B16A16_SINT = 100,
81 	RB5_R32G32_FLOAT = 103,
82 	RB5_R32G32_UINT = 104,
83 	RB5_R32G32_SINT = 105,
84 	RB5_R32G32B32A32_FLOAT = 130,
85 	RB5_R32G32B32A32_UINT = 131,
86 	RB5_R32G32B32A32_SINT = 132,
87 };
88 
89 enum a5xx_tile_mode {
90 	TILE5_LINEAR = 0,
91 	TILE5_2 = 2,
92 	TILE5_3 = 3,
93 };
94 
95 enum a5xx_vtx_fmt {
96 	VFMT5_8_UNORM = 3,
97 	VFMT5_8_SNORM = 4,
98 	VFMT5_8_UINT = 5,
99 	VFMT5_8_SINT = 6,
100 	VFMT5_8_8_UNORM = 15,
101 	VFMT5_8_8_SNORM = 16,
102 	VFMT5_8_8_UINT = 17,
103 	VFMT5_8_8_SINT = 18,
104 	VFMT5_16_UNORM = 21,
105 	VFMT5_16_SNORM = 22,
106 	VFMT5_16_FLOAT = 23,
107 	VFMT5_16_UINT = 24,
108 	VFMT5_16_SINT = 25,
109 	VFMT5_8_8_8_UNORM = 33,
110 	VFMT5_8_8_8_SNORM = 34,
111 	VFMT5_8_8_8_UINT = 35,
112 	VFMT5_8_8_8_SINT = 36,
113 	VFMT5_8_8_8_8_UNORM = 48,
114 	VFMT5_8_8_8_8_SNORM = 50,
115 	VFMT5_8_8_8_8_UINT = 51,
116 	VFMT5_8_8_8_8_SINT = 52,
117 	VFMT5_16_16_UNORM = 67,
118 	VFMT5_16_16_SNORM = 68,
119 	VFMT5_16_16_FLOAT = 69,
120 	VFMT5_16_16_UINT = 70,
121 	VFMT5_16_16_SINT = 71,
122 	VFMT5_32_UNORM = 72,
123 	VFMT5_32_SNORM = 73,
124 	VFMT5_32_FLOAT = 74,
125 	VFMT5_32_UINT = 75,
126 	VFMT5_32_SINT = 76,
127 	VFMT5_32_FIXED = 77,
128 	VFMT5_16_16_16_UNORM = 88,
129 	VFMT5_16_16_16_SNORM = 89,
130 	VFMT5_16_16_16_FLOAT = 90,
131 	VFMT5_16_16_16_UINT = 91,
132 	VFMT5_16_16_16_SINT = 92,
133 	VFMT5_16_16_16_16_UNORM = 96,
134 	VFMT5_16_16_16_16_SNORM = 97,
135 	VFMT5_16_16_16_16_FLOAT = 98,
136 	VFMT5_16_16_16_16_UINT = 99,
137 	VFMT5_16_16_16_16_SINT = 100,
138 	VFMT5_32_32_UNORM = 101,
139 	VFMT5_32_32_SNORM = 102,
140 	VFMT5_32_32_FLOAT = 103,
141 	VFMT5_32_32_UINT = 104,
142 	VFMT5_32_32_SINT = 105,
143 	VFMT5_32_32_FIXED = 106,
144 	VFMT5_32_32_32_UNORM = 112,
145 	VFMT5_32_32_32_SNORM = 113,
146 	VFMT5_32_32_32_UINT = 114,
147 	VFMT5_32_32_32_SINT = 115,
148 	VFMT5_32_32_32_FLOAT = 116,
149 	VFMT5_32_32_32_FIXED = 117,
150 	VFMT5_32_32_32_32_UNORM = 128,
151 	VFMT5_32_32_32_32_SNORM = 129,
152 	VFMT5_32_32_32_32_FLOAT = 130,
153 	VFMT5_32_32_32_32_UINT = 131,
154 	VFMT5_32_32_32_32_SINT = 132,
155 	VFMT5_32_32_32_32_FIXED = 133,
156 };
157 
158 enum a5xx_tex_fmt {
159 	TFMT5_A8_UNORM = 2,
160 	TFMT5_8_UNORM = 3,
161 	TFMT5_8_UINT = 5,
162 	TFMT5_8_SINT = 6,
163 	TFMT5_4_4_4_4_UNORM = 8,
164 	TFMT5_5_5_5_1_UNORM = 10,
165 	TFMT5_5_6_5_UNORM = 14,
166 	TFMT5_8_8_UNORM = 15,
167 	TFMT5_8_8_SNORM = 16,
168 	TFMT5_8_8_UINT = 17,
169 	TFMT5_8_8_SINT = 18,
170 	TFMT5_L8_A8_UNORM = 19,
171 	TFMT5_16_UNORM = 21,
172 	TFMT5_16_SNORM = 22,
173 	TFMT5_16_FLOAT = 23,
174 	TFMT5_16_UINT = 24,
175 	TFMT5_16_SINT = 25,
176 	TFMT5_8_8_8_8_UNORM = 48,
177 	TFMT5_8_8_8_UNORM = 49,
178 	TFMT5_8_8_8_SNORM = 50,
179 	TFMT5_8_8_8_8_UINT = 51,
180 	TFMT5_8_8_8_8_SINT = 52,
181 	TFMT5_9_9_9_E5_FLOAT = 53,
182 	TFMT5_10_10_10_2_UNORM = 54,
183 	TFMT5_10_10_10_2_UINT = 58,
184 	TFMT5_11_11_10_FLOAT = 66,
185 	TFMT5_16_16_UNORM = 67,
186 	TFMT5_16_16_SNORM = 68,
187 	TFMT5_16_16_FLOAT = 69,
188 	TFMT5_16_16_UINT = 70,
189 	TFMT5_16_16_SINT = 71,
190 	TFMT5_32_FLOAT = 74,
191 	TFMT5_32_UINT = 75,
192 	TFMT5_32_SINT = 76,
193 	TFMT5_16_16_16_16_FLOAT = 98,
194 	TFMT5_16_16_16_16_UINT = 99,
195 	TFMT5_16_16_16_16_SINT = 100,
196 	TFMT5_32_32_FLOAT = 103,
197 	TFMT5_32_32_UINT = 104,
198 	TFMT5_32_32_SINT = 105,
199 	TFMT5_32_32_32_32_FLOAT = 130,
200 	TFMT5_32_32_32_32_UINT = 131,
201 	TFMT5_32_32_32_32_SINT = 132,
202 	TFMT5_X8Z24_UNORM = 160,
203 };
204 
205 enum a5xx_tex_fetchsize {
206 	TFETCH5_1_BYTE = 0,
207 	TFETCH5_2_BYTE = 1,
208 	TFETCH5_4_BYTE = 2,
209 	TFETCH5_8_BYTE = 3,
210 	TFETCH5_16_BYTE = 4,
211 };
212 
213 enum a5xx_depth_format {
214 	DEPTH5_NONE = 0,
215 	DEPTH5_16 = 1,
216 	DEPTH5_24_8 = 2,
217 	DEPTH5_32 = 4,
218 };
219 
220 enum a5xx_blit_buf {
221 	BLIT_MRT0 = 0,
222 	BLIT_MRT1 = 1,
223 	BLIT_MRT2 = 2,
224 	BLIT_MRT3 = 3,
225 	BLIT_MRT4 = 4,
226 	BLIT_MRT5 = 5,
227 	BLIT_MRT6 = 6,
228 	BLIT_MRT7 = 7,
229 	BLIT_ZS = 8,
230 	BLIT_Z32 = 9,
231 };
232 
233 enum a5xx_tex_filter {
234 	A5XX_TEX_NEAREST = 0,
235 	A5XX_TEX_LINEAR = 1,
236 	A5XX_TEX_ANISO = 2,
237 };
238 
239 enum a5xx_tex_clamp {
240 	A5XX_TEX_REPEAT = 0,
241 	A5XX_TEX_CLAMP_TO_EDGE = 1,
242 	A5XX_TEX_MIRROR_REPEAT = 2,
243 	A5XX_TEX_CLAMP_TO_BORDER = 3,
244 	A5XX_TEX_MIRROR_CLAMP = 4,
245 };
246 
247 enum a5xx_tex_aniso {
248 	A5XX_TEX_ANISO_1 = 0,
249 	A5XX_TEX_ANISO_2 = 1,
250 	A5XX_TEX_ANISO_4 = 2,
251 	A5XX_TEX_ANISO_8 = 3,
252 	A5XX_TEX_ANISO_16 = 4,
253 };
254 
255 enum a5xx_tex_swiz {
256 	A5XX_TEX_X = 0,
257 	A5XX_TEX_Y = 1,
258 	A5XX_TEX_Z = 2,
259 	A5XX_TEX_W = 3,
260 	A5XX_TEX_ZERO = 4,
261 	A5XX_TEX_ONE = 5,
262 };
263 
264 enum a5xx_tex_type {
265 	A5XX_TEX_1D = 0,
266 	A5XX_TEX_2D = 1,
267 	A5XX_TEX_CUBE = 2,
268 	A5XX_TEX_3D = 3,
269 };
270 
271 #define A5XX_INT0_RBBM_GPU_IDLE					0x00000001
272 #define A5XX_INT0_RBBM_AHB_ERROR				0x00000002
273 #define A5XX_INT0_RBBM_TRANSFER_TIMEOUT				0x00000004
274 #define A5XX_INT0_RBBM_ME_MS_TIMEOUT				0x00000008
275 #define A5XX_INT0_RBBM_PFP_MS_TIMEOUT				0x00000010
276 #define A5XX_INT0_RBBM_ETS_MS_TIMEOUT				0x00000020
277 #define A5XX_INT0_RBBM_ATB_ASYNC_OVERFLOW			0x00000040
278 #define A5XX_INT0_RBBM_GPC_ERROR				0x00000080
279 #define A5XX_INT0_CP_SW						0x00000100
280 #define A5XX_INT0_CP_HW_ERROR					0x00000200
281 #define A5XX_INT0_CP_CCU_FLUSH_DEPTH_TS				0x00000400
282 #define A5XX_INT0_CP_CCU_FLUSH_COLOR_TS				0x00000800
283 #define A5XX_INT0_CP_CCU_RESOLVE_TS				0x00001000
284 #define A5XX_INT0_CP_IB2					0x00002000
285 #define A5XX_INT0_CP_IB1					0x00004000
286 #define A5XX_INT0_CP_RB						0x00008000
287 #define A5XX_INT0_CP_UNUSED_1					0x00010000
288 #define A5XX_INT0_CP_RB_DONE_TS					0x00020000
289 #define A5XX_INT0_CP_WT_DONE_TS					0x00040000
290 #define A5XX_INT0_UNKNOWN_1					0x00080000
291 #define A5XX_INT0_CP_CACHE_FLUSH_TS				0x00100000
292 #define A5XX_INT0_UNUSED_2					0x00200000
293 #define A5XX_INT0_RBBM_ATB_BUS_OVERFLOW				0x00400000
294 #define A5XX_INT0_MISC_HANG_DETECT				0x00800000
295 #define A5XX_INT0_UCHE_OOB_ACCESS				0x01000000
296 #define A5XX_INT0_UCHE_TRAP_INTR				0x02000000
297 #define A5XX_INT0_DEBBUS_INTR_0					0x04000000
298 #define A5XX_INT0_DEBBUS_INTR_1					0x08000000
299 #define A5XX_INT0_GPMU_VOLTAGE_DROOP				0x10000000
300 #define A5XX_INT0_GPMU_FIRMWARE					0x20000000
301 #define A5XX_INT0_ISDB_CPU_IRQ					0x40000000
302 #define A5XX_INT0_ISDB_UNDER_DEBUG				0x80000000
303 #define A5XX_CP_INT_CP_OPCODE_ERROR				0x00000001
304 #define A5XX_CP_INT_CP_RESERVED_BIT_ERROR			0x00000002
305 #define A5XX_CP_INT_CP_HW_FAULT_ERROR				0x00000004
306 #define A5XX_CP_INT_CP_DMA_ERROR				0x00000008
307 #define A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR		0x00000010
308 #define A5XX_CP_INT_CP_AHB_ERROR				0x00000020
309 #define REG_A5XX_CP_RB_BASE					0x00000800
310 
311 #define REG_A5XX_CP_RB_BASE_HI					0x00000801
312 
313 #define REG_A5XX_CP_RB_CNTL					0x00000802
314 
315 #define REG_A5XX_CP_RB_RPTR_ADDR				0x00000804
316 
317 #define REG_A5XX_CP_RB_RPTR_ADDR_HI				0x00000805
318 
319 #define REG_A5XX_CP_RB_RPTR					0x00000806
320 
321 #define REG_A5XX_CP_RB_WPTR					0x00000807
322 
323 #define REG_A5XX_CP_PFP_STAT_ADDR				0x00000808
324 
325 #define REG_A5XX_CP_PFP_STAT_DATA				0x00000809
326 
327 #define REG_A5XX_CP_DRAW_STATE_ADDR				0x0000080b
328 
329 #define REG_A5XX_CP_DRAW_STATE_DATA				0x0000080c
330 
331 #define REG_A5XX_CP_CRASH_SCRIPT_BASE_LO			0x00000817
332 
333 #define REG_A5XX_CP_CRASH_SCRIPT_BASE_HI			0x00000818
334 
335 #define REG_A5XX_CP_CRASH_DUMP_CNTL				0x00000819
336 
337 #define REG_A5XX_CP_ME_STAT_ADDR				0x0000081a
338 
339 #define REG_A5XX_CP_ROQ_THRESHOLDS_1				0x0000081f
340 
341 #define REG_A5XX_CP_ROQ_THRESHOLDS_2				0x00000820
342 
343 #define REG_A5XX_CP_ROQ_DBG_ADDR				0x00000821
344 
345 #define REG_A5XX_CP_ROQ_DBG_DATA				0x00000822
346 
347 #define REG_A5XX_CP_MEQ_DBG_ADDR				0x00000823
348 
349 #define REG_A5XX_CP_MEQ_DBG_DATA				0x00000824
350 
351 #define REG_A5XX_CP_MEQ_THRESHOLDS				0x00000825
352 
353 #define REG_A5XX_CP_MERCIU_SIZE					0x00000826
354 
355 #define REG_A5XX_CP_MERCIU_DBG_ADDR				0x00000827
356 
357 #define REG_A5XX_CP_MERCIU_DBG_DATA_1				0x00000828
358 
359 #define REG_A5XX_CP_MERCIU_DBG_DATA_2				0x00000829
360 
361 #define REG_A5XX_CP_PFP_UCODE_DBG_ADDR				0x0000082a
362 
363 #define REG_A5XX_CP_PFP_UCODE_DBG_DATA				0x0000082b
364 
365 #define REG_A5XX_CP_ME_UCODE_DBG_ADDR				0x0000082f
366 
367 #define REG_A5XX_CP_ME_UCODE_DBG_DATA				0x00000830
368 
369 #define REG_A5XX_CP_CNTL					0x00000831
370 
371 #define REG_A5XX_CP_PFP_ME_CNTL					0x00000832
372 
373 #define REG_A5XX_CP_CHICKEN_DBG					0x00000833
374 
375 #define REG_A5XX_CP_PFP_INSTR_BASE_LO				0x00000835
376 
377 #define REG_A5XX_CP_PFP_INSTR_BASE_HI				0x00000836
378 
379 #define REG_A5XX_CP_ME_INSTR_BASE_LO				0x00000838
380 
381 #define REG_A5XX_CP_ME_INSTR_BASE_HI				0x00000839
382 
383 #define REG_A5XX_CP_CONTEXT_SWITCH_CNTL				0x0000083b
384 
385 #define REG_A5XX_CP_CONTEXT_SWITCH_RESTORE_ADDR_LO		0x0000083c
386 
387 #define REG_A5XX_CP_CONTEXT_SWITCH_RESTORE_ADDR_HI		0x0000083d
388 
389 #define REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_LO			0x0000083e
390 
391 #define REG_A5XX_CP_CONTEXT_SWITCH_SAVE_ADDR_HI			0x0000083f
392 
393 #define REG_A5XX_CP_CONTEXT_SWITCH_SMMU_INFO_LO			0x00000840
394 
395 #define REG_A5XX_CP_CONTEXT_SWITCH_SMMU_INFO_HI			0x00000841
396 
397 #define REG_A5XX_CP_ADDR_MODE_CNTL				0x00000860
398 
399 #define REG_A5XX_CP_ME_STAT_DATA				0x00000b14
400 
401 #define REG_A5XX_CP_WFI_PEND_CTR				0x00000b15
402 
403 #define REG_A5XX_CP_INTERRUPT_STATUS				0x00000b18
404 
405 #define REG_A5XX_CP_HW_FAULT					0x00000b1a
406 
407 #define REG_A5XX_CP_PROTECT_STATUS				0x00000b1c
408 
409 #define REG_A5XX_CP_IB1_BASE					0x00000b1f
410 
411 #define REG_A5XX_CP_IB1_BASE_HI					0x00000b20
412 
413 #define REG_A5XX_CP_IB1_BUFSZ					0x00000b21
414 
415 #define REG_A5XX_CP_IB2_BASE					0x00000b22
416 
417 #define REG_A5XX_CP_IB2_BASE_HI					0x00000b23
418 
419 #define REG_A5XX_CP_IB2_BUFSZ					0x00000b24
420 
REG_A5XX_CP_SCRATCH(uint32_t i0)421 static inline uint32_t REG_A5XX_CP_SCRATCH(uint32_t i0) { return 0x00000b78 + 0x1*i0; }
422 
REG_A5XX_CP_SCRATCH_REG(uint32_t i0)423 static inline uint32_t REG_A5XX_CP_SCRATCH_REG(uint32_t i0) { return 0x00000b78 + 0x1*i0; }
424 
REG_A5XX_CP_PROTECT(uint32_t i0)425 static inline uint32_t REG_A5XX_CP_PROTECT(uint32_t i0) { return 0x00000880 + 0x1*i0; }
426 
REG_A5XX_CP_PROTECT_REG(uint32_t i0)427 static inline uint32_t REG_A5XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000880 + 0x1*i0; }
428 #define A5XX_CP_PROTECT_REG_BASE_ADDR__MASK			0x0001ffff
429 #define A5XX_CP_PROTECT_REG_BASE_ADDR__SHIFT			0
A5XX_CP_PROTECT_REG_BASE_ADDR(uint32_t val)430 static inline uint32_t A5XX_CP_PROTECT_REG_BASE_ADDR(uint32_t val)
431 {
432 	return ((val) << A5XX_CP_PROTECT_REG_BASE_ADDR__SHIFT) & A5XX_CP_PROTECT_REG_BASE_ADDR__MASK;
433 }
434 #define A5XX_CP_PROTECT_REG_MASK_LEN__MASK			0x1f000000
435 #define A5XX_CP_PROTECT_REG_MASK_LEN__SHIFT			24
A5XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)436 static inline uint32_t A5XX_CP_PROTECT_REG_MASK_LEN(uint32_t val)
437 {
438 	return ((val) << A5XX_CP_PROTECT_REG_MASK_LEN__SHIFT) & A5XX_CP_PROTECT_REG_MASK_LEN__MASK;
439 }
440 #define A5XX_CP_PROTECT_REG_TRAP_WRITE				0x20000000
441 #define A5XX_CP_PROTECT_REG_TRAP_READ				0x40000000
442 
443 #define REG_A5XX_CP_PROTECT_CNTL				0x000008a0
444 
445 #define REG_A5XX_CP_AHB_FAULT					0x00000b1b
446 
447 #define REG_A5XX_CP_PERFCTR_CP_SEL_0				0x00000bb0
448 
449 #define REG_A5XX_CP_PERFCTR_CP_SEL_1				0x00000bb1
450 
451 #define REG_A5XX_CP_PERFCTR_CP_SEL_2				0x00000bb2
452 
453 #define REG_A5XX_CP_PERFCTR_CP_SEL_3				0x00000bb3
454 
455 #define REG_A5XX_CP_PERFCTR_CP_SEL_4				0x00000bb4
456 
457 #define REG_A5XX_CP_PERFCTR_CP_SEL_5				0x00000bb5
458 
459 #define REG_A5XX_CP_PERFCTR_CP_SEL_6				0x00000bb6
460 
461 #define REG_A5XX_CP_PERFCTR_CP_SEL_7				0x00000bb7
462 
463 #define REG_A5XX_VSC_ADDR_MODE_CNTL				0x00000bc1
464 
465 #define REG_A5XX_CP_POWERCTR_CP_SEL_0				0x00000bba
466 
467 #define REG_A5XX_CP_POWERCTR_CP_SEL_1				0x00000bbb
468 
469 #define REG_A5XX_CP_POWERCTR_CP_SEL_2				0x00000bbc
470 
471 #define REG_A5XX_CP_POWERCTR_CP_SEL_3				0x00000bbd
472 
473 #define REG_A5XX_RBBM_CFG_DBGBUS_SEL_A				0x00000004
474 
475 #define REG_A5XX_RBBM_CFG_DBGBUS_SEL_B				0x00000005
476 
477 #define REG_A5XX_RBBM_CFG_DBGBUS_SEL_C				0x00000006
478 
479 #define REG_A5XX_RBBM_CFG_DBGBUS_SEL_D				0x00000007
480 
481 #define REG_A5XX_RBBM_CFG_DBGBUS_CNTLT				0x00000008
482 
483 #define REG_A5XX_RBBM_CFG_DBGBUS_CNTLM				0x00000009
484 
485 #define REG_A5XX_RBBM_CFG_DEBBUS_CTLTM_ENABLE_SHIFT		0x00000018
486 
487 #define REG_A5XX_RBBM_CFG_DBGBUS_OPL				0x0000000a
488 
489 #define REG_A5XX_RBBM_CFG_DBGBUS_OPE				0x0000000b
490 
491 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTL_0				0x0000000c
492 
493 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTL_1				0x0000000d
494 
495 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTL_2				0x0000000e
496 
497 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTL_3				0x0000000f
498 
499 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKL_0			0x00000010
500 
501 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKL_1			0x00000011
502 
503 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKL_2			0x00000012
504 
505 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKL_3			0x00000013
506 
507 #define REG_A5XX_RBBM_CFG_DBGBUS_BYTEL_0			0x00000014
508 
509 #define REG_A5XX_RBBM_CFG_DBGBUS_BYTEL_1			0x00000015
510 
511 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTE_0				0x00000016
512 
513 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTE_1				0x00000017
514 
515 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTE_2				0x00000018
516 
517 #define REG_A5XX_RBBM_CFG_DBGBUS_IVTE_3				0x00000019
518 
519 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKE_0			0x0000001a
520 
521 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKE_1			0x0000001b
522 
523 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKE_2			0x0000001c
524 
525 #define REG_A5XX_RBBM_CFG_DBGBUS_MASKE_3			0x0000001d
526 
527 #define REG_A5XX_RBBM_CFG_DBGBUS_NIBBLEE			0x0000001e
528 
529 #define REG_A5XX_RBBM_CFG_DBGBUS_PTRC0				0x0000001f
530 
531 #define REG_A5XX_RBBM_CFG_DBGBUS_PTRC1				0x00000020
532 
533 #define REG_A5XX_RBBM_CFG_DBGBUS_LOADREG			0x00000021
534 
535 #define REG_A5XX_RBBM_CFG_DBGBUS_IDX				0x00000022
536 
537 #define REG_A5XX_RBBM_CFG_DBGBUS_CLRC				0x00000023
538 
539 #define REG_A5XX_RBBM_CFG_DBGBUS_LOADIVT			0x00000024
540 
541 #define REG_A5XX_RBBM_INTERFACE_HANG_INT_CNTL			0x0000002f
542 
543 #define REG_A5XX_RBBM_INT_CLEAR_CMD				0x00000037
544 
545 #define REG_A5XX_RBBM_INT_0_MASK				0x00000038
546 #define A5XX_RBBM_INT_0_MASK_RBBM_GPU_IDLE			0x00000001
547 #define A5XX_RBBM_INT_0_MASK_RBBM_AHB_ERROR			0x00000002
548 #define A5XX_RBBM_INT_0_MASK_RBBM_TRANSFER_TIMEOUT		0x00000004
549 #define A5XX_RBBM_INT_0_MASK_RBBM_ME_MS_TIMEOUT			0x00000008
550 #define A5XX_RBBM_INT_0_MASK_RBBM_PFP_MS_TIMEOUT		0x00000010
551 #define A5XX_RBBM_INT_0_MASK_RBBM_ETS_MS_TIMEOUT		0x00000020
552 #define A5XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNC_OVERFLOW		0x00000040
553 #define A5XX_RBBM_INT_0_MASK_RBBM_GPC_ERROR			0x00000080
554 #define A5XX_RBBM_INT_0_MASK_CP_SW				0x00000100
555 #define A5XX_RBBM_INT_0_MASK_CP_HW_ERROR			0x00000200
556 #define A5XX_RBBM_INT_0_MASK_CP_CCU_FLUSH_DEPTH_TS		0x00000400
557 #define A5XX_RBBM_INT_0_MASK_CP_CCU_FLUSH_COLOR_TS		0x00000800
558 #define A5XX_RBBM_INT_0_MASK_CP_CCU_RESOLVE_TS			0x00001000
559 #define A5XX_RBBM_INT_0_MASK_CP_IB2				0x00002000
560 #define A5XX_RBBM_INT_0_MASK_CP_IB1				0x00004000
561 #define A5XX_RBBM_INT_0_MASK_CP_RB				0x00008000
562 #define A5XX_RBBM_INT_0_MASK_CP_RB_DONE_TS			0x00020000
563 #define A5XX_RBBM_INT_0_MASK_CP_WT_DONE_TS			0x00040000
564 #define A5XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS			0x00100000
565 #define A5XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW		0x00400000
566 #define A5XX_RBBM_INT_0_MASK_MISC_HANG_DETECT			0x00800000
567 #define A5XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS			0x01000000
568 #define A5XX_RBBM_INT_0_MASK_UCHE_TRAP_INTR			0x02000000
569 #define A5XX_RBBM_INT_0_MASK_DEBBUS_INTR_0			0x04000000
570 #define A5XX_RBBM_INT_0_MASK_DEBBUS_INTR_1			0x08000000
571 #define A5XX_RBBM_INT_0_MASK_GPMU_VOLTAGE_DROOP			0x10000000
572 #define A5XX_RBBM_INT_0_MASK_GPMU_FIRMWARE			0x20000000
573 #define A5XX_RBBM_INT_0_MASK_ISDB_CPU_IRQ			0x40000000
574 #define A5XX_RBBM_INT_0_MASK_ISDB_UNDER_DEBUG			0x80000000
575 
576 #define REG_A5XX_RBBM_AHB_DBG_CNTL				0x0000003f
577 
578 #define REG_A5XX_RBBM_EXT_VBIF_DBG_CNTL				0x00000041
579 
580 #define REG_A5XX_RBBM_SW_RESET_CMD				0x00000043
581 
582 #define REG_A5XX_RBBM_BLOCK_SW_RESET_CMD			0x00000045
583 
584 #define REG_A5XX_RBBM_BLOCK_SW_RESET_CMD2			0x00000046
585 
586 #define REG_A5XX_RBBM_DBG_LO_HI_GPIO				0x00000048
587 
588 #define REG_A5XX_RBBM_EXT_TRACE_BUS_CNTL			0x00000049
589 
590 #define REG_A5XX_RBBM_CLOCK_CNTL_TP0				0x0000004a
591 
592 #define REG_A5XX_RBBM_CLOCK_CNTL_TP1				0x0000004b
593 
594 #define REG_A5XX_RBBM_CLOCK_CNTL_TP2				0x0000004c
595 
596 #define REG_A5XX_RBBM_CLOCK_CNTL_TP3				0x0000004d
597 
598 #define REG_A5XX_RBBM_CLOCK_CNTL2_TP0				0x0000004e
599 
600 #define REG_A5XX_RBBM_CLOCK_CNTL2_TP1				0x0000004f
601 
602 #define REG_A5XX_RBBM_CLOCK_CNTL2_TP2				0x00000050
603 
604 #define REG_A5XX_RBBM_CLOCK_CNTL2_TP3				0x00000051
605 
606 #define REG_A5XX_RBBM_CLOCK_CNTL3_TP0				0x00000052
607 
608 #define REG_A5XX_RBBM_CLOCK_CNTL3_TP1				0x00000053
609 
610 #define REG_A5XX_RBBM_CLOCK_CNTL3_TP2				0x00000054
611 
612 #define REG_A5XX_RBBM_CLOCK_CNTL3_TP3				0x00000055
613 
614 #define REG_A5XX_RBBM_READ_AHB_THROUGH_DBG			0x00000059
615 
616 #define REG_A5XX_RBBM_CLOCK_CNTL_UCHE				0x0000005a
617 
618 #define REG_A5XX_RBBM_CLOCK_CNTL2_UCHE				0x0000005b
619 
620 #define REG_A5XX_RBBM_CLOCK_CNTL3_UCHE				0x0000005c
621 
622 #define REG_A5XX_RBBM_CLOCK_CNTL4_UCHE				0x0000005d
623 
624 #define REG_A5XX_RBBM_CLOCK_HYST_UCHE				0x0000005e
625 
626 #define REG_A5XX_RBBM_CLOCK_DELAY_UCHE				0x0000005f
627 
628 #define REG_A5XX_RBBM_CLOCK_MODE_GPC				0x00000060
629 
630 #define REG_A5XX_RBBM_CLOCK_DELAY_GPC				0x00000061
631 
632 #define REG_A5XX_RBBM_CLOCK_HYST_GPC				0x00000062
633 
634 #define REG_A5XX_RBBM_CLOCK_CNTL_TSE_RAS_RBBM			0x00000063
635 
636 #define REG_A5XX_RBBM_CLOCK_HYST_TSE_RAS_RBBM			0x00000064
637 
638 #define REG_A5XX_RBBM_CLOCK_DELAY_TSE_RAS_RBBM			0x00000065
639 
640 #define REG_A5XX_RBBM_CLOCK_DELAY_HLSQ				0x00000066
641 
642 #define REG_A5XX_RBBM_CLOCK_CNTL				0x00000067
643 
644 #define REG_A5XX_RBBM_CLOCK_CNTL_SP0				0x00000068
645 
646 #define REG_A5XX_RBBM_CLOCK_CNTL_SP1				0x00000069
647 
648 #define REG_A5XX_RBBM_CLOCK_CNTL_SP2				0x0000006a
649 
650 #define REG_A5XX_RBBM_CLOCK_CNTL_SP3				0x0000006b
651 
652 #define REG_A5XX_RBBM_CLOCK_CNTL2_SP0				0x0000006c
653 
654 #define REG_A5XX_RBBM_CLOCK_CNTL2_SP1				0x0000006d
655 
656 #define REG_A5XX_RBBM_CLOCK_CNTL2_SP2				0x0000006e
657 
658 #define REG_A5XX_RBBM_CLOCK_CNTL2_SP3				0x0000006f
659 
660 #define REG_A5XX_RBBM_CLOCK_HYST_SP0				0x00000070
661 
662 #define REG_A5XX_RBBM_CLOCK_HYST_SP1				0x00000071
663 
664 #define REG_A5XX_RBBM_CLOCK_HYST_SP2				0x00000072
665 
666 #define REG_A5XX_RBBM_CLOCK_HYST_SP3				0x00000073
667 
668 #define REG_A5XX_RBBM_CLOCK_DELAY_SP0				0x00000074
669 
670 #define REG_A5XX_RBBM_CLOCK_DELAY_SP1				0x00000075
671 
672 #define REG_A5XX_RBBM_CLOCK_DELAY_SP2				0x00000076
673 
674 #define REG_A5XX_RBBM_CLOCK_DELAY_SP3				0x00000077
675 
676 #define REG_A5XX_RBBM_CLOCK_CNTL_RB0				0x00000078
677 
678 #define REG_A5XX_RBBM_CLOCK_CNTL_RB1				0x00000079
679 
680 #define REG_A5XX_RBBM_CLOCK_CNTL_RB2				0x0000007a
681 
682 #define REG_A5XX_RBBM_CLOCK_CNTL_RB3				0x0000007b
683 
684 #define REG_A5XX_RBBM_CLOCK_CNTL2_RB0				0x0000007c
685 
686 #define REG_A5XX_RBBM_CLOCK_CNTL2_RB1				0x0000007d
687 
688 #define REG_A5XX_RBBM_CLOCK_CNTL2_RB2				0x0000007e
689 
690 #define REG_A5XX_RBBM_CLOCK_CNTL2_RB3				0x0000007f
691 
692 #define REG_A5XX_RBBM_CLOCK_HYST_RAC				0x00000080
693 
694 #define REG_A5XX_RBBM_CLOCK_DELAY_RAC				0x00000081
695 
696 #define REG_A5XX_RBBM_CLOCK_CNTL_CCU0				0x00000082
697 
698 #define REG_A5XX_RBBM_CLOCK_CNTL_CCU1				0x00000083
699 
700 #define REG_A5XX_RBBM_CLOCK_CNTL_CCU2				0x00000084
701 
702 #define REG_A5XX_RBBM_CLOCK_CNTL_CCU3				0x00000085
703 
704 #define REG_A5XX_RBBM_CLOCK_HYST_RB_CCU0			0x00000086
705 
706 #define REG_A5XX_RBBM_CLOCK_HYST_RB_CCU1			0x00000087
707 
708 #define REG_A5XX_RBBM_CLOCK_HYST_RB_CCU2			0x00000088
709 
710 #define REG_A5XX_RBBM_CLOCK_HYST_RB_CCU3			0x00000089
711 
712 #define REG_A5XX_RBBM_CLOCK_CNTL_RAC				0x0000008a
713 
714 #define REG_A5XX_RBBM_CLOCK_CNTL2_RAC				0x0000008b
715 
716 #define REG_A5XX_RBBM_CLOCK_DELAY_RB_CCU_L1_0			0x0000008c
717 
718 #define REG_A5XX_RBBM_CLOCK_DELAY_RB_CCU_L1_1			0x0000008d
719 
720 #define REG_A5XX_RBBM_CLOCK_DELAY_RB_CCU_L1_2			0x0000008e
721 
722 #define REG_A5XX_RBBM_CLOCK_DELAY_RB_CCU_L1_3			0x0000008f
723 
724 #define REG_A5XX_RBBM_CLOCK_HYST_VFD				0x00000090
725 
726 #define REG_A5XX_RBBM_CLOCK_MODE_VFD				0x00000091
727 
728 #define REG_A5XX_RBBM_CLOCK_DELAY_VFD				0x00000092
729 
730 #define REG_A5XX_RBBM_AHB_CNTL0					0x00000093
731 
732 #define REG_A5XX_RBBM_AHB_CNTL1					0x00000094
733 
734 #define REG_A5XX_RBBM_AHB_CNTL2					0x00000095
735 
736 #define REG_A5XX_RBBM_AHB_CMD					0x00000096
737 
738 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL11		0x0000009c
739 
740 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL12		0x0000009d
741 
742 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL13		0x0000009e
743 
744 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL14		0x0000009f
745 
746 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL15		0x000000a0
747 
748 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL16		0x000000a1
749 
750 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL17		0x000000a2
751 
752 #define REG_A5XX_RBBM_INTERFACE_HANG_MASK_CNTL18		0x000000a3
753 
754 #define REG_A5XX_RBBM_CLOCK_DELAY_TP0				0x000000a4
755 
756 #define REG_A5XX_RBBM_CLOCK_DELAY_TP1				0x000000a5
757 
758 #define REG_A5XX_RBBM_CLOCK_DELAY_TP2				0x000000a6
759 
760 #define REG_A5XX_RBBM_CLOCK_DELAY_TP3				0x000000a7
761 
762 #define REG_A5XX_RBBM_CLOCK_DELAY2_TP0				0x000000a8
763 
764 #define REG_A5XX_RBBM_CLOCK_DELAY2_TP1				0x000000a9
765 
766 #define REG_A5XX_RBBM_CLOCK_DELAY2_TP2				0x000000aa
767 
768 #define REG_A5XX_RBBM_CLOCK_DELAY2_TP3				0x000000ab
769 
770 #define REG_A5XX_RBBM_CLOCK_DELAY3_TP0				0x000000ac
771 
772 #define REG_A5XX_RBBM_CLOCK_DELAY3_TP1				0x000000ad
773 
774 #define REG_A5XX_RBBM_CLOCK_DELAY3_TP2				0x000000ae
775 
776 #define REG_A5XX_RBBM_CLOCK_DELAY3_TP3				0x000000af
777 
778 #define REG_A5XX_RBBM_CLOCK_HYST_TP0				0x000000b0
779 
780 #define REG_A5XX_RBBM_CLOCK_HYST_TP1				0x000000b1
781 
782 #define REG_A5XX_RBBM_CLOCK_HYST_TP2				0x000000b2
783 
784 #define REG_A5XX_RBBM_CLOCK_HYST_TP3				0x000000b3
785 
786 #define REG_A5XX_RBBM_CLOCK_HYST2_TP0				0x000000b4
787 
788 #define REG_A5XX_RBBM_CLOCK_HYST2_TP1				0x000000b5
789 
790 #define REG_A5XX_RBBM_CLOCK_HYST2_TP2				0x000000b6
791 
792 #define REG_A5XX_RBBM_CLOCK_HYST2_TP3				0x000000b7
793 
794 #define REG_A5XX_RBBM_CLOCK_HYST3_TP0				0x000000b8
795 
796 #define REG_A5XX_RBBM_CLOCK_HYST3_TP1				0x000000b9
797 
798 #define REG_A5XX_RBBM_CLOCK_HYST3_TP2				0x000000ba
799 
800 #define REG_A5XX_RBBM_CLOCK_HYST3_TP3				0x000000bb
801 
802 #define REG_A5XX_RBBM_CLOCK_CNTL_GPMU				0x000000c8
803 
804 #define REG_A5XX_RBBM_CLOCK_DELAY_GPMU				0x000000c9
805 
806 #define REG_A5XX_RBBM_CLOCK_HYST_GPMU				0x000000ca
807 
808 #define REG_A5XX_RBBM_PERFCTR_CP_0_LO				0x000003a0
809 
810 #define REG_A5XX_RBBM_PERFCTR_CP_0_HI				0x000003a1
811 
812 #define REG_A5XX_RBBM_PERFCTR_CP_1_LO				0x000003a2
813 
814 #define REG_A5XX_RBBM_PERFCTR_CP_1_HI				0x000003a3
815 
816 #define REG_A5XX_RBBM_PERFCTR_CP_2_LO				0x000003a4
817 
818 #define REG_A5XX_RBBM_PERFCTR_CP_2_HI				0x000003a5
819 
820 #define REG_A5XX_RBBM_PERFCTR_CP_3_LO				0x000003a6
821 
822 #define REG_A5XX_RBBM_PERFCTR_CP_3_HI				0x000003a7
823 
824 #define REG_A5XX_RBBM_PERFCTR_CP_4_LO				0x000003a8
825 
826 #define REG_A5XX_RBBM_PERFCTR_CP_4_HI				0x000003a9
827 
828 #define REG_A5XX_RBBM_PERFCTR_CP_5_LO				0x000003aa
829 
830 #define REG_A5XX_RBBM_PERFCTR_CP_5_HI				0x000003ab
831 
832 #define REG_A5XX_RBBM_PERFCTR_CP_6_LO				0x000003ac
833 
834 #define REG_A5XX_RBBM_PERFCTR_CP_6_HI				0x000003ad
835 
836 #define REG_A5XX_RBBM_PERFCTR_CP_7_LO				0x000003ae
837 
838 #define REG_A5XX_RBBM_PERFCTR_CP_7_HI				0x000003af
839 
840 #define REG_A5XX_RBBM_PERFCTR_RBBM_0_LO				0x000003b0
841 
842 #define REG_A5XX_RBBM_PERFCTR_RBBM_0_HI				0x000003b1
843 
844 #define REG_A5XX_RBBM_PERFCTR_RBBM_1_LO				0x000003b2
845 
846 #define REG_A5XX_RBBM_PERFCTR_RBBM_1_HI				0x000003b3
847 
848 #define REG_A5XX_RBBM_PERFCTR_RBBM_2_LO				0x000003b4
849 
850 #define REG_A5XX_RBBM_PERFCTR_RBBM_2_HI				0x000003b5
851 
852 #define REG_A5XX_RBBM_PERFCTR_RBBM_3_LO				0x000003b6
853 
854 #define REG_A5XX_RBBM_PERFCTR_RBBM_3_HI				0x000003b7
855 
856 #define REG_A5XX_RBBM_PERFCTR_PC_0_LO				0x000003b8
857 
858 #define REG_A5XX_RBBM_PERFCTR_PC_0_HI				0x000003b9
859 
860 #define REG_A5XX_RBBM_PERFCTR_PC_1_LO				0x000003ba
861 
862 #define REG_A5XX_RBBM_PERFCTR_PC_1_HI				0x000003bb
863 
864 #define REG_A5XX_RBBM_PERFCTR_PC_2_LO				0x000003bc
865 
866 #define REG_A5XX_RBBM_PERFCTR_PC_2_HI				0x000003bd
867 
868 #define REG_A5XX_RBBM_PERFCTR_PC_3_LO				0x000003be
869 
870 #define REG_A5XX_RBBM_PERFCTR_PC_3_HI				0x000003bf
871 
872 #define REG_A5XX_RBBM_PERFCTR_PC_4_LO				0x000003c0
873 
874 #define REG_A5XX_RBBM_PERFCTR_PC_4_HI				0x000003c1
875 
876 #define REG_A5XX_RBBM_PERFCTR_PC_5_LO				0x000003c2
877 
878 #define REG_A5XX_RBBM_PERFCTR_PC_5_HI				0x000003c3
879 
880 #define REG_A5XX_RBBM_PERFCTR_PC_6_LO				0x000003c4
881 
882 #define REG_A5XX_RBBM_PERFCTR_PC_6_HI				0x000003c5
883 
884 #define REG_A5XX_RBBM_PERFCTR_PC_7_LO				0x000003c6
885 
886 #define REG_A5XX_RBBM_PERFCTR_PC_7_HI				0x000003c7
887 
888 #define REG_A5XX_RBBM_PERFCTR_VFD_0_LO				0x000003c8
889 
890 #define REG_A5XX_RBBM_PERFCTR_VFD_0_HI				0x000003c9
891 
892 #define REG_A5XX_RBBM_PERFCTR_VFD_1_LO				0x000003ca
893 
894 #define REG_A5XX_RBBM_PERFCTR_VFD_1_HI				0x000003cb
895 
896 #define REG_A5XX_RBBM_PERFCTR_VFD_2_LO				0x000003cc
897 
898 #define REG_A5XX_RBBM_PERFCTR_VFD_2_HI				0x000003cd
899 
900 #define REG_A5XX_RBBM_PERFCTR_VFD_3_LO				0x000003ce
901 
902 #define REG_A5XX_RBBM_PERFCTR_VFD_3_HI				0x000003cf
903 
904 #define REG_A5XX_RBBM_PERFCTR_VFD_4_LO				0x000003d0
905 
906 #define REG_A5XX_RBBM_PERFCTR_VFD_4_HI				0x000003d1
907 
908 #define REG_A5XX_RBBM_PERFCTR_VFD_5_LO				0x000003d2
909 
910 #define REG_A5XX_RBBM_PERFCTR_VFD_5_HI				0x000003d3
911 
912 #define REG_A5XX_RBBM_PERFCTR_VFD_6_LO				0x000003d4
913 
914 #define REG_A5XX_RBBM_PERFCTR_VFD_6_HI				0x000003d5
915 
916 #define REG_A5XX_RBBM_PERFCTR_VFD_7_LO				0x000003d6
917 
918 #define REG_A5XX_RBBM_PERFCTR_VFD_7_HI				0x000003d7
919 
920 #define REG_A5XX_RBBM_PERFCTR_HLSQ_0_LO				0x000003d8
921 
922 #define REG_A5XX_RBBM_PERFCTR_HLSQ_0_HI				0x000003d9
923 
924 #define REG_A5XX_RBBM_PERFCTR_HLSQ_1_LO				0x000003da
925 
926 #define REG_A5XX_RBBM_PERFCTR_HLSQ_1_HI				0x000003db
927 
928 #define REG_A5XX_RBBM_PERFCTR_HLSQ_2_LO				0x000003dc
929 
930 #define REG_A5XX_RBBM_PERFCTR_HLSQ_2_HI				0x000003dd
931 
932 #define REG_A5XX_RBBM_PERFCTR_HLSQ_3_LO				0x000003de
933 
934 #define REG_A5XX_RBBM_PERFCTR_HLSQ_3_HI				0x000003df
935 
936 #define REG_A5XX_RBBM_PERFCTR_HLSQ_4_LO				0x000003e0
937 
938 #define REG_A5XX_RBBM_PERFCTR_HLSQ_4_HI				0x000003e1
939 
940 #define REG_A5XX_RBBM_PERFCTR_HLSQ_5_LO				0x000003e2
941 
942 #define REG_A5XX_RBBM_PERFCTR_HLSQ_5_HI				0x000003e3
943 
944 #define REG_A5XX_RBBM_PERFCTR_HLSQ_6_LO				0x000003e4
945 
946 #define REG_A5XX_RBBM_PERFCTR_HLSQ_6_HI				0x000003e5
947 
948 #define REG_A5XX_RBBM_PERFCTR_HLSQ_7_LO				0x000003e6
949 
950 #define REG_A5XX_RBBM_PERFCTR_HLSQ_7_HI				0x000003e7
951 
952 #define REG_A5XX_RBBM_PERFCTR_VPC_0_LO				0x000003e8
953 
954 #define REG_A5XX_RBBM_PERFCTR_VPC_0_HI				0x000003e9
955 
956 #define REG_A5XX_RBBM_PERFCTR_VPC_1_LO				0x000003ea
957 
958 #define REG_A5XX_RBBM_PERFCTR_VPC_1_HI				0x000003eb
959 
960 #define REG_A5XX_RBBM_PERFCTR_VPC_2_LO				0x000003ec
961 
962 #define REG_A5XX_RBBM_PERFCTR_VPC_2_HI				0x000003ed
963 
964 #define REG_A5XX_RBBM_PERFCTR_VPC_3_LO				0x000003ee
965 
966 #define REG_A5XX_RBBM_PERFCTR_VPC_3_HI				0x000003ef
967 
968 #define REG_A5XX_RBBM_PERFCTR_CCU_0_LO				0x000003f0
969 
970 #define REG_A5XX_RBBM_PERFCTR_CCU_0_HI				0x000003f1
971 
972 #define REG_A5XX_RBBM_PERFCTR_CCU_1_LO				0x000003f2
973 
974 #define REG_A5XX_RBBM_PERFCTR_CCU_1_HI				0x000003f3
975 
976 #define REG_A5XX_RBBM_PERFCTR_CCU_2_LO				0x000003f4
977 
978 #define REG_A5XX_RBBM_PERFCTR_CCU_2_HI				0x000003f5
979 
980 #define REG_A5XX_RBBM_PERFCTR_CCU_3_LO				0x000003f6
981 
982 #define REG_A5XX_RBBM_PERFCTR_CCU_3_HI				0x000003f7
983 
984 #define REG_A5XX_RBBM_PERFCTR_TSE_0_LO				0x000003f8
985 
986 #define REG_A5XX_RBBM_PERFCTR_TSE_0_HI				0x000003f9
987 
988 #define REG_A5XX_RBBM_PERFCTR_TSE_1_LO				0x000003fa
989 
990 #define REG_A5XX_RBBM_PERFCTR_TSE_1_HI				0x000003fb
991 
992 #define REG_A5XX_RBBM_PERFCTR_TSE_2_LO				0x000003fc
993 
994 #define REG_A5XX_RBBM_PERFCTR_TSE_2_HI				0x000003fd
995 
996 #define REG_A5XX_RBBM_PERFCTR_TSE_3_LO				0x000003fe
997 
998 #define REG_A5XX_RBBM_PERFCTR_TSE_3_HI				0x000003ff
999 
1000 #define REG_A5XX_RBBM_PERFCTR_RAS_0_LO				0x00000400
1001 
1002 #define REG_A5XX_RBBM_PERFCTR_RAS_0_HI				0x00000401
1003 
1004 #define REG_A5XX_RBBM_PERFCTR_RAS_1_LO				0x00000402
1005 
1006 #define REG_A5XX_RBBM_PERFCTR_RAS_1_HI				0x00000403
1007 
1008 #define REG_A5XX_RBBM_PERFCTR_RAS_2_LO				0x00000404
1009 
1010 #define REG_A5XX_RBBM_PERFCTR_RAS_2_HI				0x00000405
1011 
1012 #define REG_A5XX_RBBM_PERFCTR_RAS_3_LO				0x00000406
1013 
1014 #define REG_A5XX_RBBM_PERFCTR_RAS_3_HI				0x00000407
1015 
1016 #define REG_A5XX_RBBM_PERFCTR_UCHE_0_LO				0x00000408
1017 
1018 #define REG_A5XX_RBBM_PERFCTR_UCHE_0_HI				0x00000409
1019 
1020 #define REG_A5XX_RBBM_PERFCTR_UCHE_1_LO				0x0000040a
1021 
1022 #define REG_A5XX_RBBM_PERFCTR_UCHE_1_HI				0x0000040b
1023 
1024 #define REG_A5XX_RBBM_PERFCTR_UCHE_2_LO				0x0000040c
1025 
1026 #define REG_A5XX_RBBM_PERFCTR_UCHE_2_HI				0x0000040d
1027 
1028 #define REG_A5XX_RBBM_PERFCTR_UCHE_3_LO				0x0000040e
1029 
1030 #define REG_A5XX_RBBM_PERFCTR_UCHE_3_HI				0x0000040f
1031 
1032 #define REG_A5XX_RBBM_PERFCTR_UCHE_4_LO				0x00000410
1033 
1034 #define REG_A5XX_RBBM_PERFCTR_UCHE_4_HI				0x00000411
1035 
1036 #define REG_A5XX_RBBM_PERFCTR_UCHE_5_LO				0x00000412
1037 
1038 #define REG_A5XX_RBBM_PERFCTR_UCHE_5_HI				0x00000413
1039 
1040 #define REG_A5XX_RBBM_PERFCTR_UCHE_6_LO				0x00000414
1041 
1042 #define REG_A5XX_RBBM_PERFCTR_UCHE_6_HI				0x00000415
1043 
1044 #define REG_A5XX_RBBM_PERFCTR_UCHE_7_LO				0x00000416
1045 
1046 #define REG_A5XX_RBBM_PERFCTR_UCHE_7_HI				0x00000417
1047 
1048 #define REG_A5XX_RBBM_PERFCTR_TP_0_LO				0x00000418
1049 
1050 #define REG_A5XX_RBBM_PERFCTR_TP_0_HI				0x00000419
1051 
1052 #define REG_A5XX_RBBM_PERFCTR_TP_1_LO				0x0000041a
1053 
1054 #define REG_A5XX_RBBM_PERFCTR_TP_1_HI				0x0000041b
1055 
1056 #define REG_A5XX_RBBM_PERFCTR_TP_2_LO				0x0000041c
1057 
1058 #define REG_A5XX_RBBM_PERFCTR_TP_2_HI				0x0000041d
1059 
1060 #define REG_A5XX_RBBM_PERFCTR_TP_3_LO				0x0000041e
1061 
1062 #define REG_A5XX_RBBM_PERFCTR_TP_3_HI				0x0000041f
1063 
1064 #define REG_A5XX_RBBM_PERFCTR_TP_4_LO				0x00000420
1065 
1066 #define REG_A5XX_RBBM_PERFCTR_TP_4_HI				0x00000421
1067 
1068 #define REG_A5XX_RBBM_PERFCTR_TP_5_LO				0x00000422
1069 
1070 #define REG_A5XX_RBBM_PERFCTR_TP_5_HI				0x00000423
1071 
1072 #define REG_A5XX_RBBM_PERFCTR_TP_6_LO				0x00000424
1073 
1074 #define REG_A5XX_RBBM_PERFCTR_TP_6_HI				0x00000425
1075 
1076 #define REG_A5XX_RBBM_PERFCTR_TP_7_LO				0x00000426
1077 
1078 #define REG_A5XX_RBBM_PERFCTR_TP_7_HI				0x00000427
1079 
1080 #define REG_A5XX_RBBM_PERFCTR_SP_0_LO				0x00000428
1081 
1082 #define REG_A5XX_RBBM_PERFCTR_SP_0_HI				0x00000429
1083 
1084 #define REG_A5XX_RBBM_PERFCTR_SP_1_LO				0x0000042a
1085 
1086 #define REG_A5XX_RBBM_PERFCTR_SP_1_HI				0x0000042b
1087 
1088 #define REG_A5XX_RBBM_PERFCTR_SP_2_LO				0x0000042c
1089 
1090 #define REG_A5XX_RBBM_PERFCTR_SP_2_HI				0x0000042d
1091 
1092 #define REG_A5XX_RBBM_PERFCTR_SP_3_LO				0x0000042e
1093 
1094 #define REG_A5XX_RBBM_PERFCTR_SP_3_HI				0x0000042f
1095 
1096 #define REG_A5XX_RBBM_PERFCTR_SP_4_LO				0x00000430
1097 
1098 #define REG_A5XX_RBBM_PERFCTR_SP_4_HI				0x00000431
1099 
1100 #define REG_A5XX_RBBM_PERFCTR_SP_5_LO				0x00000432
1101 
1102 #define REG_A5XX_RBBM_PERFCTR_SP_5_HI				0x00000433
1103 
1104 #define REG_A5XX_RBBM_PERFCTR_SP_6_LO				0x00000434
1105 
1106 #define REG_A5XX_RBBM_PERFCTR_SP_6_HI				0x00000435
1107 
1108 #define REG_A5XX_RBBM_PERFCTR_SP_7_LO				0x00000436
1109 
1110 #define REG_A5XX_RBBM_PERFCTR_SP_7_HI				0x00000437
1111 
1112 #define REG_A5XX_RBBM_PERFCTR_SP_8_LO				0x00000438
1113 
1114 #define REG_A5XX_RBBM_PERFCTR_SP_8_HI				0x00000439
1115 
1116 #define REG_A5XX_RBBM_PERFCTR_SP_9_LO				0x0000043a
1117 
1118 #define REG_A5XX_RBBM_PERFCTR_SP_9_HI				0x0000043b
1119 
1120 #define REG_A5XX_RBBM_PERFCTR_SP_10_LO				0x0000043c
1121 
1122 #define REG_A5XX_RBBM_PERFCTR_SP_10_HI				0x0000043d
1123 
1124 #define REG_A5XX_RBBM_PERFCTR_SP_11_LO				0x0000043e
1125 
1126 #define REG_A5XX_RBBM_PERFCTR_SP_11_HI				0x0000043f
1127 
1128 #define REG_A5XX_RBBM_PERFCTR_RB_0_LO				0x00000440
1129 
1130 #define REG_A5XX_RBBM_PERFCTR_RB_0_HI				0x00000441
1131 
1132 #define REG_A5XX_RBBM_PERFCTR_RB_1_LO				0x00000442
1133 
1134 #define REG_A5XX_RBBM_PERFCTR_RB_1_HI				0x00000443
1135 
1136 #define REG_A5XX_RBBM_PERFCTR_RB_2_LO				0x00000444
1137 
1138 #define REG_A5XX_RBBM_PERFCTR_RB_2_HI				0x00000445
1139 
1140 #define REG_A5XX_RBBM_PERFCTR_RB_3_LO				0x00000446
1141 
1142 #define REG_A5XX_RBBM_PERFCTR_RB_3_HI				0x00000447
1143 
1144 #define REG_A5XX_RBBM_PERFCTR_RB_4_LO				0x00000448
1145 
1146 #define REG_A5XX_RBBM_PERFCTR_RB_4_HI				0x00000449
1147 
1148 #define REG_A5XX_RBBM_PERFCTR_RB_5_LO				0x0000044a
1149 
1150 #define REG_A5XX_RBBM_PERFCTR_RB_5_HI				0x0000044b
1151 
1152 #define REG_A5XX_RBBM_PERFCTR_RB_6_LO				0x0000044c
1153 
1154 #define REG_A5XX_RBBM_PERFCTR_RB_6_HI				0x0000044d
1155 
1156 #define REG_A5XX_RBBM_PERFCTR_RB_7_LO				0x0000044e
1157 
1158 #define REG_A5XX_RBBM_PERFCTR_RB_7_HI				0x0000044f
1159 
1160 #define REG_A5XX_RBBM_PERFCTR_VSC_0_LO				0x00000450
1161 
1162 #define REG_A5XX_RBBM_PERFCTR_VSC_0_HI				0x00000451
1163 
1164 #define REG_A5XX_RBBM_PERFCTR_VSC_1_LO				0x00000452
1165 
1166 #define REG_A5XX_RBBM_PERFCTR_VSC_1_HI				0x00000453
1167 
1168 #define REG_A5XX_RBBM_PERFCTR_LRZ_0_LO				0x00000454
1169 
1170 #define REG_A5XX_RBBM_PERFCTR_LRZ_0_HI				0x00000455
1171 
1172 #define REG_A5XX_RBBM_PERFCTR_LRZ_1_LO				0x00000456
1173 
1174 #define REG_A5XX_RBBM_PERFCTR_LRZ_1_HI				0x00000457
1175 
1176 #define REG_A5XX_RBBM_PERFCTR_LRZ_2_LO				0x00000458
1177 
1178 #define REG_A5XX_RBBM_PERFCTR_LRZ_2_HI				0x00000459
1179 
1180 #define REG_A5XX_RBBM_PERFCTR_LRZ_3_LO				0x0000045a
1181 
1182 #define REG_A5XX_RBBM_PERFCTR_LRZ_3_HI				0x0000045b
1183 
1184 #define REG_A5XX_RBBM_PERFCTR_CMP_0_LO				0x0000045c
1185 
1186 #define REG_A5XX_RBBM_PERFCTR_CMP_0_HI				0x0000045d
1187 
1188 #define REG_A5XX_RBBM_PERFCTR_CMP_1_LO				0x0000045e
1189 
1190 #define REG_A5XX_RBBM_PERFCTR_CMP_1_HI				0x0000045f
1191 
1192 #define REG_A5XX_RBBM_PERFCTR_CMP_2_LO				0x00000460
1193 
1194 #define REG_A5XX_RBBM_PERFCTR_CMP_2_HI				0x00000461
1195 
1196 #define REG_A5XX_RBBM_PERFCTR_CMP_3_LO				0x00000462
1197 
1198 #define REG_A5XX_RBBM_PERFCTR_CMP_3_HI				0x00000463
1199 
1200 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_0			0x0000046b
1201 
1202 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_1			0x0000046c
1203 
1204 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_2			0x0000046d
1205 
1206 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_3			0x0000046e
1207 
1208 #define REG_A5XX_RBBM_ALWAYSON_COUNTER_LO			0x000004d2
1209 
1210 #define REG_A5XX_RBBM_ALWAYSON_COUNTER_HI			0x000004d3
1211 
1212 #define REG_A5XX_RBBM_STATUS					0x000004f5
1213 #define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB			0x80000000
1214 #define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_CP			0x40000000
1215 #define A5XX_RBBM_STATUS_HLSQ_BUSY				0x20000000
1216 #define A5XX_RBBM_STATUS_VSC_BUSY				0x10000000
1217 #define A5XX_RBBM_STATUS_TPL1_BUSY				0x08000000
1218 #define A5XX_RBBM_STATUS_SP_BUSY				0x04000000
1219 #define A5XX_RBBM_STATUS_UCHE_BUSY				0x02000000
1220 #define A5XX_RBBM_STATUS_VPC_BUSY				0x01000000
1221 #define A5XX_RBBM_STATUS_VFDP_BUSY				0x00800000
1222 #define A5XX_RBBM_STATUS_VFD_BUSY				0x00400000
1223 #define A5XX_RBBM_STATUS_TESS_BUSY				0x00200000
1224 #define A5XX_RBBM_STATUS_PC_VSD_BUSY				0x00100000
1225 #define A5XX_RBBM_STATUS_PC_DCALL_BUSY				0x00080000
1226 #define A5XX_RBBM_STATUS_GPMU_SLAVE_BUSY			0x00040000
1227 #define A5XX_RBBM_STATUS_DCOM_BUSY				0x00020000
1228 #define A5XX_RBBM_STATUS_COM_BUSY				0x00010000
1229 #define A5XX_RBBM_STATUS_LRZ_BUZY				0x00008000
1230 #define A5XX_RBBM_STATUS_A2D_DSP_BUSY				0x00004000
1231 #define A5XX_RBBM_STATUS_CCUFCHE_BUSY				0x00002000
1232 #define A5XX_RBBM_STATUS_RB_BUSY				0x00001000
1233 #define A5XX_RBBM_STATUS_RAS_BUSY				0x00000800
1234 #define A5XX_RBBM_STATUS_TSE_BUSY				0x00000400
1235 #define A5XX_RBBM_STATUS_VBIF_BUSY				0x00000200
1236 #define A5XX_RBBM_STATUS_GPU_BUSY_IGN_AHB_HYST			0x00000100
1237 #define A5XX_RBBM_STATUS_CP_BUSY_IGN_HYST			0x00000080
1238 #define A5XX_RBBM_STATUS_CP_BUSY				0x00000040
1239 #define A5XX_RBBM_STATUS_GPMU_MASTER_BUSY			0x00000020
1240 #define A5XX_RBBM_STATUS_CP_CRASH_BUSY				0x00000010
1241 #define A5XX_RBBM_STATUS_CP_ETS_BUSY				0x00000008
1242 #define A5XX_RBBM_STATUS_CP_PFP_BUSY				0x00000004
1243 #define A5XX_RBBM_STATUS_CP_ME_BUSY				0x00000002
1244 #define A5XX_RBBM_STATUS_HI_BUSY				0x00000001
1245 
1246 #define REG_A5XX_RBBM_STATUS3					0x00000530
1247 
1248 #define REG_A5XX_RBBM_INT_0_STATUS				0x000004e1
1249 
1250 #define REG_A5XX_RBBM_AHB_ME_SPLIT_STATUS			0x000004f0
1251 
1252 #define REG_A5XX_RBBM_AHB_PFP_SPLIT_STATUS			0x000004f1
1253 
1254 #define REG_A5XX_RBBM_AHB_ETS_SPLIT_STATUS			0x000004f3
1255 
1256 #define REG_A5XX_RBBM_AHB_ERROR_STATUS				0x000004f4
1257 
1258 #define REG_A5XX_RBBM_PERFCTR_CNTL				0x00000464
1259 
1260 #define REG_A5XX_RBBM_PERFCTR_LOAD_CMD0				0x00000465
1261 
1262 #define REG_A5XX_RBBM_PERFCTR_LOAD_CMD1				0x00000466
1263 
1264 #define REG_A5XX_RBBM_PERFCTR_LOAD_CMD2				0x00000467
1265 
1266 #define REG_A5XX_RBBM_PERFCTR_LOAD_CMD3				0x00000468
1267 
1268 #define REG_A5XX_RBBM_PERFCTR_LOAD_VALUE_LO			0x00000469
1269 
1270 #define REG_A5XX_RBBM_PERFCTR_LOAD_VALUE_HI			0x0000046a
1271 
1272 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_0			0x0000046b
1273 
1274 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_1			0x0000046c
1275 
1276 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_2			0x0000046d
1277 
1278 #define REG_A5XX_RBBM_PERFCTR_RBBM_SEL_3			0x0000046e
1279 
1280 #define REG_A5XX_RBBM_PERFCTR_GPU_BUSY_MASKED			0x0000046f
1281 
1282 #define REG_A5XX_RBBM_AHB_ERROR					0x000004ed
1283 
1284 #define REG_A5XX_RBBM_CFG_DBGBUS_EVENT_LOGIC			0x00000504
1285 
1286 #define REG_A5XX_RBBM_CFG_DBGBUS_OVER				0x00000505
1287 
1288 #define REG_A5XX_RBBM_CFG_DBGBUS_COUNT0				0x00000506
1289 
1290 #define REG_A5XX_RBBM_CFG_DBGBUS_COUNT1				0x00000507
1291 
1292 #define REG_A5XX_RBBM_CFG_DBGBUS_COUNT2				0x00000508
1293 
1294 #define REG_A5XX_RBBM_CFG_DBGBUS_COUNT3				0x00000509
1295 
1296 #define REG_A5XX_RBBM_CFG_DBGBUS_COUNT4				0x0000050a
1297 
1298 #define REG_A5XX_RBBM_CFG_DBGBUS_COUNT5				0x0000050b
1299 
1300 #define REG_A5XX_RBBM_CFG_DBGBUS_TRACE_ADDR			0x0000050c
1301 
1302 #define REG_A5XX_RBBM_CFG_DBGBUS_TRACE_BUF0			0x0000050d
1303 
1304 #define REG_A5XX_RBBM_CFG_DBGBUS_TRACE_BUF1			0x0000050e
1305 
1306 #define REG_A5XX_RBBM_CFG_DBGBUS_TRACE_BUF2			0x0000050f
1307 
1308 #define REG_A5XX_RBBM_CFG_DBGBUS_TRACE_BUF3			0x00000510
1309 
1310 #define REG_A5XX_RBBM_CFG_DBGBUS_TRACE_BUF4			0x00000511
1311 
1312 #define REG_A5XX_RBBM_CFG_DBGBUS_MISR0				0x00000512
1313 
1314 #define REG_A5XX_RBBM_CFG_DBGBUS_MISR1				0x00000513
1315 
1316 #define REG_A5XX_RBBM_ISDB_CNT					0x00000533
1317 
1318 #define REG_A5XX_RBBM_SECVID_TRUST_CONFIG			0x0000f000
1319 
1320 #define REG_A5XX_RBBM_SECVID_TRUST_CNTL				0x0000f400
1321 
1322 #define REG_A5XX_RBBM_SECVID_TSB_TRUSTED_BASE_LO		0x0000f800
1323 
1324 #define REG_A5XX_RBBM_SECVID_TSB_TRUSTED_BASE_HI		0x0000f801
1325 
1326 #define REG_A5XX_RBBM_SECVID_TSB_TRUSTED_SIZE			0x0000f802
1327 
1328 #define REG_A5XX_RBBM_SECVID_TSB_CNTL				0x0000f803
1329 
1330 #define REG_A5XX_RBBM_SECVID_TSB_COMP_STATUS_LO			0x0000f804
1331 
1332 #define REG_A5XX_RBBM_SECVID_TSB_COMP_STATUS_HI			0x0000f805
1333 
1334 #define REG_A5XX_RBBM_SECVID_TSB_UCHE_STATUS_LO			0x0000f806
1335 
1336 #define REG_A5XX_RBBM_SECVID_TSB_UCHE_STATUS_HI			0x0000f807
1337 
1338 #define REG_A5XX_RBBM_SECVID_TSB_ADDR_MODE_CNTL			0x0000f810
1339 
1340 #define REG_A5XX_VSC_PIPE_DATA_LENGTH_0				0x00000c00
1341 
1342 #define REG_A5XX_VSC_PERFCTR_VSC_SEL_0				0x00000c60
1343 
1344 #define REG_A5XX_VSC_PERFCTR_VSC_SEL_1				0x00000c61
1345 
1346 #define REG_A5XX_VSC_BIN_SIZE					0x00000cdd
1347 #define A5XX_VSC_BIN_SIZE_WINDOW_OFFSET_DISABLE			0x80000000
1348 #define A5XX_VSC_BIN_SIZE_X__MASK				0x00007fff
1349 #define A5XX_VSC_BIN_SIZE_X__SHIFT				0
A5XX_VSC_BIN_SIZE_X(uint32_t val)1350 static inline uint32_t A5XX_VSC_BIN_SIZE_X(uint32_t val)
1351 {
1352 	return ((val) << A5XX_VSC_BIN_SIZE_X__SHIFT) & A5XX_VSC_BIN_SIZE_X__MASK;
1353 }
1354 #define A5XX_VSC_BIN_SIZE_Y__MASK				0x7fff0000
1355 #define A5XX_VSC_BIN_SIZE_Y__SHIFT				16
A5XX_VSC_BIN_SIZE_Y(uint32_t val)1356 static inline uint32_t A5XX_VSC_BIN_SIZE_Y(uint32_t val)
1357 {
1358 	return ((val) << A5XX_VSC_BIN_SIZE_Y__SHIFT) & A5XX_VSC_BIN_SIZE_Y__MASK;
1359 }
1360 
1361 #define REG_A5XX_GRAS_ADDR_MODE_CNTL				0x00000c81
1362 
1363 #define REG_A5XX_GRAS_PERFCTR_TSE_SEL_0				0x00000c90
1364 
1365 #define REG_A5XX_GRAS_PERFCTR_TSE_SEL_1				0x00000c91
1366 
1367 #define REG_A5XX_GRAS_PERFCTR_TSE_SEL_2				0x00000c92
1368 
1369 #define REG_A5XX_GRAS_PERFCTR_TSE_SEL_3				0x00000c93
1370 
1371 #define REG_A5XX_GRAS_PERFCTR_RAS_SEL_0				0x00000c94
1372 
1373 #define REG_A5XX_GRAS_PERFCTR_RAS_SEL_1				0x00000c95
1374 
1375 #define REG_A5XX_GRAS_PERFCTR_RAS_SEL_2				0x00000c96
1376 
1377 #define REG_A5XX_GRAS_PERFCTR_RAS_SEL_3				0x00000c97
1378 
1379 #define REG_A5XX_GRAS_PERFCTR_LRZ_SEL_0				0x00000c98
1380 
1381 #define REG_A5XX_GRAS_PERFCTR_LRZ_SEL_1				0x00000c99
1382 
1383 #define REG_A5XX_GRAS_PERFCTR_LRZ_SEL_2				0x00000c9a
1384 
1385 #define REG_A5XX_GRAS_PERFCTR_LRZ_SEL_3				0x00000c9b
1386 
1387 #define REG_A5XX_RB_DBG_ECO_CNTL				0x00000cc4
1388 
1389 #define REG_A5XX_RB_ADDR_MODE_CNTL				0x00000cc5
1390 
1391 #define REG_A5XX_RB_MODE_CNTL					0x00000cc6
1392 
1393 #define REG_A5XX_RB_CCU_CNTL					0x00000cc7
1394 
1395 #define REG_A5XX_RB_PERFCTR_RB_SEL_0				0x00000cd0
1396 
1397 #define REG_A5XX_RB_PERFCTR_RB_SEL_1				0x00000cd1
1398 
1399 #define REG_A5XX_RB_PERFCTR_RB_SEL_2				0x00000cd2
1400 
1401 #define REG_A5XX_RB_PERFCTR_RB_SEL_3				0x00000cd3
1402 
1403 #define REG_A5XX_RB_PERFCTR_RB_SEL_4				0x00000cd4
1404 
1405 #define REG_A5XX_RB_PERFCTR_RB_SEL_5				0x00000cd5
1406 
1407 #define REG_A5XX_RB_PERFCTR_RB_SEL_6				0x00000cd6
1408 
1409 #define REG_A5XX_RB_PERFCTR_RB_SEL_7				0x00000cd7
1410 
1411 #define REG_A5XX_RB_PERFCTR_CCU_SEL_0				0x00000cd8
1412 
1413 #define REG_A5XX_RB_PERFCTR_CCU_SEL_1				0x00000cd9
1414 
1415 #define REG_A5XX_RB_PERFCTR_CCU_SEL_2				0x00000cda
1416 
1417 #define REG_A5XX_RB_PERFCTR_CCU_SEL_3				0x00000cdb
1418 
1419 #define REG_A5XX_RB_POWERCTR_RB_SEL_0				0x00000ce0
1420 
1421 #define REG_A5XX_RB_POWERCTR_RB_SEL_1				0x00000ce1
1422 
1423 #define REG_A5XX_RB_POWERCTR_RB_SEL_2				0x00000ce2
1424 
1425 #define REG_A5XX_RB_POWERCTR_RB_SEL_3				0x00000ce3
1426 
1427 #define REG_A5XX_RB_POWERCTR_CCU_SEL_0				0x00000ce4
1428 
1429 #define REG_A5XX_RB_POWERCTR_CCU_SEL_1				0x00000ce5
1430 
1431 #define REG_A5XX_RB_PERFCTR_CMP_SEL_0				0x00000cec
1432 
1433 #define REG_A5XX_RB_PERFCTR_CMP_SEL_1				0x00000ced
1434 
1435 #define REG_A5XX_RB_PERFCTR_CMP_SEL_2				0x00000cee
1436 
1437 #define REG_A5XX_RB_PERFCTR_CMP_SEL_3				0x00000cef
1438 
1439 #define REG_A5XX_PC_DBG_ECO_CNTL				0x00000d00
1440 #define A5XX_PC_DBG_ECO_CNTL_TWOPASSUSEWFI			0x00000100
1441 
1442 #define REG_A5XX_PC_ADDR_MODE_CNTL				0x00000d01
1443 
1444 #define REG_A5XX_PC_MODE_CNTL					0x00000d02
1445 
1446 #define REG_A5XX_UNKNOWN_0D08					0x00000d08
1447 
1448 #define REG_A5XX_UNKNOWN_0D09					0x00000d09
1449 
1450 #define REG_A5XX_PC_PERFCTR_PC_SEL_0				0x00000d10
1451 
1452 #define REG_A5XX_PC_PERFCTR_PC_SEL_1				0x00000d11
1453 
1454 #define REG_A5XX_PC_PERFCTR_PC_SEL_2				0x00000d12
1455 
1456 #define REG_A5XX_PC_PERFCTR_PC_SEL_3				0x00000d13
1457 
1458 #define REG_A5XX_PC_PERFCTR_PC_SEL_4				0x00000d14
1459 
1460 #define REG_A5XX_PC_PERFCTR_PC_SEL_5				0x00000d15
1461 
1462 #define REG_A5XX_PC_PERFCTR_PC_SEL_6				0x00000d16
1463 
1464 #define REG_A5XX_PC_PERFCTR_PC_SEL_7				0x00000d17
1465 
1466 #define REG_A5XX_HLSQ_TIMEOUT_THRESHOLD_0			0x00000e00
1467 
1468 #define REG_A5XX_HLSQ_TIMEOUT_THRESHOLD_1			0x00000e01
1469 
1470 #define REG_A5XX_HLSQ_ADDR_MODE_CNTL				0x00000e05
1471 
1472 #define REG_A5XX_HLSQ_MODE_CNTL					0x00000e06
1473 
1474 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_0			0x00000e10
1475 
1476 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_1			0x00000e11
1477 
1478 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_2			0x00000e12
1479 
1480 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_3			0x00000e13
1481 
1482 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_4			0x00000e14
1483 
1484 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_5			0x00000e15
1485 
1486 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_6			0x00000e16
1487 
1488 #define REG_A5XX_HLSQ_PERFCTR_HLSQ_SEL_7			0x00000e17
1489 
1490 #define REG_A5XX_HLSQ_SPTP_RDSEL				0x00000f08
1491 
1492 #define REG_A5XX_HLSQ_DBG_READ_SEL				0x0000bc00
1493 
1494 #define REG_A5XX_HLSQ_DBG_AHB_READ_APERTURE			0x0000a000
1495 
1496 #define REG_A5XX_VFD_ADDR_MODE_CNTL				0x00000e41
1497 
1498 #define REG_A5XX_VFD_MODE_CNTL					0x00000e42
1499 
1500 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_0				0x00000e50
1501 
1502 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_1				0x00000e51
1503 
1504 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_2				0x00000e52
1505 
1506 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_3				0x00000e53
1507 
1508 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_4				0x00000e54
1509 
1510 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_5				0x00000e55
1511 
1512 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_6				0x00000e56
1513 
1514 #define REG_A5XX_VFD_PERFCTR_VFD_SEL_7				0x00000e57
1515 
1516 #define REG_A5XX_VPC_DBG_ECO_CNTL				0x00000e60
1517 
1518 #define REG_A5XX_VPC_ADDR_MODE_CNTL				0x00000e61
1519 
1520 #define REG_A5XX_VPC_MODE_CNTL					0x00000e62
1521 
1522 #define REG_A5XX_VPC_PERFCTR_VPC_SEL_0				0x00000e64
1523 
1524 #define REG_A5XX_VPC_PERFCTR_VPC_SEL_1				0x00000e65
1525 
1526 #define REG_A5XX_VPC_PERFCTR_VPC_SEL_2				0x00000e66
1527 
1528 #define REG_A5XX_VPC_PERFCTR_VPC_SEL_3				0x00000e67
1529 
1530 #define REG_A5XX_UCHE_ADDR_MODE_CNTL				0x00000e80
1531 
1532 #define REG_A5XX_UCHE_SVM_CNTL					0x00000e82
1533 
1534 #define REG_A5XX_UCHE_WRITE_THRU_BASE_LO			0x00000e87
1535 
1536 #define REG_A5XX_UCHE_WRITE_THRU_BASE_HI			0x00000e88
1537 
1538 #define REG_A5XX_UCHE_TRAP_BASE_LO				0x00000e89
1539 
1540 #define REG_A5XX_UCHE_TRAP_BASE_HI				0x00000e8a
1541 
1542 #define REG_A5XX_UCHE_GMEM_RANGE_MIN_LO				0x00000e8b
1543 
1544 #define REG_A5XX_UCHE_GMEM_RANGE_MIN_HI				0x00000e8c
1545 
1546 #define REG_A5XX_UCHE_GMEM_RANGE_MAX_LO				0x00000e8d
1547 
1548 #define REG_A5XX_UCHE_GMEM_RANGE_MAX_HI				0x00000e8e
1549 
1550 #define REG_A5XX_UCHE_DBG_ECO_CNTL_2				0x00000e8f
1551 
1552 #define REG_A5XX_UCHE_DBG_ECO_CNTL				0x00000e90
1553 
1554 #define REG_A5XX_UCHE_CACHE_INVALIDATE_MIN_LO			0x00000e91
1555 
1556 #define REG_A5XX_UCHE_CACHE_INVALIDATE_MIN_HI			0x00000e92
1557 
1558 #define REG_A5XX_UCHE_CACHE_INVALIDATE_MAX_LO			0x00000e93
1559 
1560 #define REG_A5XX_UCHE_CACHE_INVALIDATE_MAX_HI			0x00000e94
1561 
1562 #define REG_A5XX_UCHE_CACHE_INVALIDATE				0x00000e95
1563 
1564 #define REG_A5XX_UCHE_CACHE_WAYS				0x00000e96
1565 
1566 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_0			0x00000ea0
1567 
1568 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_1			0x00000ea1
1569 
1570 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_2			0x00000ea2
1571 
1572 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_3			0x00000ea3
1573 
1574 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_4			0x00000ea4
1575 
1576 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_5			0x00000ea5
1577 
1578 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_6			0x00000ea6
1579 
1580 #define REG_A5XX_UCHE_PERFCTR_UCHE_SEL_7			0x00000ea7
1581 
1582 #define REG_A5XX_UCHE_POWERCTR_UCHE_SEL_0			0x00000ea8
1583 
1584 #define REG_A5XX_UCHE_POWERCTR_UCHE_SEL_1			0x00000ea9
1585 
1586 #define REG_A5XX_UCHE_POWERCTR_UCHE_SEL_2			0x00000eaa
1587 
1588 #define REG_A5XX_UCHE_POWERCTR_UCHE_SEL_3			0x00000eab
1589 
1590 #define REG_A5XX_UCHE_TRAP_LOG_LO				0x00000eb1
1591 
1592 #define REG_A5XX_UCHE_TRAP_LOG_HI				0x00000eb2
1593 
1594 #define REG_A5XX_SP_DBG_ECO_CNTL				0x00000ec0
1595 
1596 #define REG_A5XX_SP_ADDR_MODE_CNTL				0x00000ec1
1597 
1598 #define REG_A5XX_SP_MODE_CNTL					0x00000ec2
1599 
1600 #define REG_A5XX_SP_PERFCTR_SP_SEL_0				0x00000ed0
1601 
1602 #define REG_A5XX_SP_PERFCTR_SP_SEL_1				0x00000ed1
1603 
1604 #define REG_A5XX_SP_PERFCTR_SP_SEL_2				0x00000ed2
1605 
1606 #define REG_A5XX_SP_PERFCTR_SP_SEL_3				0x00000ed3
1607 
1608 #define REG_A5XX_SP_PERFCTR_SP_SEL_4				0x00000ed4
1609 
1610 #define REG_A5XX_SP_PERFCTR_SP_SEL_5				0x00000ed5
1611 
1612 #define REG_A5XX_SP_PERFCTR_SP_SEL_6				0x00000ed6
1613 
1614 #define REG_A5XX_SP_PERFCTR_SP_SEL_7				0x00000ed7
1615 
1616 #define REG_A5XX_SP_PERFCTR_SP_SEL_8				0x00000ed8
1617 
1618 #define REG_A5XX_SP_PERFCTR_SP_SEL_9				0x00000ed9
1619 
1620 #define REG_A5XX_SP_PERFCTR_SP_SEL_10				0x00000eda
1621 
1622 #define REG_A5XX_SP_PERFCTR_SP_SEL_11				0x00000edb
1623 
1624 #define REG_A5XX_SP_POWERCTR_SP_SEL_0				0x00000edc
1625 
1626 #define REG_A5XX_SP_POWERCTR_SP_SEL_1				0x00000edd
1627 
1628 #define REG_A5XX_SP_POWERCTR_SP_SEL_2				0x00000ede
1629 
1630 #define REG_A5XX_SP_POWERCTR_SP_SEL_3				0x00000edf
1631 
1632 #define REG_A5XX_TPL1_ADDR_MODE_CNTL				0x00000f01
1633 
1634 #define REG_A5XX_TPL1_MODE_CNTL					0x00000f02
1635 
1636 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_0				0x00000f10
1637 
1638 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_1				0x00000f11
1639 
1640 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_2				0x00000f12
1641 
1642 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_3				0x00000f13
1643 
1644 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_4				0x00000f14
1645 
1646 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_5				0x00000f15
1647 
1648 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_6				0x00000f16
1649 
1650 #define REG_A5XX_TPL1_PERFCTR_TP_SEL_7				0x00000f17
1651 
1652 #define REG_A5XX_TPL1_POWERCTR_TP_SEL_0				0x00000f18
1653 
1654 #define REG_A5XX_TPL1_POWERCTR_TP_SEL_1				0x00000f19
1655 
1656 #define REG_A5XX_TPL1_POWERCTR_TP_SEL_2				0x00000f1a
1657 
1658 #define REG_A5XX_TPL1_POWERCTR_TP_SEL_3				0x00000f1b
1659 
1660 #define REG_A5XX_VBIF_VERSION					0x00003000
1661 
1662 #define REG_A5XX_VBIF_CLKON					0x00003001
1663 
1664 #define REG_A5XX_VBIF_ABIT_SORT					0x00003028
1665 
1666 #define REG_A5XX_VBIF_ABIT_SORT_CONF				0x00003029
1667 
1668 #define REG_A5XX_VBIF_ROUND_ROBIN_QOS_ARB			0x00003049
1669 
1670 #define REG_A5XX_VBIF_GATE_OFF_WRREQ_EN				0x0000302a
1671 
1672 #define REG_A5XX_VBIF_IN_RD_LIM_CONF0				0x0000302c
1673 
1674 #define REG_A5XX_VBIF_IN_RD_LIM_CONF1				0x0000302d
1675 
1676 #define REG_A5XX_VBIF_XIN_HALT_CTRL0				0x00003080
1677 
1678 #define REG_A5XX_VBIF_XIN_HALT_CTRL1				0x00003081
1679 
1680 #define REG_A5XX_VBIF_TEST_BUS_OUT_CTRL				0x00003084
1681 
1682 #define REG_A5XX_VBIF_TEST_BUS1_CTRL0				0x00003085
1683 
1684 #define REG_A5XX_VBIF_TEST_BUS1_CTRL1				0x00003086
1685 
1686 #define REG_A5XX_VBIF_TEST_BUS2_CTRL0				0x00003087
1687 
1688 #define REG_A5XX_VBIF_TEST_BUS2_CTRL1				0x00003088
1689 
1690 #define REG_A5XX_VBIF_TEST_BUS_OUT				0x0000308c
1691 
1692 #define REG_A5XX_VBIF_PERF_CNT_SEL0				0x000030d0
1693 
1694 #define REG_A5XX_VBIF_PERF_CNT_SEL1				0x000030d1
1695 
1696 #define REG_A5XX_VBIF_PERF_CNT_SEL2				0x000030d2
1697 
1698 #define REG_A5XX_VBIF_PERF_CNT_SEL3				0x000030d3
1699 
1700 #define REG_A5XX_VBIF_PERF_CNT_LOW0				0x000030d8
1701 
1702 #define REG_A5XX_VBIF_PERF_CNT_LOW1				0x000030d9
1703 
1704 #define REG_A5XX_VBIF_PERF_CNT_LOW2				0x000030da
1705 
1706 #define REG_A5XX_VBIF_PERF_CNT_LOW3				0x000030db
1707 
1708 #define REG_A5XX_VBIF_PERF_CNT_HIGH0				0x000030e0
1709 
1710 #define REG_A5XX_VBIF_PERF_CNT_HIGH1				0x000030e1
1711 
1712 #define REG_A5XX_VBIF_PERF_CNT_HIGH2				0x000030e2
1713 
1714 #define REG_A5XX_VBIF_PERF_CNT_HIGH3				0x000030e3
1715 
1716 #define REG_A5XX_VBIF_PERF_PWR_CNT_EN0				0x00003100
1717 
1718 #define REG_A5XX_VBIF_PERF_PWR_CNT_EN1				0x00003101
1719 
1720 #define REG_A5XX_VBIF_PERF_PWR_CNT_EN2				0x00003102
1721 
1722 #define REG_A5XX_VBIF_PERF_PWR_CNT_LOW0				0x00003110
1723 
1724 #define REG_A5XX_VBIF_PERF_PWR_CNT_LOW1				0x00003111
1725 
1726 #define REG_A5XX_VBIF_PERF_PWR_CNT_LOW2				0x00003112
1727 
1728 #define REG_A5XX_VBIF_PERF_PWR_CNT_HIGH0			0x00003118
1729 
1730 #define REG_A5XX_VBIF_PERF_PWR_CNT_HIGH1			0x00003119
1731 
1732 #define REG_A5XX_VBIF_PERF_PWR_CNT_HIGH2			0x0000311a
1733 
1734 #define REG_A5XX_GPMU_INST_RAM_BASE				0x00008800
1735 
1736 #define REG_A5XX_GPMU_DATA_RAM_BASE				0x00009800
1737 
1738 #define REG_A5XX_GPMU_SP_POWER_CNTL				0x0000a881
1739 
1740 #define REG_A5XX_GPMU_RBCCU_CLOCK_CNTL				0x0000a886
1741 
1742 #define REG_A5XX_GPMU_RBCCU_POWER_CNTL				0x0000a887
1743 
1744 #define REG_A5XX_GPMU_SP_PWR_CLK_STATUS				0x0000a88b
1745 #define A5XX_GPMU_SP_PWR_CLK_STATUS_PWR_ON			0x00100000
1746 
1747 #define REG_A5XX_GPMU_RBCCU_PWR_CLK_STATUS			0x0000a88d
1748 #define A5XX_GPMU_RBCCU_PWR_CLK_STATUS_PWR_ON			0x00100000
1749 
1750 #define REG_A5XX_GPMU_PWR_COL_STAGGER_DELAY			0x0000a891
1751 
1752 #define REG_A5XX_GPMU_PWR_COL_INTER_FRAME_CTRL			0x0000a892
1753 
1754 #define REG_A5XX_GPMU_PWR_COL_INTER_FRAME_HYST			0x0000a893
1755 
1756 #define REG_A5XX_GPMU_PWR_COL_BINNING_CTRL			0x0000a894
1757 
1758 #define REG_A5XX_GPMU_CLOCK_THROTTLE_CTRL			0x0000a8a3
1759 
1760 #define REG_A5XX_GPMU_WFI_CONFIG				0x0000a8c1
1761 
1762 #define REG_A5XX_GPMU_RBBM_INTR_INFO				0x0000a8d6
1763 
1764 #define REG_A5XX_GPMU_CM3_SYSRESET				0x0000a8d8
1765 
1766 #define REG_A5XX_GPMU_GENERAL_0					0x0000a8e0
1767 
1768 #define REG_A5XX_GPMU_GENERAL_1					0x0000a8e1
1769 
1770 #define REG_A5XX_SP_POWER_COUNTER_0_LO				0x0000a840
1771 
1772 #define REG_A5XX_SP_POWER_COUNTER_0_HI				0x0000a841
1773 
1774 #define REG_A5XX_SP_POWER_COUNTER_1_LO				0x0000a842
1775 
1776 #define REG_A5XX_SP_POWER_COUNTER_1_HI				0x0000a843
1777 
1778 #define REG_A5XX_SP_POWER_COUNTER_2_LO				0x0000a844
1779 
1780 #define REG_A5XX_SP_POWER_COUNTER_2_HI				0x0000a845
1781 
1782 #define REG_A5XX_SP_POWER_COUNTER_3_LO				0x0000a846
1783 
1784 #define REG_A5XX_SP_POWER_COUNTER_3_HI				0x0000a847
1785 
1786 #define REG_A5XX_TP_POWER_COUNTER_0_LO				0x0000a848
1787 
1788 #define REG_A5XX_TP_POWER_COUNTER_0_HI				0x0000a849
1789 
1790 #define REG_A5XX_TP_POWER_COUNTER_1_LO				0x0000a84a
1791 
1792 #define REG_A5XX_TP_POWER_COUNTER_1_HI				0x0000a84b
1793 
1794 #define REG_A5XX_TP_POWER_COUNTER_2_LO				0x0000a84c
1795 
1796 #define REG_A5XX_TP_POWER_COUNTER_2_HI				0x0000a84d
1797 
1798 #define REG_A5XX_TP_POWER_COUNTER_3_LO				0x0000a84e
1799 
1800 #define REG_A5XX_TP_POWER_COUNTER_3_HI				0x0000a84f
1801 
1802 #define REG_A5XX_RB_POWER_COUNTER_0_LO				0x0000a850
1803 
1804 #define REG_A5XX_RB_POWER_COUNTER_0_HI				0x0000a851
1805 
1806 #define REG_A5XX_RB_POWER_COUNTER_1_LO				0x0000a852
1807 
1808 #define REG_A5XX_RB_POWER_COUNTER_1_HI				0x0000a853
1809 
1810 #define REG_A5XX_RB_POWER_COUNTER_2_LO				0x0000a854
1811 
1812 #define REG_A5XX_RB_POWER_COUNTER_2_HI				0x0000a855
1813 
1814 #define REG_A5XX_RB_POWER_COUNTER_3_LO				0x0000a856
1815 
1816 #define REG_A5XX_RB_POWER_COUNTER_3_HI				0x0000a857
1817 
1818 #define REG_A5XX_CCU_POWER_COUNTER_0_LO				0x0000a858
1819 
1820 #define REG_A5XX_CCU_POWER_COUNTER_0_HI				0x0000a859
1821 
1822 #define REG_A5XX_CCU_POWER_COUNTER_1_LO				0x0000a85a
1823 
1824 #define REG_A5XX_CCU_POWER_COUNTER_1_HI				0x0000a85b
1825 
1826 #define REG_A5XX_UCHE_POWER_COUNTER_0_LO			0x0000a85c
1827 
1828 #define REG_A5XX_UCHE_POWER_COUNTER_0_HI			0x0000a85d
1829 
1830 #define REG_A5XX_UCHE_POWER_COUNTER_1_LO			0x0000a85e
1831 
1832 #define REG_A5XX_UCHE_POWER_COUNTER_1_HI			0x0000a85f
1833 
1834 #define REG_A5XX_UCHE_POWER_COUNTER_2_LO			0x0000a860
1835 
1836 #define REG_A5XX_UCHE_POWER_COUNTER_2_HI			0x0000a861
1837 
1838 #define REG_A5XX_UCHE_POWER_COUNTER_3_LO			0x0000a862
1839 
1840 #define REG_A5XX_UCHE_POWER_COUNTER_3_HI			0x0000a863
1841 
1842 #define REG_A5XX_CP_POWER_COUNTER_0_LO				0x0000a864
1843 
1844 #define REG_A5XX_CP_POWER_COUNTER_0_HI				0x0000a865
1845 
1846 #define REG_A5XX_CP_POWER_COUNTER_1_LO				0x0000a866
1847 
1848 #define REG_A5XX_CP_POWER_COUNTER_1_HI				0x0000a867
1849 
1850 #define REG_A5XX_CP_POWER_COUNTER_2_LO				0x0000a868
1851 
1852 #define REG_A5XX_CP_POWER_COUNTER_2_HI				0x0000a869
1853 
1854 #define REG_A5XX_CP_POWER_COUNTER_3_LO				0x0000a86a
1855 
1856 #define REG_A5XX_CP_POWER_COUNTER_3_HI				0x0000a86b
1857 
1858 #define REG_A5XX_GPMU_POWER_COUNTER_0_LO			0x0000a86c
1859 
1860 #define REG_A5XX_GPMU_POWER_COUNTER_0_HI			0x0000a86d
1861 
1862 #define REG_A5XX_GPMU_POWER_COUNTER_1_LO			0x0000a86e
1863 
1864 #define REG_A5XX_GPMU_POWER_COUNTER_1_HI			0x0000a86f
1865 
1866 #define REG_A5XX_GPMU_POWER_COUNTER_2_LO			0x0000a870
1867 
1868 #define REG_A5XX_GPMU_POWER_COUNTER_2_HI			0x0000a871
1869 
1870 #define REG_A5XX_GPMU_POWER_COUNTER_3_LO			0x0000a872
1871 
1872 #define REG_A5XX_GPMU_POWER_COUNTER_3_HI			0x0000a873
1873 
1874 #define REG_A5XX_GPMU_POWER_COUNTER_4_LO			0x0000a874
1875 
1876 #define REG_A5XX_GPMU_POWER_COUNTER_4_HI			0x0000a875
1877 
1878 #define REG_A5XX_GPMU_POWER_COUNTER_5_LO			0x0000a876
1879 
1880 #define REG_A5XX_GPMU_POWER_COUNTER_5_HI			0x0000a877
1881 
1882 #define REG_A5XX_GPMU_POWER_COUNTER_ENABLE			0x0000a878
1883 
1884 #define REG_A5XX_GPMU_ALWAYS_ON_COUNTER_LO			0x0000a879
1885 
1886 #define REG_A5XX_GPMU_ALWAYS_ON_COUNTER_HI			0x0000a87a
1887 
1888 #define REG_A5XX_GPMU_ALWAYS_ON_COUNTER_RESET			0x0000a87b
1889 
1890 #define REG_A5XX_GPMU_POWER_COUNTER_SELECT_0			0x0000a87c
1891 
1892 #define REG_A5XX_GPMU_POWER_COUNTER_SELECT_1			0x0000a87d
1893 
1894 #define REG_A5XX_GPMU_CLOCK_THROTTLE_CTRL			0x0000a8a3
1895 
1896 #define REG_A5XX_GPMU_THROTTLE_UNMASK_FORCE_CTRL		0x0000a8a8
1897 
1898 #define REG_A5XX_GPMU_TEMP_SENSOR_ID				0x0000ac00
1899 
1900 #define REG_A5XX_GPMU_TEMP_SENSOR_CONFIG			0x0000ac01
1901 
1902 #define REG_A5XX_GPMU_TEMP_VAL					0x0000ac02
1903 
1904 #define REG_A5XX_GPMU_DELTA_TEMP_THRESHOLD			0x0000ac03
1905 
1906 #define REG_A5XX_GPMU_TEMP_THRESHOLD_INTR_STATUS		0x0000ac05
1907 
1908 #define REG_A5XX_GPMU_TEMP_THRESHOLD_INTR_EN_MASK		0x0000ac06
1909 
1910 #define REG_A5XX_GPMU_LEAKAGE_TEMP_COEFF_0_1			0x0000ac40
1911 
1912 #define REG_A5XX_GPMU_LEAKAGE_TEMP_COEFF_2_3			0x0000ac41
1913 
1914 #define REG_A5XX_GPMU_LEAKAGE_VTG_COEFF_0_1			0x0000ac42
1915 
1916 #define REG_A5XX_GPMU_LEAKAGE_VTG_COEFF_2_3			0x0000ac43
1917 
1918 #define REG_A5XX_GPMU_BASE_LEAKAGE				0x0000ac46
1919 
1920 #define REG_A5XX_GPMU_GPMU_VOLTAGE				0x0000ac60
1921 
1922 #define REG_A5XX_GPMU_GPMU_VOLTAGE_INTR_STATUS			0x0000ac61
1923 
1924 #define REG_A5XX_GPMU_GPMU_VOLTAGE_INTR_EN_MASK			0x0000ac62
1925 
1926 #define REG_A5XX_GPMU_GPMU_PWR_THRESHOLD			0x0000ac80
1927 
1928 #define REG_A5XX_GPMU_GPMU_LLM_GLM_SLEEP_CTRL			0x0000acc4
1929 
1930 #define REG_A5XX_GPMU_GPMU_LLM_GLM_SLEEP_STATUS			0x0000acc5
1931 
1932 #define REG_A5XX_GDPM_CONFIG1					0x0000b80c
1933 
1934 #define REG_A5XX_GDPM_CONFIG2					0x0000b80d
1935 
1936 #define REG_A5XX_GDPM_INT_EN					0x0000b80f
1937 
1938 #define REG_A5XX_GDPM_INT_MASK					0x0000b811
1939 
1940 #define REG_A5XX_GPMU_BEC_ENABLE				0x0000b9a0
1941 
1942 #define REG_A5XX_GPU_CS_SENSOR_GENERAL_STATUS			0x0000c41a
1943 
1944 #define REG_A5XX_GPU_CS_AMP_CALIBRATION_STATUS1_0		0x0000c41d
1945 
1946 #define REG_A5XX_GPU_CS_AMP_CALIBRATION_STATUS1_2		0x0000c41f
1947 
1948 #define REG_A5XX_GPU_CS_AMP_CALIBRATION_STATUS1_4		0x0000c421
1949 
1950 #define REG_A5XX_GPU_CS_ENABLE_REG				0x0000c520
1951 
1952 #define REG_A5XX_GPU_CS_AMP_CALIBRATION_CONTROL1		0x0000c557
1953 
1954 #define REG_A5XX_GRAS_CL_CNTL					0x0000e000
1955 
1956 #define REG_A5XX_UNKNOWN_E001					0x0000e001
1957 
1958 #define REG_A5XX_UNKNOWN_E004					0x0000e004
1959 
1960 #define REG_A5XX_GRAS_CNTL					0x0000e005
1961 #define A5XX_GRAS_CNTL_VARYING					0x00000001
1962 #define A5XX_GRAS_CNTL_UNK3					0x00000008
1963 #define A5XX_GRAS_CNTL_XCOORD					0x00000040
1964 #define A5XX_GRAS_CNTL_YCOORD					0x00000080
1965 #define A5XX_GRAS_CNTL_ZCOORD					0x00000100
1966 #define A5XX_GRAS_CNTL_WCOORD					0x00000200
1967 
1968 #define REG_A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ			0x0000e006
1969 #define A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__MASK		0x000003ff
1970 #define A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__SHIFT		0
A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ(uint32_t val)1971 static inline uint32_t A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ(uint32_t val)
1972 {
1973 	return ((val) << A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__SHIFT) & A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_HORZ__MASK;
1974 }
1975 #define A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__MASK		0x000ffc00
1976 #define A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__SHIFT		10
A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT(uint32_t val)1977 static inline uint32_t A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT(uint32_t val)
1978 {
1979 	return ((val) << A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__SHIFT) & A5XX_GRAS_CL_GUARDBAND_CLIP_ADJ_VERT__MASK;
1980 }
1981 
1982 #define REG_A5XX_GRAS_CL_VPORT_XOFFSET_0			0x0000e010
1983 #define A5XX_GRAS_CL_VPORT_XOFFSET_0__MASK			0xffffffff
1984 #define A5XX_GRAS_CL_VPORT_XOFFSET_0__SHIFT			0
A5XX_GRAS_CL_VPORT_XOFFSET_0(float val)1985 static inline uint32_t A5XX_GRAS_CL_VPORT_XOFFSET_0(float val)
1986 {
1987 	return ((fui(val)) << A5XX_GRAS_CL_VPORT_XOFFSET_0__SHIFT) & A5XX_GRAS_CL_VPORT_XOFFSET_0__MASK;
1988 }
1989 
1990 #define REG_A5XX_GRAS_CL_VPORT_XSCALE_0				0x0000e011
1991 #define A5XX_GRAS_CL_VPORT_XSCALE_0__MASK			0xffffffff
1992 #define A5XX_GRAS_CL_VPORT_XSCALE_0__SHIFT			0
A5XX_GRAS_CL_VPORT_XSCALE_0(float val)1993 static inline uint32_t A5XX_GRAS_CL_VPORT_XSCALE_0(float val)
1994 {
1995 	return ((fui(val)) << A5XX_GRAS_CL_VPORT_XSCALE_0__SHIFT) & A5XX_GRAS_CL_VPORT_XSCALE_0__MASK;
1996 }
1997 
1998 #define REG_A5XX_GRAS_CL_VPORT_YOFFSET_0			0x0000e012
1999 #define A5XX_GRAS_CL_VPORT_YOFFSET_0__MASK			0xffffffff
2000 #define A5XX_GRAS_CL_VPORT_YOFFSET_0__SHIFT			0
A5XX_GRAS_CL_VPORT_YOFFSET_0(float val)2001 static inline uint32_t A5XX_GRAS_CL_VPORT_YOFFSET_0(float val)
2002 {
2003 	return ((fui(val)) << A5XX_GRAS_CL_VPORT_YOFFSET_0__SHIFT) & A5XX_GRAS_CL_VPORT_YOFFSET_0__MASK;
2004 }
2005 
2006 #define REG_A5XX_GRAS_CL_VPORT_YSCALE_0				0x0000e013
2007 #define A5XX_GRAS_CL_VPORT_YSCALE_0__MASK			0xffffffff
2008 #define A5XX_GRAS_CL_VPORT_YSCALE_0__SHIFT			0
A5XX_GRAS_CL_VPORT_YSCALE_0(float val)2009 static inline uint32_t A5XX_GRAS_CL_VPORT_YSCALE_0(float val)
2010 {
2011 	return ((fui(val)) << A5XX_GRAS_CL_VPORT_YSCALE_0__SHIFT) & A5XX_GRAS_CL_VPORT_YSCALE_0__MASK;
2012 }
2013 
2014 #define REG_A5XX_GRAS_CL_VPORT_ZOFFSET_0			0x0000e014
2015 #define A5XX_GRAS_CL_VPORT_ZOFFSET_0__MASK			0xffffffff
2016 #define A5XX_GRAS_CL_VPORT_ZOFFSET_0__SHIFT			0
A5XX_GRAS_CL_VPORT_ZOFFSET_0(float val)2017 static inline uint32_t A5XX_GRAS_CL_VPORT_ZOFFSET_0(float val)
2018 {
2019 	return ((fui(val)) << A5XX_GRAS_CL_VPORT_ZOFFSET_0__SHIFT) & A5XX_GRAS_CL_VPORT_ZOFFSET_0__MASK;
2020 }
2021 
2022 #define REG_A5XX_GRAS_CL_VPORT_ZSCALE_0				0x0000e015
2023 #define A5XX_GRAS_CL_VPORT_ZSCALE_0__MASK			0xffffffff
2024 #define A5XX_GRAS_CL_VPORT_ZSCALE_0__SHIFT			0
A5XX_GRAS_CL_VPORT_ZSCALE_0(float val)2025 static inline uint32_t A5XX_GRAS_CL_VPORT_ZSCALE_0(float val)
2026 {
2027 	return ((fui(val)) << A5XX_GRAS_CL_VPORT_ZSCALE_0__SHIFT) & A5XX_GRAS_CL_VPORT_ZSCALE_0__MASK;
2028 }
2029 
2030 #define REG_A5XX_GRAS_SU_CNTL					0x0000e090
2031 #define A5XX_GRAS_SU_CNTL_CULL_FRONT				0x00000001
2032 #define A5XX_GRAS_SU_CNTL_CULL_BACK				0x00000002
2033 #define A5XX_GRAS_SU_CNTL_FRONT_CW				0x00000004
2034 #define A5XX_GRAS_SU_CNTL_LINEHALFWIDTH__MASK			0x000007f8
2035 #define A5XX_GRAS_SU_CNTL_LINEHALFWIDTH__SHIFT			3
A5XX_GRAS_SU_CNTL_LINEHALFWIDTH(float val)2036 static inline uint32_t A5XX_GRAS_SU_CNTL_LINEHALFWIDTH(float val)
2037 {
2038 	return ((((int32_t)(val * 4.0))) << A5XX_GRAS_SU_CNTL_LINEHALFWIDTH__SHIFT) & A5XX_GRAS_SU_CNTL_LINEHALFWIDTH__MASK;
2039 }
2040 #define A5XX_GRAS_SU_CNTL_POLY_OFFSET				0x00000800
2041 #define A5XX_GRAS_SU_CNTL_MSAA_ENABLE				0x00002000
2042 
2043 #define REG_A5XX_GRAS_SU_POINT_MINMAX				0x0000e091
2044 #define A5XX_GRAS_SU_POINT_MINMAX_MIN__MASK			0x0000ffff
2045 #define A5XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT			0
A5XX_GRAS_SU_POINT_MINMAX_MIN(float val)2046 static inline uint32_t A5XX_GRAS_SU_POINT_MINMAX_MIN(float val)
2047 {
2048 	return ((((uint32_t)(val * 16.0))) << A5XX_GRAS_SU_POINT_MINMAX_MIN__SHIFT) & A5XX_GRAS_SU_POINT_MINMAX_MIN__MASK;
2049 }
2050 #define A5XX_GRAS_SU_POINT_MINMAX_MAX__MASK			0xffff0000
2051 #define A5XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT			16
A5XX_GRAS_SU_POINT_MINMAX_MAX(float val)2052 static inline uint32_t A5XX_GRAS_SU_POINT_MINMAX_MAX(float val)
2053 {
2054 	return ((((uint32_t)(val * 16.0))) << A5XX_GRAS_SU_POINT_MINMAX_MAX__SHIFT) & A5XX_GRAS_SU_POINT_MINMAX_MAX__MASK;
2055 }
2056 
2057 #define REG_A5XX_GRAS_SU_POINT_SIZE				0x0000e092
2058 #define A5XX_GRAS_SU_POINT_SIZE__MASK				0xffffffff
2059 #define A5XX_GRAS_SU_POINT_SIZE__SHIFT				0
A5XX_GRAS_SU_POINT_SIZE(float val)2060 static inline uint32_t A5XX_GRAS_SU_POINT_SIZE(float val)
2061 {
2062 	return ((((int32_t)(val * 16.0))) << A5XX_GRAS_SU_POINT_SIZE__SHIFT) & A5XX_GRAS_SU_POINT_SIZE__MASK;
2063 }
2064 
2065 #define REG_A5XX_UNKNOWN_E093					0x0000e093
2066 
2067 #define REG_A5XX_GRAS_SU_DEPTH_PLANE_CNTL			0x0000e094
2068 #define A5XX_GRAS_SU_DEPTH_PLANE_CNTL_FRAG_WRITES_Z		0x00000001
2069 #define A5XX_GRAS_SU_DEPTH_PLANE_CNTL_UNK1			0x00000002
2070 
2071 #define REG_A5XX_GRAS_SU_POLY_OFFSET_SCALE			0x0000e095
2072 #define A5XX_GRAS_SU_POLY_OFFSET_SCALE__MASK			0xffffffff
2073 #define A5XX_GRAS_SU_POLY_OFFSET_SCALE__SHIFT			0
A5XX_GRAS_SU_POLY_OFFSET_SCALE(float val)2074 static inline uint32_t A5XX_GRAS_SU_POLY_OFFSET_SCALE(float val)
2075 {
2076 	return ((fui(val)) << A5XX_GRAS_SU_POLY_OFFSET_SCALE__SHIFT) & A5XX_GRAS_SU_POLY_OFFSET_SCALE__MASK;
2077 }
2078 
2079 #define REG_A5XX_GRAS_SU_POLY_OFFSET_OFFSET			0x0000e096
2080 #define A5XX_GRAS_SU_POLY_OFFSET_OFFSET__MASK			0xffffffff
2081 #define A5XX_GRAS_SU_POLY_OFFSET_OFFSET__SHIFT			0
A5XX_GRAS_SU_POLY_OFFSET_OFFSET(float val)2082 static inline uint32_t A5XX_GRAS_SU_POLY_OFFSET_OFFSET(float val)
2083 {
2084 	return ((fui(val)) << A5XX_GRAS_SU_POLY_OFFSET_OFFSET__SHIFT) & A5XX_GRAS_SU_POLY_OFFSET_OFFSET__MASK;
2085 }
2086 
2087 #define REG_A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP		0x0000e097
2088 #define A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__MASK		0xffffffff
2089 #define A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__SHIFT		0
A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP(float val)2090 static inline uint32_t A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP(float val)
2091 {
2092 	return ((fui(val)) << A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__SHIFT) & A5XX_GRAS_SU_POLY_OFFSET_OFFSET_CLAMP__MASK;
2093 }
2094 
2095 #define REG_A5XX_GRAS_SU_DEPTH_BUFFER_INFO			0x0000e098
2096 #define A5XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK	0x00000007
2097 #define A5XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT	0
A5XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT(enum a5xx_depth_format val)2098 static inline uint32_t A5XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT(enum a5xx_depth_format val)
2099 {
2100 	return ((val) << A5XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT) & A5XX_GRAS_SU_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK;
2101 }
2102 
2103 #define REG_A5XX_GRAS_SU_CONSERVATIVE_RAS_CNTL			0x0000e099
2104 
2105 #define REG_A5XX_GRAS_SC_CNTL					0x0000e0a0
2106 #define A5XX_GRAS_SC_CNTL_SAMPLES_PASSED			0x00008000
2107 
2108 #define REG_A5XX_GRAS_SC_BIN_CNTL				0x0000e0a1
2109 
2110 #define REG_A5XX_GRAS_SC_RAS_MSAA_CNTL				0x0000e0a2
2111 #define A5XX_GRAS_SC_RAS_MSAA_CNTL_SAMPLES__MASK		0x00000003
2112 #define A5XX_GRAS_SC_RAS_MSAA_CNTL_SAMPLES__SHIFT		0
A5XX_GRAS_SC_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)2113 static inline uint32_t A5XX_GRAS_SC_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
2114 {
2115 	return ((val) << A5XX_GRAS_SC_RAS_MSAA_CNTL_SAMPLES__SHIFT) & A5XX_GRAS_SC_RAS_MSAA_CNTL_SAMPLES__MASK;
2116 }
2117 
2118 #define REG_A5XX_GRAS_SC_DEST_MSAA_CNTL				0x0000e0a3
2119 #define A5XX_GRAS_SC_DEST_MSAA_CNTL_SAMPLES__MASK		0x00000003
2120 #define A5XX_GRAS_SC_DEST_MSAA_CNTL_SAMPLES__SHIFT		0
A5XX_GRAS_SC_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)2121 static inline uint32_t A5XX_GRAS_SC_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
2122 {
2123 	return ((val) << A5XX_GRAS_SC_DEST_MSAA_CNTL_SAMPLES__SHIFT) & A5XX_GRAS_SC_DEST_MSAA_CNTL_SAMPLES__MASK;
2124 }
2125 #define A5XX_GRAS_SC_DEST_MSAA_CNTL_MSAA_DISABLE		0x00000004
2126 
2127 #define REG_A5XX_GRAS_SC_SCREEN_SCISSOR_CNTL			0x0000e0a4
2128 
2129 #define REG_A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0			0x0000e0aa
2130 #define A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_WINDOW_OFFSET_DISABLE	0x80000000
2131 #define A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__MASK		0x00007fff
2132 #define A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__SHIFT		0
A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X(uint32_t val)2133 static inline uint32_t A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X(uint32_t val)
2134 {
2135 	return ((val) << A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__SHIFT) & A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_X__MASK;
2136 }
2137 #define A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__MASK		0x7fff0000
2138 #define A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__SHIFT		16
A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y(uint32_t val)2139 static inline uint32_t A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y(uint32_t val)
2140 {
2141 	return ((val) << A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__SHIFT) & A5XX_GRAS_SC_SCREEN_SCISSOR_TL_0_Y__MASK;
2142 }
2143 
2144 #define REG_A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0			0x0000e0ab
2145 #define A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_WINDOW_OFFSET_DISABLE	0x80000000
2146 #define A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__MASK		0x00007fff
2147 #define A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__SHIFT		0
A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X(uint32_t val)2148 static inline uint32_t A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X(uint32_t val)
2149 {
2150 	return ((val) << A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__SHIFT) & A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_X__MASK;
2151 }
2152 #define A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__MASK		0x7fff0000
2153 #define A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__SHIFT		16
A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y(uint32_t val)2154 static inline uint32_t A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y(uint32_t val)
2155 {
2156 	return ((val) << A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__SHIFT) & A5XX_GRAS_SC_SCREEN_SCISSOR_BR_0_Y__MASK;
2157 }
2158 
2159 #define REG_A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0			0x0000e0ca
2160 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_WINDOW_OFFSET_DISABLE	0x80000000
2161 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__MASK		0x00007fff
2162 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__SHIFT		0
A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X(uint32_t val)2163 static inline uint32_t A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X(uint32_t val)
2164 {
2165 	return ((val) << A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__SHIFT) & A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_X__MASK;
2166 }
2167 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__MASK		0x7fff0000
2168 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__SHIFT		16
A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y(uint32_t val)2169 static inline uint32_t A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y(uint32_t val)
2170 {
2171 	return ((val) << A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__SHIFT) & A5XX_GRAS_SC_VIEWPORT_SCISSOR_TL_0_Y__MASK;
2172 }
2173 
2174 #define REG_A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0			0x0000e0cb
2175 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_WINDOW_OFFSET_DISABLE	0x80000000
2176 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__MASK		0x00007fff
2177 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__SHIFT		0
A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X(uint32_t val)2178 static inline uint32_t A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X(uint32_t val)
2179 {
2180 	return ((val) << A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__SHIFT) & A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_X__MASK;
2181 }
2182 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__MASK		0x7fff0000
2183 #define A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__SHIFT		16
A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y(uint32_t val)2184 static inline uint32_t A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y(uint32_t val)
2185 {
2186 	return ((val) << A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__SHIFT) & A5XX_GRAS_SC_VIEWPORT_SCISSOR_BR_0_Y__MASK;
2187 }
2188 
2189 #define REG_A5XX_GRAS_SC_WINDOW_SCISSOR_TL			0x0000e0ea
2190 #define A5XX_GRAS_SC_WINDOW_SCISSOR_TL_WINDOW_OFFSET_DISABLE	0x80000000
2191 #define A5XX_GRAS_SC_WINDOW_SCISSOR_TL_X__MASK			0x00007fff
2192 #define A5XX_GRAS_SC_WINDOW_SCISSOR_TL_X__SHIFT			0
A5XX_GRAS_SC_WINDOW_SCISSOR_TL_X(uint32_t val)2193 static inline uint32_t A5XX_GRAS_SC_WINDOW_SCISSOR_TL_X(uint32_t val)
2194 {
2195 	return ((val) << A5XX_GRAS_SC_WINDOW_SCISSOR_TL_X__SHIFT) & A5XX_GRAS_SC_WINDOW_SCISSOR_TL_X__MASK;
2196 }
2197 #define A5XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__MASK			0x7fff0000
2198 #define A5XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__SHIFT			16
A5XX_GRAS_SC_WINDOW_SCISSOR_TL_Y(uint32_t val)2199 static inline uint32_t A5XX_GRAS_SC_WINDOW_SCISSOR_TL_Y(uint32_t val)
2200 {
2201 	return ((val) << A5XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__SHIFT) & A5XX_GRAS_SC_WINDOW_SCISSOR_TL_Y__MASK;
2202 }
2203 
2204 #define REG_A5XX_GRAS_SC_WINDOW_SCISSOR_BR			0x0000e0eb
2205 #define A5XX_GRAS_SC_WINDOW_SCISSOR_BR_WINDOW_OFFSET_DISABLE	0x80000000
2206 #define A5XX_GRAS_SC_WINDOW_SCISSOR_BR_X__MASK			0x00007fff
2207 #define A5XX_GRAS_SC_WINDOW_SCISSOR_BR_X__SHIFT			0
A5XX_GRAS_SC_WINDOW_SCISSOR_BR_X(uint32_t val)2208 static inline uint32_t A5XX_GRAS_SC_WINDOW_SCISSOR_BR_X(uint32_t val)
2209 {
2210 	return ((val) << A5XX_GRAS_SC_WINDOW_SCISSOR_BR_X__SHIFT) & A5XX_GRAS_SC_WINDOW_SCISSOR_BR_X__MASK;
2211 }
2212 #define A5XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__MASK			0x7fff0000
2213 #define A5XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__SHIFT			16
A5XX_GRAS_SC_WINDOW_SCISSOR_BR_Y(uint32_t val)2214 static inline uint32_t A5XX_GRAS_SC_WINDOW_SCISSOR_BR_Y(uint32_t val)
2215 {
2216 	return ((val) << A5XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__SHIFT) & A5XX_GRAS_SC_WINDOW_SCISSOR_BR_Y__MASK;
2217 }
2218 
2219 #define REG_A5XX_GRAS_LRZ_CNTL					0x0000e100
2220 
2221 #define REG_A5XX_GRAS_LRZ_BUFFER_BASE_LO			0x0000e101
2222 
2223 #define REG_A5XX_GRAS_LRZ_BUFFER_BASE_HI			0x0000e102
2224 
2225 #define REG_A5XX_GRAS_LRZ_BUFFER_PITCH				0x0000e103
2226 
2227 #define REG_A5XX_GRAS_LRZ_FAST_CLEAR_BUFFER_BASE_LO		0x0000e104
2228 
2229 #define REG_A5XX_GRAS_LRZ_FAST_CLEAR_BUFFER_BASE_HI		0x0000e105
2230 
2231 #define REG_A5XX_RB_CNTL					0x0000e140
2232 #define A5XX_RB_CNTL_WIDTH__MASK				0x000000ff
2233 #define A5XX_RB_CNTL_WIDTH__SHIFT				0
A5XX_RB_CNTL_WIDTH(uint32_t val)2234 static inline uint32_t A5XX_RB_CNTL_WIDTH(uint32_t val)
2235 {
2236 	assert(!(val & 0x1f));
2237 	return ((val >> 5) << A5XX_RB_CNTL_WIDTH__SHIFT) & A5XX_RB_CNTL_WIDTH__MASK;
2238 }
2239 #define A5XX_RB_CNTL_HEIGHT__MASK				0x0001fe00
2240 #define A5XX_RB_CNTL_HEIGHT__SHIFT				9
A5XX_RB_CNTL_HEIGHT(uint32_t val)2241 static inline uint32_t A5XX_RB_CNTL_HEIGHT(uint32_t val)
2242 {
2243 	assert(!(val & 0x1f));
2244 	return ((val >> 5) << A5XX_RB_CNTL_HEIGHT__SHIFT) & A5XX_RB_CNTL_HEIGHT__MASK;
2245 }
2246 #define A5XX_RB_CNTL_BYPASS					0x00020000
2247 
2248 #define REG_A5XX_RB_RENDER_CNTL					0x0000e141
2249 #define A5XX_RB_RENDER_CNTL_SAMPLES_PASSED			0x00000040
2250 #define A5XX_RB_RENDER_CNTL_FLAG_DEPTH				0x00004000
2251 #define A5XX_RB_RENDER_CNTL_FLAG_DEPTH2				0x00008000
2252 #define A5XX_RB_RENDER_CNTL_FLAG_MRTS__MASK			0x00ff0000
2253 #define A5XX_RB_RENDER_CNTL_FLAG_MRTS__SHIFT			16
A5XX_RB_RENDER_CNTL_FLAG_MRTS(uint32_t val)2254 static inline uint32_t A5XX_RB_RENDER_CNTL_FLAG_MRTS(uint32_t val)
2255 {
2256 	return ((val) << A5XX_RB_RENDER_CNTL_FLAG_MRTS__SHIFT) & A5XX_RB_RENDER_CNTL_FLAG_MRTS__MASK;
2257 }
2258 #define A5XX_RB_RENDER_CNTL_FLAG_MRTS2__MASK			0xff000000
2259 #define A5XX_RB_RENDER_CNTL_FLAG_MRTS2__SHIFT			24
A5XX_RB_RENDER_CNTL_FLAG_MRTS2(uint32_t val)2260 static inline uint32_t A5XX_RB_RENDER_CNTL_FLAG_MRTS2(uint32_t val)
2261 {
2262 	return ((val) << A5XX_RB_RENDER_CNTL_FLAG_MRTS2__SHIFT) & A5XX_RB_RENDER_CNTL_FLAG_MRTS2__MASK;
2263 }
2264 
2265 #define REG_A5XX_RB_RAS_MSAA_CNTL				0x0000e142
2266 #define A5XX_RB_RAS_MSAA_CNTL_SAMPLES__MASK			0x00000003
2267 #define A5XX_RB_RAS_MSAA_CNTL_SAMPLES__SHIFT			0
A5XX_RB_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)2268 static inline uint32_t A5XX_RB_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
2269 {
2270 	return ((val) << A5XX_RB_RAS_MSAA_CNTL_SAMPLES__SHIFT) & A5XX_RB_RAS_MSAA_CNTL_SAMPLES__MASK;
2271 }
2272 
2273 #define REG_A5XX_RB_DEST_MSAA_CNTL				0x0000e143
2274 #define A5XX_RB_DEST_MSAA_CNTL_SAMPLES__MASK			0x00000003
2275 #define A5XX_RB_DEST_MSAA_CNTL_SAMPLES__SHIFT			0
A5XX_RB_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)2276 static inline uint32_t A5XX_RB_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
2277 {
2278 	return ((val) << A5XX_RB_DEST_MSAA_CNTL_SAMPLES__SHIFT) & A5XX_RB_DEST_MSAA_CNTL_SAMPLES__MASK;
2279 }
2280 #define A5XX_RB_DEST_MSAA_CNTL_MSAA_DISABLE			0x00000004
2281 
2282 #define REG_A5XX_RB_RENDER_CONTROL0				0x0000e144
2283 #define A5XX_RB_RENDER_CONTROL0_VARYING				0x00000001
2284 #define A5XX_RB_RENDER_CONTROL0_UNK3				0x00000008
2285 #define A5XX_RB_RENDER_CONTROL0_XCOORD				0x00000040
2286 #define A5XX_RB_RENDER_CONTROL0_YCOORD				0x00000080
2287 #define A5XX_RB_RENDER_CONTROL0_ZCOORD				0x00000100
2288 #define A5XX_RB_RENDER_CONTROL0_WCOORD				0x00000200
2289 
2290 #define REG_A5XX_RB_RENDER_CONTROL1				0x0000e145
2291 #define A5XX_RB_RENDER_CONTROL1_FACENESS			0x00000002
2292 
2293 #define REG_A5XX_RB_FS_OUTPUT_CNTL				0x0000e146
2294 #define A5XX_RB_FS_OUTPUT_CNTL_MRT__MASK			0x0000000f
2295 #define A5XX_RB_FS_OUTPUT_CNTL_MRT__SHIFT			0
A5XX_RB_FS_OUTPUT_CNTL_MRT(uint32_t val)2296 static inline uint32_t A5XX_RB_FS_OUTPUT_CNTL_MRT(uint32_t val)
2297 {
2298 	return ((val) << A5XX_RB_FS_OUTPUT_CNTL_MRT__SHIFT) & A5XX_RB_FS_OUTPUT_CNTL_MRT__MASK;
2299 }
2300 #define A5XX_RB_FS_OUTPUT_CNTL_FRAG_WRITES_Z			0x00000020
2301 
2302 #define REG_A5XX_RB_RENDER_COMPONENTS				0x0000e147
2303 #define A5XX_RB_RENDER_COMPONENTS_RT0__MASK			0x0000000f
2304 #define A5XX_RB_RENDER_COMPONENTS_RT0__SHIFT			0
A5XX_RB_RENDER_COMPONENTS_RT0(uint32_t val)2305 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT0(uint32_t val)
2306 {
2307 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT0__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT0__MASK;
2308 }
2309 #define A5XX_RB_RENDER_COMPONENTS_RT1__MASK			0x000000f0
2310 #define A5XX_RB_RENDER_COMPONENTS_RT1__SHIFT			4
A5XX_RB_RENDER_COMPONENTS_RT1(uint32_t val)2311 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT1(uint32_t val)
2312 {
2313 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT1__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT1__MASK;
2314 }
2315 #define A5XX_RB_RENDER_COMPONENTS_RT2__MASK			0x00000f00
2316 #define A5XX_RB_RENDER_COMPONENTS_RT2__SHIFT			8
A5XX_RB_RENDER_COMPONENTS_RT2(uint32_t val)2317 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT2(uint32_t val)
2318 {
2319 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT2__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT2__MASK;
2320 }
2321 #define A5XX_RB_RENDER_COMPONENTS_RT3__MASK			0x0000f000
2322 #define A5XX_RB_RENDER_COMPONENTS_RT3__SHIFT			12
A5XX_RB_RENDER_COMPONENTS_RT3(uint32_t val)2323 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT3(uint32_t val)
2324 {
2325 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT3__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT3__MASK;
2326 }
2327 #define A5XX_RB_RENDER_COMPONENTS_RT4__MASK			0x000f0000
2328 #define A5XX_RB_RENDER_COMPONENTS_RT4__SHIFT			16
A5XX_RB_RENDER_COMPONENTS_RT4(uint32_t val)2329 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT4(uint32_t val)
2330 {
2331 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT4__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT4__MASK;
2332 }
2333 #define A5XX_RB_RENDER_COMPONENTS_RT5__MASK			0x00f00000
2334 #define A5XX_RB_RENDER_COMPONENTS_RT5__SHIFT			20
A5XX_RB_RENDER_COMPONENTS_RT5(uint32_t val)2335 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT5(uint32_t val)
2336 {
2337 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT5__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT5__MASK;
2338 }
2339 #define A5XX_RB_RENDER_COMPONENTS_RT6__MASK			0x0f000000
2340 #define A5XX_RB_RENDER_COMPONENTS_RT6__SHIFT			24
A5XX_RB_RENDER_COMPONENTS_RT6(uint32_t val)2341 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT6(uint32_t val)
2342 {
2343 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT6__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT6__MASK;
2344 }
2345 #define A5XX_RB_RENDER_COMPONENTS_RT7__MASK			0xf0000000
2346 #define A5XX_RB_RENDER_COMPONENTS_RT7__SHIFT			28
A5XX_RB_RENDER_COMPONENTS_RT7(uint32_t val)2347 static inline uint32_t A5XX_RB_RENDER_COMPONENTS_RT7(uint32_t val)
2348 {
2349 	return ((val) << A5XX_RB_RENDER_COMPONENTS_RT7__SHIFT) & A5XX_RB_RENDER_COMPONENTS_RT7__MASK;
2350 }
2351 
REG_A5XX_RB_MRT(uint32_t i0)2352 static inline uint32_t REG_A5XX_RB_MRT(uint32_t i0) { return 0x0000e150 + 0x7*i0; }
2353 
REG_A5XX_RB_MRT_CONTROL(uint32_t i0)2354 static inline uint32_t REG_A5XX_RB_MRT_CONTROL(uint32_t i0) { return 0x0000e150 + 0x7*i0; }
2355 #define A5XX_RB_MRT_CONTROL_BLEND				0x00000001
2356 #define A5XX_RB_MRT_CONTROL_BLEND2				0x00000002
2357 #define A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK		0x00000780
2358 #define A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT		7
A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE(uint32_t val)2359 static inline uint32_t A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE(uint32_t val)
2360 {
2361 	return ((val) << A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE__SHIFT) & A5XX_RB_MRT_CONTROL_COMPONENT_ENABLE__MASK;
2362 }
2363 
REG_A5XX_RB_MRT_BLEND_CONTROL(uint32_t i0)2364 static inline uint32_t REG_A5XX_RB_MRT_BLEND_CONTROL(uint32_t i0) { return 0x0000e151 + 0x7*i0; }
2365 #define A5XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__MASK		0x0000001f
2366 #define A5XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__SHIFT		0
A5XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(enum adreno_rb_blend_factor val)2367 static inline uint32_t A5XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR(enum adreno_rb_blend_factor val)
2368 {
2369 	return ((val) << A5XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__SHIFT) & A5XX_RB_MRT_BLEND_CONTROL_RGB_SRC_FACTOR__MASK;
2370 }
2371 #define A5XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK	0x000000e0
2372 #define A5XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT	5
A5XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)2373 static inline uint32_t A5XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
2374 {
2375 	return ((val) << A5XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__SHIFT) & A5XX_RB_MRT_BLEND_CONTROL_RGB_BLEND_OPCODE__MASK;
2376 }
2377 #define A5XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__MASK		0x00001f00
2378 #define A5XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__SHIFT	8
A5XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(enum adreno_rb_blend_factor val)2379 static inline uint32_t A5XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR(enum adreno_rb_blend_factor val)
2380 {
2381 	return ((val) << A5XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__SHIFT) & A5XX_RB_MRT_BLEND_CONTROL_RGB_DEST_FACTOR__MASK;
2382 }
2383 #define A5XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__MASK	0x001f0000
2384 #define A5XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__SHIFT	16
A5XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(enum adreno_rb_blend_factor val)2385 static inline uint32_t A5XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR(enum adreno_rb_blend_factor val)
2386 {
2387 	return ((val) << A5XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__SHIFT) & A5XX_RB_MRT_BLEND_CONTROL_ALPHA_SRC_FACTOR__MASK;
2388 }
2389 #define A5XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK	0x00e00000
2390 #define A5XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT	21
A5XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)2391 static inline uint32_t A5XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE(enum a3xx_rb_blend_opcode val)
2392 {
2393 	return ((val) << A5XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__SHIFT) & A5XX_RB_MRT_BLEND_CONTROL_ALPHA_BLEND_OPCODE__MASK;
2394 }
2395 #define A5XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__MASK	0x1f000000
2396 #define A5XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__SHIFT	24
A5XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(enum adreno_rb_blend_factor val)2397 static inline uint32_t A5XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR(enum adreno_rb_blend_factor val)
2398 {
2399 	return ((val) << A5XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__SHIFT) & A5XX_RB_MRT_BLEND_CONTROL_ALPHA_DEST_FACTOR__MASK;
2400 }
2401 
REG_A5XX_RB_MRT_BUF_INFO(uint32_t i0)2402 static inline uint32_t REG_A5XX_RB_MRT_BUF_INFO(uint32_t i0) { return 0x0000e152 + 0x7*i0; }
2403 #define A5XX_RB_MRT_BUF_INFO_COLOR_FORMAT__MASK			0x000000ff
2404 #define A5XX_RB_MRT_BUF_INFO_COLOR_FORMAT__SHIFT		0
A5XX_RB_MRT_BUF_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)2405 static inline uint32_t A5XX_RB_MRT_BUF_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)
2406 {
2407 	return ((val) << A5XX_RB_MRT_BUF_INFO_COLOR_FORMAT__SHIFT) & A5XX_RB_MRT_BUF_INFO_COLOR_FORMAT__MASK;
2408 }
2409 #define A5XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__MASK		0x00000300
2410 #define A5XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__SHIFT		8
A5XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE(enum a5xx_tile_mode val)2411 static inline uint32_t A5XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE(enum a5xx_tile_mode val)
2412 {
2413 	return ((val) << A5XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__SHIFT) & A5XX_RB_MRT_BUF_INFO_COLOR_TILE_MODE__MASK;
2414 }
2415 #define A5XX_RB_MRT_BUF_INFO_COLOR_SWAP__MASK			0x00006000
2416 #define A5XX_RB_MRT_BUF_INFO_COLOR_SWAP__SHIFT			13
A5XX_RB_MRT_BUF_INFO_COLOR_SWAP(enum a3xx_color_swap val)2417 static inline uint32_t A5XX_RB_MRT_BUF_INFO_COLOR_SWAP(enum a3xx_color_swap val)
2418 {
2419 	return ((val) << A5XX_RB_MRT_BUF_INFO_COLOR_SWAP__SHIFT) & A5XX_RB_MRT_BUF_INFO_COLOR_SWAP__MASK;
2420 }
2421 #define A5XX_RB_MRT_BUF_INFO_COLOR_SRGB				0x00008000
2422 
REG_A5XX_RB_MRT_PITCH(uint32_t i0)2423 static inline uint32_t REG_A5XX_RB_MRT_PITCH(uint32_t i0) { return 0x0000e153 + 0x7*i0; }
2424 #define A5XX_RB_MRT_PITCH__MASK					0xffffffff
2425 #define A5XX_RB_MRT_PITCH__SHIFT				0
A5XX_RB_MRT_PITCH(uint32_t val)2426 static inline uint32_t A5XX_RB_MRT_PITCH(uint32_t val)
2427 {
2428 	assert(!(val & 0x3f));
2429 	return ((val >> 6) << A5XX_RB_MRT_PITCH__SHIFT) & A5XX_RB_MRT_PITCH__MASK;
2430 }
2431 
REG_A5XX_RB_MRT_ARRAY_PITCH(uint32_t i0)2432 static inline uint32_t REG_A5XX_RB_MRT_ARRAY_PITCH(uint32_t i0) { return 0x0000e154 + 0x7*i0; }
2433 #define A5XX_RB_MRT_ARRAY_PITCH__MASK				0xffffffff
2434 #define A5XX_RB_MRT_ARRAY_PITCH__SHIFT				0
A5XX_RB_MRT_ARRAY_PITCH(uint32_t val)2435 static inline uint32_t A5XX_RB_MRT_ARRAY_PITCH(uint32_t val)
2436 {
2437 	assert(!(val & 0x3f));
2438 	return ((val >> 6) << A5XX_RB_MRT_ARRAY_PITCH__SHIFT) & A5XX_RB_MRT_ARRAY_PITCH__MASK;
2439 }
2440 
REG_A5XX_RB_MRT_BASE_LO(uint32_t i0)2441 static inline uint32_t REG_A5XX_RB_MRT_BASE_LO(uint32_t i0) { return 0x0000e155 + 0x7*i0; }
2442 
REG_A5XX_RB_MRT_BASE_HI(uint32_t i0)2443 static inline uint32_t REG_A5XX_RB_MRT_BASE_HI(uint32_t i0) { return 0x0000e156 + 0x7*i0; }
2444 
2445 #define REG_A5XX_RB_BLEND_RED					0x0000e1a0
2446 #define A5XX_RB_BLEND_RED_UINT__MASK				0x000000ff
2447 #define A5XX_RB_BLEND_RED_UINT__SHIFT				0
A5XX_RB_BLEND_RED_UINT(uint32_t val)2448 static inline uint32_t A5XX_RB_BLEND_RED_UINT(uint32_t val)
2449 {
2450 	return ((val) << A5XX_RB_BLEND_RED_UINT__SHIFT) & A5XX_RB_BLEND_RED_UINT__MASK;
2451 }
2452 #define A5XX_RB_BLEND_RED_SINT__MASK				0x0000ff00
2453 #define A5XX_RB_BLEND_RED_SINT__SHIFT				8
A5XX_RB_BLEND_RED_SINT(uint32_t val)2454 static inline uint32_t A5XX_RB_BLEND_RED_SINT(uint32_t val)
2455 {
2456 	return ((val) << A5XX_RB_BLEND_RED_SINT__SHIFT) & A5XX_RB_BLEND_RED_SINT__MASK;
2457 }
2458 #define A5XX_RB_BLEND_RED_FLOAT__MASK				0xffff0000
2459 #define A5XX_RB_BLEND_RED_FLOAT__SHIFT				16
A5XX_RB_BLEND_RED_FLOAT(float val)2460 static inline uint32_t A5XX_RB_BLEND_RED_FLOAT(float val)
2461 {
2462 	return ((util_float_to_half(val)) << A5XX_RB_BLEND_RED_FLOAT__SHIFT) & A5XX_RB_BLEND_RED_FLOAT__MASK;
2463 }
2464 
2465 #define REG_A5XX_RB_BLEND_RED_F32				0x0000e1a1
2466 #define A5XX_RB_BLEND_RED_F32__MASK				0xffffffff
2467 #define A5XX_RB_BLEND_RED_F32__SHIFT				0
A5XX_RB_BLEND_RED_F32(float val)2468 static inline uint32_t A5XX_RB_BLEND_RED_F32(float val)
2469 {
2470 	return ((fui(val)) << A5XX_RB_BLEND_RED_F32__SHIFT) & A5XX_RB_BLEND_RED_F32__MASK;
2471 }
2472 
2473 #define REG_A5XX_RB_BLEND_GREEN					0x0000e1a2
2474 #define A5XX_RB_BLEND_GREEN_UINT__MASK				0x000000ff
2475 #define A5XX_RB_BLEND_GREEN_UINT__SHIFT				0
A5XX_RB_BLEND_GREEN_UINT(uint32_t val)2476 static inline uint32_t A5XX_RB_BLEND_GREEN_UINT(uint32_t val)
2477 {
2478 	return ((val) << A5XX_RB_BLEND_GREEN_UINT__SHIFT) & A5XX_RB_BLEND_GREEN_UINT__MASK;
2479 }
2480 #define A5XX_RB_BLEND_GREEN_SINT__MASK				0x0000ff00
2481 #define A5XX_RB_BLEND_GREEN_SINT__SHIFT				8
A5XX_RB_BLEND_GREEN_SINT(uint32_t val)2482 static inline uint32_t A5XX_RB_BLEND_GREEN_SINT(uint32_t val)
2483 {
2484 	return ((val) << A5XX_RB_BLEND_GREEN_SINT__SHIFT) & A5XX_RB_BLEND_GREEN_SINT__MASK;
2485 }
2486 #define A5XX_RB_BLEND_GREEN_FLOAT__MASK				0xffff0000
2487 #define A5XX_RB_BLEND_GREEN_FLOAT__SHIFT			16
A5XX_RB_BLEND_GREEN_FLOAT(float val)2488 static inline uint32_t A5XX_RB_BLEND_GREEN_FLOAT(float val)
2489 {
2490 	return ((util_float_to_half(val)) << A5XX_RB_BLEND_GREEN_FLOAT__SHIFT) & A5XX_RB_BLEND_GREEN_FLOAT__MASK;
2491 }
2492 
2493 #define REG_A5XX_RB_BLEND_GREEN_F32				0x0000e1a3
2494 #define A5XX_RB_BLEND_GREEN_F32__MASK				0xffffffff
2495 #define A5XX_RB_BLEND_GREEN_F32__SHIFT				0
A5XX_RB_BLEND_GREEN_F32(float val)2496 static inline uint32_t A5XX_RB_BLEND_GREEN_F32(float val)
2497 {
2498 	return ((fui(val)) << A5XX_RB_BLEND_GREEN_F32__SHIFT) & A5XX_RB_BLEND_GREEN_F32__MASK;
2499 }
2500 
2501 #define REG_A5XX_RB_BLEND_BLUE					0x0000e1a4
2502 #define A5XX_RB_BLEND_BLUE_UINT__MASK				0x000000ff
2503 #define A5XX_RB_BLEND_BLUE_UINT__SHIFT				0
A5XX_RB_BLEND_BLUE_UINT(uint32_t val)2504 static inline uint32_t A5XX_RB_BLEND_BLUE_UINT(uint32_t val)
2505 {
2506 	return ((val) << A5XX_RB_BLEND_BLUE_UINT__SHIFT) & A5XX_RB_BLEND_BLUE_UINT__MASK;
2507 }
2508 #define A5XX_RB_BLEND_BLUE_SINT__MASK				0x0000ff00
2509 #define A5XX_RB_BLEND_BLUE_SINT__SHIFT				8
A5XX_RB_BLEND_BLUE_SINT(uint32_t val)2510 static inline uint32_t A5XX_RB_BLEND_BLUE_SINT(uint32_t val)
2511 {
2512 	return ((val) << A5XX_RB_BLEND_BLUE_SINT__SHIFT) & A5XX_RB_BLEND_BLUE_SINT__MASK;
2513 }
2514 #define A5XX_RB_BLEND_BLUE_FLOAT__MASK				0xffff0000
2515 #define A5XX_RB_BLEND_BLUE_FLOAT__SHIFT				16
A5XX_RB_BLEND_BLUE_FLOAT(float val)2516 static inline uint32_t A5XX_RB_BLEND_BLUE_FLOAT(float val)
2517 {
2518 	return ((util_float_to_half(val)) << A5XX_RB_BLEND_BLUE_FLOAT__SHIFT) & A5XX_RB_BLEND_BLUE_FLOAT__MASK;
2519 }
2520 
2521 #define REG_A5XX_RB_BLEND_BLUE_F32				0x0000e1a5
2522 #define A5XX_RB_BLEND_BLUE_F32__MASK				0xffffffff
2523 #define A5XX_RB_BLEND_BLUE_F32__SHIFT				0
A5XX_RB_BLEND_BLUE_F32(float val)2524 static inline uint32_t A5XX_RB_BLEND_BLUE_F32(float val)
2525 {
2526 	return ((fui(val)) << A5XX_RB_BLEND_BLUE_F32__SHIFT) & A5XX_RB_BLEND_BLUE_F32__MASK;
2527 }
2528 
2529 #define REG_A5XX_RB_BLEND_ALPHA					0x0000e1a6
2530 #define A5XX_RB_BLEND_ALPHA_UINT__MASK				0x000000ff
2531 #define A5XX_RB_BLEND_ALPHA_UINT__SHIFT				0
A5XX_RB_BLEND_ALPHA_UINT(uint32_t val)2532 static inline uint32_t A5XX_RB_BLEND_ALPHA_UINT(uint32_t val)
2533 {
2534 	return ((val) << A5XX_RB_BLEND_ALPHA_UINT__SHIFT) & A5XX_RB_BLEND_ALPHA_UINT__MASK;
2535 }
2536 #define A5XX_RB_BLEND_ALPHA_SINT__MASK				0x0000ff00
2537 #define A5XX_RB_BLEND_ALPHA_SINT__SHIFT				8
A5XX_RB_BLEND_ALPHA_SINT(uint32_t val)2538 static inline uint32_t A5XX_RB_BLEND_ALPHA_SINT(uint32_t val)
2539 {
2540 	return ((val) << A5XX_RB_BLEND_ALPHA_SINT__SHIFT) & A5XX_RB_BLEND_ALPHA_SINT__MASK;
2541 }
2542 #define A5XX_RB_BLEND_ALPHA_FLOAT__MASK				0xffff0000
2543 #define A5XX_RB_BLEND_ALPHA_FLOAT__SHIFT			16
A5XX_RB_BLEND_ALPHA_FLOAT(float val)2544 static inline uint32_t A5XX_RB_BLEND_ALPHA_FLOAT(float val)
2545 {
2546 	return ((util_float_to_half(val)) << A5XX_RB_BLEND_ALPHA_FLOAT__SHIFT) & A5XX_RB_BLEND_ALPHA_FLOAT__MASK;
2547 }
2548 
2549 #define REG_A5XX_RB_BLEND_ALPHA_F32				0x0000e1a7
2550 #define A5XX_RB_BLEND_ALPHA_F32__MASK				0xffffffff
2551 #define A5XX_RB_BLEND_ALPHA_F32__SHIFT				0
A5XX_RB_BLEND_ALPHA_F32(float val)2552 static inline uint32_t A5XX_RB_BLEND_ALPHA_F32(float val)
2553 {
2554 	return ((fui(val)) << A5XX_RB_BLEND_ALPHA_F32__SHIFT) & A5XX_RB_BLEND_ALPHA_F32__MASK;
2555 }
2556 
2557 #define REG_A5XX_RB_ALPHA_CONTROL				0x0000e1a8
2558 #define A5XX_RB_ALPHA_CONTROL_ALPHA_REF__MASK			0x000000ff
2559 #define A5XX_RB_ALPHA_CONTROL_ALPHA_REF__SHIFT			0
A5XX_RB_ALPHA_CONTROL_ALPHA_REF(uint32_t val)2560 static inline uint32_t A5XX_RB_ALPHA_CONTROL_ALPHA_REF(uint32_t val)
2561 {
2562 	return ((val) << A5XX_RB_ALPHA_CONTROL_ALPHA_REF__SHIFT) & A5XX_RB_ALPHA_CONTROL_ALPHA_REF__MASK;
2563 }
2564 #define A5XX_RB_ALPHA_CONTROL_ALPHA_TEST			0x00000100
2565 #define A5XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__MASK		0x00000e00
2566 #define A5XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__SHIFT		9
A5XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC(enum adreno_compare_func val)2567 static inline uint32_t A5XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC(enum adreno_compare_func val)
2568 {
2569 	return ((val) << A5XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__SHIFT) & A5XX_RB_ALPHA_CONTROL_ALPHA_TEST_FUNC__MASK;
2570 }
2571 
2572 #define REG_A5XX_RB_BLEND_CNTL					0x0000e1a9
2573 #define A5XX_RB_BLEND_CNTL_ENABLE_BLEND__MASK			0x000000ff
2574 #define A5XX_RB_BLEND_CNTL_ENABLE_BLEND__SHIFT			0
A5XX_RB_BLEND_CNTL_ENABLE_BLEND(uint32_t val)2575 static inline uint32_t A5XX_RB_BLEND_CNTL_ENABLE_BLEND(uint32_t val)
2576 {
2577 	return ((val) << A5XX_RB_BLEND_CNTL_ENABLE_BLEND__SHIFT) & A5XX_RB_BLEND_CNTL_ENABLE_BLEND__MASK;
2578 }
2579 #define A5XX_RB_BLEND_CNTL_INDEPENDENT_BLEND			0x00000100
2580 #define A5XX_RB_BLEND_CNTL_SAMPLE_MASK__MASK			0xffff0000
2581 #define A5XX_RB_BLEND_CNTL_SAMPLE_MASK__SHIFT			16
A5XX_RB_BLEND_CNTL_SAMPLE_MASK(uint32_t val)2582 static inline uint32_t A5XX_RB_BLEND_CNTL_SAMPLE_MASK(uint32_t val)
2583 {
2584 	return ((val) << A5XX_RB_BLEND_CNTL_SAMPLE_MASK__SHIFT) & A5XX_RB_BLEND_CNTL_SAMPLE_MASK__MASK;
2585 }
2586 
2587 #define REG_A5XX_RB_DEPTH_PLANE_CNTL				0x0000e1b0
2588 #define A5XX_RB_DEPTH_PLANE_CNTL_FRAG_WRITES_Z			0x00000001
2589 #define A5XX_RB_DEPTH_PLANE_CNTL_UNK1				0x00000002
2590 
2591 #define REG_A5XX_RB_DEPTH_CNTL					0x0000e1b1
2592 #define A5XX_RB_DEPTH_CNTL_Z_ENABLE				0x00000001
2593 #define A5XX_RB_DEPTH_CNTL_Z_WRITE_ENABLE			0x00000002
2594 #define A5XX_RB_DEPTH_CNTL_ZFUNC__MASK				0x0000001c
2595 #define A5XX_RB_DEPTH_CNTL_ZFUNC__SHIFT				2
A5XX_RB_DEPTH_CNTL_ZFUNC(enum adreno_compare_func val)2596 static inline uint32_t A5XX_RB_DEPTH_CNTL_ZFUNC(enum adreno_compare_func val)
2597 {
2598 	return ((val) << A5XX_RB_DEPTH_CNTL_ZFUNC__SHIFT) & A5XX_RB_DEPTH_CNTL_ZFUNC__MASK;
2599 }
2600 #define A5XX_RB_DEPTH_CNTL_Z_TEST_ENABLE			0x00000040
2601 
2602 #define REG_A5XX_RB_DEPTH_BUFFER_INFO				0x0000e1b2
2603 #define A5XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK		0x00000007
2604 #define A5XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT		0
A5XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT(enum a5xx_depth_format val)2605 static inline uint32_t A5XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT(enum a5xx_depth_format val)
2606 {
2607 	return ((val) << A5XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__SHIFT) & A5XX_RB_DEPTH_BUFFER_INFO_DEPTH_FORMAT__MASK;
2608 }
2609 
2610 #define REG_A5XX_RB_DEPTH_BUFFER_BASE_LO			0x0000e1b3
2611 
2612 #define REG_A5XX_RB_DEPTH_BUFFER_BASE_HI			0x0000e1b4
2613 
2614 #define REG_A5XX_RB_DEPTH_BUFFER_PITCH				0x0000e1b5
2615 #define A5XX_RB_DEPTH_BUFFER_PITCH__MASK			0xffffffff
2616 #define A5XX_RB_DEPTH_BUFFER_PITCH__SHIFT			0
A5XX_RB_DEPTH_BUFFER_PITCH(uint32_t val)2617 static inline uint32_t A5XX_RB_DEPTH_BUFFER_PITCH(uint32_t val)
2618 {
2619 	assert(!(val & 0x3f));
2620 	return ((val >> 6) << A5XX_RB_DEPTH_BUFFER_PITCH__SHIFT) & A5XX_RB_DEPTH_BUFFER_PITCH__MASK;
2621 }
2622 
2623 #define REG_A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH			0x0000e1b6
2624 #define A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH__MASK			0xffffffff
2625 #define A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH__SHIFT			0
A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH(uint32_t val)2626 static inline uint32_t A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH(uint32_t val)
2627 {
2628 	assert(!(val & 0x3f));
2629 	return ((val >> 6) << A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH__SHIFT) & A5XX_RB_DEPTH_BUFFER_ARRAY_PITCH__MASK;
2630 }
2631 
2632 #define REG_A5XX_RB_STENCIL_CONTROL				0x0000e1c0
2633 #define A5XX_RB_STENCIL_CONTROL_STENCIL_ENABLE			0x00000001
2634 #define A5XX_RB_STENCIL_CONTROL_STENCIL_ENABLE_BF		0x00000002
2635 #define A5XX_RB_STENCIL_CONTROL_STENCIL_READ			0x00000004
2636 #define A5XX_RB_STENCIL_CONTROL_FUNC__MASK			0x00000700
2637 #define A5XX_RB_STENCIL_CONTROL_FUNC__SHIFT			8
A5XX_RB_STENCIL_CONTROL_FUNC(enum adreno_compare_func val)2638 static inline uint32_t A5XX_RB_STENCIL_CONTROL_FUNC(enum adreno_compare_func val)
2639 {
2640 	return ((val) << A5XX_RB_STENCIL_CONTROL_FUNC__SHIFT) & A5XX_RB_STENCIL_CONTROL_FUNC__MASK;
2641 }
2642 #define A5XX_RB_STENCIL_CONTROL_FAIL__MASK			0x00003800
2643 #define A5XX_RB_STENCIL_CONTROL_FAIL__SHIFT			11
A5XX_RB_STENCIL_CONTROL_FAIL(enum adreno_stencil_op val)2644 static inline uint32_t A5XX_RB_STENCIL_CONTROL_FAIL(enum adreno_stencil_op val)
2645 {
2646 	return ((val) << A5XX_RB_STENCIL_CONTROL_FAIL__SHIFT) & A5XX_RB_STENCIL_CONTROL_FAIL__MASK;
2647 }
2648 #define A5XX_RB_STENCIL_CONTROL_ZPASS__MASK			0x0001c000
2649 #define A5XX_RB_STENCIL_CONTROL_ZPASS__SHIFT			14
A5XX_RB_STENCIL_CONTROL_ZPASS(enum adreno_stencil_op val)2650 static inline uint32_t A5XX_RB_STENCIL_CONTROL_ZPASS(enum adreno_stencil_op val)
2651 {
2652 	return ((val) << A5XX_RB_STENCIL_CONTROL_ZPASS__SHIFT) & A5XX_RB_STENCIL_CONTROL_ZPASS__MASK;
2653 }
2654 #define A5XX_RB_STENCIL_CONTROL_ZFAIL__MASK			0x000e0000
2655 #define A5XX_RB_STENCIL_CONTROL_ZFAIL__SHIFT			17
A5XX_RB_STENCIL_CONTROL_ZFAIL(enum adreno_stencil_op val)2656 static inline uint32_t A5XX_RB_STENCIL_CONTROL_ZFAIL(enum adreno_stencil_op val)
2657 {
2658 	return ((val) << A5XX_RB_STENCIL_CONTROL_ZFAIL__SHIFT) & A5XX_RB_STENCIL_CONTROL_ZFAIL__MASK;
2659 }
2660 #define A5XX_RB_STENCIL_CONTROL_FUNC_BF__MASK			0x00700000
2661 #define A5XX_RB_STENCIL_CONTROL_FUNC_BF__SHIFT			20
A5XX_RB_STENCIL_CONTROL_FUNC_BF(enum adreno_compare_func val)2662 static inline uint32_t A5XX_RB_STENCIL_CONTROL_FUNC_BF(enum adreno_compare_func val)
2663 {
2664 	return ((val) << A5XX_RB_STENCIL_CONTROL_FUNC_BF__SHIFT) & A5XX_RB_STENCIL_CONTROL_FUNC_BF__MASK;
2665 }
2666 #define A5XX_RB_STENCIL_CONTROL_FAIL_BF__MASK			0x03800000
2667 #define A5XX_RB_STENCIL_CONTROL_FAIL_BF__SHIFT			23
A5XX_RB_STENCIL_CONTROL_FAIL_BF(enum adreno_stencil_op val)2668 static inline uint32_t A5XX_RB_STENCIL_CONTROL_FAIL_BF(enum adreno_stencil_op val)
2669 {
2670 	return ((val) << A5XX_RB_STENCIL_CONTROL_FAIL_BF__SHIFT) & A5XX_RB_STENCIL_CONTROL_FAIL_BF__MASK;
2671 }
2672 #define A5XX_RB_STENCIL_CONTROL_ZPASS_BF__MASK			0x1c000000
2673 #define A5XX_RB_STENCIL_CONTROL_ZPASS_BF__SHIFT			26
A5XX_RB_STENCIL_CONTROL_ZPASS_BF(enum adreno_stencil_op val)2674 static inline uint32_t A5XX_RB_STENCIL_CONTROL_ZPASS_BF(enum adreno_stencil_op val)
2675 {
2676 	return ((val) << A5XX_RB_STENCIL_CONTROL_ZPASS_BF__SHIFT) & A5XX_RB_STENCIL_CONTROL_ZPASS_BF__MASK;
2677 }
2678 #define A5XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK			0xe0000000
2679 #define A5XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT			29
A5XX_RB_STENCIL_CONTROL_ZFAIL_BF(enum adreno_stencil_op val)2680 static inline uint32_t A5XX_RB_STENCIL_CONTROL_ZFAIL_BF(enum adreno_stencil_op val)
2681 {
2682 	return ((val) << A5XX_RB_STENCIL_CONTROL_ZFAIL_BF__SHIFT) & A5XX_RB_STENCIL_CONTROL_ZFAIL_BF__MASK;
2683 }
2684 
2685 #define REG_A5XX_RB_STENCIL_INFO				0x0000e1c1
2686 #define A5XX_RB_STENCIL_INFO_SEPARATE_STENCIL			0x00000001
2687 
2688 #define REG_A5XX_RB_STENCIL_BASE_LO				0x0000e1c2
2689 
2690 #define REG_A5XX_RB_STENCIL_BASE_HI				0x0000e1c3
2691 
2692 #define REG_A5XX_RB_STENCIL_PITCH				0x0000e1c4
2693 #define A5XX_RB_STENCIL_PITCH__MASK				0xffffffff
2694 #define A5XX_RB_STENCIL_PITCH__SHIFT				0
A5XX_RB_STENCIL_PITCH(uint32_t val)2695 static inline uint32_t A5XX_RB_STENCIL_PITCH(uint32_t val)
2696 {
2697 	assert(!(val & 0x3f));
2698 	return ((val >> 6) << A5XX_RB_STENCIL_PITCH__SHIFT) & A5XX_RB_STENCIL_PITCH__MASK;
2699 }
2700 
2701 #define REG_A5XX_RB_STENCIL_ARRAY_PITCH				0x0000e1c5
2702 #define A5XX_RB_STENCIL_ARRAY_PITCH__MASK			0xffffffff
2703 #define A5XX_RB_STENCIL_ARRAY_PITCH__SHIFT			0
A5XX_RB_STENCIL_ARRAY_PITCH(uint32_t val)2704 static inline uint32_t A5XX_RB_STENCIL_ARRAY_PITCH(uint32_t val)
2705 {
2706 	assert(!(val & 0x3f));
2707 	return ((val >> 6) << A5XX_RB_STENCIL_ARRAY_PITCH__SHIFT) & A5XX_RB_STENCIL_ARRAY_PITCH__MASK;
2708 }
2709 
2710 #define REG_A5XX_RB_STENCILREFMASK				0x0000e1c6
2711 #define A5XX_RB_STENCILREFMASK_STENCILREF__MASK			0x000000ff
2712 #define A5XX_RB_STENCILREFMASK_STENCILREF__SHIFT		0
A5XX_RB_STENCILREFMASK_STENCILREF(uint32_t val)2713 static inline uint32_t A5XX_RB_STENCILREFMASK_STENCILREF(uint32_t val)
2714 {
2715 	return ((val) << A5XX_RB_STENCILREFMASK_STENCILREF__SHIFT) & A5XX_RB_STENCILREFMASK_STENCILREF__MASK;
2716 }
2717 #define A5XX_RB_STENCILREFMASK_STENCILMASK__MASK		0x0000ff00
2718 #define A5XX_RB_STENCILREFMASK_STENCILMASK__SHIFT		8
A5XX_RB_STENCILREFMASK_STENCILMASK(uint32_t val)2719 static inline uint32_t A5XX_RB_STENCILREFMASK_STENCILMASK(uint32_t val)
2720 {
2721 	return ((val) << A5XX_RB_STENCILREFMASK_STENCILMASK__SHIFT) & A5XX_RB_STENCILREFMASK_STENCILMASK__MASK;
2722 }
2723 #define A5XX_RB_STENCILREFMASK_STENCILWRITEMASK__MASK		0x00ff0000
2724 #define A5XX_RB_STENCILREFMASK_STENCILWRITEMASK__SHIFT		16
A5XX_RB_STENCILREFMASK_STENCILWRITEMASK(uint32_t val)2725 static inline uint32_t A5XX_RB_STENCILREFMASK_STENCILWRITEMASK(uint32_t val)
2726 {
2727 	return ((val) << A5XX_RB_STENCILREFMASK_STENCILWRITEMASK__SHIFT) & A5XX_RB_STENCILREFMASK_STENCILWRITEMASK__MASK;
2728 }
2729 
2730 #define REG_A5XX_UNKNOWN_E1C7					0x0000e1c7
2731 
2732 #define REG_A5XX_RB_WINDOW_OFFSET				0x0000e1d0
2733 #define A5XX_RB_WINDOW_OFFSET_WINDOW_OFFSET_DISABLE		0x80000000
2734 #define A5XX_RB_WINDOW_OFFSET_X__MASK				0x00007fff
2735 #define A5XX_RB_WINDOW_OFFSET_X__SHIFT				0
A5XX_RB_WINDOW_OFFSET_X(uint32_t val)2736 static inline uint32_t A5XX_RB_WINDOW_OFFSET_X(uint32_t val)
2737 {
2738 	return ((val) << A5XX_RB_WINDOW_OFFSET_X__SHIFT) & A5XX_RB_WINDOW_OFFSET_X__MASK;
2739 }
2740 #define A5XX_RB_WINDOW_OFFSET_Y__MASK				0x7fff0000
2741 #define A5XX_RB_WINDOW_OFFSET_Y__SHIFT				16
A5XX_RB_WINDOW_OFFSET_Y(uint32_t val)2742 static inline uint32_t A5XX_RB_WINDOW_OFFSET_Y(uint32_t val)
2743 {
2744 	return ((val) << A5XX_RB_WINDOW_OFFSET_Y__SHIFT) & A5XX_RB_WINDOW_OFFSET_Y__MASK;
2745 }
2746 
2747 #define REG_A5XX_RB_BLIT_CNTL					0x0000e210
2748 #define A5XX_RB_BLIT_CNTL_BUF__MASK				0x0000000f
2749 #define A5XX_RB_BLIT_CNTL_BUF__SHIFT				0
A5XX_RB_BLIT_CNTL_BUF(enum a5xx_blit_buf val)2750 static inline uint32_t A5XX_RB_BLIT_CNTL_BUF(enum a5xx_blit_buf val)
2751 {
2752 	return ((val) << A5XX_RB_BLIT_CNTL_BUF__SHIFT) & A5XX_RB_BLIT_CNTL_BUF__MASK;
2753 }
2754 
2755 #define REG_A5XX_RB_RESOLVE_CNTL_1				0x0000e211
2756 #define A5XX_RB_RESOLVE_CNTL_1_WINDOW_OFFSET_DISABLE		0x80000000
2757 #define A5XX_RB_RESOLVE_CNTL_1_X__MASK				0x00007fff
2758 #define A5XX_RB_RESOLVE_CNTL_1_X__SHIFT				0
A5XX_RB_RESOLVE_CNTL_1_X(uint32_t val)2759 static inline uint32_t A5XX_RB_RESOLVE_CNTL_1_X(uint32_t val)
2760 {
2761 	return ((val) << A5XX_RB_RESOLVE_CNTL_1_X__SHIFT) & A5XX_RB_RESOLVE_CNTL_1_X__MASK;
2762 }
2763 #define A5XX_RB_RESOLVE_CNTL_1_Y__MASK				0x7fff0000
2764 #define A5XX_RB_RESOLVE_CNTL_1_Y__SHIFT				16
A5XX_RB_RESOLVE_CNTL_1_Y(uint32_t val)2765 static inline uint32_t A5XX_RB_RESOLVE_CNTL_1_Y(uint32_t val)
2766 {
2767 	return ((val) << A5XX_RB_RESOLVE_CNTL_1_Y__SHIFT) & A5XX_RB_RESOLVE_CNTL_1_Y__MASK;
2768 }
2769 
2770 #define REG_A5XX_RB_RESOLVE_CNTL_2				0x0000e212
2771 #define A5XX_RB_RESOLVE_CNTL_2_WINDOW_OFFSET_DISABLE		0x80000000
2772 #define A5XX_RB_RESOLVE_CNTL_2_X__MASK				0x00007fff
2773 #define A5XX_RB_RESOLVE_CNTL_2_X__SHIFT				0
A5XX_RB_RESOLVE_CNTL_2_X(uint32_t val)2774 static inline uint32_t A5XX_RB_RESOLVE_CNTL_2_X(uint32_t val)
2775 {
2776 	return ((val) << A5XX_RB_RESOLVE_CNTL_2_X__SHIFT) & A5XX_RB_RESOLVE_CNTL_2_X__MASK;
2777 }
2778 #define A5XX_RB_RESOLVE_CNTL_2_Y__MASK				0x7fff0000
2779 #define A5XX_RB_RESOLVE_CNTL_2_Y__SHIFT				16
A5XX_RB_RESOLVE_CNTL_2_Y(uint32_t val)2780 static inline uint32_t A5XX_RB_RESOLVE_CNTL_2_Y(uint32_t val)
2781 {
2782 	return ((val) << A5XX_RB_RESOLVE_CNTL_2_Y__SHIFT) & A5XX_RB_RESOLVE_CNTL_2_Y__MASK;
2783 }
2784 
2785 #define REG_A5XX_RB_RESOLVE_CNTL_3				0x0000e213
2786 
2787 #define REG_A5XX_RB_BLIT_DST_LO					0x0000e214
2788 
2789 #define REG_A5XX_RB_BLIT_DST_HI					0x0000e215
2790 
2791 #define REG_A5XX_RB_BLIT_DST_PITCH				0x0000e216
2792 #define A5XX_RB_BLIT_DST_PITCH__MASK				0xffffffff
2793 #define A5XX_RB_BLIT_DST_PITCH__SHIFT				0
A5XX_RB_BLIT_DST_PITCH(uint32_t val)2794 static inline uint32_t A5XX_RB_BLIT_DST_PITCH(uint32_t val)
2795 {
2796 	assert(!(val & 0x3f));
2797 	return ((val >> 6) << A5XX_RB_BLIT_DST_PITCH__SHIFT) & A5XX_RB_BLIT_DST_PITCH__MASK;
2798 }
2799 
2800 #define REG_A5XX_RB_BLIT_DST_ARRAY_PITCH			0x0000e217
2801 #define A5XX_RB_BLIT_DST_ARRAY_PITCH__MASK			0xffffffff
2802 #define A5XX_RB_BLIT_DST_ARRAY_PITCH__SHIFT			0
A5XX_RB_BLIT_DST_ARRAY_PITCH(uint32_t val)2803 static inline uint32_t A5XX_RB_BLIT_DST_ARRAY_PITCH(uint32_t val)
2804 {
2805 	assert(!(val & 0x3f));
2806 	return ((val >> 6) << A5XX_RB_BLIT_DST_ARRAY_PITCH__SHIFT) & A5XX_RB_BLIT_DST_ARRAY_PITCH__MASK;
2807 }
2808 
2809 #define REG_A5XX_RB_CLEAR_COLOR_DW0				0x0000e218
2810 
2811 #define REG_A5XX_RB_CLEAR_COLOR_DW1				0x0000e219
2812 
2813 #define REG_A5XX_RB_CLEAR_COLOR_DW2				0x0000e21a
2814 
2815 #define REG_A5XX_RB_CLEAR_COLOR_DW3				0x0000e21b
2816 
2817 #define REG_A5XX_RB_CLEAR_CNTL					0x0000e21c
2818 #define A5XX_RB_CLEAR_CNTL_FAST_CLEAR				0x00000002
2819 #define A5XX_RB_CLEAR_CNTL_MASK__MASK				0x000000f0
2820 #define A5XX_RB_CLEAR_CNTL_MASK__SHIFT				4
A5XX_RB_CLEAR_CNTL_MASK(uint32_t val)2821 static inline uint32_t A5XX_RB_CLEAR_CNTL_MASK(uint32_t val)
2822 {
2823 	return ((val) << A5XX_RB_CLEAR_CNTL_MASK__SHIFT) & A5XX_RB_CLEAR_CNTL_MASK__MASK;
2824 }
2825 
2826 #define REG_A5XX_RB_DEPTH_FLAG_BUFFER_BASE_LO			0x0000e240
2827 
2828 #define REG_A5XX_RB_DEPTH_FLAG_BUFFER_BASE_HI			0x0000e241
2829 
2830 #define REG_A5XX_RB_DEPTH_FLAG_BUFFER_PITCH			0x0000e242
2831 
REG_A5XX_RB_MRT_FLAG_BUFFER(uint32_t i0)2832 static inline uint32_t REG_A5XX_RB_MRT_FLAG_BUFFER(uint32_t i0) { return 0x0000e243 + 0x4*i0; }
2833 
REG_A5XX_RB_MRT_FLAG_BUFFER_ADDR_LO(uint32_t i0)2834 static inline uint32_t REG_A5XX_RB_MRT_FLAG_BUFFER_ADDR_LO(uint32_t i0) { return 0x0000e243 + 0x4*i0; }
2835 
REG_A5XX_RB_MRT_FLAG_BUFFER_ADDR_HI(uint32_t i0)2836 static inline uint32_t REG_A5XX_RB_MRT_FLAG_BUFFER_ADDR_HI(uint32_t i0) { return 0x0000e244 + 0x4*i0; }
2837 
REG_A5XX_RB_MRT_FLAG_BUFFER_PITCH(uint32_t i0)2838 static inline uint32_t REG_A5XX_RB_MRT_FLAG_BUFFER_PITCH(uint32_t i0) { return 0x0000e245 + 0x4*i0; }
2839 #define A5XX_RB_MRT_FLAG_BUFFER_PITCH__MASK			0xffffffff
2840 #define A5XX_RB_MRT_FLAG_BUFFER_PITCH__SHIFT			0
A5XX_RB_MRT_FLAG_BUFFER_PITCH(uint32_t val)2841 static inline uint32_t A5XX_RB_MRT_FLAG_BUFFER_PITCH(uint32_t val)
2842 {
2843 	assert(!(val & 0x3f));
2844 	return ((val >> 6) << A5XX_RB_MRT_FLAG_BUFFER_PITCH__SHIFT) & A5XX_RB_MRT_FLAG_BUFFER_PITCH__MASK;
2845 }
2846 
REG_A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH(uint32_t i0)2847 static inline uint32_t REG_A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH(uint32_t i0) { return 0x0000e246 + 0x4*i0; }
2848 #define A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH__MASK		0xffffffff
2849 #define A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH__SHIFT		0
A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH(uint32_t val)2850 static inline uint32_t A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH(uint32_t val)
2851 {
2852 	assert(!(val & 0x3f));
2853 	return ((val >> 6) << A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH__SHIFT) & A5XX_RB_MRT_FLAG_BUFFER_ARRAY_PITCH__MASK;
2854 }
2855 
2856 #define REG_A5XX_RB_BLIT_FLAG_DST_LO				0x0000e263
2857 
2858 #define REG_A5XX_RB_BLIT_FLAG_DST_HI				0x0000e264
2859 
2860 #define REG_A5XX_RB_BLIT_FLAG_DST_PITCH				0x0000e265
2861 #define A5XX_RB_BLIT_FLAG_DST_PITCH__MASK			0xffffffff
2862 #define A5XX_RB_BLIT_FLAG_DST_PITCH__SHIFT			0
A5XX_RB_BLIT_FLAG_DST_PITCH(uint32_t val)2863 static inline uint32_t A5XX_RB_BLIT_FLAG_DST_PITCH(uint32_t val)
2864 {
2865 	assert(!(val & 0x3f));
2866 	return ((val >> 6) << A5XX_RB_BLIT_FLAG_DST_PITCH__SHIFT) & A5XX_RB_BLIT_FLAG_DST_PITCH__MASK;
2867 }
2868 
2869 #define REG_A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH			0x0000e266
2870 #define A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH__MASK			0xffffffff
2871 #define A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH__SHIFT		0
A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH(uint32_t val)2872 static inline uint32_t A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH(uint32_t val)
2873 {
2874 	assert(!(val & 0x3f));
2875 	return ((val >> 6) << A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH__SHIFT) & A5XX_RB_BLIT_FLAG_DST_ARRAY_PITCH__MASK;
2876 }
2877 
2878 #define REG_A5XX_VPC_CNTL_0					0x0000e280
2879 #define A5XX_VPC_CNTL_0_STRIDE_IN_VPC__MASK			0x0000007f
2880 #define A5XX_VPC_CNTL_0_STRIDE_IN_VPC__SHIFT			0
A5XX_VPC_CNTL_0_STRIDE_IN_VPC(uint32_t val)2881 static inline uint32_t A5XX_VPC_CNTL_0_STRIDE_IN_VPC(uint32_t val)
2882 {
2883 	return ((val) << A5XX_VPC_CNTL_0_STRIDE_IN_VPC__SHIFT) & A5XX_VPC_CNTL_0_STRIDE_IN_VPC__MASK;
2884 }
2885 #define A5XX_VPC_CNTL_0_VARYING					0x00000800
2886 
REG_A5XX_VPC_VARYING_INTERP(uint32_t i0)2887 static inline uint32_t REG_A5XX_VPC_VARYING_INTERP(uint32_t i0) { return 0x0000e282 + 0x1*i0; }
2888 
REG_A5XX_VPC_VARYING_INTERP_MODE(uint32_t i0)2889 static inline uint32_t REG_A5XX_VPC_VARYING_INTERP_MODE(uint32_t i0) { return 0x0000e282 + 0x1*i0; }
2890 
REG_A5XX_VPC_VARYING_PS_REPL(uint32_t i0)2891 static inline uint32_t REG_A5XX_VPC_VARYING_PS_REPL(uint32_t i0) { return 0x0000e28a + 0x1*i0; }
2892 
REG_A5XX_VPC_VARYING_PS_REPL_MODE(uint32_t i0)2893 static inline uint32_t REG_A5XX_VPC_VARYING_PS_REPL_MODE(uint32_t i0) { return 0x0000e28a + 0x1*i0; }
2894 
2895 #define REG_A5XX_UNKNOWN_E292					0x0000e292
2896 
2897 #define REG_A5XX_UNKNOWN_E293					0x0000e293
2898 
REG_A5XX_VPC_VAR(uint32_t i0)2899 static inline uint32_t REG_A5XX_VPC_VAR(uint32_t i0) { return 0x0000e294 + 0x1*i0; }
2900 
REG_A5XX_VPC_VAR_DISABLE(uint32_t i0)2901 static inline uint32_t REG_A5XX_VPC_VAR_DISABLE(uint32_t i0) { return 0x0000e294 + 0x1*i0; }
2902 
2903 #define REG_A5XX_VPC_GS_SIV_CNTL				0x0000e298
2904 
2905 #define REG_A5XX_UNKNOWN_E29A					0x0000e29a
2906 
2907 #define REG_A5XX_VPC_PACK					0x0000e29d
2908 #define A5XX_VPC_PACK_NUMNONPOSVAR__MASK			0x000000ff
2909 #define A5XX_VPC_PACK_NUMNONPOSVAR__SHIFT			0
A5XX_VPC_PACK_NUMNONPOSVAR(uint32_t val)2910 static inline uint32_t A5XX_VPC_PACK_NUMNONPOSVAR(uint32_t val)
2911 {
2912 	return ((val) << A5XX_VPC_PACK_NUMNONPOSVAR__SHIFT) & A5XX_VPC_PACK_NUMNONPOSVAR__MASK;
2913 }
2914 #define A5XX_VPC_PACK_PSIZELOC__MASK				0x0000ff00
2915 #define A5XX_VPC_PACK_PSIZELOC__SHIFT				8
A5XX_VPC_PACK_PSIZELOC(uint32_t val)2916 static inline uint32_t A5XX_VPC_PACK_PSIZELOC(uint32_t val)
2917 {
2918 	return ((val) << A5XX_VPC_PACK_PSIZELOC__SHIFT) & A5XX_VPC_PACK_PSIZELOC__MASK;
2919 }
2920 
2921 #define REG_A5XX_VPC_FS_PRIMITIVEID_CNTL			0x0000e2a0
2922 
2923 #define REG_A5XX_VPC_SO_BUF_CNTL				0x0000e2a1
2924 #define A5XX_VPC_SO_BUF_CNTL_BUF0				0x00000001
2925 #define A5XX_VPC_SO_BUF_CNTL_BUF1				0x00000008
2926 #define A5XX_VPC_SO_BUF_CNTL_BUF2				0x00000040
2927 #define A5XX_VPC_SO_BUF_CNTL_BUF3				0x00000200
2928 #define A5XX_VPC_SO_BUF_CNTL_ENABLE				0x00008000
2929 
2930 #define REG_A5XX_VPC_SO_OVERRIDE				0x0000e2a2
2931 #define A5XX_VPC_SO_OVERRIDE_SO_DISABLE				0x00000001
2932 
2933 #define REG_A5XX_VPC_SO_CNTL					0x0000e2a3
2934 #define A5XX_VPC_SO_CNTL_ENABLE					0x00010000
2935 
2936 #define REG_A5XX_VPC_SO_PROG					0x0000e2a4
2937 #define A5XX_VPC_SO_PROG_A_BUF__MASK				0x00000003
2938 #define A5XX_VPC_SO_PROG_A_BUF__SHIFT				0
A5XX_VPC_SO_PROG_A_BUF(uint32_t val)2939 static inline uint32_t A5XX_VPC_SO_PROG_A_BUF(uint32_t val)
2940 {
2941 	return ((val) << A5XX_VPC_SO_PROG_A_BUF__SHIFT) & A5XX_VPC_SO_PROG_A_BUF__MASK;
2942 }
2943 #define A5XX_VPC_SO_PROG_A_OFF__MASK				0x000007fc
2944 #define A5XX_VPC_SO_PROG_A_OFF__SHIFT				2
A5XX_VPC_SO_PROG_A_OFF(uint32_t val)2945 static inline uint32_t A5XX_VPC_SO_PROG_A_OFF(uint32_t val)
2946 {
2947 	assert(!(val & 0x3));
2948 	return ((val >> 2) << A5XX_VPC_SO_PROG_A_OFF__SHIFT) & A5XX_VPC_SO_PROG_A_OFF__MASK;
2949 }
2950 #define A5XX_VPC_SO_PROG_A_EN					0x00000800
2951 #define A5XX_VPC_SO_PROG_B_BUF__MASK				0x00003000
2952 #define A5XX_VPC_SO_PROG_B_BUF__SHIFT				12
A5XX_VPC_SO_PROG_B_BUF(uint32_t val)2953 static inline uint32_t A5XX_VPC_SO_PROG_B_BUF(uint32_t val)
2954 {
2955 	return ((val) << A5XX_VPC_SO_PROG_B_BUF__SHIFT) & A5XX_VPC_SO_PROG_B_BUF__MASK;
2956 }
2957 #define A5XX_VPC_SO_PROG_B_OFF__MASK				0x007fc000
2958 #define A5XX_VPC_SO_PROG_B_OFF__SHIFT				14
A5XX_VPC_SO_PROG_B_OFF(uint32_t val)2959 static inline uint32_t A5XX_VPC_SO_PROG_B_OFF(uint32_t val)
2960 {
2961 	assert(!(val & 0x3));
2962 	return ((val >> 2) << A5XX_VPC_SO_PROG_B_OFF__SHIFT) & A5XX_VPC_SO_PROG_B_OFF__MASK;
2963 }
2964 #define A5XX_VPC_SO_PROG_B_EN					0x00800000
2965 
REG_A5XX_VPC_SO(uint32_t i0)2966 static inline uint32_t REG_A5XX_VPC_SO(uint32_t i0) { return 0x0000e2a7 + 0x7*i0; }
2967 
REG_A5XX_VPC_SO_BUFFER_BASE_LO(uint32_t i0)2968 static inline uint32_t REG_A5XX_VPC_SO_BUFFER_BASE_LO(uint32_t i0) { return 0x0000e2a7 + 0x7*i0; }
2969 
REG_A5XX_VPC_SO_BUFFER_BASE_HI(uint32_t i0)2970 static inline uint32_t REG_A5XX_VPC_SO_BUFFER_BASE_HI(uint32_t i0) { return 0x0000e2a8 + 0x7*i0; }
2971 
REG_A5XX_VPC_SO_BUFFER_SIZE(uint32_t i0)2972 static inline uint32_t REG_A5XX_VPC_SO_BUFFER_SIZE(uint32_t i0) { return 0x0000e2a9 + 0x7*i0; }
2973 
REG_A5XX_VPC_SO_NCOMP(uint32_t i0)2974 static inline uint32_t REG_A5XX_VPC_SO_NCOMP(uint32_t i0) { return 0x0000e2aa + 0x7*i0; }
2975 
REG_A5XX_VPC_SO_BUFFER_OFFSET(uint32_t i0)2976 static inline uint32_t REG_A5XX_VPC_SO_BUFFER_OFFSET(uint32_t i0) { return 0x0000e2ab + 0x7*i0; }
2977 
REG_A5XX_VPC_SO_FLUSH_BASE_LO(uint32_t i0)2978 static inline uint32_t REG_A5XX_VPC_SO_FLUSH_BASE_LO(uint32_t i0) { return 0x0000e2ac + 0x7*i0; }
2979 
REG_A5XX_VPC_SO_FLUSH_BASE_HI(uint32_t i0)2980 static inline uint32_t REG_A5XX_VPC_SO_FLUSH_BASE_HI(uint32_t i0) { return 0x0000e2ad + 0x7*i0; }
2981 
2982 #define REG_A5XX_PC_PRIMITIVE_CNTL				0x0000e384
2983 #define A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC__MASK		0x0000007f
2984 #define A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC__SHIFT		0
A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC(uint32_t val)2985 static inline uint32_t A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC(uint32_t val)
2986 {
2987 	return ((val) << A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC__SHIFT) & A5XX_PC_PRIMITIVE_CNTL_STRIDE_IN_VPC__MASK;
2988 }
2989 
2990 #define REG_A5XX_PC_PRIM_VTX_CNTL				0x0000e385
2991 #define A5XX_PC_PRIM_VTX_CNTL_PSIZE				0x00000800
2992 
2993 #define REG_A5XX_PC_RASTER_CNTL					0x0000e388
2994 
2995 #define REG_A5XX_UNKNOWN_E389					0x0000e389
2996 
2997 #define REG_A5XX_PC_RESTART_INDEX				0x0000e38c
2998 
2999 #define REG_A5XX_UNKNOWN_E38D					0x0000e38d
3000 
3001 #define REG_A5XX_PC_GS_PARAM					0x0000e38e
3002 
3003 #define REG_A5XX_PC_HS_PARAM					0x0000e38f
3004 
3005 #define REG_A5XX_PC_POWER_CNTL					0x0000e3b0
3006 
3007 #define REG_A5XX_VFD_CONTROL_0					0x0000e400
3008 #define A5XX_VFD_CONTROL_0_VTXCNT__MASK				0x0000003f
3009 #define A5XX_VFD_CONTROL_0_VTXCNT__SHIFT			0
A5XX_VFD_CONTROL_0_VTXCNT(uint32_t val)3010 static inline uint32_t A5XX_VFD_CONTROL_0_VTXCNT(uint32_t val)
3011 {
3012 	return ((val) << A5XX_VFD_CONTROL_0_VTXCNT__SHIFT) & A5XX_VFD_CONTROL_0_VTXCNT__MASK;
3013 }
3014 
3015 #define REG_A5XX_VFD_CONTROL_1					0x0000e401
3016 #define A5XX_VFD_CONTROL_1_REGID4VTX__MASK			0x000000ff
3017 #define A5XX_VFD_CONTROL_1_REGID4VTX__SHIFT			0
A5XX_VFD_CONTROL_1_REGID4VTX(uint32_t val)3018 static inline uint32_t A5XX_VFD_CONTROL_1_REGID4VTX(uint32_t val)
3019 {
3020 	return ((val) << A5XX_VFD_CONTROL_1_REGID4VTX__SHIFT) & A5XX_VFD_CONTROL_1_REGID4VTX__MASK;
3021 }
3022 #define A5XX_VFD_CONTROL_1_REGID4INST__MASK			0x0000ff00
3023 #define A5XX_VFD_CONTROL_1_REGID4INST__SHIFT			8
A5XX_VFD_CONTROL_1_REGID4INST(uint32_t val)3024 static inline uint32_t A5XX_VFD_CONTROL_1_REGID4INST(uint32_t val)
3025 {
3026 	return ((val) << A5XX_VFD_CONTROL_1_REGID4INST__SHIFT) & A5XX_VFD_CONTROL_1_REGID4INST__MASK;
3027 }
3028 
3029 #define REG_A5XX_VFD_CONTROL_2					0x0000e402
3030 
3031 #define REG_A5XX_VFD_CONTROL_3					0x0000e403
3032 
3033 #define REG_A5XX_VFD_CONTROL_4					0x0000e404
3034 
3035 #define REG_A5XX_VFD_CONTROL_5					0x0000e405
3036 
3037 #define REG_A5XX_VFD_INDEX_OFFSET				0x0000e408
3038 
3039 #define REG_A5XX_VFD_INSTANCE_START_OFFSET			0x0000e409
3040 
REG_A5XX_VFD_FETCH(uint32_t i0)3041 static inline uint32_t REG_A5XX_VFD_FETCH(uint32_t i0) { return 0x0000e40a + 0x4*i0; }
3042 
REG_A5XX_VFD_FETCH_BASE_LO(uint32_t i0)3043 static inline uint32_t REG_A5XX_VFD_FETCH_BASE_LO(uint32_t i0) { return 0x0000e40a + 0x4*i0; }
3044 
REG_A5XX_VFD_FETCH_BASE_HI(uint32_t i0)3045 static inline uint32_t REG_A5XX_VFD_FETCH_BASE_HI(uint32_t i0) { return 0x0000e40b + 0x4*i0; }
3046 
REG_A5XX_VFD_FETCH_SIZE(uint32_t i0)3047 static inline uint32_t REG_A5XX_VFD_FETCH_SIZE(uint32_t i0) { return 0x0000e40c + 0x4*i0; }
3048 
REG_A5XX_VFD_FETCH_STRIDE(uint32_t i0)3049 static inline uint32_t REG_A5XX_VFD_FETCH_STRIDE(uint32_t i0) { return 0x0000e40d + 0x4*i0; }
3050 
REG_A5XX_VFD_DECODE(uint32_t i0)3051 static inline uint32_t REG_A5XX_VFD_DECODE(uint32_t i0) { return 0x0000e48a + 0x2*i0; }
3052 
REG_A5XX_VFD_DECODE_INSTR(uint32_t i0)3053 static inline uint32_t REG_A5XX_VFD_DECODE_INSTR(uint32_t i0) { return 0x0000e48a + 0x2*i0; }
3054 #define A5XX_VFD_DECODE_INSTR_IDX__MASK				0x0000001f
3055 #define A5XX_VFD_DECODE_INSTR_IDX__SHIFT			0
A5XX_VFD_DECODE_INSTR_IDX(uint32_t val)3056 static inline uint32_t A5XX_VFD_DECODE_INSTR_IDX(uint32_t val)
3057 {
3058 	return ((val) << A5XX_VFD_DECODE_INSTR_IDX__SHIFT) & A5XX_VFD_DECODE_INSTR_IDX__MASK;
3059 }
3060 #define A5XX_VFD_DECODE_INSTR_INSTANCED				0x00020000
3061 #define A5XX_VFD_DECODE_INSTR_FORMAT__MASK			0x3ff00000
3062 #define A5XX_VFD_DECODE_INSTR_FORMAT__SHIFT			20
A5XX_VFD_DECODE_INSTR_FORMAT(enum a5xx_vtx_fmt val)3063 static inline uint32_t A5XX_VFD_DECODE_INSTR_FORMAT(enum a5xx_vtx_fmt val)
3064 {
3065 	return ((val) << A5XX_VFD_DECODE_INSTR_FORMAT__SHIFT) & A5XX_VFD_DECODE_INSTR_FORMAT__MASK;
3066 }
3067 #define A5XX_VFD_DECODE_INSTR_UNK30				0x40000000
3068 #define A5XX_VFD_DECODE_INSTR_FLOAT				0x80000000
3069 
REG_A5XX_VFD_DECODE_STEP_RATE(uint32_t i0)3070 static inline uint32_t REG_A5XX_VFD_DECODE_STEP_RATE(uint32_t i0) { return 0x0000e48b + 0x2*i0; }
3071 
REG_A5XX_VFD_DEST_CNTL(uint32_t i0)3072 static inline uint32_t REG_A5XX_VFD_DEST_CNTL(uint32_t i0) { return 0x0000e4ca + 0x1*i0; }
3073 
REG_A5XX_VFD_DEST_CNTL_INSTR(uint32_t i0)3074 static inline uint32_t REG_A5XX_VFD_DEST_CNTL_INSTR(uint32_t i0) { return 0x0000e4ca + 0x1*i0; }
3075 #define A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK__MASK		0x0000000f
3076 #define A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK__SHIFT		0
A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK(uint32_t val)3077 static inline uint32_t A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK(uint32_t val)
3078 {
3079 	return ((val) << A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK__SHIFT) & A5XX_VFD_DEST_CNTL_INSTR_WRITEMASK__MASK;
3080 }
3081 #define A5XX_VFD_DEST_CNTL_INSTR_REGID__MASK			0x00000ff0
3082 #define A5XX_VFD_DEST_CNTL_INSTR_REGID__SHIFT			4
A5XX_VFD_DEST_CNTL_INSTR_REGID(uint32_t val)3083 static inline uint32_t A5XX_VFD_DEST_CNTL_INSTR_REGID(uint32_t val)
3084 {
3085 	return ((val) << A5XX_VFD_DEST_CNTL_INSTR_REGID__SHIFT) & A5XX_VFD_DEST_CNTL_INSTR_REGID__MASK;
3086 }
3087 
3088 #define REG_A5XX_VFD_POWER_CNTL					0x0000e4f0
3089 
3090 #define REG_A5XX_SP_SP_CNTL					0x0000e580
3091 
3092 #define REG_A5XX_SP_VS_CONTROL_REG				0x0000e584
3093 #define A5XX_SP_VS_CONTROL_REG_ENABLED				0x00000001
3094 #define A5XX_SP_VS_CONTROL_REG_CONSTOBJECTOFFSET__MASK		0x000000fe
3095 #define A5XX_SP_VS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT		1
A5XX_SP_VS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3096 static inline uint32_t A5XX_SP_VS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3097 {
3098 	return ((val) << A5XX_SP_VS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_SP_VS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3099 }
3100 #define A5XX_SP_VS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3101 #define A5XX_SP_VS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_SP_VS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3102 static inline uint32_t A5XX_SP_VS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3103 {
3104 	return ((val) << A5XX_SP_VS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_SP_VS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3105 }
3106 
3107 #define REG_A5XX_SP_FS_CONTROL_REG				0x0000e585
3108 #define A5XX_SP_FS_CONTROL_REG_ENABLED				0x00000001
3109 #define A5XX_SP_FS_CONTROL_REG_CONSTOBJECTOFFSET__MASK		0x000000fe
3110 #define A5XX_SP_FS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT		1
A5XX_SP_FS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3111 static inline uint32_t A5XX_SP_FS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3112 {
3113 	return ((val) << A5XX_SP_FS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_SP_FS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3114 }
3115 #define A5XX_SP_FS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3116 #define A5XX_SP_FS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_SP_FS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3117 static inline uint32_t A5XX_SP_FS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3118 {
3119 	return ((val) << A5XX_SP_FS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_SP_FS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3120 }
3121 
3122 #define REG_A5XX_SP_HS_CONTROL_REG				0x0000e586
3123 #define A5XX_SP_HS_CONTROL_REG_ENABLED				0x00000001
3124 #define A5XX_SP_HS_CONTROL_REG_CONSTOBJECTOFFSET__MASK		0x000000fe
3125 #define A5XX_SP_HS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT		1
A5XX_SP_HS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3126 static inline uint32_t A5XX_SP_HS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3127 {
3128 	return ((val) << A5XX_SP_HS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_SP_HS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3129 }
3130 #define A5XX_SP_HS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3131 #define A5XX_SP_HS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_SP_HS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3132 static inline uint32_t A5XX_SP_HS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3133 {
3134 	return ((val) << A5XX_SP_HS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_SP_HS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3135 }
3136 
3137 #define REG_A5XX_SP_DS_CONTROL_REG				0x0000e587
3138 #define A5XX_SP_DS_CONTROL_REG_ENABLED				0x00000001
3139 #define A5XX_SP_DS_CONTROL_REG_CONSTOBJECTOFFSET__MASK		0x000000fe
3140 #define A5XX_SP_DS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT		1
A5XX_SP_DS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3141 static inline uint32_t A5XX_SP_DS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3142 {
3143 	return ((val) << A5XX_SP_DS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_SP_DS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3144 }
3145 #define A5XX_SP_DS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3146 #define A5XX_SP_DS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_SP_DS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3147 static inline uint32_t A5XX_SP_DS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3148 {
3149 	return ((val) << A5XX_SP_DS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_SP_DS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3150 }
3151 
3152 #define REG_A5XX_SP_GS_CONTROL_REG				0x0000e588
3153 #define A5XX_SP_GS_CONTROL_REG_ENABLED				0x00000001
3154 #define A5XX_SP_GS_CONTROL_REG_CONSTOBJECTOFFSET__MASK		0x000000fe
3155 #define A5XX_SP_GS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT		1
A5XX_SP_GS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3156 static inline uint32_t A5XX_SP_GS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3157 {
3158 	return ((val) << A5XX_SP_GS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_SP_GS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3159 }
3160 #define A5XX_SP_GS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3161 #define A5XX_SP_GS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_SP_GS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3162 static inline uint32_t A5XX_SP_GS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3163 {
3164 	return ((val) << A5XX_SP_GS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_SP_GS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3165 }
3166 
3167 #define REG_A5XX_SP_CS_CONFIG					0x0000e589
3168 
3169 #define REG_A5XX_SP_VS_CONFIG_MAX_CONST				0x0000e58a
3170 
3171 #define REG_A5XX_SP_FS_CONFIG_MAX_CONST				0x0000e58b
3172 
3173 #define REG_A5XX_SP_VS_CTRL_REG0				0x0000e590
3174 #define A5XX_SP_VS_CTRL_REG0_THREADSIZE__MASK			0x00000008
3175 #define A5XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT			3
A5XX_SP_VS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)3176 static inline uint32_t A5XX_SP_VS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
3177 {
3178 	return ((val) << A5XX_SP_VS_CTRL_REG0_THREADSIZE__SHIFT) & A5XX_SP_VS_CTRL_REG0_THREADSIZE__MASK;
3179 }
3180 #define A5XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x000003f0
3181 #define A5XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		4
A5XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)3182 static inline uint32_t A5XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
3183 {
3184 	return ((val) << A5XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A5XX_SP_VS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
3185 }
3186 #define A5XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x0000fc00
3187 #define A5XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		10
A5XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)3188 static inline uint32_t A5XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
3189 {
3190 	return ((val) << A5XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A5XX_SP_VS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
3191 }
3192 #define A5XX_SP_VS_CTRL_REG0_VARYING				0x00010000
3193 #define A5XX_SP_VS_CTRL_REG0_PIXLODENABLE			0x00100000
3194 #define A5XX_SP_VS_CTRL_REG0_BRANCHSTACK__MASK			0xfe000000
3195 #define A5XX_SP_VS_CTRL_REG0_BRANCHSTACK__SHIFT			25
A5XX_SP_VS_CTRL_REG0_BRANCHSTACK(uint32_t val)3196 static inline uint32_t A5XX_SP_VS_CTRL_REG0_BRANCHSTACK(uint32_t val)
3197 {
3198 	return ((val) << A5XX_SP_VS_CTRL_REG0_BRANCHSTACK__SHIFT) & A5XX_SP_VS_CTRL_REG0_BRANCHSTACK__MASK;
3199 }
3200 
3201 #define REG_A5XX_SP_PRIMITIVE_CNTL				0x0000e592
3202 #define A5XX_SP_PRIMITIVE_CNTL_VSOUT__MASK			0x0000001f
3203 #define A5XX_SP_PRIMITIVE_CNTL_VSOUT__SHIFT			0
A5XX_SP_PRIMITIVE_CNTL_VSOUT(uint32_t val)3204 static inline uint32_t A5XX_SP_PRIMITIVE_CNTL_VSOUT(uint32_t val)
3205 {
3206 	return ((val) << A5XX_SP_PRIMITIVE_CNTL_VSOUT__SHIFT) & A5XX_SP_PRIMITIVE_CNTL_VSOUT__MASK;
3207 }
3208 
REG_A5XX_SP_VS_OUT(uint32_t i0)3209 static inline uint32_t REG_A5XX_SP_VS_OUT(uint32_t i0) { return 0x0000e593 + 0x1*i0; }
3210 
REG_A5XX_SP_VS_OUT_REG(uint32_t i0)3211 static inline uint32_t REG_A5XX_SP_VS_OUT_REG(uint32_t i0) { return 0x0000e593 + 0x1*i0; }
3212 #define A5XX_SP_VS_OUT_REG_A_REGID__MASK			0x000000ff
3213 #define A5XX_SP_VS_OUT_REG_A_REGID__SHIFT			0
A5XX_SP_VS_OUT_REG_A_REGID(uint32_t val)3214 static inline uint32_t A5XX_SP_VS_OUT_REG_A_REGID(uint32_t val)
3215 {
3216 	return ((val) << A5XX_SP_VS_OUT_REG_A_REGID__SHIFT) & A5XX_SP_VS_OUT_REG_A_REGID__MASK;
3217 }
3218 #define A5XX_SP_VS_OUT_REG_A_COMPMASK__MASK			0x00000f00
3219 #define A5XX_SP_VS_OUT_REG_A_COMPMASK__SHIFT			8
A5XX_SP_VS_OUT_REG_A_COMPMASK(uint32_t val)3220 static inline uint32_t A5XX_SP_VS_OUT_REG_A_COMPMASK(uint32_t val)
3221 {
3222 	return ((val) << A5XX_SP_VS_OUT_REG_A_COMPMASK__SHIFT) & A5XX_SP_VS_OUT_REG_A_COMPMASK__MASK;
3223 }
3224 #define A5XX_SP_VS_OUT_REG_B_REGID__MASK			0x00ff0000
3225 #define A5XX_SP_VS_OUT_REG_B_REGID__SHIFT			16
A5XX_SP_VS_OUT_REG_B_REGID(uint32_t val)3226 static inline uint32_t A5XX_SP_VS_OUT_REG_B_REGID(uint32_t val)
3227 {
3228 	return ((val) << A5XX_SP_VS_OUT_REG_B_REGID__SHIFT) & A5XX_SP_VS_OUT_REG_B_REGID__MASK;
3229 }
3230 #define A5XX_SP_VS_OUT_REG_B_COMPMASK__MASK			0x0f000000
3231 #define A5XX_SP_VS_OUT_REG_B_COMPMASK__SHIFT			24
A5XX_SP_VS_OUT_REG_B_COMPMASK(uint32_t val)3232 static inline uint32_t A5XX_SP_VS_OUT_REG_B_COMPMASK(uint32_t val)
3233 {
3234 	return ((val) << A5XX_SP_VS_OUT_REG_B_COMPMASK__SHIFT) & A5XX_SP_VS_OUT_REG_B_COMPMASK__MASK;
3235 }
3236 
REG_A5XX_SP_VS_VPC_DST(uint32_t i0)3237 static inline uint32_t REG_A5XX_SP_VS_VPC_DST(uint32_t i0) { return 0x0000e5a3 + 0x1*i0; }
3238 
REG_A5XX_SP_VS_VPC_DST_REG(uint32_t i0)3239 static inline uint32_t REG_A5XX_SP_VS_VPC_DST_REG(uint32_t i0) { return 0x0000e5a3 + 0x1*i0; }
3240 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC0__MASK			0x000000ff
3241 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC0__SHIFT			0
A5XX_SP_VS_VPC_DST_REG_OUTLOC0(uint32_t val)3242 static inline uint32_t A5XX_SP_VS_VPC_DST_REG_OUTLOC0(uint32_t val)
3243 {
3244 	return ((val) << A5XX_SP_VS_VPC_DST_REG_OUTLOC0__SHIFT) & A5XX_SP_VS_VPC_DST_REG_OUTLOC0__MASK;
3245 }
3246 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC1__MASK			0x0000ff00
3247 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC1__SHIFT			8
A5XX_SP_VS_VPC_DST_REG_OUTLOC1(uint32_t val)3248 static inline uint32_t A5XX_SP_VS_VPC_DST_REG_OUTLOC1(uint32_t val)
3249 {
3250 	return ((val) << A5XX_SP_VS_VPC_DST_REG_OUTLOC1__SHIFT) & A5XX_SP_VS_VPC_DST_REG_OUTLOC1__MASK;
3251 }
3252 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC2__MASK			0x00ff0000
3253 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC2__SHIFT			16
A5XX_SP_VS_VPC_DST_REG_OUTLOC2(uint32_t val)3254 static inline uint32_t A5XX_SP_VS_VPC_DST_REG_OUTLOC2(uint32_t val)
3255 {
3256 	return ((val) << A5XX_SP_VS_VPC_DST_REG_OUTLOC2__SHIFT) & A5XX_SP_VS_VPC_DST_REG_OUTLOC2__MASK;
3257 }
3258 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC3__MASK			0xff000000
3259 #define A5XX_SP_VS_VPC_DST_REG_OUTLOC3__SHIFT			24
A5XX_SP_VS_VPC_DST_REG_OUTLOC3(uint32_t val)3260 static inline uint32_t A5XX_SP_VS_VPC_DST_REG_OUTLOC3(uint32_t val)
3261 {
3262 	return ((val) << A5XX_SP_VS_VPC_DST_REG_OUTLOC3__SHIFT) & A5XX_SP_VS_VPC_DST_REG_OUTLOC3__MASK;
3263 }
3264 
3265 #define REG_A5XX_UNKNOWN_E5AB					0x0000e5ab
3266 
3267 #define REG_A5XX_SP_VS_OBJ_START_LO				0x0000e5ac
3268 
3269 #define REG_A5XX_SP_VS_OBJ_START_HI				0x0000e5ad
3270 
3271 #define REG_A5XX_SP_FS_CTRL_REG0				0x0000e5c0
3272 #define A5XX_SP_FS_CTRL_REG0_THREADSIZE__MASK			0x00000008
3273 #define A5XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT			3
A5XX_SP_FS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)3274 static inline uint32_t A5XX_SP_FS_CTRL_REG0_THREADSIZE(enum a3xx_threadsize val)
3275 {
3276 	return ((val) << A5XX_SP_FS_CTRL_REG0_THREADSIZE__SHIFT) & A5XX_SP_FS_CTRL_REG0_THREADSIZE__MASK;
3277 }
3278 #define A5XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__MASK		0x000003f0
3279 #define A5XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT		4
A5XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)3280 static inline uint32_t A5XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT(uint32_t val)
3281 {
3282 	return ((val) << A5XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__SHIFT) & A5XX_SP_FS_CTRL_REG0_HALFREGFOOTPRINT__MASK;
3283 }
3284 #define A5XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__MASK		0x0000fc00
3285 #define A5XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT		10
A5XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)3286 static inline uint32_t A5XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT(uint32_t val)
3287 {
3288 	return ((val) << A5XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__SHIFT) & A5XX_SP_FS_CTRL_REG0_FULLREGFOOTPRINT__MASK;
3289 }
3290 #define A5XX_SP_FS_CTRL_REG0_VARYING				0x00010000
3291 #define A5XX_SP_FS_CTRL_REG0_PIXLODENABLE			0x00100000
3292 #define A5XX_SP_FS_CTRL_REG0_BRANCHSTACK__MASK			0xfe000000
3293 #define A5XX_SP_FS_CTRL_REG0_BRANCHSTACK__SHIFT			25
A5XX_SP_FS_CTRL_REG0_BRANCHSTACK(uint32_t val)3294 static inline uint32_t A5XX_SP_FS_CTRL_REG0_BRANCHSTACK(uint32_t val)
3295 {
3296 	return ((val) << A5XX_SP_FS_CTRL_REG0_BRANCHSTACK__SHIFT) & A5XX_SP_FS_CTRL_REG0_BRANCHSTACK__MASK;
3297 }
3298 
3299 #define REG_A5XX_UNKNOWN_E5C2					0x0000e5c2
3300 
3301 #define REG_A5XX_SP_FS_OBJ_START_LO				0x0000e5c3
3302 
3303 #define REG_A5XX_SP_FS_OBJ_START_HI				0x0000e5c4
3304 
3305 #define REG_A5XX_SP_BLEND_CNTL					0x0000e5c9
3306 
3307 #define REG_A5XX_SP_FS_OUTPUT_CNTL				0x0000e5ca
3308 #define A5XX_SP_FS_OUTPUT_CNTL_MRT__MASK			0x0000000f
3309 #define A5XX_SP_FS_OUTPUT_CNTL_MRT__SHIFT			0
A5XX_SP_FS_OUTPUT_CNTL_MRT(uint32_t val)3310 static inline uint32_t A5XX_SP_FS_OUTPUT_CNTL_MRT(uint32_t val)
3311 {
3312 	return ((val) << A5XX_SP_FS_OUTPUT_CNTL_MRT__SHIFT) & A5XX_SP_FS_OUTPUT_CNTL_MRT__MASK;
3313 }
3314 #define A5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID__MASK		0x00001fe0
3315 #define A5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID__SHIFT		5
A5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID(uint32_t val)3316 static inline uint32_t A5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID(uint32_t val)
3317 {
3318 	return ((val) << A5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID__SHIFT) & A5XX_SP_FS_OUTPUT_CNTL_DEPTH_REGID__MASK;
3319 }
3320 #define A5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID__MASK		0x001fe000
3321 #define A5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID__SHIFT		13
A5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID(uint32_t val)3322 static inline uint32_t A5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID(uint32_t val)
3323 {
3324 	return ((val) << A5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID__SHIFT) & A5XX_SP_FS_OUTPUT_CNTL_SAMPLEMASK_REGID__MASK;
3325 }
3326 
REG_A5XX_SP_FS_OUTPUT(uint32_t i0)3327 static inline uint32_t REG_A5XX_SP_FS_OUTPUT(uint32_t i0) { return 0x0000e5cb + 0x1*i0; }
3328 
REG_A5XX_SP_FS_OUTPUT_REG(uint32_t i0)3329 static inline uint32_t REG_A5XX_SP_FS_OUTPUT_REG(uint32_t i0) { return 0x0000e5cb + 0x1*i0; }
3330 #define A5XX_SP_FS_OUTPUT_REG_REGID__MASK			0x000000ff
3331 #define A5XX_SP_FS_OUTPUT_REG_REGID__SHIFT			0
A5XX_SP_FS_OUTPUT_REG_REGID(uint32_t val)3332 static inline uint32_t A5XX_SP_FS_OUTPUT_REG_REGID(uint32_t val)
3333 {
3334 	return ((val) << A5XX_SP_FS_OUTPUT_REG_REGID__SHIFT) & A5XX_SP_FS_OUTPUT_REG_REGID__MASK;
3335 }
3336 #define A5XX_SP_FS_OUTPUT_REG_HALF_PRECISION			0x00000100
3337 
REG_A5XX_SP_FS_MRT(uint32_t i0)3338 static inline uint32_t REG_A5XX_SP_FS_MRT(uint32_t i0) { return 0x0000e5d3 + 0x1*i0; }
3339 
REG_A5XX_SP_FS_MRT_REG(uint32_t i0)3340 static inline uint32_t REG_A5XX_SP_FS_MRT_REG(uint32_t i0) { return 0x0000e5d3 + 0x1*i0; }
3341 #define A5XX_SP_FS_MRT_REG_COLOR_FORMAT__MASK			0x000000ff
3342 #define A5XX_SP_FS_MRT_REG_COLOR_FORMAT__SHIFT			0
A5XX_SP_FS_MRT_REG_COLOR_FORMAT(enum a5xx_color_fmt val)3343 static inline uint32_t A5XX_SP_FS_MRT_REG_COLOR_FORMAT(enum a5xx_color_fmt val)
3344 {
3345 	return ((val) << A5XX_SP_FS_MRT_REG_COLOR_FORMAT__SHIFT) & A5XX_SP_FS_MRT_REG_COLOR_FORMAT__MASK;
3346 }
3347 #define A5XX_SP_FS_MRT_REG_COLOR_SRGB				0x00000400
3348 
3349 #define REG_A5XX_UNKNOWN_E5DB					0x0000e5db
3350 
3351 #define REG_A5XX_SP_CS_CNTL_0					0x0000e5f0
3352 
3353 #define REG_A5XX_UNKNOWN_E600					0x0000e600
3354 
3355 #define REG_A5XX_UNKNOWN_E640					0x0000e640
3356 
3357 #define REG_A5XX_TPL1_TP_RAS_MSAA_CNTL				0x0000e704
3358 #define A5XX_TPL1_TP_RAS_MSAA_CNTL_SAMPLES__MASK		0x00000003
3359 #define A5XX_TPL1_TP_RAS_MSAA_CNTL_SAMPLES__SHIFT		0
A5XX_TPL1_TP_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)3360 static inline uint32_t A5XX_TPL1_TP_RAS_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
3361 {
3362 	return ((val) << A5XX_TPL1_TP_RAS_MSAA_CNTL_SAMPLES__SHIFT) & A5XX_TPL1_TP_RAS_MSAA_CNTL_SAMPLES__MASK;
3363 }
3364 
3365 #define REG_A5XX_TPL1_TP_DEST_MSAA_CNTL				0x0000e705
3366 #define A5XX_TPL1_TP_DEST_MSAA_CNTL_SAMPLES__MASK		0x00000003
3367 #define A5XX_TPL1_TP_DEST_MSAA_CNTL_SAMPLES__SHIFT		0
A5XX_TPL1_TP_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)3368 static inline uint32_t A5XX_TPL1_TP_DEST_MSAA_CNTL_SAMPLES(enum a3xx_msaa_samples val)
3369 {
3370 	return ((val) << A5XX_TPL1_TP_DEST_MSAA_CNTL_SAMPLES__SHIFT) & A5XX_TPL1_TP_DEST_MSAA_CNTL_SAMPLES__MASK;
3371 }
3372 #define A5XX_TPL1_TP_DEST_MSAA_CNTL_MSAA_DISABLE		0x00000004
3373 
3374 #define REG_A5XX_TPL1_TP_BORDER_COLOR_BASE_ADDR_LO		0x0000e706
3375 
3376 #define REG_A5XX_TPL1_TP_BORDER_COLOR_BASE_ADDR_HI		0x0000e707
3377 
3378 #define REG_A5XX_TPL1_VS_TEX_COUNT				0x0000e700
3379 
3380 #define REG_A5XX_TPL1_VS_TEX_SAMP_LO				0x0000e722
3381 
3382 #define REG_A5XX_TPL1_VS_TEX_SAMP_HI				0x0000e723
3383 
3384 #define REG_A5XX_TPL1_VS_TEX_CONST_LO				0x0000e72a
3385 
3386 #define REG_A5XX_TPL1_VS_TEX_CONST_HI				0x0000e72b
3387 
3388 #define REG_A5XX_TPL1_FS_TEX_COUNT				0x0000e750
3389 
3390 #define REG_A5XX_TPL1_FS_TEX_SAMP_LO				0x0000e75a
3391 
3392 #define REG_A5XX_TPL1_FS_TEX_SAMP_HI				0x0000e75b
3393 
3394 #define REG_A5XX_TPL1_FS_TEX_CONST_LO				0x0000e75e
3395 
3396 #define REG_A5XX_TPL1_FS_TEX_CONST_HI				0x0000e75f
3397 
3398 #define REG_A5XX_TPL1_TP_FS_ROTATION_CNTL			0x0000e764
3399 
3400 #define REG_A5XX_HLSQ_CONTROL_0_REG				0x0000e784
3401 #define A5XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__MASK		0x00000001
3402 #define A5XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__SHIFT		0
A5XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE(enum a3xx_threadsize val)3403 static inline uint32_t A5XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE(enum a3xx_threadsize val)
3404 {
3405 	return ((val) << A5XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__SHIFT) & A5XX_HLSQ_CONTROL_0_REG_FSTHREADSIZE__MASK;
3406 }
3407 
3408 #define REG_A5XX_HLSQ_CONTROL_1_REG				0x0000e785
3409 #define A5XX_HLSQ_CONTROL_1_REG_PRIMALLOCTHRESHOLD__MASK	0x0000003f
3410 #define A5XX_HLSQ_CONTROL_1_REG_PRIMALLOCTHRESHOLD__SHIFT	0
A5XX_HLSQ_CONTROL_1_REG_PRIMALLOCTHRESHOLD(uint32_t val)3411 static inline uint32_t A5XX_HLSQ_CONTROL_1_REG_PRIMALLOCTHRESHOLD(uint32_t val)
3412 {
3413 	return ((val) << A5XX_HLSQ_CONTROL_1_REG_PRIMALLOCTHRESHOLD__SHIFT) & A5XX_HLSQ_CONTROL_1_REG_PRIMALLOCTHRESHOLD__MASK;
3414 }
3415 
3416 #define REG_A5XX_HLSQ_CONTROL_2_REG				0x0000e786
3417 #define A5XX_HLSQ_CONTROL_2_REG_FACEREGID__MASK			0x000000ff
3418 #define A5XX_HLSQ_CONTROL_2_REG_FACEREGID__SHIFT		0
A5XX_HLSQ_CONTROL_2_REG_FACEREGID(uint32_t val)3419 static inline uint32_t A5XX_HLSQ_CONTROL_2_REG_FACEREGID(uint32_t val)
3420 {
3421 	return ((val) << A5XX_HLSQ_CONTROL_2_REG_FACEREGID__SHIFT) & A5XX_HLSQ_CONTROL_2_REG_FACEREGID__MASK;
3422 }
3423 
3424 #define REG_A5XX_HLSQ_CONTROL_3_REG				0x0000e787
3425 #define A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__MASK		0x000000ff
3426 #define A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__SHIFT		0
A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID(uint32_t val)3427 static inline uint32_t A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID(uint32_t val)
3428 {
3429 	return ((val) << A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__SHIFT) & A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID__MASK;
3430 }
3431 
3432 #define REG_A5XX_HLSQ_CONTROL_4_REG				0x0000e788
3433 #define A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__MASK		0x00ff0000
3434 #define A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__SHIFT		16
A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(uint32_t val)3435 static inline uint32_t A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(uint32_t val)
3436 {
3437 	return ((val) << A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__SHIFT) & A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID__MASK;
3438 }
3439 #define A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__MASK		0xff000000
3440 #define A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__SHIFT		24
A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID(uint32_t val)3441 static inline uint32_t A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID(uint32_t val)
3442 {
3443 	return ((val) << A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__SHIFT) & A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID__MASK;
3444 }
3445 
3446 #define REG_A5XX_HLSQ_UPDATE_CNTL				0x0000e78a
3447 
3448 #define REG_A5XX_HLSQ_VS_CONTROL_REG				0x0000e78b
3449 #define A5XX_HLSQ_VS_CONTROL_REG_ENABLED			0x00000001
3450 #define A5XX_HLSQ_VS_CONTROL_REG_CONSTOBJECTOFFSET__MASK	0x000000fe
3451 #define A5XX_HLSQ_VS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT	1
A5XX_HLSQ_VS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3452 static inline uint32_t A5XX_HLSQ_VS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3453 {
3454 	return ((val) << A5XX_HLSQ_VS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_HLSQ_VS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3455 }
3456 #define A5XX_HLSQ_VS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3457 #define A5XX_HLSQ_VS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_HLSQ_VS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3458 static inline uint32_t A5XX_HLSQ_VS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3459 {
3460 	return ((val) << A5XX_HLSQ_VS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_HLSQ_VS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3461 }
3462 
3463 #define REG_A5XX_HLSQ_FS_CONTROL_REG				0x0000e78c
3464 #define A5XX_HLSQ_FS_CONTROL_REG_ENABLED			0x00000001
3465 #define A5XX_HLSQ_FS_CONTROL_REG_CONSTOBJECTOFFSET__MASK	0x000000fe
3466 #define A5XX_HLSQ_FS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT	1
A5XX_HLSQ_FS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3467 static inline uint32_t A5XX_HLSQ_FS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3468 {
3469 	return ((val) << A5XX_HLSQ_FS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_HLSQ_FS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3470 }
3471 #define A5XX_HLSQ_FS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3472 #define A5XX_HLSQ_FS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_HLSQ_FS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3473 static inline uint32_t A5XX_HLSQ_FS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3474 {
3475 	return ((val) << A5XX_HLSQ_FS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_HLSQ_FS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3476 }
3477 
3478 #define REG_A5XX_HLSQ_HS_CONTROL_REG				0x0000e78d
3479 #define A5XX_HLSQ_HS_CONTROL_REG_ENABLED			0x00000001
3480 #define A5XX_HLSQ_HS_CONTROL_REG_CONSTOBJECTOFFSET__MASK	0x000000fe
3481 #define A5XX_HLSQ_HS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT	1
A5XX_HLSQ_HS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3482 static inline uint32_t A5XX_HLSQ_HS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3483 {
3484 	return ((val) << A5XX_HLSQ_HS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_HLSQ_HS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3485 }
3486 #define A5XX_HLSQ_HS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3487 #define A5XX_HLSQ_HS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_HLSQ_HS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3488 static inline uint32_t A5XX_HLSQ_HS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3489 {
3490 	return ((val) << A5XX_HLSQ_HS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_HLSQ_HS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3491 }
3492 
3493 #define REG_A5XX_HLSQ_DS_CONTROL_REG				0x0000e78e
3494 #define A5XX_HLSQ_DS_CONTROL_REG_ENABLED			0x00000001
3495 #define A5XX_HLSQ_DS_CONTROL_REG_CONSTOBJECTOFFSET__MASK	0x000000fe
3496 #define A5XX_HLSQ_DS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT	1
A5XX_HLSQ_DS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3497 static inline uint32_t A5XX_HLSQ_DS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3498 {
3499 	return ((val) << A5XX_HLSQ_DS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_HLSQ_DS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3500 }
3501 #define A5XX_HLSQ_DS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3502 #define A5XX_HLSQ_DS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_HLSQ_DS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3503 static inline uint32_t A5XX_HLSQ_DS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3504 {
3505 	return ((val) << A5XX_HLSQ_DS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_HLSQ_DS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3506 }
3507 
3508 #define REG_A5XX_HLSQ_GS_CONTROL_REG				0x0000e78f
3509 #define A5XX_HLSQ_GS_CONTROL_REG_ENABLED			0x00000001
3510 #define A5XX_HLSQ_GS_CONTROL_REG_CONSTOBJECTOFFSET__MASK	0x000000fe
3511 #define A5XX_HLSQ_GS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT	1
A5XX_HLSQ_GS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)3512 static inline uint32_t A5XX_HLSQ_GS_CONTROL_REG_CONSTOBJECTOFFSET(uint32_t val)
3513 {
3514 	return ((val) << A5XX_HLSQ_GS_CONTROL_REG_CONSTOBJECTOFFSET__SHIFT) & A5XX_HLSQ_GS_CONTROL_REG_CONSTOBJECTOFFSET__MASK;
3515 }
3516 #define A5XX_HLSQ_GS_CONTROL_REG_SHADEROBJOFFSET__MASK		0x00007f00
3517 #define A5XX_HLSQ_GS_CONTROL_REG_SHADEROBJOFFSET__SHIFT		8
A5XX_HLSQ_GS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)3518 static inline uint32_t A5XX_HLSQ_GS_CONTROL_REG_SHADEROBJOFFSET(uint32_t val)
3519 {
3520 	return ((val) << A5XX_HLSQ_GS_CONTROL_REG_SHADEROBJOFFSET__SHIFT) & A5XX_HLSQ_GS_CONTROL_REG_SHADEROBJOFFSET__MASK;
3521 }
3522 
3523 #define REG_A5XX_HLSQ_CS_CONFIG					0x0000e790
3524 
3525 #define REG_A5XX_HLSQ_VS_CNTL					0x0000e791
3526 #define A5XX_HLSQ_VS_CNTL_INSTRLEN__MASK			0xfffffffe
3527 #define A5XX_HLSQ_VS_CNTL_INSTRLEN__SHIFT			1
A5XX_HLSQ_VS_CNTL_INSTRLEN(uint32_t val)3528 static inline uint32_t A5XX_HLSQ_VS_CNTL_INSTRLEN(uint32_t val)
3529 {
3530 	return ((val) << A5XX_HLSQ_VS_CNTL_INSTRLEN__SHIFT) & A5XX_HLSQ_VS_CNTL_INSTRLEN__MASK;
3531 }
3532 
3533 #define REG_A5XX_HLSQ_FS_CNTL					0x0000e792
3534 #define A5XX_HLSQ_FS_CNTL_INSTRLEN__MASK			0xfffffffe
3535 #define A5XX_HLSQ_FS_CNTL_INSTRLEN__SHIFT			1
A5XX_HLSQ_FS_CNTL_INSTRLEN(uint32_t val)3536 static inline uint32_t A5XX_HLSQ_FS_CNTL_INSTRLEN(uint32_t val)
3537 {
3538 	return ((val) << A5XX_HLSQ_FS_CNTL_INSTRLEN__SHIFT) & A5XX_HLSQ_FS_CNTL_INSTRLEN__MASK;
3539 }
3540 
3541 #define REG_A5XX_HLSQ_HS_CNTL					0x0000e793
3542 #define A5XX_HLSQ_HS_CNTL_INSTRLEN__MASK			0xfffffffe
3543 #define A5XX_HLSQ_HS_CNTL_INSTRLEN__SHIFT			1
A5XX_HLSQ_HS_CNTL_INSTRLEN(uint32_t val)3544 static inline uint32_t A5XX_HLSQ_HS_CNTL_INSTRLEN(uint32_t val)
3545 {
3546 	return ((val) << A5XX_HLSQ_HS_CNTL_INSTRLEN__SHIFT) & A5XX_HLSQ_HS_CNTL_INSTRLEN__MASK;
3547 }
3548 
3549 #define REG_A5XX_HLSQ_DS_CNTL					0x0000e794
3550 #define A5XX_HLSQ_DS_CNTL_INSTRLEN__MASK			0xfffffffe
3551 #define A5XX_HLSQ_DS_CNTL_INSTRLEN__SHIFT			1
A5XX_HLSQ_DS_CNTL_INSTRLEN(uint32_t val)3552 static inline uint32_t A5XX_HLSQ_DS_CNTL_INSTRLEN(uint32_t val)
3553 {
3554 	return ((val) << A5XX_HLSQ_DS_CNTL_INSTRLEN__SHIFT) & A5XX_HLSQ_DS_CNTL_INSTRLEN__MASK;
3555 }
3556 
3557 #define REG_A5XX_HLSQ_GS_CNTL					0x0000e795
3558 #define A5XX_HLSQ_GS_CNTL_INSTRLEN__MASK			0xfffffffe
3559 #define A5XX_HLSQ_GS_CNTL_INSTRLEN__SHIFT			1
A5XX_HLSQ_GS_CNTL_INSTRLEN(uint32_t val)3560 static inline uint32_t A5XX_HLSQ_GS_CNTL_INSTRLEN(uint32_t val)
3561 {
3562 	return ((val) << A5XX_HLSQ_GS_CNTL_INSTRLEN__SHIFT) & A5XX_HLSQ_GS_CNTL_INSTRLEN__MASK;
3563 }
3564 
3565 #define REG_A5XX_HLSQ_CS_CNTL					0x0000e796
3566 #define A5XX_HLSQ_CS_CNTL_INSTRLEN__MASK			0xfffffffe
3567 #define A5XX_HLSQ_CS_CNTL_INSTRLEN__SHIFT			1
A5XX_HLSQ_CS_CNTL_INSTRLEN(uint32_t val)3568 static inline uint32_t A5XX_HLSQ_CS_CNTL_INSTRLEN(uint32_t val)
3569 {
3570 	return ((val) << A5XX_HLSQ_CS_CNTL_INSTRLEN__SHIFT) & A5XX_HLSQ_CS_CNTL_INSTRLEN__MASK;
3571 }
3572 
3573 #define REG_A5XX_HLSQ_CS_KERNEL_GROUP_X				0x0000e7b9
3574 
3575 #define REG_A5XX_HLSQ_CS_KERNEL_GROUP_Y				0x0000e7ba
3576 
3577 #define REG_A5XX_HLSQ_CS_KERNEL_GROUP_Z				0x0000e7bb
3578 
3579 #define REG_A5XX_HLSQ_CS_NDRANGE_0				0x0000e7b0
3580 
3581 #define REG_A5XX_HLSQ_CS_NDRANGE_1				0x0000e7b1
3582 
3583 #define REG_A5XX_HLSQ_CS_NDRANGE_2				0x0000e7b2
3584 
3585 #define REG_A5XX_HLSQ_CS_NDRANGE_3				0x0000e7b3
3586 
3587 #define REG_A5XX_HLSQ_CS_NDRANGE_4				0x0000e7b4
3588 
3589 #define REG_A5XX_HLSQ_CS_NDRANGE_5				0x0000e7b5
3590 
3591 #define REG_A5XX_HLSQ_CS_NDRANGE_6				0x0000e7b6
3592 
3593 #define REG_A5XX_HLSQ_CS_CNTL_0					0x0000e7b7
3594 
3595 #define REG_A5XX_HLSQ_CS_CNTL_1					0x0000e7b8
3596 
3597 #define REG_A5XX_UNKNOWN_E7C0					0x0000e7c0
3598 
3599 #define REG_A5XX_HLSQ_VS_CONSTLEN				0x0000e7c3
3600 
3601 #define REG_A5XX_HLSQ_VS_INSTRLEN				0x0000e7c4
3602 
3603 #define REG_A5XX_UNKNOWN_E7C5					0x0000e7c5
3604 
3605 #define REG_A5XX_UNKNOWN_E7CA					0x0000e7ca
3606 
3607 #define REG_A5XX_HLSQ_FS_CONSTLEN				0x0000e7d7
3608 
3609 #define REG_A5XX_HLSQ_FS_INSTRLEN				0x0000e7d8
3610 
3611 #define REG_A5XX_HLSQ_HS_CONSTLEN				0x0000e7c8
3612 
3613 #define REG_A5XX_HLSQ_HS_INSTRLEN				0x0000e7c9
3614 
3615 #define REG_A5XX_HLSQ_DS_CONSTLEN				0x0000e7cd
3616 
3617 #define REG_A5XX_HLSQ_DS_INSTRLEN				0x0000e7ce
3618 
3619 #define REG_A5XX_UNKNOWN_E7CF					0x0000e7cf
3620 
3621 #define REG_A5XX_HLSQ_GS_CONSTLEN				0x0000e7d2
3622 
3623 #define REG_A5XX_HLSQ_GS_INSTRLEN				0x0000e7d3
3624 
3625 #define REG_A5XX_UNKNOWN_E7D4					0x0000e7d4
3626 
3627 #define REG_A5XX_UNKNOWN_E7D9					0x0000e7d9
3628 
3629 #define REG_A5XX_HLSQ_CONTEXT_SWITCH_CS_SW_3			0x0000e7dc
3630 
3631 #define REG_A5XX_HLSQ_CONTEXT_SWITCH_CS_SW_4			0x0000e7dd
3632 
3633 #define REG_A5XX_RB_2D_SRC_SOLID_DW0				0x00002101
3634 
3635 #define REG_A5XX_RB_2D_SRC_SOLID_DW1				0x00002102
3636 
3637 #define REG_A5XX_RB_2D_SRC_SOLID_DW2				0x00002103
3638 
3639 #define REG_A5XX_RB_2D_SRC_SOLID_DW3				0x00002104
3640 
3641 #define REG_A5XX_RB_2D_SRC_INFO					0x00002107
3642 #define A5XX_RB_2D_SRC_INFO_COLOR_FORMAT__MASK			0x000000ff
3643 #define A5XX_RB_2D_SRC_INFO_COLOR_FORMAT__SHIFT			0
A5XX_RB_2D_SRC_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)3644 static inline uint32_t A5XX_RB_2D_SRC_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)
3645 {
3646 	return ((val) << A5XX_RB_2D_SRC_INFO_COLOR_FORMAT__SHIFT) & A5XX_RB_2D_SRC_INFO_COLOR_FORMAT__MASK;
3647 }
3648 #define A5XX_RB_2D_SRC_INFO_COLOR_SWAP__MASK			0x00000c00
3649 #define A5XX_RB_2D_SRC_INFO_COLOR_SWAP__SHIFT			10
A5XX_RB_2D_SRC_INFO_COLOR_SWAP(enum a3xx_color_swap val)3650 static inline uint32_t A5XX_RB_2D_SRC_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3651 {
3652 	return ((val) << A5XX_RB_2D_SRC_INFO_COLOR_SWAP__SHIFT) & A5XX_RB_2D_SRC_INFO_COLOR_SWAP__MASK;
3653 }
3654 
3655 #define REG_A5XX_RB_2D_SRC_LO					0x00002108
3656 
3657 #define REG_A5XX_RB_2D_SRC_HI					0x00002109
3658 
3659 #define REG_A5XX_RB_2D_SRC_SIZE					0x0000210a
3660 #define A5XX_RB_2D_SRC_SIZE_PITCH__MASK				0x0000ffff
3661 #define A5XX_RB_2D_SRC_SIZE_PITCH__SHIFT			0
A5XX_RB_2D_SRC_SIZE_PITCH(uint32_t val)3662 static inline uint32_t A5XX_RB_2D_SRC_SIZE_PITCH(uint32_t val)
3663 {
3664 	assert(!(val & 0x3f));
3665 	return ((val >> 6) << A5XX_RB_2D_SRC_SIZE_PITCH__SHIFT) & A5XX_RB_2D_SRC_SIZE_PITCH__MASK;
3666 }
3667 #define A5XX_RB_2D_SRC_SIZE_ARRAY_PITCH__MASK			0xffff0000
3668 #define A5XX_RB_2D_SRC_SIZE_ARRAY_PITCH__SHIFT			16
A5XX_RB_2D_SRC_SIZE_ARRAY_PITCH(uint32_t val)3669 static inline uint32_t A5XX_RB_2D_SRC_SIZE_ARRAY_PITCH(uint32_t val)
3670 {
3671 	assert(!(val & 0x3f));
3672 	return ((val >> 6) << A5XX_RB_2D_SRC_SIZE_ARRAY_PITCH__SHIFT) & A5XX_RB_2D_SRC_SIZE_ARRAY_PITCH__MASK;
3673 }
3674 
3675 #define REG_A5XX_RB_2D_DST_INFO					0x00002110
3676 #define A5XX_RB_2D_DST_INFO_COLOR_FORMAT__MASK			0x000000ff
3677 #define A5XX_RB_2D_DST_INFO_COLOR_FORMAT__SHIFT			0
A5XX_RB_2D_DST_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)3678 static inline uint32_t A5XX_RB_2D_DST_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)
3679 {
3680 	return ((val) << A5XX_RB_2D_DST_INFO_COLOR_FORMAT__SHIFT) & A5XX_RB_2D_DST_INFO_COLOR_FORMAT__MASK;
3681 }
3682 #define A5XX_RB_2D_DST_INFO_COLOR_SWAP__MASK			0x00000c00
3683 #define A5XX_RB_2D_DST_INFO_COLOR_SWAP__SHIFT			10
A5XX_RB_2D_DST_INFO_COLOR_SWAP(enum a3xx_color_swap val)3684 static inline uint32_t A5XX_RB_2D_DST_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3685 {
3686 	return ((val) << A5XX_RB_2D_DST_INFO_COLOR_SWAP__SHIFT) & A5XX_RB_2D_DST_INFO_COLOR_SWAP__MASK;
3687 }
3688 
3689 #define REG_A5XX_RB_2D_DST_LO					0x00002111
3690 
3691 #define REG_A5XX_RB_2D_DST_HI					0x00002112
3692 
3693 #define REG_A5XX_RB_2D_DST_SIZE					0x00002113
3694 #define A5XX_RB_2D_DST_SIZE_PITCH__MASK				0x0000ffff
3695 #define A5XX_RB_2D_DST_SIZE_PITCH__SHIFT			0
A5XX_RB_2D_DST_SIZE_PITCH(uint32_t val)3696 static inline uint32_t A5XX_RB_2D_DST_SIZE_PITCH(uint32_t val)
3697 {
3698 	assert(!(val & 0x3f));
3699 	return ((val >> 6) << A5XX_RB_2D_DST_SIZE_PITCH__SHIFT) & A5XX_RB_2D_DST_SIZE_PITCH__MASK;
3700 }
3701 #define A5XX_RB_2D_DST_SIZE_ARRAY_PITCH__MASK			0xffff0000
3702 #define A5XX_RB_2D_DST_SIZE_ARRAY_PITCH__SHIFT			16
A5XX_RB_2D_DST_SIZE_ARRAY_PITCH(uint32_t val)3703 static inline uint32_t A5XX_RB_2D_DST_SIZE_ARRAY_PITCH(uint32_t val)
3704 {
3705 	assert(!(val & 0x3f));
3706 	return ((val >> 6) << A5XX_RB_2D_DST_SIZE_ARRAY_PITCH__SHIFT) & A5XX_RB_2D_DST_SIZE_ARRAY_PITCH__MASK;
3707 }
3708 
3709 #define REG_A5XX_RB_2D_SRC_FLAGS_LO				0x00002140
3710 
3711 #define REG_A5XX_RB_2D_SRC_FLAGS_HI				0x00002141
3712 
3713 #define REG_A5XX_RB_2D_DST_FLAGS_LO				0x00002143
3714 
3715 #define REG_A5XX_RB_2D_DST_FLAGS_HI				0x00002144
3716 
3717 #define REG_A5XX_GRAS_2D_SRC_INFO				0x00002181
3718 #define A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT__MASK		0x000000ff
3719 #define A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT__SHIFT		0
A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)3720 static inline uint32_t A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)
3721 {
3722 	return ((val) << A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT__SHIFT) & A5XX_GRAS_2D_SRC_INFO_COLOR_FORMAT__MASK;
3723 }
3724 #define A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP__MASK			0x00000c00
3725 #define A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP__SHIFT			10
A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP(enum a3xx_color_swap val)3726 static inline uint32_t A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3727 {
3728 	return ((val) << A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP__SHIFT) & A5XX_GRAS_2D_SRC_INFO_COLOR_SWAP__MASK;
3729 }
3730 
3731 #define REG_A5XX_GRAS_2D_DST_INFO				0x00002182
3732 #define A5XX_GRAS_2D_DST_INFO_COLOR_FORMAT__MASK		0x000000ff
3733 #define A5XX_GRAS_2D_DST_INFO_COLOR_FORMAT__SHIFT		0
A5XX_GRAS_2D_DST_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)3734 static inline uint32_t A5XX_GRAS_2D_DST_INFO_COLOR_FORMAT(enum a5xx_color_fmt val)
3735 {
3736 	return ((val) << A5XX_GRAS_2D_DST_INFO_COLOR_FORMAT__SHIFT) & A5XX_GRAS_2D_DST_INFO_COLOR_FORMAT__MASK;
3737 }
3738 #define A5XX_GRAS_2D_DST_INFO_COLOR_SWAP__MASK			0x00000c00
3739 #define A5XX_GRAS_2D_DST_INFO_COLOR_SWAP__SHIFT			10
A5XX_GRAS_2D_DST_INFO_COLOR_SWAP(enum a3xx_color_swap val)3740 static inline uint32_t A5XX_GRAS_2D_DST_INFO_COLOR_SWAP(enum a3xx_color_swap val)
3741 {
3742 	return ((val) << A5XX_GRAS_2D_DST_INFO_COLOR_SWAP__SHIFT) & A5XX_GRAS_2D_DST_INFO_COLOR_SWAP__MASK;
3743 }
3744 
3745 #define REG_A5XX_UNKNOWN_2100					0x00002100
3746 
3747 #define REG_A5XX_UNKNOWN_2180					0x00002180
3748 
3749 #define REG_A5XX_UNKNOWN_2184					0x00002184
3750 
3751 #define REG_A5XX_TEX_SAMP_0					0x00000000
3752 #define A5XX_TEX_SAMP_0_MIPFILTER_LINEAR_NEAR			0x00000001
3753 #define A5XX_TEX_SAMP_0_XY_MAG__MASK				0x00000006
3754 #define A5XX_TEX_SAMP_0_XY_MAG__SHIFT				1
A5XX_TEX_SAMP_0_XY_MAG(enum a5xx_tex_filter val)3755 static inline uint32_t A5XX_TEX_SAMP_0_XY_MAG(enum a5xx_tex_filter val)
3756 {
3757 	return ((val) << A5XX_TEX_SAMP_0_XY_MAG__SHIFT) & A5XX_TEX_SAMP_0_XY_MAG__MASK;
3758 }
3759 #define A5XX_TEX_SAMP_0_XY_MIN__MASK				0x00000018
3760 #define A5XX_TEX_SAMP_0_XY_MIN__SHIFT				3
A5XX_TEX_SAMP_0_XY_MIN(enum a5xx_tex_filter val)3761 static inline uint32_t A5XX_TEX_SAMP_0_XY_MIN(enum a5xx_tex_filter val)
3762 {
3763 	return ((val) << A5XX_TEX_SAMP_0_XY_MIN__SHIFT) & A5XX_TEX_SAMP_0_XY_MIN__MASK;
3764 }
3765 #define A5XX_TEX_SAMP_0_WRAP_S__MASK				0x000000e0
3766 #define A5XX_TEX_SAMP_0_WRAP_S__SHIFT				5
A5XX_TEX_SAMP_0_WRAP_S(enum a5xx_tex_clamp val)3767 static inline uint32_t A5XX_TEX_SAMP_0_WRAP_S(enum a5xx_tex_clamp val)
3768 {
3769 	return ((val) << A5XX_TEX_SAMP_0_WRAP_S__SHIFT) & A5XX_TEX_SAMP_0_WRAP_S__MASK;
3770 }
3771 #define A5XX_TEX_SAMP_0_WRAP_T__MASK				0x00000700
3772 #define A5XX_TEX_SAMP_0_WRAP_T__SHIFT				8
A5XX_TEX_SAMP_0_WRAP_T(enum a5xx_tex_clamp val)3773 static inline uint32_t A5XX_TEX_SAMP_0_WRAP_T(enum a5xx_tex_clamp val)
3774 {
3775 	return ((val) << A5XX_TEX_SAMP_0_WRAP_T__SHIFT) & A5XX_TEX_SAMP_0_WRAP_T__MASK;
3776 }
3777 #define A5XX_TEX_SAMP_0_WRAP_R__MASK				0x00003800
3778 #define A5XX_TEX_SAMP_0_WRAP_R__SHIFT				11
A5XX_TEX_SAMP_0_WRAP_R(enum a5xx_tex_clamp val)3779 static inline uint32_t A5XX_TEX_SAMP_0_WRAP_R(enum a5xx_tex_clamp val)
3780 {
3781 	return ((val) << A5XX_TEX_SAMP_0_WRAP_R__SHIFT) & A5XX_TEX_SAMP_0_WRAP_R__MASK;
3782 }
3783 #define A5XX_TEX_SAMP_0_ANISO__MASK				0x0001c000
3784 #define A5XX_TEX_SAMP_0_ANISO__SHIFT				14
A5XX_TEX_SAMP_0_ANISO(enum a5xx_tex_aniso val)3785 static inline uint32_t A5XX_TEX_SAMP_0_ANISO(enum a5xx_tex_aniso val)
3786 {
3787 	return ((val) << A5XX_TEX_SAMP_0_ANISO__SHIFT) & A5XX_TEX_SAMP_0_ANISO__MASK;
3788 }
3789 #define A5XX_TEX_SAMP_0_LOD_BIAS__MASK				0xfff80000
3790 #define A5XX_TEX_SAMP_0_LOD_BIAS__SHIFT				19
A5XX_TEX_SAMP_0_LOD_BIAS(float val)3791 static inline uint32_t A5XX_TEX_SAMP_0_LOD_BIAS(float val)
3792 {
3793 	return ((((int32_t)(val * 256.0))) << A5XX_TEX_SAMP_0_LOD_BIAS__SHIFT) & A5XX_TEX_SAMP_0_LOD_BIAS__MASK;
3794 }
3795 
3796 #define REG_A5XX_TEX_SAMP_1					0x00000001
3797 #define A5XX_TEX_SAMP_1_COMPARE_FUNC__MASK			0x0000000e
3798 #define A5XX_TEX_SAMP_1_COMPARE_FUNC__SHIFT			1
A5XX_TEX_SAMP_1_COMPARE_FUNC(enum adreno_compare_func val)3799 static inline uint32_t A5XX_TEX_SAMP_1_COMPARE_FUNC(enum adreno_compare_func val)
3800 {
3801 	return ((val) << A5XX_TEX_SAMP_1_COMPARE_FUNC__SHIFT) & A5XX_TEX_SAMP_1_COMPARE_FUNC__MASK;
3802 }
3803 #define A5XX_TEX_SAMP_1_CUBEMAPSEAMLESSFILTOFF			0x00000010
3804 #define A5XX_TEX_SAMP_1_UNNORM_COORDS				0x00000020
3805 #define A5XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR			0x00000040
3806 #define A5XX_TEX_SAMP_1_MAX_LOD__MASK				0x000fff00
3807 #define A5XX_TEX_SAMP_1_MAX_LOD__SHIFT				8
A5XX_TEX_SAMP_1_MAX_LOD(float val)3808 static inline uint32_t A5XX_TEX_SAMP_1_MAX_LOD(float val)
3809 {
3810 	return ((((uint32_t)(val * 256.0))) << A5XX_TEX_SAMP_1_MAX_LOD__SHIFT) & A5XX_TEX_SAMP_1_MAX_LOD__MASK;
3811 }
3812 #define A5XX_TEX_SAMP_1_MIN_LOD__MASK				0xfff00000
3813 #define A5XX_TEX_SAMP_1_MIN_LOD__SHIFT				20
A5XX_TEX_SAMP_1_MIN_LOD(float val)3814 static inline uint32_t A5XX_TEX_SAMP_1_MIN_LOD(float val)
3815 {
3816 	return ((((uint32_t)(val * 256.0))) << A5XX_TEX_SAMP_1_MIN_LOD__SHIFT) & A5XX_TEX_SAMP_1_MIN_LOD__MASK;
3817 }
3818 
3819 #define REG_A5XX_TEX_SAMP_2					0x00000002
3820 #define A5XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK			0xfffffff0
3821 #define A5XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT			4
A5XX_TEX_SAMP_2_BCOLOR_OFFSET(uint32_t val)3822 static inline uint32_t A5XX_TEX_SAMP_2_BCOLOR_OFFSET(uint32_t val)
3823 {
3824 	return ((val) << A5XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT) & A5XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK;
3825 }
3826 
3827 #define REG_A5XX_TEX_SAMP_3					0x00000003
3828 
3829 #define REG_A5XX_TEX_CONST_0					0x00000000
3830 #define A5XX_TEX_CONST_0_TILE_MODE__MASK			0x00000003
3831 #define A5XX_TEX_CONST_0_TILE_MODE__SHIFT			0
A5XX_TEX_CONST_0_TILE_MODE(enum a5xx_tile_mode val)3832 static inline uint32_t A5XX_TEX_CONST_0_TILE_MODE(enum a5xx_tile_mode val)
3833 {
3834 	return ((val) << A5XX_TEX_CONST_0_TILE_MODE__SHIFT) & A5XX_TEX_CONST_0_TILE_MODE__MASK;
3835 }
3836 #define A5XX_TEX_CONST_0_SRGB					0x00000004
3837 #define A5XX_TEX_CONST_0_SWIZ_X__MASK				0x00000070
3838 #define A5XX_TEX_CONST_0_SWIZ_X__SHIFT				4
A5XX_TEX_CONST_0_SWIZ_X(enum a5xx_tex_swiz val)3839 static inline uint32_t A5XX_TEX_CONST_0_SWIZ_X(enum a5xx_tex_swiz val)
3840 {
3841 	return ((val) << A5XX_TEX_CONST_0_SWIZ_X__SHIFT) & A5XX_TEX_CONST_0_SWIZ_X__MASK;
3842 }
3843 #define A5XX_TEX_CONST_0_SWIZ_Y__MASK				0x00000380
3844 #define A5XX_TEX_CONST_0_SWIZ_Y__SHIFT				7
A5XX_TEX_CONST_0_SWIZ_Y(enum a5xx_tex_swiz val)3845 static inline uint32_t A5XX_TEX_CONST_0_SWIZ_Y(enum a5xx_tex_swiz val)
3846 {
3847 	return ((val) << A5XX_TEX_CONST_0_SWIZ_Y__SHIFT) & A5XX_TEX_CONST_0_SWIZ_Y__MASK;
3848 }
3849 #define A5XX_TEX_CONST_0_SWIZ_Z__MASK				0x00001c00
3850 #define A5XX_TEX_CONST_0_SWIZ_Z__SHIFT				10
A5XX_TEX_CONST_0_SWIZ_Z(enum a5xx_tex_swiz val)3851 static inline uint32_t A5XX_TEX_CONST_0_SWIZ_Z(enum a5xx_tex_swiz val)
3852 {
3853 	return ((val) << A5XX_TEX_CONST_0_SWIZ_Z__SHIFT) & A5XX_TEX_CONST_0_SWIZ_Z__MASK;
3854 }
3855 #define A5XX_TEX_CONST_0_SWIZ_W__MASK				0x0000e000
3856 #define A5XX_TEX_CONST_0_SWIZ_W__SHIFT				13
A5XX_TEX_CONST_0_SWIZ_W(enum a5xx_tex_swiz val)3857 static inline uint32_t A5XX_TEX_CONST_0_SWIZ_W(enum a5xx_tex_swiz val)
3858 {
3859 	return ((val) << A5XX_TEX_CONST_0_SWIZ_W__SHIFT) & A5XX_TEX_CONST_0_SWIZ_W__MASK;
3860 }
3861 #define A5XX_TEX_CONST_0_MIPLVLS__MASK				0x000f0000
3862 #define A5XX_TEX_CONST_0_MIPLVLS__SHIFT				16
A5XX_TEX_CONST_0_MIPLVLS(uint32_t val)3863 static inline uint32_t A5XX_TEX_CONST_0_MIPLVLS(uint32_t val)
3864 {
3865 	return ((val) << A5XX_TEX_CONST_0_MIPLVLS__SHIFT) & A5XX_TEX_CONST_0_MIPLVLS__MASK;
3866 }
3867 #define A5XX_TEX_CONST_0_FMT__MASK				0x3fc00000
3868 #define A5XX_TEX_CONST_0_FMT__SHIFT				22
A5XX_TEX_CONST_0_FMT(enum a5xx_tex_fmt val)3869 static inline uint32_t A5XX_TEX_CONST_0_FMT(enum a5xx_tex_fmt val)
3870 {
3871 	return ((val) << A5XX_TEX_CONST_0_FMT__SHIFT) & A5XX_TEX_CONST_0_FMT__MASK;
3872 }
3873 #define A5XX_TEX_CONST_0_SWAP__MASK				0xc0000000
3874 #define A5XX_TEX_CONST_0_SWAP__SHIFT				30
A5XX_TEX_CONST_0_SWAP(enum a3xx_color_swap val)3875 static inline uint32_t A5XX_TEX_CONST_0_SWAP(enum a3xx_color_swap val)
3876 {
3877 	return ((val) << A5XX_TEX_CONST_0_SWAP__SHIFT) & A5XX_TEX_CONST_0_SWAP__MASK;
3878 }
3879 
3880 #define REG_A5XX_TEX_CONST_1					0x00000001
3881 #define A5XX_TEX_CONST_1_WIDTH__MASK				0x00007fff
3882 #define A5XX_TEX_CONST_1_WIDTH__SHIFT				0
A5XX_TEX_CONST_1_WIDTH(uint32_t val)3883 static inline uint32_t A5XX_TEX_CONST_1_WIDTH(uint32_t val)
3884 {
3885 	return ((val) << A5XX_TEX_CONST_1_WIDTH__SHIFT) & A5XX_TEX_CONST_1_WIDTH__MASK;
3886 }
3887 #define A5XX_TEX_CONST_1_HEIGHT__MASK				0x3fff8000
3888 #define A5XX_TEX_CONST_1_HEIGHT__SHIFT				15
A5XX_TEX_CONST_1_HEIGHT(uint32_t val)3889 static inline uint32_t A5XX_TEX_CONST_1_HEIGHT(uint32_t val)
3890 {
3891 	return ((val) << A5XX_TEX_CONST_1_HEIGHT__SHIFT) & A5XX_TEX_CONST_1_HEIGHT__MASK;
3892 }
3893 
3894 #define REG_A5XX_TEX_CONST_2					0x00000002
3895 #define A5XX_TEX_CONST_2_FETCHSIZE__MASK			0x0000000f
3896 #define A5XX_TEX_CONST_2_FETCHSIZE__SHIFT			0
A5XX_TEX_CONST_2_FETCHSIZE(enum a5xx_tex_fetchsize val)3897 static inline uint32_t A5XX_TEX_CONST_2_FETCHSIZE(enum a5xx_tex_fetchsize val)
3898 {
3899 	return ((val) << A5XX_TEX_CONST_2_FETCHSIZE__SHIFT) & A5XX_TEX_CONST_2_FETCHSIZE__MASK;
3900 }
3901 #define A5XX_TEX_CONST_2_PITCH__MASK				0x1fffff80
3902 #define A5XX_TEX_CONST_2_PITCH__SHIFT				7
A5XX_TEX_CONST_2_PITCH(uint32_t val)3903 static inline uint32_t A5XX_TEX_CONST_2_PITCH(uint32_t val)
3904 {
3905 	return ((val) << A5XX_TEX_CONST_2_PITCH__SHIFT) & A5XX_TEX_CONST_2_PITCH__MASK;
3906 }
3907 #define A5XX_TEX_CONST_2_TYPE__MASK				0x60000000
3908 #define A5XX_TEX_CONST_2_TYPE__SHIFT				29
A5XX_TEX_CONST_2_TYPE(enum a5xx_tex_type val)3909 static inline uint32_t A5XX_TEX_CONST_2_TYPE(enum a5xx_tex_type val)
3910 {
3911 	return ((val) << A5XX_TEX_CONST_2_TYPE__SHIFT) & A5XX_TEX_CONST_2_TYPE__MASK;
3912 }
3913 
3914 #define REG_A5XX_TEX_CONST_3					0x00000003
3915 #define A5XX_TEX_CONST_3_ARRAY_PITCH__MASK			0x00003fff
3916 #define A5XX_TEX_CONST_3_ARRAY_PITCH__SHIFT			0
A5XX_TEX_CONST_3_ARRAY_PITCH(uint32_t val)3917 static inline uint32_t A5XX_TEX_CONST_3_ARRAY_PITCH(uint32_t val)
3918 {
3919 	assert(!(val & 0xfff));
3920 	return ((val >> 12) << A5XX_TEX_CONST_3_ARRAY_PITCH__SHIFT) & A5XX_TEX_CONST_3_ARRAY_PITCH__MASK;
3921 }
3922 #define A5XX_TEX_CONST_3_FLAG					0x10000000
3923 
3924 #define REG_A5XX_TEX_CONST_4					0x00000004
3925 #define A5XX_TEX_CONST_4_BASE_LO__MASK				0xffffffe0
3926 #define A5XX_TEX_CONST_4_BASE_LO__SHIFT				5
A5XX_TEX_CONST_4_BASE_LO(uint32_t val)3927 static inline uint32_t A5XX_TEX_CONST_4_BASE_LO(uint32_t val)
3928 {
3929 	assert(!(val & 0x1f));
3930 	return ((val >> 5) << A5XX_TEX_CONST_4_BASE_LO__SHIFT) & A5XX_TEX_CONST_4_BASE_LO__MASK;
3931 }
3932 
3933 #define REG_A5XX_TEX_CONST_5					0x00000005
3934 #define A5XX_TEX_CONST_5_BASE_HI__MASK				0x0001ffff
3935 #define A5XX_TEX_CONST_5_BASE_HI__SHIFT				0
A5XX_TEX_CONST_5_BASE_HI(uint32_t val)3936 static inline uint32_t A5XX_TEX_CONST_5_BASE_HI(uint32_t val)
3937 {
3938 	return ((val) << A5XX_TEX_CONST_5_BASE_HI__SHIFT) & A5XX_TEX_CONST_5_BASE_HI__MASK;
3939 }
3940 #define A5XX_TEX_CONST_5_DEPTH__MASK				0x3ffe0000
3941 #define A5XX_TEX_CONST_5_DEPTH__SHIFT				17
A5XX_TEX_CONST_5_DEPTH(uint32_t val)3942 static inline uint32_t A5XX_TEX_CONST_5_DEPTH(uint32_t val)
3943 {
3944 	return ((val) << A5XX_TEX_CONST_5_DEPTH__SHIFT) & A5XX_TEX_CONST_5_DEPTH__MASK;
3945 }
3946 
3947 #define REG_A5XX_TEX_CONST_6					0x00000006
3948 
3949 #define REG_A5XX_TEX_CONST_7					0x00000007
3950 
3951 #define REG_A5XX_TEX_CONST_8					0x00000008
3952 
3953 #define REG_A5XX_TEX_CONST_9					0x00000009
3954 
3955 #define REG_A5XX_TEX_CONST_10					0x0000000a
3956 
3957 #define REG_A5XX_TEX_CONST_11					0x0000000b
3958 
3959 
3960 #endif /* A5XX_XML */
3961