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 ( 1572 bytes, from 2016-02-10 17:07:21)
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 ( 11518 bytes, from 2016-02-10 21:03:25)
15 - /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 16166 bytes, from 2016-02-11 21:20:31)
16 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 83967 bytes, from 2016-02-10 17:07:21)
17 - /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 109916 bytes, from 2016-02-20 18:44:48)
18 - /home/robclark/src/freedreno/envytools/rnndb/adreno/ocmem.xml ( 1773 bytes, from 2015-09-24 17:30:00)
20 Copyright (C) 2013-2016 by the following authors:
21 - Rob Clark <robdclark@gmail.com> (robclark)
22 - Ilia Mirkin <imirkin@alum.mit.edu> (imirkin)
24 Permission is hereby granted, free of charge, to any person obtaining
25 a copy of this software and associated documentation files (the
26 "Software"), to deal in the Software without restriction, including
27 without limitation the rights to use, copy, modify, merge, publish,
28 distribute, sublicense, and/or sell copies of the Software, and to
29 permit persons to whom the Software is furnished to do so, subject to
30 the following conditions:
32 The above copyright notice and this permission notice (including the
33 next paragraph) shall be included in all copies or substantial
34 portions of the Software.
36 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
39 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
40 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
41 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
42 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 enum adreno_pa_su_sc_draw {
49 PC_DRAW_TRIANGLES = 2,
52 enum adreno_compare_func {
63 enum adreno_stencil_op {
67 STENCIL_INCR_CLAMP = 3,
68 STENCIL_DECR_CLAMP = 4,
70 STENCIL_INCR_WRAP = 6,
71 STENCIL_DECR_WRAP = 7,
74 enum adreno_rb_blend_factor {
78 FACTOR_ONE_MINUS_SRC_COLOR = 5,
80 FACTOR_ONE_MINUS_SRC_ALPHA = 7,
82 FACTOR_ONE_MINUS_DST_COLOR = 9,
83 FACTOR_DST_ALPHA = 10,
84 FACTOR_ONE_MINUS_DST_ALPHA = 11,
85 FACTOR_CONSTANT_COLOR = 12,
86 FACTOR_ONE_MINUS_CONSTANT_COLOR = 13,
87 FACTOR_CONSTANT_ALPHA = 14,
88 FACTOR_ONE_MINUS_CONSTANT_ALPHA = 15,
89 FACTOR_SRC_ALPHA_SATURATE = 16,
90 FACTOR_SRC1_COLOR = 20,
91 FACTOR_ONE_MINUS_SRC1_COLOR = 21,
92 FACTOR_SRC1_ALPHA = 22,
93 FACTOR_ONE_MINUS_SRC1_ALPHA = 23,
96 enum adreno_rb_surface_endian {
105 enum adreno_rb_dither_mode {
108 DITHER_IF_ALPHA_OFF = 2,
111 enum adreno_rb_depth_format {
117 enum adreno_rb_copy_control_mode {
120 RB_COPY_DEPTH_STENCIL = 5,
126 ROP_AND_INVERTED = 2,
127 ROP_COPY_INVERTED = 3,
134 ROP_OR_INVERTED = 11,
140 enum a3xx_render_mode {
141 RB_RENDERING_PASS = 0,
147 enum a3xx_msaa_samples {
153 enum a3xx_threadmode {
158 enum a3xx_instrbuffermode {
163 enum a3xx_threadsize {
168 enum a3xx_color_swap {
175 #define REG_AXXX_CP_RB_BASE 0x000001c0
177 #define REG_AXXX_CP_RB_CNTL 0x000001c1
178 #define AXXX_CP_RB_CNTL_BUFSZ__MASK 0x0000003f
179 #define AXXX_CP_RB_CNTL_BUFSZ__SHIFT 0
180 static inline uint32_t AXXX_CP_RB_CNTL_BUFSZ(uint32_t val)
182 return ((val) << AXXX_CP_RB_CNTL_BUFSZ__SHIFT) & AXXX_CP_RB_CNTL_BUFSZ__MASK;
184 #define AXXX_CP_RB_CNTL_BLKSZ__MASK 0x00003f00
185 #define AXXX_CP_RB_CNTL_BLKSZ__SHIFT 8
186 static inline uint32_t AXXX_CP_RB_CNTL_BLKSZ(uint32_t val)
188 return ((val) << AXXX_CP_RB_CNTL_BLKSZ__SHIFT) & AXXX_CP_RB_CNTL_BLKSZ__MASK;
190 #define AXXX_CP_RB_CNTL_BUF_SWAP__MASK 0x00030000
191 #define AXXX_CP_RB_CNTL_BUF_SWAP__SHIFT 16
192 static inline uint32_t AXXX_CP_RB_CNTL_BUF_SWAP(uint32_t val)
194 return ((val) << AXXX_CP_RB_CNTL_BUF_SWAP__SHIFT) & AXXX_CP_RB_CNTL_BUF_SWAP__MASK;
196 #define AXXX_CP_RB_CNTL_POLL_EN 0x00100000
197 #define AXXX_CP_RB_CNTL_NO_UPDATE 0x08000000
198 #define AXXX_CP_RB_CNTL_RPTR_WR_EN 0x80000000
200 #define REG_AXXX_CP_RB_RPTR_ADDR 0x000001c3
201 #define AXXX_CP_RB_RPTR_ADDR_SWAP__MASK 0x00000003
202 #define AXXX_CP_RB_RPTR_ADDR_SWAP__SHIFT 0
203 static inline uint32_t AXXX_CP_RB_RPTR_ADDR_SWAP(uint32_t val)
205 return ((val) << AXXX_CP_RB_RPTR_ADDR_SWAP__SHIFT) & AXXX_CP_RB_RPTR_ADDR_SWAP__MASK;
207 #define AXXX_CP_RB_RPTR_ADDR_ADDR__MASK 0xfffffffc
208 #define AXXX_CP_RB_RPTR_ADDR_ADDR__SHIFT 2
209 static inline uint32_t AXXX_CP_RB_RPTR_ADDR_ADDR(uint32_t val)
211 return ((val >> 2) << AXXX_CP_RB_RPTR_ADDR_ADDR__SHIFT) & AXXX_CP_RB_RPTR_ADDR_ADDR__MASK;
214 #define REG_AXXX_CP_RB_RPTR 0x000001c4
216 #define REG_AXXX_CP_RB_WPTR 0x000001c5
218 #define REG_AXXX_CP_RB_WPTR_DELAY 0x000001c6
220 #define REG_AXXX_CP_RB_RPTR_WR 0x000001c7
222 #define REG_AXXX_CP_RB_WPTR_BASE 0x000001c8
224 #define REG_AXXX_CP_QUEUE_THRESHOLDS 0x000001d5
225 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__MASK 0x0000000f
226 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__SHIFT 0
227 static inline uint32_t AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START(uint32_t val)
229 return ((val) << AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__SHIFT) & AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB1_START__MASK;
231 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__MASK 0x00000f00
232 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__SHIFT 8
233 static inline uint32_t AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START(uint32_t val)
235 return ((val) << AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__SHIFT) & AXXX_CP_QUEUE_THRESHOLDS_CSQ_IB2_START__MASK;
237 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__MASK 0x000f0000
238 #define AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__SHIFT 16
239 static inline uint32_t AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START(uint32_t val)
241 return ((val) << AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__SHIFT) & AXXX_CP_QUEUE_THRESHOLDS_CSQ_ST_START__MASK;
244 #define REG_AXXX_CP_MEQ_THRESHOLDS 0x000001d6
245 #define AXXX_CP_MEQ_THRESHOLDS_MEQ_END__MASK 0x001f0000
246 #define AXXX_CP_MEQ_THRESHOLDS_MEQ_END__SHIFT 16
247 static inline uint32_t AXXX_CP_MEQ_THRESHOLDS_MEQ_END(uint32_t val)
249 return ((val) << AXXX_CP_MEQ_THRESHOLDS_MEQ_END__SHIFT) & AXXX_CP_MEQ_THRESHOLDS_MEQ_END__MASK;
251 #define AXXX_CP_MEQ_THRESHOLDS_ROQ_END__MASK 0x1f000000
252 #define AXXX_CP_MEQ_THRESHOLDS_ROQ_END__SHIFT 24
253 static inline uint32_t AXXX_CP_MEQ_THRESHOLDS_ROQ_END(uint32_t val)
255 return ((val) << AXXX_CP_MEQ_THRESHOLDS_ROQ_END__SHIFT) & AXXX_CP_MEQ_THRESHOLDS_ROQ_END__MASK;
258 #define REG_AXXX_CP_CSQ_AVAIL 0x000001d7
259 #define AXXX_CP_CSQ_AVAIL_RING__MASK 0x0000007f
260 #define AXXX_CP_CSQ_AVAIL_RING__SHIFT 0
261 static inline uint32_t AXXX_CP_CSQ_AVAIL_RING(uint32_t val)
263 return ((val) << AXXX_CP_CSQ_AVAIL_RING__SHIFT) & AXXX_CP_CSQ_AVAIL_RING__MASK;
265 #define AXXX_CP_CSQ_AVAIL_IB1__MASK 0x00007f00
266 #define AXXX_CP_CSQ_AVAIL_IB1__SHIFT 8
267 static inline uint32_t AXXX_CP_CSQ_AVAIL_IB1(uint32_t val)
269 return ((val) << AXXX_CP_CSQ_AVAIL_IB1__SHIFT) & AXXX_CP_CSQ_AVAIL_IB1__MASK;
271 #define AXXX_CP_CSQ_AVAIL_IB2__MASK 0x007f0000
272 #define AXXX_CP_CSQ_AVAIL_IB2__SHIFT 16
273 static inline uint32_t AXXX_CP_CSQ_AVAIL_IB2(uint32_t val)
275 return ((val) << AXXX_CP_CSQ_AVAIL_IB2__SHIFT) & AXXX_CP_CSQ_AVAIL_IB2__MASK;
278 #define REG_AXXX_CP_STQ_AVAIL 0x000001d8
279 #define AXXX_CP_STQ_AVAIL_ST__MASK 0x0000007f
280 #define AXXX_CP_STQ_AVAIL_ST__SHIFT 0
281 static inline uint32_t AXXX_CP_STQ_AVAIL_ST(uint32_t val)
283 return ((val) << AXXX_CP_STQ_AVAIL_ST__SHIFT) & AXXX_CP_STQ_AVAIL_ST__MASK;
286 #define REG_AXXX_CP_MEQ_AVAIL 0x000001d9
287 #define AXXX_CP_MEQ_AVAIL_MEQ__MASK 0x0000001f
288 #define AXXX_CP_MEQ_AVAIL_MEQ__SHIFT 0
289 static inline uint32_t AXXX_CP_MEQ_AVAIL_MEQ(uint32_t val)
291 return ((val) << AXXX_CP_MEQ_AVAIL_MEQ__SHIFT) & AXXX_CP_MEQ_AVAIL_MEQ__MASK;
294 #define REG_AXXX_SCRATCH_UMSK 0x000001dc
295 #define AXXX_SCRATCH_UMSK_UMSK__MASK 0x000000ff
296 #define AXXX_SCRATCH_UMSK_UMSK__SHIFT 0
297 static inline uint32_t AXXX_SCRATCH_UMSK_UMSK(uint32_t val)
299 return ((val) << AXXX_SCRATCH_UMSK_UMSK__SHIFT) & AXXX_SCRATCH_UMSK_UMSK__MASK;
301 #define AXXX_SCRATCH_UMSK_SWAP__MASK 0x00030000
302 #define AXXX_SCRATCH_UMSK_SWAP__SHIFT 16
303 static inline uint32_t AXXX_SCRATCH_UMSK_SWAP(uint32_t val)
305 return ((val) << AXXX_SCRATCH_UMSK_SWAP__SHIFT) & AXXX_SCRATCH_UMSK_SWAP__MASK;
308 #define REG_AXXX_SCRATCH_ADDR 0x000001dd
310 #define REG_AXXX_CP_ME_RDADDR 0x000001ea
312 #define REG_AXXX_CP_STATE_DEBUG_INDEX 0x000001ec
314 #define REG_AXXX_CP_STATE_DEBUG_DATA 0x000001ed
316 #define REG_AXXX_CP_INT_CNTL 0x000001f2
318 #define REG_AXXX_CP_INT_STATUS 0x000001f3
320 #define REG_AXXX_CP_INT_ACK 0x000001f4
322 #define REG_AXXX_CP_ME_CNTL 0x000001f6
323 #define AXXX_CP_ME_CNTL_BUSY 0x20000000
324 #define AXXX_CP_ME_CNTL_HALT 0x10000000
326 #define REG_AXXX_CP_ME_STATUS 0x000001f7
328 #define REG_AXXX_CP_ME_RAM_WADDR 0x000001f8
330 #define REG_AXXX_CP_ME_RAM_RADDR 0x000001f9
332 #define REG_AXXX_CP_ME_RAM_DATA 0x000001fa
334 #define REG_AXXX_CP_DEBUG 0x000001fc
335 #define AXXX_CP_DEBUG_PREDICATE_DISABLE 0x00800000
336 #define AXXX_CP_DEBUG_PROG_END_PTR_ENABLE 0x01000000
337 #define AXXX_CP_DEBUG_MIU_128BIT_WRITE_ENABLE 0x02000000
338 #define AXXX_CP_DEBUG_PREFETCH_PASS_NOPS 0x04000000
339 #define AXXX_CP_DEBUG_DYNAMIC_CLK_DISABLE 0x08000000
340 #define AXXX_CP_DEBUG_PREFETCH_MATCH_DISABLE 0x10000000
341 #define AXXX_CP_DEBUG_SIMPLE_ME_FLOW_CONTROL 0x40000000
342 #define AXXX_CP_DEBUG_MIU_WRITE_PACK_DISABLE 0x80000000
344 #define REG_AXXX_CP_CSQ_RB_STAT 0x000001fd
345 #define AXXX_CP_CSQ_RB_STAT_RPTR__MASK 0x0000007f
346 #define AXXX_CP_CSQ_RB_STAT_RPTR__SHIFT 0
347 static inline uint32_t AXXX_CP_CSQ_RB_STAT_RPTR(uint32_t val)
349 return ((val) << AXXX_CP_CSQ_RB_STAT_RPTR__SHIFT) & AXXX_CP_CSQ_RB_STAT_RPTR__MASK;
351 #define AXXX_CP_CSQ_RB_STAT_WPTR__MASK 0x007f0000
352 #define AXXX_CP_CSQ_RB_STAT_WPTR__SHIFT 16
353 static inline uint32_t AXXX_CP_CSQ_RB_STAT_WPTR(uint32_t val)
355 return ((val) << AXXX_CP_CSQ_RB_STAT_WPTR__SHIFT) & AXXX_CP_CSQ_RB_STAT_WPTR__MASK;
358 #define REG_AXXX_CP_CSQ_IB1_STAT 0x000001fe
359 #define AXXX_CP_CSQ_IB1_STAT_RPTR__MASK 0x0000007f
360 #define AXXX_CP_CSQ_IB1_STAT_RPTR__SHIFT 0
361 static inline uint32_t AXXX_CP_CSQ_IB1_STAT_RPTR(uint32_t val)
363 return ((val) << AXXX_CP_CSQ_IB1_STAT_RPTR__SHIFT) & AXXX_CP_CSQ_IB1_STAT_RPTR__MASK;
365 #define AXXX_CP_CSQ_IB1_STAT_WPTR__MASK 0x007f0000
366 #define AXXX_CP_CSQ_IB1_STAT_WPTR__SHIFT 16
367 static inline uint32_t AXXX_CP_CSQ_IB1_STAT_WPTR(uint32_t val)
369 return ((val) << AXXX_CP_CSQ_IB1_STAT_WPTR__SHIFT) & AXXX_CP_CSQ_IB1_STAT_WPTR__MASK;
372 #define REG_AXXX_CP_CSQ_IB2_STAT 0x000001ff
373 #define AXXX_CP_CSQ_IB2_STAT_RPTR__MASK 0x0000007f
374 #define AXXX_CP_CSQ_IB2_STAT_RPTR__SHIFT 0
375 static inline uint32_t AXXX_CP_CSQ_IB2_STAT_RPTR(uint32_t val)
377 return ((val) << AXXX_CP_CSQ_IB2_STAT_RPTR__SHIFT) & AXXX_CP_CSQ_IB2_STAT_RPTR__MASK;
379 #define AXXX_CP_CSQ_IB2_STAT_WPTR__MASK 0x007f0000
380 #define AXXX_CP_CSQ_IB2_STAT_WPTR__SHIFT 16
381 static inline uint32_t AXXX_CP_CSQ_IB2_STAT_WPTR(uint32_t val)
383 return ((val) << AXXX_CP_CSQ_IB2_STAT_WPTR__SHIFT) & AXXX_CP_CSQ_IB2_STAT_WPTR__MASK;
386 #define REG_AXXX_CP_NON_PREFETCH_CNTRS 0x00000440
388 #define REG_AXXX_CP_STQ_ST_STAT 0x00000443
390 #define REG_AXXX_CP_ST_BASE 0x0000044d
392 #define REG_AXXX_CP_ST_BUFSZ 0x0000044e
394 #define REG_AXXX_CP_MEQ_STAT 0x0000044f
396 #define REG_AXXX_CP_MIU_TAG_STAT 0x00000452
398 #define REG_AXXX_CP_BIN_MASK_LO 0x00000454
400 #define REG_AXXX_CP_BIN_MASK_HI 0x00000455
402 #define REG_AXXX_CP_BIN_SELECT_LO 0x00000456
404 #define REG_AXXX_CP_BIN_SELECT_HI 0x00000457
406 #define REG_AXXX_CP_IB1_BASE 0x00000458
408 #define REG_AXXX_CP_IB1_BUFSZ 0x00000459
410 #define REG_AXXX_CP_IB2_BASE 0x0000045a
412 #define REG_AXXX_CP_IB2_BUFSZ 0x0000045b
414 #define REG_AXXX_CP_STAT 0x0000047f
416 #define REG_AXXX_CP_SCRATCH_REG0 0x00000578
418 #define REG_AXXX_CP_SCRATCH_REG1 0x00000579
420 #define REG_AXXX_CP_SCRATCH_REG2 0x0000057a
422 #define REG_AXXX_CP_SCRATCH_REG3 0x0000057b
424 #define REG_AXXX_CP_SCRATCH_REG4 0x0000057c
426 #define REG_AXXX_CP_SCRATCH_REG5 0x0000057d
428 #define REG_AXXX_CP_SCRATCH_REG6 0x0000057e
430 #define REG_AXXX_CP_SCRATCH_REG7 0x0000057f
432 #define REG_AXXX_CP_ME_VS_EVENT_SRC 0x00000600
434 #define REG_AXXX_CP_ME_VS_EVENT_ADDR 0x00000601
436 #define REG_AXXX_CP_ME_VS_EVENT_DATA 0x00000602
438 #define REG_AXXX_CP_ME_VS_EVENT_ADDR_SWM 0x00000603
440 #define REG_AXXX_CP_ME_VS_EVENT_DATA_SWM 0x00000604
442 #define REG_AXXX_CP_ME_PS_EVENT_SRC 0x00000605
444 #define REG_AXXX_CP_ME_PS_EVENT_ADDR 0x00000606
446 #define REG_AXXX_CP_ME_PS_EVENT_DATA 0x00000607
448 #define REG_AXXX_CP_ME_PS_EVENT_ADDR_SWM 0x00000608
450 #define REG_AXXX_CP_ME_PS_EVENT_DATA_SWM 0x00000609
452 #define REG_AXXX_CP_ME_CF_EVENT_SRC 0x0000060a
454 #define REG_AXXX_CP_ME_CF_EVENT_ADDR 0x0000060b
456 #define REG_AXXX_CP_ME_CF_EVENT_DATA 0x0000060c
458 #define REG_AXXX_CP_ME_NRT_ADDR 0x0000060d
460 #define REG_AXXX_CP_ME_NRT_DATA 0x0000060e
462 #define REG_AXXX_CP_ME_VS_FETCH_DONE_SRC 0x00000612
464 #define REG_AXXX_CP_ME_VS_FETCH_DONE_ADDR 0x00000613
466 #define REG_AXXX_CP_ME_VS_FETCH_DONE_DATA 0x00000614
469 #endif /* ADRENO_COMMON_XML */