1 #ifndef ADRENO_COMMON_XML
2 #define ADRENO_COMMON_XML
4 /* Autogenerated file, DO NOT EDIT manually!
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
10 The rules-ng-ng source files this header was generated from are:
11 - /home/robclark/src/freedreno/envytools/rnndb/adreno.xml ( 398 bytes, from 2015-09-24 17:25:31)
12 - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml ( 1453 bytes, from 2015-05-20 20:03:07)
13 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2015-05-20 20:03:14)
14 - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10755 bytes, from 2015-09-14 20:46:55)
15 - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
16 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67771 bytes, from 2015-09-14 20:46:55)
17 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63970 bytes, from 2015-09-14 20:50:12)
18 - /home/robclark/src/freedreno/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2015-09-24 17:30:00)
20 Copyright (C) 2013-2015 by the following authors:
21 - Rob Clark <robdclark@gmail.com> (robclark)
23 Permission is hereby granted, free of charge, to any person obtaining
24 a copy of this software and associated documentation files (the
25 "Software"), to deal in the Software without restriction, including
26 without limitation the rights to use, copy, modify, merge, publish,
27 distribute, sublicense, and/or sell copies of the Software, and to
28 permit persons to whom the Software is furnished to do so, subject to
29 the following conditions:
31 The above copyright notice and this permission notice (including the
32 next paragraph) shall be included in all copies or substantial
33 portions of the Software.
35 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
37 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
38 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
39 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
40 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
41 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45 enum adreno_pa_su_sc_draw
{
48 PC_DRAW_TRIANGLES
= 2,
51 enum adreno_compare_func
{
62 enum adreno_stencil_op
{
66 STENCIL_INCR_CLAMP
= 3,
67 STENCIL_DECR_CLAMP
= 4,
69 STENCIL_INCR_WRAP
= 6,
70 STENCIL_DECR_WRAP
= 7,
73 enum adreno_rb_blend_factor
{
77 FACTOR_ONE_MINUS_SRC_COLOR
= 5,
79 FACTOR_ONE_MINUS_SRC_ALPHA
= 7,
81 FACTOR_ONE_MINUS_DST_COLOR
= 9,
82 FACTOR_DST_ALPHA
= 10,
83 FACTOR_ONE_MINUS_DST_ALPHA
= 11,
84 FACTOR_CONSTANT_COLOR
= 12,
85 FACTOR_ONE_MINUS_CONSTANT_COLOR
= 13,
86 FACTOR_CONSTANT_ALPHA
= 14,
87 FACTOR_ONE_MINUS_CONSTANT_ALPHA
= 15,
88 FACTOR_SRC_ALPHA_SATURATE
= 16,
89 FACTOR_SRC1_COLOR
= 20,
90 FACTOR_ONE_MINUS_SRC1_COLOR
= 21,
91 FACTOR_SRC1_ALPHA
= 22,
92 FACTOR_ONE_MINUS_SRC1_ALPHA
= 23,
95 enum adreno_rb_surface_endian
{
104 enum adreno_rb_dither_mode
{
107 DITHER_IF_ALPHA_OFF
= 2,
110 enum adreno_rb_depth_format
{
116 enum adreno_rb_copy_control_mode
{
119 RB_COPY_DEPTH_STENCIL
= 5,
122 enum a3xx_render_mode
{
123 RB_RENDERING_PASS
= 0,
129 enum a3xx_msaa_samples
{
135 enum a3xx_threadmode
{
140 enum a3xx_instrbuffermode
{
145 enum a3xx_threadsize
{
150 enum a3xx_color_swap
{
157 #define REG_AXXX_CP_RB_BASE 0x000001c0
159 #define REG_AXXX_CP_RB_CNTL 0x000001c1
160 #define AXXX_CP_RB_CNTL_BUFSZ__MASK 0x0000003f
161 #define AXXX_CP_RB_CNTL_BUFSZ__SHIFT 0
162 static inline uint32_t AXXX_CP_RB_CNTL_BUFSZ(uint32_t val
)
164 return ((val
) << AXXX_CP_RB_CNTL_BUFSZ__SHIFT
) & AXXX_CP_RB_CNTL_BUFSZ__MASK
;
166 #define AXXX_CP_RB_CNTL_BLKSZ__MASK 0x00003f00
167 #define AXXX_CP_RB_CNTL_BLKSZ__SHIFT 8
168 static inline uint32_t AXXX_CP_RB_CNTL_BLKSZ(uint32_t val
)
170 return ((val
) << AXXX_CP_RB_CNTL_BLKSZ__SHIFT
) & AXXX_CP_RB_CNTL_BLKSZ__MASK
;
172 #define AXXX_CP_RB_CNTL_BUF_SWAP__MASK 0x00030000
173 #define AXXX_CP_RB_CNTL_BUF_SWAP__SHIFT 16
174 static inline uint32_t AXXX_CP_RB_CNTL_BUF_SWAP(uint32_t val
)
176 return ((val
) << AXXX_CP_RB_CNTL_BUF_SWAP__SHIFT
) & AXXX_CP_RB_CNTL_BUF_SWAP__MASK
;
178 #define AXXX_CP_RB_CNTL_POLL_EN 0x00100000
179 #define AXXX_CP_RB_CNTL_NO_UPDATE 0x08000000
180 #define AXXX_CP_RB_CNTL_RPTR_WR_EN 0x80000000
182 #define REG_AXXX_CP_RB_RPTR_ADDR 0x000001c3
183 #define AXXX_CP_RB_RPTR_ADDR_SWAP__MASK 0x00000003
184 #define AXXX_CP_RB_RPTR_ADDR_SWAP__SHIFT 0
185 static inline uint32_t AXXX_CP_RB_RPTR_ADDR_SWAP(uint32_t val
)
187 return ((val
) << AXXX_CP_RB_RPTR_ADDR_SWAP__SHIFT
) & AXXX_CP_RB_RPTR_ADDR_SWAP__MASK
;
189 #define AXXX_CP_RB_RPTR_ADDR_ADDR__MASK 0xfffffffc
190 #define AXXX_CP_RB_RPTR_ADDR_ADDR__SHIFT 2
191 static inline uint32_t AXXX_CP_RB_RPTR_ADDR_ADDR(uint32_t val
)
193 return ((val
>> 2) << AXXX_CP_RB_RPTR_ADDR_ADDR__SHIFT
) & AXXX_CP_RB_RPTR_ADDR_ADDR__MASK
;
196 #define REG_AXXX_CP_RB_RPTR 0x000001c4
198 #define REG_AXXX_CP_RB_WPTR 0x000001c5
200 #define REG_AXXX_CP_RB_WPTR_DELAY 0x000001c6
202 #define REG_AXXX_CP_RB_RPTR_WR 0x000001c7
204 #define REG_AXXX_CP_RB_WPTR_BASE 0x000001c8
206 #define REG_AXXX_CP_QUEUE_THRESHOLDS 0x000001d5
207 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__MASK 0x0000000f
208 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__SHIFT 0
209 static inline uint32_t AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START(uint32_t val
)
211 return ((val
) << AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__SHIFT
) & AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__MASK
;
213 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__MASK 0x00000f00
214 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__SHIFT 8
215 static inline uint32_t AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START(uint32_t val
)
217 return ((val
) << AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__SHIFT
) & AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__MASK
;
219 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__MASK 0x000f0000
220 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__SHIFT 16
221 static inline uint32_t AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START(uint32_t val
)
223 return ((val
) << AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__SHIFT
) & AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__MASK
;
226 #define REG_AXXX_CP_MEQ_THRESHOLDS 0x000001d6
227 #define AXXX_CP_MEQ_THRESHOLDS_MEQ_END__MASK 0x001f0000
228 #define AXXX_CP_MEQ_THRESHOLDS_MEQ_END__SHIFT 16
229 static inline uint32_t AXXX_CP_MEQ_THRESHOLDS_MEQ_END(uint32_t val
)
231 return ((val
) << AXXX_CP_MEQ_THRESHOLDS_MEQ_END__SHIFT
) & AXXX_CP_MEQ_THRESHOLDS_MEQ_END__MASK
;
233 #define AXXX_CP_MEQ_THRESHOLDS_ROQ_END__MASK 0x1f000000
234 #define AXXX_CP_MEQ_THRESHOLDS_ROQ_END__SHIFT 24
235 static inline uint32_t AXXX_CP_MEQ_THRESHOLDS_ROQ_END(uint32_t val
)
237 return ((val
) << AXXX_CP_MEQ_THRESHOLDS_ROQ_END__SHIFT
) & AXXX_CP_MEQ_THRESHOLDS_ROQ_END__MASK
;
240 #define REG_AXXX_CP_CSQ_AVAIL 0x000001d7
241 #define AXXX_CP_CSQ_AVAIL_RING__MASK 0x0000007f
242 #define AXXX_CP_CSQ_AVAIL_RING__SHIFT 0
243 static inline uint32_t AXXX_CP_CSQ_AVAIL_RING(uint32_t val
)
245 return ((val
) << AXXX_CP_CSQ_AVAIL_RING__SHIFT
) & AXXX_CP_CSQ_AVAIL_RING__MASK
;
247 #define AXXX_CP_CSQ_AVAIL_IB1__MASK 0x00007f00
248 #define AXXX_CP_CSQ_AVAIL_IB1__SHIFT 8
249 static inline uint32_t AXXX_CP_CSQ_AVAIL_IB1(uint32_t val
)
251 return ((val
) << AXXX_CP_CSQ_AVAIL_IB1__SHIFT
) & AXXX_CP_CSQ_AVAIL_IB1__MASK
;
253 #define AXXX_CP_CSQ_AVAIL_IB2__MASK 0x007f0000
254 #define AXXX_CP_CSQ_AVAIL_IB2__SHIFT 16
255 static inline uint32_t AXXX_CP_CSQ_AVAIL_IB2(uint32_t val
)
257 return ((val
) << AXXX_CP_CSQ_AVAIL_IB2__SHIFT
) & AXXX_CP_CSQ_AVAIL_IB2__MASK
;
260 #define REG_AXXX_CP_STQ_AVAIL 0x000001d8
261 #define AXXX_CP_STQ_AVAIL_ST__MASK 0x0000007f
262 #define AXXX_CP_STQ_AVAIL_ST__SHIFT 0
263 static inline uint32_t AXXX_CP_STQ_AVAIL_ST(uint32_t val
)
265 return ((val
) << AXXX_CP_STQ_AVAIL_ST__SHIFT
) & AXXX_CP_STQ_AVAIL_ST__MASK
;
268 #define REG_AXXX_CP_MEQ_AVAIL 0x000001d9
269 #define AXXX_CP_MEQ_AVAIL_MEQ__MASK 0x0000001f
270 #define AXXX_CP_MEQ_AVAIL_MEQ__SHIFT 0
271 static inline uint32_t AXXX_CP_MEQ_AVAIL_MEQ(uint32_t val
)
273 return ((val
) << AXXX_CP_MEQ_AVAIL_MEQ__SHIFT
) & AXXX_CP_MEQ_AVAIL_MEQ__MASK
;
276 #define REG_AXXX_SCRATCH_UMSK 0x000001dc
277 #define AXXX_SCRATCH_UMSK_UMSK__MASK 0x000000ff
278 #define AXXX_SCRATCH_UMSK_UMSK__SHIFT 0
279 static inline uint32_t AXXX_SCRATCH_UMSK_UMSK(uint32_t val
)
281 return ((val
) << AXXX_SCRATCH_UMSK_UMSK__SHIFT
) & AXXX_SCRATCH_UMSK_UMSK__MASK
;
283 #define AXXX_SCRATCH_UMSK_SWAP__MASK 0x00030000
284 #define AXXX_SCRATCH_UMSK_SWAP__SHIFT 16
285 static inline uint32_t AXXX_SCRATCH_UMSK_SWAP(uint32_t val
)
287 return ((val
) << AXXX_SCRATCH_UMSK_SWAP__SHIFT
) & AXXX_SCRATCH_UMSK_SWAP__MASK
;
290 #define REG_AXXX_SCRATCH_ADDR 0x000001dd
292 #define REG_AXXX_CP_ME_RDADDR 0x000001ea
294 #define REG_AXXX_CP_STATE_DEBUG_INDEX 0x000001ec
296 #define REG_AXXX_CP_STATE_DEBUG_DATA 0x000001ed
298 #define REG_AXXX_CP_INT_CNTL 0x000001f2
300 #define REG_AXXX_CP_INT_STATUS 0x000001f3
302 #define REG_AXXX_CP_INT_ACK 0x000001f4
304 #define REG_AXXX_CP_ME_CNTL 0x000001f6
305 #define AXXX_CP_ME_CNTL_BUSY 0x20000000
306 #define AXXX_CP_ME_CNTL_HALT 0x10000000
308 #define REG_AXXX_CP_ME_STATUS 0x000001f7
310 #define REG_AXXX_CP_ME_RAM_WADDR 0x000001f8
312 #define REG_AXXX_CP_ME_RAM_RADDR 0x000001f9
314 #define REG_AXXX_CP_ME_RAM_DATA 0x000001fa
316 #define REG_AXXX_CP_DEBUG 0x000001fc
317 #define AXXX_CP_DEBUG_PREDICATE_DISABLE 0x00800000
318 #define AXXX_CP_DEBUG_PROG_END_PTR_ENABLE 0x01000000
319 #define AXXX_CP_DEBUG_MIU_128BIT_WRITE_ENABLE 0x02000000
320 #define AXXX_CP_DEBUG_PREFETCH_PASS_NOPS 0x04000000
321 #define AXXX_CP_DEBUG_DYNAMIC_CLK_DISABLE 0x08000000
322 #define AXXX_CP_DEBUG_PREFETCH_MATCH_DISABLE 0x10000000
323 #define AXXX_CP_DEBUG_SIMPLE_ME_FLOW_CONTROL 0x40000000
324 #define AXXX_CP_DEBUG_MIU_WRITE_PACK_DISABLE 0x80000000
326 #define REG_AXXX_CP_CSQ_RB_STAT 0x000001fd
327 #define AXXX_CP_CSQ_RB_STAT_RPTR__MASK 0x0000007f
328 #define AXXX_CP_CSQ_RB_STAT_RPTR__SHIFT 0
329 static inline uint32_t AXXX_CP_CSQ_RB_STAT_RPTR(uint32_t val
)
331 return ((val
) << AXXX_CP_CSQ_RB_STAT_RPTR__SHIFT
) & AXXX_CP_CSQ_RB_STAT_RPTR__MASK
;
333 #define AXXX_CP_CSQ_RB_STAT_WPTR__MASK 0x007f0000
334 #define AXXX_CP_CSQ_RB_STAT_WPTR__SHIFT 16
335 static inline uint32_t AXXX_CP_CSQ_RB_STAT_WPTR(uint32_t val
)
337 return ((val
) << AXXX_CP_CSQ_RB_STAT_WPTR__SHIFT
) & AXXX_CP_CSQ_RB_STAT_WPTR__MASK
;
340 #define REG_AXXX_CP_CSQ_IB1_STAT 0x000001fe
341 #define AXXX_CP_CSQ_IB1_STAT_RPTR__MASK 0x0000007f
342 #define AXXX_CP_CSQ_IB1_STAT_RPTR__SHIFT 0
343 static inline uint32_t AXXX_CP_CSQ_IB1_STAT_RPTR(uint32_t val
)
345 return ((val
) << AXXX_CP_CSQ_IB1_STAT_RPTR__SHIFT
) & AXXX_CP_CSQ_IB1_STAT_RPTR__MASK
;
347 #define AXXX_CP_CSQ_IB1_STAT_WPTR__MASK 0x007f0000
348 #define AXXX_CP_CSQ_IB1_STAT_WPTR__SHIFT 16
349 static inline uint32_t AXXX_CP_CSQ_IB1_STAT_WPTR(uint32_t val
)
351 return ((val
) << AXXX_CP_CSQ_IB1_STAT_WPTR__SHIFT
) & AXXX_CP_CSQ_IB1_STAT_WPTR__MASK
;
354 #define REG_AXXX_CP_CSQ_IB2_STAT 0x000001ff
355 #define AXXX_CP_CSQ_IB2_STAT_RPTR__MASK 0x0000007f
356 #define AXXX_CP_CSQ_IB2_STAT_RPTR__SHIFT 0
357 static inline uint32_t AXXX_CP_CSQ_IB2_STAT_RPTR(uint32_t val
)
359 return ((val
) << AXXX_CP_CSQ_IB2_STAT_RPTR__SHIFT
) & AXXX_CP_CSQ_IB2_STAT_RPTR__MASK
;
361 #define AXXX_CP_CSQ_IB2_STAT_WPTR__MASK 0x007f0000
362 #define AXXX_CP_CSQ_IB2_STAT_WPTR__SHIFT 16
363 static inline uint32_t AXXX_CP_CSQ_IB2_STAT_WPTR(uint32_t val
)
365 return ((val
) << AXXX_CP_CSQ_IB2_STAT_WPTR__SHIFT
) & AXXX_CP_CSQ_IB2_STAT_WPTR__MASK
;
368 #define REG_AXXX_CP_NON_PREFETCH_CNTRS 0x00000440
370 #define REG_AXXX_CP_STQ_ST_STAT 0x00000443
372 #define REG_AXXX_CP_ST_BASE 0x0000044d
374 #define REG_AXXX_CP_ST_BUFSZ 0x0000044e
376 #define REG_AXXX_CP_MEQ_STAT 0x0000044f
378 #define REG_AXXX_CP_MIU_TAG_STAT 0x00000452
380 #define REG_AXXX_CP_BIN_MASK_LO 0x00000454
382 #define REG_AXXX_CP_BIN_MASK_HI 0x00000455
384 #define REG_AXXX_CP_BIN_SELECT_LO 0x00000456
386 #define REG_AXXX_CP_BIN_SELECT_HI 0x00000457
388 #define REG_AXXX_CP_IB1_BASE 0x00000458
390 #define REG_AXXX_CP_IB1_BUFSZ 0x00000459
392 #define REG_AXXX_CP_IB2_BASE 0x0000045a
394 #define REG_AXXX_CP_IB2_BUFSZ 0x0000045b
396 #define REG_AXXX_CP_STAT 0x0000047f
398 #define REG_AXXX_CP_SCRATCH_REG0 0x00000578
400 #define REG_AXXX_CP_SCRATCH_REG1 0x00000579
402 #define REG_AXXX_CP_SCRATCH_REG2 0x0000057a
404 #define REG_AXXX_CP_SCRATCH_REG3 0x0000057b
406 #define REG_AXXX_CP_SCRATCH_REG4 0x0000057c
408 #define REG_AXXX_CP_SCRATCH_REG5 0x0000057d
410 #define REG_AXXX_CP_SCRATCH_REG6 0x0000057e
412 #define REG_AXXX_CP_SCRATCH_REG7 0x0000057f
414 #define REG_AXXX_CP_ME_VS_EVENT_SRC 0x00000600
416 #define REG_AXXX_CP_ME_VS_EVENT_ADDR 0x00000601
418 #define REG_AXXX_CP_ME_VS_EVENT_DATA 0x00000602
420 #define REG_AXXX_CP_ME_VS_EVENT_ADDR_SWM 0x00000603
422 #define REG_AXXX_CP_ME_VS_EVENT_DATA_SWM 0x00000604
424 #define REG_AXXX_CP_ME_PS_EVENT_SRC 0x00000605
426 #define REG_AXXX_CP_ME_PS_EVENT_ADDR 0x00000606
428 #define REG_AXXX_CP_ME_PS_EVENT_DATA 0x00000607
430 #define REG_AXXX_CP_ME_PS_EVENT_ADDR_SWM 0x00000608
432 #define REG_AXXX_CP_ME_PS_EVENT_DATA_SWM 0x00000609
434 #define REG_AXXX_CP_ME_CF_EVENT_SRC 0x0000060a
436 #define REG_AXXX_CP_ME_CF_EVENT_ADDR 0x0000060b
438 #define REG_AXXX_CP_ME_CF_EVENT_DATA 0x0000060c
440 #define REG_AXXX_CP_ME_NRT_ADDR 0x0000060d
442 #define REG_AXXX_CP_ME_NRT_DATA 0x0000060e
444 #define REG_AXXX_CP_ME_VS_FETCH_DONE_SRC 0x00000612
446 #define REG_AXXX_CP_ME_VS_FETCH_DONE_ADDR 0x00000613
448 #define REG_AXXX_CP_ME_VS_FETCH_DONE_DATA 0x00000614
451 #endif /* ADRENO_COMMON_XML */