xref: /haiku/headers/private/graphics/radeon_hd/r600_reg.h (revision 2613175e19f6fd2969bd35fce36ba89fc20f88d9)
1*2613175eSAlexander von Gluck IV /*
2*2613175eSAlexander von Gluck IV  * RadeonHD R6xx, R7xx Register documentation
3*2613175eSAlexander von Gluck IV  *
4*2613175eSAlexander von Gluck IV  * Copyright (C) 2008-2009  Advanced Micro Devices, Inc.
5*2613175eSAlexander von Gluck IV  * Copyright (C) 2008-2009  Matthias Hopf
6*2613175eSAlexander von Gluck IV  *
7*2613175eSAlexander von Gluck IV  * Permission is hereby granted, free of charge, to any person obtaining a
8*2613175eSAlexander von Gluck IV  * copy of this software and associated documentation files (the "Software"),
9*2613175eSAlexander von Gluck IV  * to deal in the Software without restriction, including without limitation
10*2613175eSAlexander von Gluck IV  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11*2613175eSAlexander von Gluck IV  * and/or sell copies of the Software, and to permit persons to whom the
12*2613175eSAlexander von Gluck IV  * Software is furnished to do so, subject to the following conditions:
13*2613175eSAlexander von Gluck IV  *
14*2613175eSAlexander von Gluck IV  * The above copyright notice and this permission notice shall be included
15*2613175eSAlexander von Gluck IV  * in all copies or substantial portions of the Software.
16*2613175eSAlexander von Gluck IV  *
17*2613175eSAlexander von Gluck IV  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18*2613175eSAlexander von Gluck IV  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19*2613175eSAlexander von Gluck IV  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20*2613175eSAlexander von Gluck IV  * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21*2613175eSAlexander von Gluck IV  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22*2613175eSAlexander von Gluck IV  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23*2613175eSAlexander von Gluck IV  */
24*2613175eSAlexander von Gluck IV 
25*2613175eSAlexander von Gluck IV #ifndef _R600_REG_H_
26*2613175eSAlexander von Gluck IV #define _R600_REG_H_
27*2613175eSAlexander von Gluck IV 
28*2613175eSAlexander von Gluck IV /*
29*2613175eSAlexander von Gluck IV  * Register definitions
30*2613175eSAlexander von Gluck IV  */
31*2613175eSAlexander von Gluck IV 
32*2613175eSAlexander von Gluck IV #include "r600_reg_auto_r6xx.h"
33*2613175eSAlexander von Gluck IV #include "r600_reg_r6xx.h"
34*2613175eSAlexander von Gluck IV #include "r600_reg_r7xx.h"
35*2613175eSAlexander von Gluck IV 
36*2613175eSAlexander von Gluck IV 
37*2613175eSAlexander von Gluck IV /* SET_*_REG offsets + ends */
38*2613175eSAlexander von Gluck IV enum {
39*2613175eSAlexander von Gluck IV     SET_CONFIG_REG_offset          = 0x00008000,
40*2613175eSAlexander von Gluck IV     SET_CONFIG_REG_end             = 0x0000ac00,
41*2613175eSAlexander von Gluck IV     SET_CONTEXT_REG_offset         = 0x00028000,
42*2613175eSAlexander von Gluck IV     SET_CONTEXT_REG_end            = 0x00029000,
43*2613175eSAlexander von Gluck IV     SET_ALU_CONST_offset           = 0x00030000,
44*2613175eSAlexander von Gluck IV     SET_ALU_CONST_end              = 0x00032000,
45*2613175eSAlexander von Gluck IV     SET_RESOURCE_offset            = 0x00038000,
46*2613175eSAlexander von Gluck IV     SET_RESOURCE_end               = 0x0003c000,
47*2613175eSAlexander von Gluck IV     SET_SAMPLER_offset             = 0x0003c000,
48*2613175eSAlexander von Gluck IV     SET_SAMPLER_end                = 0x0003cff0,
49*2613175eSAlexander von Gluck IV     SET_CTL_CONST_offset           = 0x0003cff0,
50*2613175eSAlexander von Gluck IV     SET_CTL_CONST_end              = 0x0003e200,
51*2613175eSAlexander von Gluck IV     SET_LOOP_CONST_offset          = 0x0003e200,
52*2613175eSAlexander von Gluck IV     SET_LOOP_CONST_end             = 0x0003e380,
53*2613175eSAlexander von Gluck IV     SET_BOOL_CONST_offset          = 0x0003e380,
54*2613175eSAlexander von Gluck IV     SET_BOOL_CONST_end             = 0x0003e38c
55*2613175eSAlexander von Gluck IV };
56*2613175eSAlexander von Gluck IV 
57*2613175eSAlexander von Gluck IV /* packet3 IT_SURFACE_BASE_UPDATE bits */
58*2613175eSAlexander von Gluck IV enum {
59*2613175eSAlexander von Gluck IV 	DEPTH_BASE    = (1 << 0),
60*2613175eSAlexander von Gluck IV 	COLOR0_BASE   = (1 << 1),
61*2613175eSAlexander von Gluck IV 	COLOR1_BASE   = (1 << 2),
62*2613175eSAlexander von Gluck IV 	COLOR2_BASE   = (1 << 3),
63*2613175eSAlexander von Gluck IV 	COLOR3_BASE   = (1 << 4),
64*2613175eSAlexander von Gluck IV 	COLOR4_BASE   = (1 << 5),
65*2613175eSAlexander von Gluck IV 	COLOR5_BASE   = (1 << 6),
66*2613175eSAlexander von Gluck IV 	COLOR6_BASE   = (1 << 7),
67*2613175eSAlexander von Gluck IV 	COLOR7_BASE   = (1 << 8),
68*2613175eSAlexander von Gluck IV 	STRMOUT_BASE0 = (1 << 9),
69*2613175eSAlexander von Gluck IV 	STRMOUT_BASE1 = (1 << 10),
70*2613175eSAlexander von Gluck IV 	STRMOUT_BASE2 = (1 << 11),
71*2613175eSAlexander von Gluck IV 	STRMOUT_BASE3 = (1 << 12),
72*2613175eSAlexander von Gluck IV 	COHER_BASE0   = (1 << 13),
73*2613175eSAlexander von Gluck IV 	COHER_BASE1   = (1 << 14)
74*2613175eSAlexander von Gluck IV };
75*2613175eSAlexander von Gluck IV 
76*2613175eSAlexander von Gluck IV /* packet3 IT_WAIT_REG_MEM operation encoding */
77*2613175eSAlexander von Gluck IV enum {
78*2613175eSAlexander von Gluck IV 	WAIT_ALWAYS = (0<<0),
79*2613175eSAlexander von Gluck IV 	WAIT_LT     = (1<<0),
80*2613175eSAlexander von Gluck IV 	WAIT_LE     = (2<<0),
81*2613175eSAlexander von Gluck IV 	WAIT_EQ     = (3<<0),
82*2613175eSAlexander von Gluck IV 	WAIT_NE     = (4<<0),
83*2613175eSAlexander von Gluck IV 	WAIT_GE     = (5<<0),
84*2613175eSAlexander von Gluck IV 	WAIT_GT     = (6<<0),
85*2613175eSAlexander von Gluck IV 
86*2613175eSAlexander von Gluck IV 	WAIT_REG    = (0<<4),
87*2613175eSAlexander von Gluck IV 	WAIT_MEM    = (1<<4)
88*2613175eSAlexander von Gluck IV };
89*2613175eSAlexander von Gluck IV 
90*2613175eSAlexander von Gluck IV /* Packet3 commands */
91*2613175eSAlexander von Gluck IV enum {
92*2613175eSAlexander von Gluck IV     IT_NOP                               = 0x10,
93*2613175eSAlexander von Gluck IV     IT_INDIRECT_BUFFER_END               = 0x17,
94*2613175eSAlexander von Gluck IV     IT_SET_PREDICATION                   = 0x20,
95*2613175eSAlexander von Gluck IV     IT_REG_RMW                           = 0x21,
96*2613175eSAlexander von Gluck IV     IT_COND_EXEC                         = 0x22,
97*2613175eSAlexander von Gluck IV     IT_PRED_EXEC                         = 0x23,
98*2613175eSAlexander von Gluck IV     IT_START_3D_CMDBUF                   = 0x24,
99*2613175eSAlexander von Gluck IV     IT_DRAW_INDEX_2                      = 0x27,
100*2613175eSAlexander von Gluck IV     IT_CONTEXT_CONTROL                   = 0x28,
101*2613175eSAlexander von Gluck IV     IT_DRAW_INDEX_IMMD_BE                = 0x29,
102*2613175eSAlexander von Gluck IV     IT_INDEX_TYPE                        = 0x2A,
103*2613175eSAlexander von Gluck IV     IT_DRAW_INDEX                        = 0x2B,
104*2613175eSAlexander von Gluck IV     IT_DRAW_INDEX_AUTO                   = 0x2D,
105*2613175eSAlexander von Gluck IV     IT_DRAW_INDEX_IMMD                   = 0x2E,
106*2613175eSAlexander von Gluck IV     IT_NUM_INSTANCES                     = 0x2F,
107*2613175eSAlexander von Gluck IV     IT_STRMOUT_BUFFER_UPDATE             = 0x34,
108*2613175eSAlexander von Gluck IV     IT_INDIRECT_BUFFER_MP                = 0x38,
109*2613175eSAlexander von Gluck IV     IT_MEM_SEMAPHORE                     = 0x39,
110*2613175eSAlexander von Gluck IV     IT_MPEG_INDEX                        = 0x3A,
111*2613175eSAlexander von Gluck IV     IT_WAIT_REG_MEM                      = 0x3C,
112*2613175eSAlexander von Gluck IV     IT_MEM_WRITE                         = 0x3D,
113*2613175eSAlexander von Gluck IV     IT_INDIRECT_BUFFER                   = 0x32,
114*2613175eSAlexander von Gluck IV     IT_CP_INTERRUPT                      = 0x40,
115*2613175eSAlexander von Gluck IV     IT_SURFACE_SYNC                      = 0x43,
116*2613175eSAlexander von Gluck IV     IT_ME_INITIALIZE                     = 0x44,
117*2613175eSAlexander von Gluck IV     IT_COND_WRITE                        = 0x45,
118*2613175eSAlexander von Gluck IV     IT_EVENT_WRITE                       = 0x46,
119*2613175eSAlexander von Gluck IV     IT_EVENT_WRITE_EOP                   = 0x47,
120*2613175eSAlexander von Gluck IV     IT_ONE_REG_WRITE                     = 0x57,
121*2613175eSAlexander von Gluck IV     IT_SET_CONFIG_REG                    = 0x68,
122*2613175eSAlexander von Gluck IV     IT_SET_CONTEXT_REG                   = 0x69,
123*2613175eSAlexander von Gluck IV     IT_SET_ALU_CONST                     = 0x6A,
124*2613175eSAlexander von Gluck IV     IT_SET_BOOL_CONST                    = 0x6B,
125*2613175eSAlexander von Gluck IV     IT_SET_LOOP_CONST                    = 0x6C,
126*2613175eSAlexander von Gluck IV     IT_SET_RESOURCE                      = 0x6D,
127*2613175eSAlexander von Gluck IV     IT_SET_SAMPLER                       = 0x6E,
128*2613175eSAlexander von Gluck IV     IT_SET_CTL_CONST                     = 0x6F,
129*2613175eSAlexander von Gluck IV     IT_SURFACE_BASE_UPDATE               = 0x73
130*2613175eSAlexander von Gluck IV };
131*2613175eSAlexander von Gluck IV 
132*2613175eSAlexander von Gluck IV #endif
133