Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2009 Advanced Micro Devices, Inc. |
| 3 | * Copyright 2009 Red Hat Inc. |
| 4 | * |
| 5 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 6 | * copy of this software and associated documentation files (the "Software"), |
| 7 | * to deal in the Software without restriction, including without limitation |
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 9 | * and/or sell copies of the Software, and to permit persons to whom the |
| 10 | * Software is furnished to do so, subject to the following conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be included in |
| 13 | * all copies or substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 19 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 21 | * OTHER DEALINGS IN THE SOFTWARE. |
| 22 | * |
| 23 | * Authors: Dave Airlie |
| 24 | * Alex Deucher |
| 25 | * Jerome Glisse |
| 26 | */ |
| 27 | #ifndef R600D_H |
| 28 | #define R600D_H |
| 29 | |
| 30 | #define CP_PACKET2 0x80000000 |
| 31 | #define PACKET2_PAD_SHIFT 0 |
| 32 | #define PACKET2_PAD_MASK (0x3fffffff << 0) |
| 33 | |
| 34 | #define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v))) |
| 35 | |
| 36 | #define R6XX_MAX_SH_GPRS 256 |
| 37 | #define R6XX_MAX_TEMP_GPRS 16 |
| 38 | #define R6XX_MAX_SH_THREADS 256 |
| 39 | #define R6XX_MAX_SH_STACK_ENTRIES 4096 |
| 40 | #define R6XX_MAX_BACKENDS 8 |
| 41 | #define R6XX_MAX_BACKENDS_MASK 0xff |
| 42 | #define R6XX_MAX_SIMDS 8 |
| 43 | #define R6XX_MAX_SIMDS_MASK 0xff |
| 44 | #define R6XX_MAX_PIPES 8 |
| 45 | #define R6XX_MAX_PIPES_MASK 0xff |
| 46 | |
| 47 | /* PTE flags */ |
| 48 | #define PTE_VALID (1 << 0) |
| 49 | #define PTE_SYSTEM (1 << 1) |
| 50 | #define PTE_SNOOPED (1 << 2) |
| 51 | #define PTE_READABLE (1 << 5) |
| 52 | #define PTE_WRITEABLE (1 << 6) |
| 53 | |
| 54 | /* Registers */ |
| 55 | #define ARB_POP 0x2418 |
| 56 | #define ENABLE_TC128 (1 << 30) |
| 57 | #define ARB_GDEC_RD_CNTL 0x246C |
| 58 | |
| 59 | #define CC_GC_SHADER_PIPE_CONFIG 0x8950 |
| 60 | #define CC_RB_BACKEND_DISABLE 0x98F4 |
| 61 | #define BACKEND_DISABLE(x) ((x) << 16) |
| 62 | |
| 63 | #define CB_COLOR0_BASE 0x28040 |
| 64 | #define CB_COLOR1_BASE 0x28044 |
| 65 | #define CB_COLOR2_BASE 0x28048 |
| 66 | #define CB_COLOR3_BASE 0x2804C |
| 67 | #define CB_COLOR4_BASE 0x28050 |
| 68 | #define CB_COLOR5_BASE 0x28054 |
| 69 | #define CB_COLOR6_BASE 0x28058 |
| 70 | #define CB_COLOR7_BASE 0x2805C |
| 71 | #define CB_COLOR7_FRAG 0x280FC |
| 72 | |
| 73 | #define CB_COLOR0_SIZE 0x28060 |
| 74 | #define CB_COLOR0_VIEW 0x28080 |
| 75 | #define CB_COLOR0_INFO 0x280a0 |
| 76 | #define CB_COLOR0_TILE 0x280c0 |
| 77 | #define CB_COLOR0_FRAG 0x280e0 |
| 78 | #define CB_COLOR0_MASK 0x28100 |
| 79 | |
Alex Deucher | 5f77df3 | 2010-03-26 14:52:32 -0400 | [diff] [blame] | 80 | #define SQ_ALU_CONST_CACHE_PS_0 0x28940 |
| 81 | #define SQ_ALU_CONST_CACHE_PS_1 0x28944 |
| 82 | #define SQ_ALU_CONST_CACHE_PS_2 0x28948 |
| 83 | #define SQ_ALU_CONST_CACHE_PS_3 0x2894c |
| 84 | #define SQ_ALU_CONST_CACHE_PS_4 0x28950 |
| 85 | #define SQ_ALU_CONST_CACHE_PS_5 0x28954 |
| 86 | #define SQ_ALU_CONST_CACHE_PS_6 0x28958 |
| 87 | #define SQ_ALU_CONST_CACHE_PS_7 0x2895c |
| 88 | #define SQ_ALU_CONST_CACHE_PS_8 0x28960 |
| 89 | #define SQ_ALU_CONST_CACHE_PS_9 0x28964 |
| 90 | #define SQ_ALU_CONST_CACHE_PS_10 0x28968 |
| 91 | #define SQ_ALU_CONST_CACHE_PS_11 0x2896c |
| 92 | #define SQ_ALU_CONST_CACHE_PS_12 0x28970 |
| 93 | #define SQ_ALU_CONST_CACHE_PS_13 0x28974 |
| 94 | #define SQ_ALU_CONST_CACHE_PS_14 0x28978 |
| 95 | #define SQ_ALU_CONST_CACHE_PS_15 0x2897c |
| 96 | #define SQ_ALU_CONST_CACHE_VS_0 0x28980 |
| 97 | #define SQ_ALU_CONST_CACHE_VS_1 0x28984 |
| 98 | #define SQ_ALU_CONST_CACHE_VS_2 0x28988 |
| 99 | #define SQ_ALU_CONST_CACHE_VS_3 0x2898c |
| 100 | #define SQ_ALU_CONST_CACHE_VS_4 0x28990 |
| 101 | #define SQ_ALU_CONST_CACHE_VS_5 0x28994 |
| 102 | #define SQ_ALU_CONST_CACHE_VS_6 0x28998 |
| 103 | #define SQ_ALU_CONST_CACHE_VS_7 0x2899c |
| 104 | #define SQ_ALU_CONST_CACHE_VS_8 0x289a0 |
| 105 | #define SQ_ALU_CONST_CACHE_VS_9 0x289a4 |
| 106 | #define SQ_ALU_CONST_CACHE_VS_10 0x289a8 |
| 107 | #define SQ_ALU_CONST_CACHE_VS_11 0x289ac |
| 108 | #define SQ_ALU_CONST_CACHE_VS_12 0x289b0 |
| 109 | #define SQ_ALU_CONST_CACHE_VS_13 0x289b4 |
| 110 | #define SQ_ALU_CONST_CACHE_VS_14 0x289b8 |
| 111 | #define SQ_ALU_CONST_CACHE_VS_15 0x289bc |
| 112 | #define SQ_ALU_CONST_CACHE_GS_0 0x289c0 |
| 113 | #define SQ_ALU_CONST_CACHE_GS_1 0x289c4 |
| 114 | #define SQ_ALU_CONST_CACHE_GS_2 0x289c8 |
| 115 | #define SQ_ALU_CONST_CACHE_GS_3 0x289cc |
| 116 | #define SQ_ALU_CONST_CACHE_GS_4 0x289d0 |
| 117 | #define SQ_ALU_CONST_CACHE_GS_5 0x289d4 |
| 118 | #define SQ_ALU_CONST_CACHE_GS_6 0x289d8 |
| 119 | #define SQ_ALU_CONST_CACHE_GS_7 0x289dc |
| 120 | #define SQ_ALU_CONST_CACHE_GS_8 0x289e0 |
| 121 | #define SQ_ALU_CONST_CACHE_GS_9 0x289e4 |
| 122 | #define SQ_ALU_CONST_CACHE_GS_10 0x289e8 |
| 123 | #define SQ_ALU_CONST_CACHE_GS_11 0x289ec |
| 124 | #define SQ_ALU_CONST_CACHE_GS_12 0x289f0 |
| 125 | #define SQ_ALU_CONST_CACHE_GS_13 0x289f4 |
| 126 | #define SQ_ALU_CONST_CACHE_GS_14 0x289f8 |
| 127 | #define SQ_ALU_CONST_CACHE_GS_15 0x289fc |
| 128 | |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 129 | #define CONFIG_MEMSIZE 0x5428 |
Dave Airlie | 28d5204 | 2009-09-21 14:33:58 +1000 | [diff] [blame] | 130 | #define CONFIG_CNTL 0x5424 |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 131 | #define CP_STAT 0x8680 |
| 132 | #define CP_COHER_BASE 0x85F8 |
| 133 | #define CP_DEBUG 0xC1FC |
| 134 | #define R_0086D8_CP_ME_CNTL 0x86D8 |
| 135 | #define S_0086D8_CP_ME_HALT(x) (((x) & 1)<<28) |
| 136 | #define C_0086D8_CP_ME_HALT(x) ((x) & 0xEFFFFFFF) |
| 137 | #define CP_ME_RAM_DATA 0xC160 |
| 138 | #define CP_ME_RAM_RADDR 0xC158 |
| 139 | #define CP_ME_RAM_WADDR 0xC15C |
| 140 | #define CP_MEQ_THRESHOLDS 0x8764 |
| 141 | #define MEQ_END(x) ((x) << 16) |
| 142 | #define ROQ_END(x) ((x) << 24) |
| 143 | #define CP_PERFMON_CNTL 0x87FC |
| 144 | #define CP_PFP_UCODE_ADDR 0xC150 |
| 145 | #define CP_PFP_UCODE_DATA 0xC154 |
| 146 | #define CP_QUEUE_THRESHOLDS 0x8760 |
| 147 | #define ROQ_IB1_START(x) ((x) << 0) |
| 148 | #define ROQ_IB2_START(x) ((x) << 8) |
| 149 | #define CP_RB_BASE 0xC100 |
| 150 | #define CP_RB_CNTL 0xC104 |
| 151 | #define RB_BUFSZ(x) ((x)<<0) |
| 152 | #define RB_BLKSZ(x) ((x)<<8) |
| 153 | #define RB_NO_UPDATE (1<<27) |
| 154 | #define RB_RPTR_WR_ENA (1<<31) |
| 155 | #define BUF_SWAP_32BIT (2 << 16) |
| 156 | #define CP_RB_RPTR 0x8700 |
| 157 | #define CP_RB_RPTR_ADDR 0xC10C |
| 158 | #define CP_RB_RPTR_ADDR_HI 0xC110 |
| 159 | #define CP_RB_RPTR_WR 0xC108 |
| 160 | #define CP_RB_WPTR 0xC114 |
| 161 | #define CP_RB_WPTR_ADDR 0xC118 |
| 162 | #define CP_RB_WPTR_ADDR_HI 0xC11C |
| 163 | #define CP_RB_WPTR_DELAY 0x8704 |
| 164 | #define CP_ROQ_IB1_STAT 0x8784 |
| 165 | #define CP_ROQ_IB2_STAT 0x8788 |
| 166 | #define CP_SEM_WAIT_TIMER 0x85BC |
| 167 | |
| 168 | #define DB_DEBUG 0x9830 |
| 169 | #define PREZ_MUST_WAIT_FOR_POSTZ_DONE (1 << 31) |
| 170 | #define DB_DEPTH_BASE 0x2800C |
Alex Deucher | a39533b | 2009-11-09 16:41:21 -0500 | [diff] [blame] | 171 | #define DB_HTILE_DATA_BASE 0x28014 |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 172 | #define DB_WATERMARKS 0x9838 |
| 173 | #define DEPTH_FREE(x) ((x) << 0) |
| 174 | #define DEPTH_FLUSH(x) ((x) << 5) |
| 175 | #define DEPTH_PENDING_FREE(x) ((x) << 15) |
| 176 | #define DEPTH_CACHELINE_FREE(x) ((x) << 20) |
| 177 | |
| 178 | #define DCP_TILING_CONFIG 0x6CA0 |
| 179 | #define PIPE_TILING(x) ((x) << 1) |
| 180 | #define BANK_TILING(x) ((x) << 4) |
| 181 | #define GROUP_SIZE(x) ((x) << 6) |
| 182 | #define ROW_TILING(x) ((x) << 8) |
| 183 | #define BANK_SWAPS(x) ((x) << 11) |
| 184 | #define SAMPLE_SPLIT(x) ((x) << 14) |
| 185 | #define BACKEND_MAP(x) ((x) << 16) |
| 186 | |
| 187 | #define GB_TILING_CONFIG 0x98F0 |
| 188 | |
| 189 | #define GC_USER_SHADER_PIPE_CONFIG 0x8954 |
| 190 | #define INACTIVE_QD_PIPES(x) ((x) << 8) |
| 191 | #define INACTIVE_QD_PIPES_MASK 0x0000FF00 |
| 192 | #define INACTIVE_SIMDS(x) ((x) << 16) |
| 193 | #define INACTIVE_SIMDS_MASK 0x00FF0000 |
| 194 | |
| 195 | #define SQ_CONFIG 0x8c00 |
| 196 | # define VC_ENABLE (1 << 0) |
| 197 | # define EXPORT_SRC_C (1 << 1) |
| 198 | # define DX9_CONSTS (1 << 2) |
| 199 | # define ALU_INST_PREFER_VECTOR (1 << 3) |
| 200 | # define DX10_CLAMP (1 << 4) |
| 201 | # define CLAUSE_SEQ_PRIO(x) ((x) << 8) |
| 202 | # define PS_PRIO(x) ((x) << 24) |
| 203 | # define VS_PRIO(x) ((x) << 26) |
| 204 | # define GS_PRIO(x) ((x) << 28) |
| 205 | # define ES_PRIO(x) ((x) << 30) |
| 206 | #define SQ_GPR_RESOURCE_MGMT_1 0x8c04 |
| 207 | # define NUM_PS_GPRS(x) ((x) << 0) |
| 208 | # define NUM_VS_GPRS(x) ((x) << 16) |
| 209 | # define NUM_CLAUSE_TEMP_GPRS(x) ((x) << 28) |
| 210 | #define SQ_GPR_RESOURCE_MGMT_2 0x8c08 |
| 211 | # define NUM_GS_GPRS(x) ((x) << 0) |
| 212 | # define NUM_ES_GPRS(x) ((x) << 16) |
| 213 | #define SQ_THREAD_RESOURCE_MGMT 0x8c0c |
| 214 | # define NUM_PS_THREADS(x) ((x) << 0) |
| 215 | # define NUM_VS_THREADS(x) ((x) << 8) |
| 216 | # define NUM_GS_THREADS(x) ((x) << 16) |
| 217 | # define NUM_ES_THREADS(x) ((x) << 24) |
| 218 | #define SQ_STACK_RESOURCE_MGMT_1 0x8c10 |
| 219 | # define NUM_PS_STACK_ENTRIES(x) ((x) << 0) |
| 220 | # define NUM_VS_STACK_ENTRIES(x) ((x) << 16) |
| 221 | #define SQ_STACK_RESOURCE_MGMT_2 0x8c14 |
| 222 | # define NUM_GS_STACK_ENTRIES(x) ((x) << 0) |
| 223 | # define NUM_ES_STACK_ENTRIES(x) ((x) << 16) |
Alex Deucher | a39533b | 2009-11-09 16:41:21 -0500 | [diff] [blame] | 224 | #define SQ_ESGS_RING_BASE 0x8c40 |
| 225 | #define SQ_GSVS_RING_BASE 0x8c48 |
| 226 | #define SQ_ESTMP_RING_BASE 0x8c50 |
| 227 | #define SQ_GSTMP_RING_BASE 0x8c58 |
| 228 | #define SQ_VSTMP_RING_BASE 0x8c60 |
| 229 | #define SQ_PSTMP_RING_BASE 0x8c68 |
| 230 | #define SQ_FBUF_RING_BASE 0x8c70 |
| 231 | #define SQ_REDUC_RING_BASE 0x8c78 |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 232 | |
| 233 | #define GRBM_CNTL 0x8000 |
| 234 | # define GRBM_READ_TIMEOUT(x) ((x) << 0) |
| 235 | #define GRBM_STATUS 0x8010 |
| 236 | #define CMDFIFO_AVAIL_MASK 0x0000001F |
| 237 | #define GUI_ACTIVE (1<<31) |
| 238 | #define GRBM_STATUS2 0x8014 |
| 239 | #define GRBM_SOFT_RESET 0x8020 |
| 240 | #define SOFT_RESET_CP (1<<0) |
| 241 | |
Alex Deucher | 21a8122 | 2010-07-02 12:58:16 -0400 | [diff] [blame^] | 242 | #define CG_THERMAL_STATUS 0x7F4 |
| 243 | #define ASIC_T(x) ((x) << 0) |
| 244 | #define ASIC_T_MASK 0x1FF |
| 245 | #define ASIC_T_SHIFT 0 |
| 246 | |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 247 | #define HDP_HOST_PATH_CNTL 0x2C00 |
| 248 | #define HDP_NONSURFACE_BASE 0x2C04 |
| 249 | #define HDP_NONSURFACE_INFO 0x2C08 |
| 250 | #define HDP_NONSURFACE_SIZE 0x2C0C |
| 251 | #define HDP_REG_COHERENCY_FLUSH_CNTL 0x54A0 |
| 252 | #define HDP_TILING_CONFIG 0x2F3C |
| 253 | |
| 254 | #define MC_VM_AGP_TOP 0x2184 |
| 255 | #define MC_VM_AGP_BOT 0x2188 |
| 256 | #define MC_VM_AGP_BASE 0x218C |
| 257 | #define MC_VM_FB_LOCATION 0x2180 |
| 258 | #define MC_VM_L1_TLB_MCD_RD_A_CNTL 0x219C |
| 259 | #define ENABLE_L1_TLB (1 << 0) |
| 260 | #define ENABLE_L1_FRAGMENT_PROCESSING (1 << 1) |
| 261 | #define ENABLE_L1_STRICT_ORDERING (1 << 2) |
| 262 | #define SYSTEM_ACCESS_MODE_MASK 0x000000C0 |
| 263 | #define SYSTEM_ACCESS_MODE_SHIFT 6 |
| 264 | #define SYSTEM_ACCESS_MODE_PA_ONLY (0 << 6) |
| 265 | #define SYSTEM_ACCESS_MODE_USE_SYS_MAP (1 << 6) |
| 266 | #define SYSTEM_ACCESS_MODE_IN_SYS (2 << 6) |
| 267 | #define SYSTEM_ACCESS_MODE_NOT_IN_SYS (3 << 6) |
| 268 | #define SYSTEM_APERTURE_UNMAPPED_ACCESS_PASS_THRU (0 << 8) |
| 269 | #define SYSTEM_APERTURE_UNMAPPED_ACCESS_DEFAULT_PAGE (1 << 8) |
| 270 | #define ENABLE_SEMAPHORE_MODE (1 << 10) |
| 271 | #define ENABLE_WAIT_L2_QUERY (1 << 11) |
| 272 | #define EFFECTIVE_L1_TLB_SIZE(x) (((x) & 7) << 12) |
| 273 | #define EFFECTIVE_L1_TLB_SIZE_MASK 0x00007000 |
| 274 | #define EFFECTIVE_L1_TLB_SIZE_SHIFT 12 |
| 275 | #define EFFECTIVE_L1_QUEUE_SIZE(x) (((x) & 7) << 15) |
| 276 | #define EFFECTIVE_L1_QUEUE_SIZE_MASK 0x00038000 |
| 277 | #define EFFECTIVE_L1_QUEUE_SIZE_SHIFT 15 |
| 278 | #define MC_VM_L1_TLB_MCD_RD_B_CNTL 0x21A0 |
| 279 | #define MC_VM_L1_TLB_MCB_RD_GFX_CNTL 0x21FC |
| 280 | #define MC_VM_L1_TLB_MCB_RD_HDP_CNTL 0x2204 |
| 281 | #define MC_VM_L1_TLB_MCB_RD_PDMA_CNTL 0x2208 |
| 282 | #define MC_VM_L1_TLB_MCB_RD_SEM_CNTL 0x220C |
| 283 | #define MC_VM_L1_TLB_MCB_RD_SYS_CNTL 0x2200 |
| 284 | #define MC_VM_L1_TLB_MCD_WR_A_CNTL 0x21A4 |
| 285 | #define MC_VM_L1_TLB_MCD_WR_B_CNTL 0x21A8 |
| 286 | #define MC_VM_L1_TLB_MCB_WR_GFX_CNTL 0x2210 |
| 287 | #define MC_VM_L1_TLB_MCB_WR_HDP_CNTL 0x2218 |
| 288 | #define MC_VM_L1_TLB_MCB_WR_PDMA_CNTL 0x221C |
| 289 | #define MC_VM_L1_TLB_MCB_WR_SEM_CNTL 0x2220 |
| 290 | #define MC_VM_L1_TLB_MCB_WR_SYS_CNTL 0x2214 |
| 291 | #define MC_VM_SYSTEM_APERTURE_LOW_ADDR 0x2190 |
| 292 | #define LOGICAL_PAGE_NUMBER_MASK 0x000FFFFF |
| 293 | #define LOGICAL_PAGE_NUMBER_SHIFT 0 |
| 294 | #define MC_VM_SYSTEM_APERTURE_HIGH_ADDR 0x2194 |
| 295 | #define MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR 0x2198 |
| 296 | |
| 297 | #define PA_CL_ENHANCE 0x8A14 |
| 298 | #define CLIP_VTX_REORDER_ENA (1 << 0) |
| 299 | #define NUM_CLIP_SEQ(x) ((x) << 1) |
| 300 | #define PA_SC_AA_CONFIG 0x28C04 |
| 301 | #define PA_SC_AA_SAMPLE_LOCS_2S 0x8B40 |
| 302 | #define PA_SC_AA_SAMPLE_LOCS_4S 0x8B44 |
| 303 | #define PA_SC_AA_SAMPLE_LOCS_8S_WD0 0x8B48 |
| 304 | #define PA_SC_AA_SAMPLE_LOCS_8S_WD1 0x8B4C |
| 305 | #define S0_X(x) ((x) << 0) |
| 306 | #define S0_Y(x) ((x) << 4) |
| 307 | #define S1_X(x) ((x) << 8) |
| 308 | #define S1_Y(x) ((x) << 12) |
| 309 | #define S2_X(x) ((x) << 16) |
| 310 | #define S2_Y(x) ((x) << 20) |
| 311 | #define S3_X(x) ((x) << 24) |
| 312 | #define S3_Y(x) ((x) << 28) |
| 313 | #define S4_X(x) ((x) << 0) |
| 314 | #define S4_Y(x) ((x) << 4) |
| 315 | #define S5_X(x) ((x) << 8) |
| 316 | #define S5_Y(x) ((x) << 12) |
| 317 | #define S6_X(x) ((x) << 16) |
| 318 | #define S6_Y(x) ((x) << 20) |
| 319 | #define S7_X(x) ((x) << 24) |
| 320 | #define S7_Y(x) ((x) << 28) |
| 321 | #define PA_SC_CLIPRECT_RULE 0x2820c |
| 322 | #define PA_SC_ENHANCE 0x8BF0 |
| 323 | #define FORCE_EOV_MAX_CLK_CNT(x) ((x) << 0) |
| 324 | #define FORCE_EOV_MAX_TILE_CNT(x) ((x) << 12) |
| 325 | #define PA_SC_LINE_STIPPLE 0x28A0C |
| 326 | #define PA_SC_LINE_STIPPLE_STATE 0x8B10 |
| 327 | #define PA_SC_MODE_CNTL 0x28A4C |
| 328 | #define PA_SC_MULTI_CHIP_CNTL 0x8B20 |
| 329 | |
| 330 | #define PA_SC_SCREEN_SCISSOR_TL 0x28030 |
| 331 | #define PA_SC_GENERIC_SCISSOR_TL 0x28240 |
| 332 | #define PA_SC_WINDOW_SCISSOR_TL 0x28204 |
| 333 | |
| 334 | #define PCIE_PORT_INDEX 0x0038 |
| 335 | #define PCIE_PORT_DATA 0x003C |
| 336 | |
Alex Deucher | 5885b7a | 2009-10-19 17:23:33 -0400 | [diff] [blame] | 337 | #define CHMAP 0x2004 |
| 338 | #define NOOFCHAN_SHIFT 12 |
| 339 | #define NOOFCHAN_MASK 0x00003000 |
| 340 | |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 341 | #define RAMCFG 0x2408 |
| 342 | #define NOOFBANK_SHIFT 0 |
| 343 | #define NOOFBANK_MASK 0x00000001 |
| 344 | #define NOOFRANK_SHIFT 1 |
| 345 | #define NOOFRANK_MASK 0x00000002 |
| 346 | #define NOOFROWS_SHIFT 2 |
| 347 | #define NOOFROWS_MASK 0x0000001C |
| 348 | #define NOOFCOLS_SHIFT 5 |
| 349 | #define NOOFCOLS_MASK 0x00000060 |
| 350 | #define CHANSIZE_SHIFT 7 |
| 351 | #define CHANSIZE_MASK 0x00000080 |
| 352 | #define BURSTLENGTH_SHIFT 8 |
| 353 | #define BURSTLENGTH_MASK 0x00000100 |
| 354 | #define CHANSIZE_OVERRIDE (1 << 10) |
| 355 | |
| 356 | #define SCRATCH_REG0 0x8500 |
| 357 | #define SCRATCH_REG1 0x8504 |
| 358 | #define SCRATCH_REG2 0x8508 |
| 359 | #define SCRATCH_REG3 0x850C |
| 360 | #define SCRATCH_REG4 0x8510 |
| 361 | #define SCRATCH_REG5 0x8514 |
| 362 | #define SCRATCH_REG6 0x8518 |
| 363 | #define SCRATCH_REG7 0x851C |
| 364 | #define SCRATCH_UMSK 0x8540 |
| 365 | #define SCRATCH_ADDR 0x8544 |
| 366 | |
| 367 | #define SPI_CONFIG_CNTL 0x9100 |
| 368 | #define GPR_WRITE_PRIORITY(x) ((x) << 0) |
| 369 | #define DISABLE_INTERP_1 (1 << 5) |
| 370 | #define SPI_CONFIG_CNTL_1 0x913C |
| 371 | #define VTX_DONE_DELAY(x) ((x) << 0) |
| 372 | #define INTERP_ONE_PRIM_PER_ROW (1 << 4) |
| 373 | #define SPI_INPUT_Z 0x286D8 |
| 374 | #define SPI_PS_IN_CONTROL_0 0x286CC |
| 375 | #define NUM_INTERP(x) ((x)<<0) |
| 376 | #define POSITION_ENA (1<<8) |
| 377 | #define POSITION_CENTROID (1<<9) |
| 378 | #define POSITION_ADDR(x) ((x)<<10) |
| 379 | #define PARAM_GEN(x) ((x)<<15) |
| 380 | #define PARAM_GEN_ADDR(x) ((x)<<19) |
| 381 | #define BARYC_SAMPLE_CNTL(x) ((x)<<26) |
| 382 | #define PERSP_GRADIENT_ENA (1<<28) |
| 383 | #define LINEAR_GRADIENT_ENA (1<<29) |
| 384 | #define POSITION_SAMPLE (1<<30) |
| 385 | #define BARYC_AT_SAMPLE_ENA (1<<31) |
| 386 | #define SPI_PS_IN_CONTROL_1 0x286D0 |
| 387 | #define GEN_INDEX_PIX (1<<0) |
| 388 | #define GEN_INDEX_PIX_ADDR(x) ((x)<<1) |
| 389 | #define FRONT_FACE_ENA (1<<8) |
| 390 | #define FRONT_FACE_CHAN(x) ((x)<<9) |
| 391 | #define FRONT_FACE_ALL_BITS (1<<11) |
| 392 | #define FRONT_FACE_ADDR(x) ((x)<<12) |
| 393 | #define FOG_ADDR(x) ((x)<<17) |
| 394 | #define FIXED_PT_POSITION_ENA (1<<24) |
| 395 | #define FIXED_PT_POSITION_ADDR(x) ((x)<<25) |
| 396 | |
| 397 | #define SQ_MS_FIFO_SIZES 0x8CF0 |
| 398 | #define CACHE_FIFO_SIZE(x) ((x) << 0) |
| 399 | #define FETCH_FIFO_HIWATER(x) ((x) << 8) |
| 400 | #define DONE_FIFO_HIWATER(x) ((x) << 16) |
| 401 | #define ALU_UPDATE_FIFO_HIWATER(x) ((x) << 24) |
| 402 | #define SQ_PGM_START_ES 0x28880 |
| 403 | #define SQ_PGM_START_FS 0x28894 |
| 404 | #define SQ_PGM_START_GS 0x2886C |
| 405 | #define SQ_PGM_START_PS 0x28840 |
| 406 | #define SQ_PGM_RESOURCES_PS 0x28850 |
| 407 | #define SQ_PGM_EXPORTS_PS 0x28854 |
| 408 | #define SQ_PGM_CF_OFFSET_PS 0x288cc |
| 409 | #define SQ_PGM_START_VS 0x28858 |
| 410 | #define SQ_PGM_RESOURCES_VS 0x28868 |
| 411 | #define SQ_PGM_CF_OFFSET_VS 0x288d0 |
| 412 | #define SQ_VTX_CONSTANT_WORD6_0 0x38018 |
| 413 | #define S__SQ_VTX_CONSTANT_TYPE(x) (((x) & 3) << 30) |
| 414 | #define G__SQ_VTX_CONSTANT_TYPE(x) (((x) >> 30) & 3) |
| 415 | #define SQ_TEX_VTX_INVALID_TEXTURE 0x0 |
| 416 | #define SQ_TEX_VTX_INVALID_BUFFER 0x1 |
| 417 | #define SQ_TEX_VTX_VALID_TEXTURE 0x2 |
| 418 | #define SQ_TEX_VTX_VALID_BUFFER 0x3 |
| 419 | |
| 420 | |
| 421 | #define SX_MISC 0x28350 |
Alex Deucher | a39533b | 2009-11-09 16:41:21 -0500 | [diff] [blame] | 422 | #define SX_MEMORY_EXPORT_BASE 0x9010 |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 423 | #define SX_DEBUG_1 0x9054 |
| 424 | #define SMX_EVENT_RELEASE (1 << 0) |
| 425 | #define ENABLE_NEW_SMX_ADDRESS (1 << 16) |
| 426 | |
| 427 | #define TA_CNTL_AUX 0x9508 |
| 428 | #define DISABLE_CUBE_WRAP (1 << 0) |
| 429 | #define DISABLE_CUBE_ANISO (1 << 1) |
| 430 | #define SYNC_GRADIENT (1 << 24) |
| 431 | #define SYNC_WALKER (1 << 25) |
| 432 | #define SYNC_ALIGNER (1 << 26) |
| 433 | #define BILINEAR_PRECISION_6_BIT (0 << 31) |
| 434 | #define BILINEAR_PRECISION_8_BIT (1 << 31) |
| 435 | |
| 436 | #define TC_CNTL 0x9608 |
| 437 | #define TC_L2_SIZE(x) ((x)<<5) |
| 438 | #define L2_DISABLE_LATE_HIT (1<<9) |
| 439 | |
| 440 | |
| 441 | #define VGT_CACHE_INVALIDATION 0x88C4 |
| 442 | #define CACHE_INVALIDATION(x) ((x)<<0) |
| 443 | #define VC_ONLY 0 |
| 444 | #define TC_ONLY 1 |
| 445 | #define VC_AND_TC 2 |
| 446 | #define VGT_DMA_BASE 0x287E8 |
| 447 | #define VGT_DMA_BASE_HI 0x287E4 |
| 448 | #define VGT_ES_PER_GS 0x88CC |
| 449 | #define VGT_GS_PER_ES 0x88C8 |
| 450 | #define VGT_GS_PER_VS 0x88E8 |
| 451 | #define VGT_GS_VERTEX_REUSE 0x88D4 |
| 452 | #define VGT_PRIMITIVE_TYPE 0x8958 |
| 453 | #define VGT_NUM_INSTANCES 0x8974 |
| 454 | #define VGT_OUT_DEALLOC_CNTL 0x28C5C |
| 455 | #define DEALLOC_DIST_MASK 0x0000007F |
| 456 | #define VGT_STRMOUT_BASE_OFFSET_0 0x28B10 |
| 457 | #define VGT_STRMOUT_BASE_OFFSET_1 0x28B14 |
| 458 | #define VGT_STRMOUT_BASE_OFFSET_2 0x28B18 |
| 459 | #define VGT_STRMOUT_BASE_OFFSET_3 0x28B1c |
| 460 | #define VGT_STRMOUT_BASE_OFFSET_HI_0 0x28B44 |
| 461 | #define VGT_STRMOUT_BASE_OFFSET_HI_1 0x28B48 |
| 462 | #define VGT_STRMOUT_BASE_OFFSET_HI_2 0x28B4c |
| 463 | #define VGT_STRMOUT_BASE_OFFSET_HI_3 0x28B50 |
| 464 | #define VGT_STRMOUT_BUFFER_BASE_0 0x28AD8 |
| 465 | #define VGT_STRMOUT_BUFFER_BASE_1 0x28AE8 |
| 466 | #define VGT_STRMOUT_BUFFER_BASE_2 0x28AF8 |
| 467 | #define VGT_STRMOUT_BUFFER_BASE_3 0x28B08 |
| 468 | #define VGT_STRMOUT_BUFFER_OFFSET_0 0x28ADC |
| 469 | #define VGT_STRMOUT_BUFFER_OFFSET_1 0x28AEC |
| 470 | #define VGT_STRMOUT_BUFFER_OFFSET_2 0x28AFC |
| 471 | #define VGT_STRMOUT_BUFFER_OFFSET_3 0x28B0C |
| 472 | #define VGT_STRMOUT_EN 0x28AB0 |
| 473 | #define VGT_VERTEX_REUSE_BLOCK_CNTL 0x28C58 |
| 474 | #define VTX_REUSE_DEPTH_MASK 0x000000FF |
| 475 | #define VGT_EVENT_INITIATOR 0x28a90 |
| 476 | # define CACHE_FLUSH_AND_INV_EVENT (0x16 << 0) |
| 477 | |
| 478 | #define VM_CONTEXT0_CNTL 0x1410 |
| 479 | #define ENABLE_CONTEXT (1 << 0) |
| 480 | #define PAGE_TABLE_DEPTH(x) (((x) & 3) << 1) |
| 481 | #define RANGE_PROTECTION_FAULT_ENABLE_DEFAULT (1 << 4) |
| 482 | #define VM_CONTEXT0_INVALIDATION_LOW_ADDR 0x1490 |
| 483 | #define VM_CONTEXT0_INVALIDATION_HIGH_ADDR 0x14B0 |
| 484 | #define VM_CONTEXT0_PAGE_TABLE_BASE_ADDR 0x1574 |
| 485 | #define VM_CONTEXT0_PAGE_TABLE_START_ADDR 0x1594 |
| 486 | #define VM_CONTEXT0_PAGE_TABLE_END_ADDR 0x15B4 |
| 487 | #define VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR 0x1554 |
| 488 | #define VM_CONTEXT0_REQUEST_RESPONSE 0x1470 |
| 489 | #define REQUEST_TYPE(x) (((x) & 0xf) << 0) |
| 490 | #define RESPONSE_TYPE_MASK 0x000000F0 |
| 491 | #define RESPONSE_TYPE_SHIFT 4 |
| 492 | #define VM_L2_CNTL 0x1400 |
| 493 | #define ENABLE_L2_CACHE (1 << 0) |
| 494 | #define ENABLE_L2_FRAGMENT_PROCESSING (1 << 1) |
| 495 | #define ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE (1 << 9) |
| 496 | #define EFFECTIVE_L2_QUEUE_SIZE(x) (((x) & 7) << 13) |
| 497 | #define VM_L2_CNTL2 0x1404 |
| 498 | #define INVALIDATE_ALL_L1_TLBS (1 << 0) |
| 499 | #define INVALIDATE_L2_CACHE (1 << 1) |
| 500 | #define VM_L2_CNTL3 0x1408 |
| 501 | #define BANK_SELECT_0(x) (((x) & 0x1f) << 0) |
| 502 | #define BANK_SELECT_1(x) (((x) & 0x1f) << 5) |
| 503 | #define L2_CACHE_UPDATE_MODE(x) (((x) & 3) << 10) |
| 504 | #define VM_L2_STATUS 0x140C |
| 505 | #define L2_BUSY (1 << 0) |
| 506 | |
| 507 | #define WAIT_UNTIL 0x8040 |
| 508 | #define WAIT_2D_IDLE_bit (1 << 14) |
| 509 | #define WAIT_3D_IDLE_bit (1 << 15) |
| 510 | #define WAIT_2D_IDLECLEAN_bit (1 << 16) |
| 511 | #define WAIT_3D_IDLECLEAN_bit (1 << 17) |
| 512 | |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 513 | #define IH_RB_CNTL 0x3e00 |
| 514 | # define IH_RB_ENABLE (1 << 0) |
| 515 | # define IH_IB_SIZE(x) ((x) << 1) /* log2 */ |
| 516 | # define IH_RB_FULL_DRAIN_ENABLE (1 << 6) |
| 517 | # define IH_WPTR_WRITEBACK_ENABLE (1 << 8) |
| 518 | # define IH_WPTR_WRITEBACK_TIMER(x) ((x) << 9) /* log2 */ |
| 519 | # define IH_WPTR_OVERFLOW_ENABLE (1 << 16) |
| 520 | # define IH_WPTR_OVERFLOW_CLEAR (1 << 31) |
| 521 | #define IH_RB_BASE 0x3e04 |
| 522 | #define IH_RB_RPTR 0x3e08 |
| 523 | #define IH_RB_WPTR 0x3e0c |
| 524 | # define RB_OVERFLOW (1 << 0) |
| 525 | # define WPTR_OFFSET_MASK 0x3fffc |
| 526 | #define IH_RB_WPTR_ADDR_HI 0x3e10 |
| 527 | #define IH_RB_WPTR_ADDR_LO 0x3e14 |
| 528 | #define IH_CNTL 0x3e18 |
| 529 | # define ENABLE_INTR (1 << 0) |
| 530 | # define IH_MC_SWAP(x) ((x) << 2) |
| 531 | # define IH_MC_SWAP_NONE 0 |
| 532 | # define IH_MC_SWAP_16BIT 1 |
| 533 | # define IH_MC_SWAP_32BIT 2 |
| 534 | # define IH_MC_SWAP_64BIT 3 |
| 535 | # define RPTR_REARM (1 << 4) |
| 536 | # define MC_WRREQ_CREDIT(x) ((x) << 15) |
| 537 | # define MC_WR_CLEAN_CNT(x) ((x) << 20) |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 538 | |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 539 | #define RLC_CNTL 0x3f00 |
| 540 | # define RLC_ENABLE (1 << 0) |
| 541 | #define RLC_HB_BASE 0x3f10 |
| 542 | #define RLC_HB_CNTL 0x3f0c |
| 543 | #define RLC_HB_RPTR 0x3f20 |
| 544 | #define RLC_HB_WPTR 0x3f1c |
| 545 | #define RLC_HB_WPTR_LSB_ADDR 0x3f14 |
| 546 | #define RLC_HB_WPTR_MSB_ADDR 0x3f18 |
| 547 | #define RLC_MC_CNTL 0x3f44 |
| 548 | #define RLC_UCODE_CNTL 0x3f48 |
| 549 | #define RLC_UCODE_ADDR 0x3f2c |
| 550 | #define RLC_UCODE_DATA 0x3f30 |
| 551 | |
| 552 | #define SRBM_SOFT_RESET 0xe60 |
| 553 | # define SOFT_RESET_RLC (1 << 13) |
| 554 | |
| 555 | #define CP_INT_CNTL 0xc124 |
| 556 | # define CNTX_BUSY_INT_ENABLE (1 << 19) |
| 557 | # define CNTX_EMPTY_INT_ENABLE (1 << 20) |
| 558 | # define SCRATCH_INT_ENABLE (1 << 25) |
| 559 | # define TIME_STAMP_INT_ENABLE (1 << 26) |
| 560 | # define IB2_INT_ENABLE (1 << 29) |
| 561 | # define IB1_INT_ENABLE (1 << 30) |
| 562 | # define RB_INT_ENABLE (1 << 31) |
| 563 | #define CP_INT_STATUS 0xc128 |
| 564 | # define SCRATCH_INT_STAT (1 << 25) |
| 565 | # define TIME_STAMP_INT_STAT (1 << 26) |
| 566 | # define IB2_INT_STAT (1 << 29) |
| 567 | # define IB1_INT_STAT (1 << 30) |
| 568 | # define RB_INT_STAT (1 << 31) |
| 569 | |
| 570 | #define GRBM_INT_CNTL 0x8060 |
| 571 | # define RDERR_INT_ENABLE (1 << 0) |
| 572 | # define WAIT_COUNT_TIMEOUT_INT_ENABLE (1 << 1) |
| 573 | # define GUI_IDLE_INT_ENABLE (1 << 19) |
| 574 | |
| 575 | #define INTERRUPT_CNTL 0x5468 |
| 576 | # define IH_DUMMY_RD_OVERRIDE (1 << 0) |
| 577 | # define IH_DUMMY_RD_EN (1 << 1) |
| 578 | # define IH_REQ_NONSNOOP_EN (1 << 3) |
| 579 | # define GEN_IH_INT_EN (1 << 8) |
| 580 | #define INTERRUPT_CNTL2 0x546c |
| 581 | |
| 582 | #define D1MODE_VBLANK_STATUS 0x6534 |
| 583 | #define D2MODE_VBLANK_STATUS 0x6d34 |
| 584 | # define DxMODE_VBLANK_OCCURRED (1 << 0) |
| 585 | # define DxMODE_VBLANK_ACK (1 << 4) |
| 586 | # define DxMODE_VBLANK_STAT (1 << 12) |
| 587 | # define DxMODE_VBLANK_INTERRUPT (1 << 16) |
| 588 | # define DxMODE_VBLANK_INTERRUPT_TYPE (1 << 17) |
| 589 | #define D1MODE_VLINE_STATUS 0x653c |
| 590 | #define D2MODE_VLINE_STATUS 0x6d3c |
| 591 | # define DxMODE_VLINE_OCCURRED (1 << 0) |
| 592 | # define DxMODE_VLINE_ACK (1 << 4) |
| 593 | # define DxMODE_VLINE_STAT (1 << 12) |
| 594 | # define DxMODE_VLINE_INTERRUPT (1 << 16) |
| 595 | # define DxMODE_VLINE_INTERRUPT_TYPE (1 << 17) |
| 596 | #define DxMODE_INT_MASK 0x6540 |
| 597 | # define D1MODE_VBLANK_INT_MASK (1 << 0) |
| 598 | # define D1MODE_VLINE_INT_MASK (1 << 4) |
| 599 | # define D2MODE_VBLANK_INT_MASK (1 << 8) |
| 600 | # define D2MODE_VLINE_INT_MASK (1 << 12) |
| 601 | #define DCE3_DISP_INTERRUPT_STATUS 0x7ddc |
| 602 | # define DC_HPD1_INTERRUPT (1 << 18) |
| 603 | # define DC_HPD2_INTERRUPT (1 << 19) |
| 604 | #define DISP_INTERRUPT_STATUS 0x7edc |
| 605 | # define LB_D1_VLINE_INTERRUPT (1 << 2) |
| 606 | # define LB_D2_VLINE_INTERRUPT (1 << 3) |
| 607 | # define LB_D1_VBLANK_INTERRUPT (1 << 4) |
| 608 | # define LB_D2_VBLANK_INTERRUPT (1 << 5) |
| 609 | # define DACA_AUTODETECT_INTERRUPT (1 << 16) |
| 610 | # define DACB_AUTODETECT_INTERRUPT (1 << 17) |
| 611 | # define DC_HOT_PLUG_DETECT1_INTERRUPT (1 << 18) |
| 612 | # define DC_HOT_PLUG_DETECT2_INTERRUPT (1 << 19) |
| 613 | # define DC_I2C_SW_DONE_INTERRUPT (1 << 20) |
| 614 | # define DC_I2C_HW_DONE_INTERRUPT (1 << 21) |
Alex Deucher | b500f68 | 2009-12-03 13:08:53 -0500 | [diff] [blame] | 615 | #define DISP_INTERRUPT_STATUS_CONTINUE 0x7ee8 |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 616 | #define DCE3_DISP_INTERRUPT_STATUS_CONTINUE 0x7de8 |
| 617 | # define DC_HPD4_INTERRUPT (1 << 14) |
| 618 | # define DC_HPD4_RX_INTERRUPT (1 << 15) |
| 619 | # define DC_HPD3_INTERRUPT (1 << 28) |
| 620 | # define DC_HPD1_RX_INTERRUPT (1 << 29) |
| 621 | # define DC_HPD2_RX_INTERRUPT (1 << 30) |
| 622 | #define DCE3_DISP_INTERRUPT_STATUS_CONTINUE2 0x7dec |
| 623 | # define DC_HPD3_RX_INTERRUPT (1 << 0) |
| 624 | # define DIGA_DP_VID_STREAM_DISABLE_INTERRUPT (1 << 1) |
| 625 | # define DIGA_DP_STEER_FIFO_OVERFLOW_INTERRUPT (1 << 2) |
| 626 | # define DIGB_DP_VID_STREAM_DISABLE_INTERRUPT (1 << 3) |
| 627 | # define DIGB_DP_STEER_FIFO_OVERFLOW_INTERRUPT (1 << 4) |
| 628 | # define AUX1_SW_DONE_INTERRUPT (1 << 5) |
| 629 | # define AUX1_LS_DONE_INTERRUPT (1 << 6) |
| 630 | # define AUX2_SW_DONE_INTERRUPT (1 << 7) |
| 631 | # define AUX2_LS_DONE_INTERRUPT (1 << 8) |
| 632 | # define AUX3_SW_DONE_INTERRUPT (1 << 9) |
| 633 | # define AUX3_LS_DONE_INTERRUPT (1 << 10) |
| 634 | # define AUX4_SW_DONE_INTERRUPT (1 << 11) |
| 635 | # define AUX4_LS_DONE_INTERRUPT (1 << 12) |
| 636 | # define DIGA_DP_FAST_TRAINING_COMPLETE_INTERRUPT (1 << 13) |
| 637 | # define DIGB_DP_FAST_TRAINING_COMPLETE_INTERRUPT (1 << 14) |
| 638 | /* DCE 3.2 */ |
| 639 | # define AUX5_SW_DONE_INTERRUPT (1 << 15) |
| 640 | # define AUX5_LS_DONE_INTERRUPT (1 << 16) |
| 641 | # define AUX6_SW_DONE_INTERRUPT (1 << 17) |
| 642 | # define AUX6_LS_DONE_INTERRUPT (1 << 18) |
| 643 | # define DC_HPD5_INTERRUPT (1 << 19) |
| 644 | # define DC_HPD5_RX_INTERRUPT (1 << 20) |
| 645 | # define DC_HPD6_INTERRUPT (1 << 21) |
| 646 | # define DC_HPD6_RX_INTERRUPT (1 << 22) |
| 647 | |
Alex Deucher | b500f68 | 2009-12-03 13:08:53 -0500 | [diff] [blame] | 648 | #define DACA_AUTO_DETECT_CONTROL 0x7828 |
| 649 | #define DACB_AUTO_DETECT_CONTROL 0x7a28 |
| 650 | #define DCE3_DACA_AUTO_DETECT_CONTROL 0x7028 |
| 651 | #define DCE3_DACB_AUTO_DETECT_CONTROL 0x7128 |
| 652 | # define DACx_AUTODETECT_MODE(x) ((x) << 0) |
| 653 | # define DACx_AUTODETECT_MODE_NONE 0 |
| 654 | # define DACx_AUTODETECT_MODE_CONNECT 1 |
| 655 | # define DACx_AUTODETECT_MODE_DISCONNECT 2 |
| 656 | # define DACx_AUTODETECT_FRAME_TIME_COUNTER(x) ((x) << 8) |
| 657 | /* bit 18 = R/C, 17 = G/Y, 16 = B/Comp */ |
| 658 | # define DACx_AUTODETECT_CHECK_MASK(x) ((x) << 16) |
| 659 | |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 660 | #define DCE3_DACA_AUTODETECT_INT_CONTROL 0x7038 |
| 661 | #define DCE3_DACB_AUTODETECT_INT_CONTROL 0x7138 |
| 662 | #define DACA_AUTODETECT_INT_CONTROL 0x7838 |
| 663 | #define DACB_AUTODETECT_INT_CONTROL 0x7a38 |
| 664 | # define DACx_AUTODETECT_ACK (1 << 0) |
| 665 | # define DACx_AUTODETECT_INT_ENABLE (1 << 16) |
| 666 | |
Alex Deucher | b500f68 | 2009-12-03 13:08:53 -0500 | [diff] [blame] | 667 | #define DC_HOT_PLUG_DETECT1_CONTROL 0x7d00 |
| 668 | #define DC_HOT_PLUG_DETECT2_CONTROL 0x7d10 |
| 669 | #define DC_HOT_PLUG_DETECT3_CONTROL 0x7d24 |
| 670 | # define DC_HOT_PLUG_DETECTx_EN (1 << 0) |
| 671 | |
| 672 | #define DC_HOT_PLUG_DETECT1_INT_STATUS 0x7d04 |
| 673 | #define DC_HOT_PLUG_DETECT2_INT_STATUS 0x7d14 |
| 674 | #define DC_HOT_PLUG_DETECT3_INT_STATUS 0x7d28 |
| 675 | # define DC_HOT_PLUG_DETECTx_INT_STATUS (1 << 0) |
| 676 | # define DC_HOT_PLUG_DETECTx_SENSE (1 << 1) |
| 677 | |
| 678 | /* DCE 3.0 */ |
| 679 | #define DC_HPD1_INT_STATUS 0x7d00 |
| 680 | #define DC_HPD2_INT_STATUS 0x7d0c |
| 681 | #define DC_HPD3_INT_STATUS 0x7d18 |
| 682 | #define DC_HPD4_INT_STATUS 0x7d24 |
| 683 | /* DCE 3.2 */ |
| 684 | #define DC_HPD5_INT_STATUS 0x7dc0 |
| 685 | #define DC_HPD6_INT_STATUS 0x7df4 |
| 686 | # define DC_HPDx_INT_STATUS (1 << 0) |
| 687 | # define DC_HPDx_SENSE (1 << 1) |
| 688 | # define DC_HPDx_RX_INT_STATUS (1 << 8) |
| 689 | |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 690 | #define DC_HOT_PLUG_DETECT1_INT_CONTROL 0x7d08 |
| 691 | #define DC_HOT_PLUG_DETECT2_INT_CONTROL 0x7d18 |
| 692 | #define DC_HOT_PLUG_DETECT3_INT_CONTROL 0x7d2c |
| 693 | # define DC_HOT_PLUG_DETECTx_INT_ACK (1 << 0) |
| 694 | # define DC_HOT_PLUG_DETECTx_INT_POLARITY (1 << 8) |
| 695 | # define DC_HOT_PLUG_DETECTx_INT_EN (1 << 16) |
Alex Deucher | b500f68 | 2009-12-03 13:08:53 -0500 | [diff] [blame] | 696 | /* DCE 3.0 */ |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 697 | #define DC_HPD1_INT_CONTROL 0x7d04 |
| 698 | #define DC_HPD2_INT_CONTROL 0x7d10 |
| 699 | #define DC_HPD3_INT_CONTROL 0x7d1c |
| 700 | #define DC_HPD4_INT_CONTROL 0x7d28 |
Alex Deucher | b500f68 | 2009-12-03 13:08:53 -0500 | [diff] [blame] | 701 | /* DCE 3.2 */ |
| 702 | #define DC_HPD5_INT_CONTROL 0x7dc4 |
| 703 | #define DC_HPD6_INT_CONTROL 0x7df8 |
Alex Deucher | d8f60cf | 2009-12-01 13:43:46 -0500 | [diff] [blame] | 704 | # define DC_HPDx_INT_ACK (1 << 0) |
| 705 | # define DC_HPDx_INT_POLARITY (1 << 8) |
| 706 | # define DC_HPDx_INT_EN (1 << 16) |
| 707 | # define DC_HPDx_RX_INT_ACK (1 << 20) |
| 708 | # define DC_HPDx_RX_INT_EN (1 << 24) |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 709 | |
Alex Deucher | b500f68 | 2009-12-03 13:08:53 -0500 | [diff] [blame] | 710 | /* DCE 3.0 */ |
| 711 | #define DC_HPD1_CONTROL 0x7d08 |
| 712 | #define DC_HPD2_CONTROL 0x7d14 |
| 713 | #define DC_HPD3_CONTROL 0x7d20 |
| 714 | #define DC_HPD4_CONTROL 0x7d2c |
| 715 | /* DCE 3.2 */ |
| 716 | #define DC_HPD5_CONTROL 0x7dc8 |
| 717 | #define DC_HPD6_CONTROL 0x7dfc |
| 718 | # define DC_HPDx_CONNECTION_TIMER(x) ((x) << 0) |
| 719 | # define DC_HPDx_RX_INT_TIMER(x) ((x) << 16) |
| 720 | /* DCE 3.2 */ |
| 721 | # define DC_HPDx_EN (1 << 28) |
| 722 | |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 723 | /* |
| 724 | * PM4 |
| 725 | */ |
| 726 | #define PACKET_TYPE0 0 |
| 727 | #define PACKET_TYPE1 1 |
| 728 | #define PACKET_TYPE2 2 |
| 729 | #define PACKET_TYPE3 3 |
| 730 | |
| 731 | #define CP_PACKET_GET_TYPE(h) (((h) >> 30) & 3) |
| 732 | #define CP_PACKET_GET_COUNT(h) (((h) >> 16) & 0x3FFF) |
| 733 | #define CP_PACKET0_GET_REG(h) (((h) & 0xFFFF) << 2) |
| 734 | #define CP_PACKET3_GET_OPCODE(h) (((h) >> 8) & 0xFF) |
| 735 | #define PACKET0(reg, n) ((PACKET_TYPE0 << 30) | \ |
| 736 | (((reg) >> 2) & 0xFFFF) | \ |
| 737 | ((n) & 0x3FFF) << 16) |
| 738 | #define PACKET3(op, n) ((PACKET_TYPE3 << 30) | \ |
| 739 | (((op) & 0xFF) << 8) | \ |
| 740 | ((n) & 0x3FFF) << 16) |
| 741 | |
| 742 | /* Packet 3 types */ |
| 743 | #define PACKET3_NOP 0x10 |
| 744 | #define PACKET3_INDIRECT_BUFFER_END 0x17 |
| 745 | #define PACKET3_SET_PREDICATION 0x20 |
| 746 | #define PACKET3_REG_RMW 0x21 |
| 747 | #define PACKET3_COND_EXEC 0x22 |
| 748 | #define PACKET3_PRED_EXEC 0x23 |
| 749 | #define PACKET3_START_3D_CMDBUF 0x24 |
| 750 | #define PACKET3_DRAW_INDEX_2 0x27 |
| 751 | #define PACKET3_CONTEXT_CONTROL 0x28 |
| 752 | #define PACKET3_DRAW_INDEX_IMMD_BE 0x29 |
| 753 | #define PACKET3_INDEX_TYPE 0x2A |
| 754 | #define PACKET3_DRAW_INDEX 0x2B |
| 755 | #define PACKET3_DRAW_INDEX_AUTO 0x2D |
| 756 | #define PACKET3_DRAW_INDEX_IMMD 0x2E |
| 757 | #define PACKET3_NUM_INSTANCES 0x2F |
| 758 | #define PACKET3_STRMOUT_BUFFER_UPDATE 0x34 |
| 759 | #define PACKET3_INDIRECT_BUFFER_MP 0x38 |
| 760 | #define PACKET3_MEM_SEMAPHORE 0x39 |
| 761 | #define PACKET3_MPEG_INDEX 0x3A |
| 762 | #define PACKET3_WAIT_REG_MEM 0x3C |
| 763 | #define PACKET3_MEM_WRITE 0x3D |
| 764 | #define PACKET3_INDIRECT_BUFFER 0x32 |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 765 | #define PACKET3_SURFACE_SYNC 0x43 |
| 766 | # define PACKET3_CB0_DEST_BASE_ENA (1 << 6) |
| 767 | # define PACKET3_TC_ACTION_ENA (1 << 23) |
| 768 | # define PACKET3_VC_ACTION_ENA (1 << 24) |
| 769 | # define PACKET3_CB_ACTION_ENA (1 << 25) |
| 770 | # define PACKET3_DB_ACTION_ENA (1 << 26) |
| 771 | # define PACKET3_SH_ACTION_ENA (1 << 27) |
| 772 | # define PACKET3_SMX_ACTION_ENA (1 << 28) |
| 773 | #define PACKET3_ME_INITIALIZE 0x44 |
| 774 | #define PACKET3_ME_INITIALIZE_DEVICE_ID(x) ((x) << 16) |
| 775 | #define PACKET3_COND_WRITE 0x45 |
| 776 | #define PACKET3_EVENT_WRITE 0x46 |
| 777 | #define PACKET3_EVENT_WRITE_EOP 0x47 |
| 778 | #define PACKET3_ONE_REG_WRITE 0x57 |
| 779 | #define PACKET3_SET_CONFIG_REG 0x68 |
| 780 | #define PACKET3_SET_CONFIG_REG_OFFSET 0x00008000 |
| 781 | #define PACKET3_SET_CONFIG_REG_END 0x0000ac00 |
| 782 | #define PACKET3_SET_CONTEXT_REG 0x69 |
| 783 | #define PACKET3_SET_CONTEXT_REG_OFFSET 0x00028000 |
| 784 | #define PACKET3_SET_CONTEXT_REG_END 0x00029000 |
| 785 | #define PACKET3_SET_ALU_CONST 0x6A |
| 786 | #define PACKET3_SET_ALU_CONST_OFFSET 0x00030000 |
| 787 | #define PACKET3_SET_ALU_CONST_END 0x00032000 |
| 788 | #define PACKET3_SET_BOOL_CONST 0x6B |
| 789 | #define PACKET3_SET_BOOL_CONST_OFFSET 0x0003e380 |
| 790 | #define PACKET3_SET_BOOL_CONST_END 0x00040000 |
| 791 | #define PACKET3_SET_LOOP_CONST 0x6C |
| 792 | #define PACKET3_SET_LOOP_CONST_OFFSET 0x0003e200 |
| 793 | #define PACKET3_SET_LOOP_CONST_END 0x0003e380 |
| 794 | #define PACKET3_SET_RESOURCE 0x6D |
| 795 | #define PACKET3_SET_RESOURCE_OFFSET 0x00038000 |
| 796 | #define PACKET3_SET_RESOURCE_END 0x0003c000 |
| 797 | #define PACKET3_SET_SAMPLER 0x6E |
| 798 | #define PACKET3_SET_SAMPLER_OFFSET 0x0003c000 |
| 799 | #define PACKET3_SET_SAMPLER_END 0x0003cff0 |
| 800 | #define PACKET3_SET_CTL_CONST 0x6F |
| 801 | #define PACKET3_SET_CTL_CONST_OFFSET 0x0003cff0 |
| 802 | #define PACKET3_SET_CTL_CONST_END 0x0003e200 |
| 803 | #define PACKET3_SURFACE_BASE_UPDATE 0x73 |
| 804 | |
| 805 | |
| 806 | #define R_008020_GRBM_SOFT_RESET 0x8020 |
| 807 | #define S_008020_SOFT_RESET_CP(x) (((x) & 1) << 0) |
| 808 | #define S_008020_SOFT_RESET_CB(x) (((x) & 1) << 1) |
| 809 | #define S_008020_SOFT_RESET_CR(x) (((x) & 1) << 2) |
| 810 | #define S_008020_SOFT_RESET_DB(x) (((x) & 1) << 3) |
| 811 | #define S_008020_SOFT_RESET_PA(x) (((x) & 1) << 5) |
| 812 | #define S_008020_SOFT_RESET_SC(x) (((x) & 1) << 6) |
| 813 | #define S_008020_SOFT_RESET_SMX(x) (((x) & 1) << 7) |
| 814 | #define S_008020_SOFT_RESET_SPI(x) (((x) & 1) << 8) |
| 815 | #define S_008020_SOFT_RESET_SH(x) (((x) & 1) << 9) |
| 816 | #define S_008020_SOFT_RESET_SX(x) (((x) & 1) << 10) |
| 817 | #define S_008020_SOFT_RESET_TC(x) (((x) & 1) << 11) |
| 818 | #define S_008020_SOFT_RESET_TA(x) (((x) & 1) << 12) |
| 819 | #define S_008020_SOFT_RESET_VC(x) (((x) & 1) << 13) |
| 820 | #define S_008020_SOFT_RESET_VGT(x) (((x) & 1) << 14) |
| 821 | #define R_008010_GRBM_STATUS 0x8010 |
| 822 | #define S_008010_CMDFIFO_AVAIL(x) (((x) & 0x1F) << 0) |
| 823 | #define S_008010_CP_RQ_PENDING(x) (((x) & 1) << 6) |
| 824 | #define S_008010_CF_RQ_PENDING(x) (((x) & 1) << 7) |
| 825 | #define S_008010_PF_RQ_PENDING(x) (((x) & 1) << 8) |
| 826 | #define S_008010_GRBM_EE_BUSY(x) (((x) & 1) << 10) |
| 827 | #define S_008010_VC_BUSY(x) (((x) & 1) << 11) |
| 828 | #define S_008010_DB03_CLEAN(x) (((x) & 1) << 12) |
| 829 | #define S_008010_CB03_CLEAN(x) (((x) & 1) << 13) |
| 830 | #define S_008010_VGT_BUSY_NO_DMA(x) (((x) & 1) << 16) |
| 831 | #define S_008010_VGT_BUSY(x) (((x) & 1) << 17) |
| 832 | #define S_008010_TA03_BUSY(x) (((x) & 1) << 18) |
| 833 | #define S_008010_TC_BUSY(x) (((x) & 1) << 19) |
| 834 | #define S_008010_SX_BUSY(x) (((x) & 1) << 20) |
| 835 | #define S_008010_SH_BUSY(x) (((x) & 1) << 21) |
| 836 | #define S_008010_SPI03_BUSY(x) (((x) & 1) << 22) |
| 837 | #define S_008010_SMX_BUSY(x) (((x) & 1) << 23) |
| 838 | #define S_008010_SC_BUSY(x) (((x) & 1) << 24) |
| 839 | #define S_008010_PA_BUSY(x) (((x) & 1) << 25) |
| 840 | #define S_008010_DB03_BUSY(x) (((x) & 1) << 26) |
| 841 | #define S_008010_CR_BUSY(x) (((x) & 1) << 27) |
| 842 | #define S_008010_CP_COHERENCY_BUSY(x) (((x) & 1) << 28) |
| 843 | #define S_008010_CP_BUSY(x) (((x) & 1) << 29) |
| 844 | #define S_008010_CB03_BUSY(x) (((x) & 1) << 30) |
| 845 | #define S_008010_GUI_ACTIVE(x) (((x) & 1) << 31) |
| 846 | #define G_008010_CMDFIFO_AVAIL(x) (((x) >> 0) & 0x1F) |
| 847 | #define G_008010_CP_RQ_PENDING(x) (((x) >> 6) & 1) |
| 848 | #define G_008010_CF_RQ_PENDING(x) (((x) >> 7) & 1) |
| 849 | #define G_008010_PF_RQ_PENDING(x) (((x) >> 8) & 1) |
| 850 | #define G_008010_GRBM_EE_BUSY(x) (((x) >> 10) & 1) |
| 851 | #define G_008010_VC_BUSY(x) (((x) >> 11) & 1) |
| 852 | #define G_008010_DB03_CLEAN(x) (((x) >> 12) & 1) |
| 853 | #define G_008010_CB03_CLEAN(x) (((x) >> 13) & 1) |
| 854 | #define G_008010_VGT_BUSY_NO_DMA(x) (((x) >> 16) & 1) |
| 855 | #define G_008010_VGT_BUSY(x) (((x) >> 17) & 1) |
| 856 | #define G_008010_TA03_BUSY(x) (((x) >> 18) & 1) |
| 857 | #define G_008010_TC_BUSY(x) (((x) >> 19) & 1) |
| 858 | #define G_008010_SX_BUSY(x) (((x) >> 20) & 1) |
| 859 | #define G_008010_SH_BUSY(x) (((x) >> 21) & 1) |
| 860 | #define G_008010_SPI03_BUSY(x) (((x) >> 22) & 1) |
| 861 | #define G_008010_SMX_BUSY(x) (((x) >> 23) & 1) |
| 862 | #define G_008010_SC_BUSY(x) (((x) >> 24) & 1) |
| 863 | #define G_008010_PA_BUSY(x) (((x) >> 25) & 1) |
| 864 | #define G_008010_DB03_BUSY(x) (((x) >> 26) & 1) |
| 865 | #define G_008010_CR_BUSY(x) (((x) >> 27) & 1) |
| 866 | #define G_008010_CP_COHERENCY_BUSY(x) (((x) >> 28) & 1) |
| 867 | #define G_008010_CP_BUSY(x) (((x) >> 29) & 1) |
| 868 | #define G_008010_CB03_BUSY(x) (((x) >> 30) & 1) |
| 869 | #define G_008010_GUI_ACTIVE(x) (((x) >> 31) & 1) |
| 870 | #define R_008014_GRBM_STATUS2 0x8014 |
| 871 | #define S_008014_CR_CLEAN(x) (((x) & 1) << 0) |
| 872 | #define S_008014_SMX_CLEAN(x) (((x) & 1) << 1) |
| 873 | #define S_008014_SPI0_BUSY(x) (((x) & 1) << 8) |
| 874 | #define S_008014_SPI1_BUSY(x) (((x) & 1) << 9) |
| 875 | #define S_008014_SPI2_BUSY(x) (((x) & 1) << 10) |
| 876 | #define S_008014_SPI3_BUSY(x) (((x) & 1) << 11) |
| 877 | #define S_008014_TA0_BUSY(x) (((x) & 1) << 12) |
| 878 | #define S_008014_TA1_BUSY(x) (((x) & 1) << 13) |
| 879 | #define S_008014_TA2_BUSY(x) (((x) & 1) << 14) |
| 880 | #define S_008014_TA3_BUSY(x) (((x) & 1) << 15) |
| 881 | #define S_008014_DB0_BUSY(x) (((x) & 1) << 16) |
| 882 | #define S_008014_DB1_BUSY(x) (((x) & 1) << 17) |
| 883 | #define S_008014_DB2_BUSY(x) (((x) & 1) << 18) |
| 884 | #define S_008014_DB3_BUSY(x) (((x) & 1) << 19) |
| 885 | #define S_008014_CB0_BUSY(x) (((x) & 1) << 20) |
| 886 | #define S_008014_CB1_BUSY(x) (((x) & 1) << 21) |
| 887 | #define S_008014_CB2_BUSY(x) (((x) & 1) << 22) |
| 888 | #define S_008014_CB3_BUSY(x) (((x) & 1) << 23) |
| 889 | #define G_008014_CR_CLEAN(x) (((x) >> 0) & 1) |
| 890 | #define G_008014_SMX_CLEAN(x) (((x) >> 1) & 1) |
| 891 | #define G_008014_SPI0_BUSY(x) (((x) >> 8) & 1) |
| 892 | #define G_008014_SPI1_BUSY(x) (((x) >> 9) & 1) |
| 893 | #define G_008014_SPI2_BUSY(x) (((x) >> 10) & 1) |
| 894 | #define G_008014_SPI3_BUSY(x) (((x) >> 11) & 1) |
| 895 | #define G_008014_TA0_BUSY(x) (((x) >> 12) & 1) |
| 896 | #define G_008014_TA1_BUSY(x) (((x) >> 13) & 1) |
| 897 | #define G_008014_TA2_BUSY(x) (((x) >> 14) & 1) |
| 898 | #define G_008014_TA3_BUSY(x) (((x) >> 15) & 1) |
| 899 | #define G_008014_DB0_BUSY(x) (((x) >> 16) & 1) |
| 900 | #define G_008014_DB1_BUSY(x) (((x) >> 17) & 1) |
| 901 | #define G_008014_DB2_BUSY(x) (((x) >> 18) & 1) |
| 902 | #define G_008014_DB3_BUSY(x) (((x) >> 19) & 1) |
| 903 | #define G_008014_CB0_BUSY(x) (((x) >> 20) & 1) |
| 904 | #define G_008014_CB1_BUSY(x) (((x) >> 21) & 1) |
| 905 | #define G_008014_CB2_BUSY(x) (((x) >> 22) & 1) |
| 906 | #define G_008014_CB3_BUSY(x) (((x) >> 23) & 1) |
| 907 | #define R_000E50_SRBM_STATUS 0x0E50 |
| 908 | #define G_000E50_RLC_RQ_PENDING(x) (((x) >> 3) & 1) |
| 909 | #define G_000E50_RCU_RQ_PENDING(x) (((x) >> 4) & 1) |
| 910 | #define G_000E50_GRBM_RQ_PENDING(x) (((x) >> 5) & 1) |
| 911 | #define G_000E50_HI_RQ_PENDING(x) (((x) >> 6) & 1) |
| 912 | #define G_000E50_IO_EXTERN_SIGNAL(x) (((x) >> 7) & 1) |
| 913 | #define G_000E50_VMC_BUSY(x) (((x) >> 8) & 1) |
| 914 | #define G_000E50_MCB_BUSY(x) (((x) >> 9) & 1) |
| 915 | #define G_000E50_MCDZ_BUSY(x) (((x) >> 10) & 1) |
| 916 | #define G_000E50_MCDY_BUSY(x) (((x) >> 11) & 1) |
| 917 | #define G_000E50_MCDX_BUSY(x) (((x) >> 12) & 1) |
| 918 | #define G_000E50_MCDW_BUSY(x) (((x) >> 13) & 1) |
| 919 | #define G_000E50_SEM_BUSY(x) (((x) >> 14) & 1) |
| 920 | #define G_000E50_RLC_BUSY(x) (((x) >> 15) & 1) |
Jerome Glisse | 1a029b7 | 2009-10-06 19:04:30 +0200 | [diff] [blame] | 921 | #define G_000E50_BIF_BUSY(x) (((x) >> 29) & 1) |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 922 | #define R_000E60_SRBM_SOFT_RESET 0x0E60 |
| 923 | #define S_000E60_SOFT_RESET_BIF(x) (((x) & 1) << 1) |
| 924 | #define S_000E60_SOFT_RESET_CG(x) (((x) & 1) << 2) |
| 925 | #define S_000E60_SOFT_RESET_CMC(x) (((x) & 1) << 3) |
| 926 | #define S_000E60_SOFT_RESET_CSC(x) (((x) & 1) << 4) |
| 927 | #define S_000E60_SOFT_RESET_DC(x) (((x) & 1) << 5) |
| 928 | #define S_000E60_SOFT_RESET_GRBM(x) (((x) & 1) << 8) |
| 929 | #define S_000E60_SOFT_RESET_HDP(x) (((x) & 1) << 9) |
| 930 | #define S_000E60_SOFT_RESET_IH(x) (((x) & 1) << 10) |
| 931 | #define S_000E60_SOFT_RESET_MC(x) (((x) & 1) << 11) |
| 932 | #define S_000E60_SOFT_RESET_RLC(x) (((x) & 1) << 13) |
| 933 | #define S_000E60_SOFT_RESET_ROM(x) (((x) & 1) << 14) |
| 934 | #define S_000E60_SOFT_RESET_SEM(x) (((x) & 1) << 15) |
| 935 | #define S_000E60_SOFT_RESET_TSC(x) (((x) & 1) << 16) |
| 936 | #define S_000E60_SOFT_RESET_VMC(x) (((x) & 1) << 17) |
| 937 | |
Dave Airlie | 23956df | 2009-11-23 12:01:09 +1000 | [diff] [blame] | 938 | #define R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL 0x5480 |
Jerome Glisse | c8c15ff | 2010-01-18 13:01:36 +0100 | [diff] [blame] | 939 | |
Jerome Glisse | 961fb59 | 2010-02-10 22:30:05 +0000 | [diff] [blame] | 940 | #define R_028C04_PA_SC_AA_CONFIG 0x028C04 |
| 941 | #define S_028C04_MSAA_NUM_SAMPLES(x) (((x) & 0x3) << 0) |
| 942 | #define G_028C04_MSAA_NUM_SAMPLES(x) (((x) >> 0) & 0x3) |
| 943 | #define C_028C04_MSAA_NUM_SAMPLES 0xFFFFFFFC |
| 944 | #define S_028C04_AA_MASK_CENTROID_DTMN(x) (((x) & 0x1) << 4) |
| 945 | #define G_028C04_AA_MASK_CENTROID_DTMN(x) (((x) >> 4) & 0x1) |
| 946 | #define C_028C04_AA_MASK_CENTROID_DTMN 0xFFFFFFEF |
| 947 | #define S_028C04_MAX_SAMPLE_DIST(x) (((x) & 0xF) << 13) |
| 948 | #define G_028C04_MAX_SAMPLE_DIST(x) (((x) >> 13) & 0xF) |
| 949 | #define C_028C04_MAX_SAMPLE_DIST 0xFFFE1FFF |
Jerome Glisse | c8c15ff | 2010-01-18 13:01:36 +0100 | [diff] [blame] | 950 | #define R_0280E0_CB_COLOR0_FRAG 0x0280E0 |
| 951 | #define S_0280E0_BASE_256B(x) (((x) & 0xFFFFFFFF) << 0) |
| 952 | #define G_0280E0_BASE_256B(x) (((x) >> 0) & 0xFFFFFFFF) |
| 953 | #define C_0280E0_BASE_256B 0x00000000 |
| 954 | #define R_0280E4_CB_COLOR1_FRAG 0x0280E4 |
| 955 | #define R_0280E8_CB_COLOR2_FRAG 0x0280E8 |
| 956 | #define R_0280EC_CB_COLOR3_FRAG 0x0280EC |
| 957 | #define R_0280F0_CB_COLOR4_FRAG 0x0280F0 |
| 958 | #define R_0280F4_CB_COLOR5_FRAG 0x0280F4 |
| 959 | #define R_0280F8_CB_COLOR6_FRAG 0x0280F8 |
| 960 | #define R_0280FC_CB_COLOR7_FRAG 0x0280FC |
| 961 | #define R_0280C0_CB_COLOR0_TILE 0x0280C0 |
| 962 | #define S_0280C0_BASE_256B(x) (((x) & 0xFFFFFFFF) << 0) |
| 963 | #define G_0280C0_BASE_256B(x) (((x) >> 0) & 0xFFFFFFFF) |
| 964 | #define C_0280C0_BASE_256B 0x00000000 |
| 965 | #define R_0280C4_CB_COLOR1_TILE 0x0280C4 |
| 966 | #define R_0280C8_CB_COLOR2_TILE 0x0280C8 |
| 967 | #define R_0280CC_CB_COLOR3_TILE 0x0280CC |
| 968 | #define R_0280D0_CB_COLOR4_TILE 0x0280D0 |
| 969 | #define R_0280D4_CB_COLOR5_TILE 0x0280D4 |
| 970 | #define R_0280D8_CB_COLOR6_TILE 0x0280D8 |
| 971 | #define R_0280DC_CB_COLOR7_TILE 0x0280DC |
Jerome Glisse | 961fb59 | 2010-02-10 22:30:05 +0000 | [diff] [blame] | 972 | #define R_0280A0_CB_COLOR0_INFO 0x0280A0 |
| 973 | #define S_0280A0_ENDIAN(x) (((x) & 0x3) << 0) |
| 974 | #define G_0280A0_ENDIAN(x) (((x) >> 0) & 0x3) |
| 975 | #define C_0280A0_ENDIAN 0xFFFFFFFC |
| 976 | #define S_0280A0_FORMAT(x) (((x) & 0x3F) << 2) |
| 977 | #define G_0280A0_FORMAT(x) (((x) >> 2) & 0x3F) |
| 978 | #define C_0280A0_FORMAT 0xFFFFFF03 |
| 979 | #define V_0280A0_COLOR_INVALID 0x00000000 |
| 980 | #define V_0280A0_COLOR_8 0x00000001 |
| 981 | #define V_0280A0_COLOR_4_4 0x00000002 |
| 982 | #define V_0280A0_COLOR_3_3_2 0x00000003 |
| 983 | #define V_0280A0_COLOR_16 0x00000005 |
| 984 | #define V_0280A0_COLOR_16_FLOAT 0x00000006 |
| 985 | #define V_0280A0_COLOR_8_8 0x00000007 |
| 986 | #define V_0280A0_COLOR_5_6_5 0x00000008 |
| 987 | #define V_0280A0_COLOR_6_5_5 0x00000009 |
| 988 | #define V_0280A0_COLOR_1_5_5_5 0x0000000A |
| 989 | #define V_0280A0_COLOR_4_4_4_4 0x0000000B |
| 990 | #define V_0280A0_COLOR_5_5_5_1 0x0000000C |
| 991 | #define V_0280A0_COLOR_32 0x0000000D |
| 992 | #define V_0280A0_COLOR_32_FLOAT 0x0000000E |
| 993 | #define V_0280A0_COLOR_16_16 0x0000000F |
| 994 | #define V_0280A0_COLOR_16_16_FLOAT 0x00000010 |
| 995 | #define V_0280A0_COLOR_8_24 0x00000011 |
| 996 | #define V_0280A0_COLOR_8_24_FLOAT 0x00000012 |
| 997 | #define V_0280A0_COLOR_24_8 0x00000013 |
| 998 | #define V_0280A0_COLOR_24_8_FLOAT 0x00000014 |
| 999 | #define V_0280A0_COLOR_10_11_11 0x00000015 |
| 1000 | #define V_0280A0_COLOR_10_11_11_FLOAT 0x00000016 |
| 1001 | #define V_0280A0_COLOR_11_11_10 0x00000017 |
| 1002 | #define V_0280A0_COLOR_11_11_10_FLOAT 0x00000018 |
| 1003 | #define V_0280A0_COLOR_2_10_10_10 0x00000019 |
| 1004 | #define V_0280A0_COLOR_8_8_8_8 0x0000001A |
| 1005 | #define V_0280A0_COLOR_10_10_10_2 0x0000001B |
| 1006 | #define V_0280A0_COLOR_X24_8_32_FLOAT 0x0000001C |
| 1007 | #define V_0280A0_COLOR_32_32 0x0000001D |
| 1008 | #define V_0280A0_COLOR_32_32_FLOAT 0x0000001E |
| 1009 | #define V_0280A0_COLOR_16_16_16_16 0x0000001F |
| 1010 | #define V_0280A0_COLOR_16_16_16_16_FLOAT 0x00000020 |
| 1011 | #define V_0280A0_COLOR_32_32_32_32 0x00000022 |
| 1012 | #define V_0280A0_COLOR_32_32_32_32_FLOAT 0x00000023 |
| 1013 | #define S_0280A0_ARRAY_MODE(x) (((x) & 0xF) << 8) |
| 1014 | #define G_0280A0_ARRAY_MODE(x) (((x) >> 8) & 0xF) |
| 1015 | #define C_0280A0_ARRAY_MODE 0xFFFFF0FF |
| 1016 | #define V_0280A0_ARRAY_LINEAR_GENERAL 0x00000000 |
| 1017 | #define V_0280A0_ARRAY_LINEAR_ALIGNED 0x00000001 |
| 1018 | #define V_0280A0_ARRAY_1D_TILED_THIN1 0x00000002 |
| 1019 | #define V_0280A0_ARRAY_2D_TILED_THIN1 0x00000004 |
| 1020 | #define S_0280A0_NUMBER_TYPE(x) (((x) & 0x7) << 12) |
| 1021 | #define G_0280A0_NUMBER_TYPE(x) (((x) >> 12) & 0x7) |
| 1022 | #define C_0280A0_NUMBER_TYPE 0xFFFF8FFF |
| 1023 | #define S_0280A0_READ_SIZE(x) (((x) & 0x1) << 15) |
| 1024 | #define G_0280A0_READ_SIZE(x) (((x) >> 15) & 0x1) |
| 1025 | #define C_0280A0_READ_SIZE 0xFFFF7FFF |
| 1026 | #define S_0280A0_COMP_SWAP(x) (((x) & 0x3) << 16) |
| 1027 | #define G_0280A0_COMP_SWAP(x) (((x) >> 16) & 0x3) |
| 1028 | #define C_0280A0_COMP_SWAP 0xFFFCFFFF |
| 1029 | #define S_0280A0_TILE_MODE(x) (((x) & 0x3) << 18) |
| 1030 | #define G_0280A0_TILE_MODE(x) (((x) >> 18) & 0x3) |
| 1031 | #define C_0280A0_TILE_MODE 0xFFF3FFFF |
| 1032 | #define S_0280A0_BLEND_CLAMP(x) (((x) & 0x1) << 20) |
| 1033 | #define G_0280A0_BLEND_CLAMP(x) (((x) >> 20) & 0x1) |
| 1034 | #define C_0280A0_BLEND_CLAMP 0xFFEFFFFF |
| 1035 | #define S_0280A0_CLEAR_COLOR(x) (((x) & 0x1) << 21) |
| 1036 | #define G_0280A0_CLEAR_COLOR(x) (((x) >> 21) & 0x1) |
| 1037 | #define C_0280A0_CLEAR_COLOR 0xFFDFFFFF |
| 1038 | #define S_0280A0_BLEND_BYPASS(x) (((x) & 0x1) << 22) |
| 1039 | #define G_0280A0_BLEND_BYPASS(x) (((x) >> 22) & 0x1) |
| 1040 | #define C_0280A0_BLEND_BYPASS 0xFFBFFFFF |
| 1041 | #define S_0280A0_BLEND_FLOAT32(x) (((x) & 0x1) << 23) |
| 1042 | #define G_0280A0_BLEND_FLOAT32(x) (((x) >> 23) & 0x1) |
| 1043 | #define C_0280A0_BLEND_FLOAT32 0xFF7FFFFF |
| 1044 | #define S_0280A0_SIMPLE_FLOAT(x) (((x) & 0x1) << 24) |
| 1045 | #define G_0280A0_SIMPLE_FLOAT(x) (((x) >> 24) & 0x1) |
| 1046 | #define C_0280A0_SIMPLE_FLOAT 0xFEFFFFFF |
| 1047 | #define S_0280A0_ROUND_MODE(x) (((x) & 0x1) << 25) |
| 1048 | #define G_0280A0_ROUND_MODE(x) (((x) >> 25) & 0x1) |
| 1049 | #define C_0280A0_ROUND_MODE 0xFDFFFFFF |
| 1050 | #define S_0280A0_TILE_COMPACT(x) (((x) & 0x1) << 26) |
| 1051 | #define G_0280A0_TILE_COMPACT(x) (((x) >> 26) & 0x1) |
| 1052 | #define C_0280A0_TILE_COMPACT 0xFBFFFFFF |
| 1053 | #define S_0280A0_SOURCE_FORMAT(x) (((x) & 0x1) << 27) |
| 1054 | #define G_0280A0_SOURCE_FORMAT(x) (((x) >> 27) & 0x1) |
| 1055 | #define C_0280A0_SOURCE_FORMAT 0xF7FFFFFF |
| 1056 | #define R_0280A4_CB_COLOR1_INFO 0x0280A4 |
| 1057 | #define R_0280A8_CB_COLOR2_INFO 0x0280A8 |
| 1058 | #define R_0280AC_CB_COLOR3_INFO 0x0280AC |
| 1059 | #define R_0280B0_CB_COLOR4_INFO 0x0280B0 |
| 1060 | #define R_0280B4_CB_COLOR5_INFO 0x0280B4 |
| 1061 | #define R_0280B8_CB_COLOR6_INFO 0x0280B8 |
| 1062 | #define R_0280BC_CB_COLOR7_INFO 0x0280BC |
| 1063 | #define R_028060_CB_COLOR0_SIZE 0x028060 |
| 1064 | #define S_028060_PITCH_TILE_MAX(x) (((x) & 0x3FF) << 0) |
| 1065 | #define G_028060_PITCH_TILE_MAX(x) (((x) >> 0) & 0x3FF) |
| 1066 | #define C_028060_PITCH_TILE_MAX 0xFFFFFC00 |
| 1067 | #define S_028060_SLICE_TILE_MAX(x) (((x) & 0xFFFFF) << 10) |
| 1068 | #define G_028060_SLICE_TILE_MAX(x) (((x) >> 10) & 0xFFFFF) |
| 1069 | #define C_028060_SLICE_TILE_MAX 0xC00003FF |
| 1070 | #define R_028064_CB_COLOR1_SIZE 0x028064 |
| 1071 | #define R_028068_CB_COLOR2_SIZE 0x028068 |
| 1072 | #define R_02806C_CB_COLOR3_SIZE 0x02806C |
| 1073 | #define R_028070_CB_COLOR4_SIZE 0x028070 |
| 1074 | #define R_028074_CB_COLOR5_SIZE 0x028074 |
| 1075 | #define R_028078_CB_COLOR6_SIZE 0x028078 |
| 1076 | #define R_02807C_CB_COLOR7_SIZE 0x02807C |
| 1077 | #define R_028238_CB_TARGET_MASK 0x028238 |
| 1078 | #define S_028238_TARGET0_ENABLE(x) (((x) & 0xF) << 0) |
| 1079 | #define G_028238_TARGET0_ENABLE(x) (((x) >> 0) & 0xF) |
| 1080 | #define C_028238_TARGET0_ENABLE 0xFFFFFFF0 |
| 1081 | #define S_028238_TARGET1_ENABLE(x) (((x) & 0xF) << 4) |
| 1082 | #define G_028238_TARGET1_ENABLE(x) (((x) >> 4) & 0xF) |
| 1083 | #define C_028238_TARGET1_ENABLE 0xFFFFFF0F |
| 1084 | #define S_028238_TARGET2_ENABLE(x) (((x) & 0xF) << 8) |
| 1085 | #define G_028238_TARGET2_ENABLE(x) (((x) >> 8) & 0xF) |
| 1086 | #define C_028238_TARGET2_ENABLE 0xFFFFF0FF |
| 1087 | #define S_028238_TARGET3_ENABLE(x) (((x) & 0xF) << 12) |
| 1088 | #define G_028238_TARGET3_ENABLE(x) (((x) >> 12) & 0xF) |
| 1089 | #define C_028238_TARGET3_ENABLE 0xFFFF0FFF |
| 1090 | #define S_028238_TARGET4_ENABLE(x) (((x) & 0xF) << 16) |
| 1091 | #define G_028238_TARGET4_ENABLE(x) (((x) >> 16) & 0xF) |
| 1092 | #define C_028238_TARGET4_ENABLE 0xFFF0FFFF |
| 1093 | #define S_028238_TARGET5_ENABLE(x) (((x) & 0xF) << 20) |
| 1094 | #define G_028238_TARGET5_ENABLE(x) (((x) >> 20) & 0xF) |
| 1095 | #define C_028238_TARGET5_ENABLE 0xFF0FFFFF |
| 1096 | #define S_028238_TARGET6_ENABLE(x) (((x) & 0xF) << 24) |
| 1097 | #define G_028238_TARGET6_ENABLE(x) (((x) >> 24) & 0xF) |
| 1098 | #define C_028238_TARGET6_ENABLE 0xF0FFFFFF |
| 1099 | #define S_028238_TARGET7_ENABLE(x) (((x) & 0xF) << 28) |
| 1100 | #define G_028238_TARGET7_ENABLE(x) (((x) >> 28) & 0xF) |
| 1101 | #define C_028238_TARGET7_ENABLE 0x0FFFFFFF |
| 1102 | #define R_02823C_CB_SHADER_MASK 0x02823C |
| 1103 | #define S_02823C_OUTPUT0_ENABLE(x) (((x) & 0xF) << 0) |
| 1104 | #define G_02823C_OUTPUT0_ENABLE(x) (((x) >> 0) & 0xF) |
| 1105 | #define C_02823C_OUTPUT0_ENABLE 0xFFFFFFF0 |
| 1106 | #define S_02823C_OUTPUT1_ENABLE(x) (((x) & 0xF) << 4) |
| 1107 | #define G_02823C_OUTPUT1_ENABLE(x) (((x) >> 4) & 0xF) |
| 1108 | #define C_02823C_OUTPUT1_ENABLE 0xFFFFFF0F |
| 1109 | #define S_02823C_OUTPUT2_ENABLE(x) (((x) & 0xF) << 8) |
| 1110 | #define G_02823C_OUTPUT2_ENABLE(x) (((x) >> 8) & 0xF) |
| 1111 | #define C_02823C_OUTPUT2_ENABLE 0xFFFFF0FF |
| 1112 | #define S_02823C_OUTPUT3_ENABLE(x) (((x) & 0xF) << 12) |
| 1113 | #define G_02823C_OUTPUT3_ENABLE(x) (((x) >> 12) & 0xF) |
| 1114 | #define C_02823C_OUTPUT3_ENABLE 0xFFFF0FFF |
| 1115 | #define S_02823C_OUTPUT4_ENABLE(x) (((x) & 0xF) << 16) |
| 1116 | #define G_02823C_OUTPUT4_ENABLE(x) (((x) >> 16) & 0xF) |
| 1117 | #define C_02823C_OUTPUT4_ENABLE 0xFFF0FFFF |
| 1118 | #define S_02823C_OUTPUT5_ENABLE(x) (((x) & 0xF) << 20) |
| 1119 | #define G_02823C_OUTPUT5_ENABLE(x) (((x) >> 20) & 0xF) |
| 1120 | #define C_02823C_OUTPUT5_ENABLE 0xFF0FFFFF |
| 1121 | #define S_02823C_OUTPUT6_ENABLE(x) (((x) & 0xF) << 24) |
| 1122 | #define G_02823C_OUTPUT6_ENABLE(x) (((x) >> 24) & 0xF) |
| 1123 | #define C_02823C_OUTPUT6_ENABLE 0xF0FFFFFF |
| 1124 | #define S_02823C_OUTPUT7_ENABLE(x) (((x) & 0xF) << 28) |
| 1125 | #define G_02823C_OUTPUT7_ENABLE(x) (((x) >> 28) & 0xF) |
| 1126 | #define C_02823C_OUTPUT7_ENABLE 0x0FFFFFFF |
| 1127 | #define R_028AB0_VGT_STRMOUT_EN 0x028AB0 |
| 1128 | #define S_028AB0_STREAMOUT(x) (((x) & 0x1) << 0) |
| 1129 | #define G_028AB0_STREAMOUT(x) (((x) >> 0) & 0x1) |
| 1130 | #define C_028AB0_STREAMOUT 0xFFFFFFFE |
| 1131 | #define R_028B20_VGT_STRMOUT_BUFFER_EN 0x028B20 |
| 1132 | #define S_028B20_BUFFER_0_EN(x) (((x) & 0x1) << 0) |
| 1133 | #define G_028B20_BUFFER_0_EN(x) (((x) >> 0) & 0x1) |
| 1134 | #define C_028B20_BUFFER_0_EN 0xFFFFFFFE |
| 1135 | #define S_028B20_BUFFER_1_EN(x) (((x) & 0x1) << 1) |
| 1136 | #define G_028B20_BUFFER_1_EN(x) (((x) >> 1) & 0x1) |
| 1137 | #define C_028B20_BUFFER_1_EN 0xFFFFFFFD |
| 1138 | #define S_028B20_BUFFER_2_EN(x) (((x) & 0x1) << 2) |
| 1139 | #define G_028B20_BUFFER_2_EN(x) (((x) >> 2) & 0x1) |
| 1140 | #define C_028B20_BUFFER_2_EN 0xFFFFFFFB |
| 1141 | #define S_028B20_BUFFER_3_EN(x) (((x) & 0x1) << 3) |
| 1142 | #define G_028B20_BUFFER_3_EN(x) (((x) >> 3) & 0x1) |
| 1143 | #define C_028B20_BUFFER_3_EN 0xFFFFFFF7 |
| 1144 | #define S_028B20_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1145 | #define G_028B20_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1146 | #define C_028B20_SIZE 0x00000000 |
| 1147 | #define R_038000_SQ_TEX_RESOURCE_WORD0_0 0x038000 |
| 1148 | #define S_038000_DIM(x) (((x) & 0x7) << 0) |
| 1149 | #define G_038000_DIM(x) (((x) >> 0) & 0x7) |
| 1150 | #define C_038000_DIM 0xFFFFFFF8 |
| 1151 | #define V_038000_SQ_TEX_DIM_1D 0x00000000 |
| 1152 | #define V_038000_SQ_TEX_DIM_2D 0x00000001 |
| 1153 | #define V_038000_SQ_TEX_DIM_3D 0x00000002 |
| 1154 | #define V_038000_SQ_TEX_DIM_CUBEMAP 0x00000003 |
| 1155 | #define V_038000_SQ_TEX_DIM_1D_ARRAY 0x00000004 |
| 1156 | #define V_038000_SQ_TEX_DIM_2D_ARRAY 0x00000005 |
| 1157 | #define V_038000_SQ_TEX_DIM_2D_MSAA 0x00000006 |
| 1158 | #define V_038000_SQ_TEX_DIM_2D_ARRAY_MSAA 0x00000007 |
| 1159 | #define S_038000_TILE_MODE(x) (((x) & 0xF) << 3) |
| 1160 | #define G_038000_TILE_MODE(x) (((x) >> 3) & 0xF) |
| 1161 | #define C_038000_TILE_MODE 0xFFFFFF87 |
| 1162 | #define S_038000_TILE_TYPE(x) (((x) & 0x1) << 7) |
| 1163 | #define G_038000_TILE_TYPE(x) (((x) >> 7) & 0x1) |
| 1164 | #define C_038000_TILE_TYPE 0xFFFFFF7F |
| 1165 | #define S_038000_PITCH(x) (((x) & 0x7FF) << 8) |
| 1166 | #define G_038000_PITCH(x) (((x) >> 8) & 0x7FF) |
| 1167 | #define C_038000_PITCH 0xFFF800FF |
| 1168 | #define S_038000_TEX_WIDTH(x) (((x) & 0x1FFF) << 19) |
| 1169 | #define G_038000_TEX_WIDTH(x) (((x) >> 19) & 0x1FFF) |
| 1170 | #define C_038000_TEX_WIDTH 0x0007FFFF |
| 1171 | #define R_038004_SQ_TEX_RESOURCE_WORD1_0 0x038004 |
| 1172 | #define S_038004_TEX_HEIGHT(x) (((x) & 0x1FFF) << 0) |
| 1173 | #define G_038004_TEX_HEIGHT(x) (((x) >> 0) & 0x1FFF) |
| 1174 | #define C_038004_TEX_HEIGHT 0xFFFFE000 |
| 1175 | #define S_038004_TEX_DEPTH(x) (((x) & 0x1FFF) << 13) |
| 1176 | #define G_038004_TEX_DEPTH(x) (((x) >> 13) & 0x1FFF) |
| 1177 | #define C_038004_TEX_DEPTH 0xFC001FFF |
| 1178 | #define S_038004_DATA_FORMAT(x) (((x) & 0x3F) << 26) |
| 1179 | #define G_038004_DATA_FORMAT(x) (((x) >> 26) & 0x3F) |
| 1180 | #define C_038004_DATA_FORMAT 0x03FFFFFF |
| 1181 | #define V_038004_COLOR_INVALID 0x00000000 |
| 1182 | #define V_038004_COLOR_8 0x00000001 |
| 1183 | #define V_038004_COLOR_4_4 0x00000002 |
| 1184 | #define V_038004_COLOR_3_3_2 0x00000003 |
| 1185 | #define V_038004_COLOR_16 0x00000005 |
| 1186 | #define V_038004_COLOR_16_FLOAT 0x00000006 |
| 1187 | #define V_038004_COLOR_8_8 0x00000007 |
| 1188 | #define V_038004_COLOR_5_6_5 0x00000008 |
| 1189 | #define V_038004_COLOR_6_5_5 0x00000009 |
| 1190 | #define V_038004_COLOR_1_5_5_5 0x0000000A |
| 1191 | #define V_038004_COLOR_4_4_4_4 0x0000000B |
| 1192 | #define V_038004_COLOR_5_5_5_1 0x0000000C |
| 1193 | #define V_038004_COLOR_32 0x0000000D |
| 1194 | #define V_038004_COLOR_32_FLOAT 0x0000000E |
| 1195 | #define V_038004_COLOR_16_16 0x0000000F |
| 1196 | #define V_038004_COLOR_16_16_FLOAT 0x00000010 |
| 1197 | #define V_038004_COLOR_8_24 0x00000011 |
| 1198 | #define V_038004_COLOR_8_24_FLOAT 0x00000012 |
| 1199 | #define V_038004_COLOR_24_8 0x00000013 |
| 1200 | #define V_038004_COLOR_24_8_FLOAT 0x00000014 |
| 1201 | #define V_038004_COLOR_10_11_11 0x00000015 |
| 1202 | #define V_038004_COLOR_10_11_11_FLOAT 0x00000016 |
| 1203 | #define V_038004_COLOR_11_11_10 0x00000017 |
| 1204 | #define V_038004_COLOR_11_11_10_FLOAT 0x00000018 |
| 1205 | #define V_038004_COLOR_2_10_10_10 0x00000019 |
| 1206 | #define V_038004_COLOR_8_8_8_8 0x0000001A |
| 1207 | #define V_038004_COLOR_10_10_10_2 0x0000001B |
| 1208 | #define V_038004_COLOR_X24_8_32_FLOAT 0x0000001C |
| 1209 | #define V_038004_COLOR_32_32 0x0000001D |
| 1210 | #define V_038004_COLOR_32_32_FLOAT 0x0000001E |
| 1211 | #define V_038004_COLOR_16_16_16_16 0x0000001F |
| 1212 | #define V_038004_COLOR_16_16_16_16_FLOAT 0x00000020 |
| 1213 | #define V_038004_COLOR_32_32_32_32 0x00000022 |
| 1214 | #define V_038004_COLOR_32_32_32_32_FLOAT 0x00000023 |
| 1215 | #define V_038004_FMT_1 0x00000025 |
| 1216 | #define V_038004_FMT_GB_GR 0x00000027 |
| 1217 | #define V_038004_FMT_BG_RG 0x00000028 |
| 1218 | #define V_038004_FMT_32_AS_8 0x00000029 |
| 1219 | #define V_038004_FMT_32_AS_8_8 0x0000002A |
| 1220 | #define V_038004_FMT_5_9_9_9_SHAREDEXP 0x0000002B |
| 1221 | #define V_038004_FMT_8_8_8 0x0000002C |
| 1222 | #define V_038004_FMT_16_16_16 0x0000002D |
| 1223 | #define V_038004_FMT_16_16_16_FLOAT 0x0000002E |
| 1224 | #define V_038004_FMT_32_32_32 0x0000002F |
| 1225 | #define V_038004_FMT_32_32_32_FLOAT 0x00000030 |
| 1226 | #define R_038010_SQ_TEX_RESOURCE_WORD4_0 0x038010 |
| 1227 | #define S_038010_FORMAT_COMP_X(x) (((x) & 0x3) << 0) |
| 1228 | #define G_038010_FORMAT_COMP_X(x) (((x) >> 0) & 0x3) |
| 1229 | #define C_038010_FORMAT_COMP_X 0xFFFFFFFC |
| 1230 | #define S_038010_FORMAT_COMP_Y(x) (((x) & 0x3) << 2) |
| 1231 | #define G_038010_FORMAT_COMP_Y(x) (((x) >> 2) & 0x3) |
| 1232 | #define C_038010_FORMAT_COMP_Y 0xFFFFFFF3 |
| 1233 | #define S_038010_FORMAT_COMP_Z(x) (((x) & 0x3) << 4) |
| 1234 | #define G_038010_FORMAT_COMP_Z(x) (((x) >> 4) & 0x3) |
| 1235 | #define C_038010_FORMAT_COMP_Z 0xFFFFFFCF |
| 1236 | #define S_038010_FORMAT_COMP_W(x) (((x) & 0x3) << 6) |
| 1237 | #define G_038010_FORMAT_COMP_W(x) (((x) >> 6) & 0x3) |
| 1238 | #define C_038010_FORMAT_COMP_W 0xFFFFFF3F |
| 1239 | #define S_038010_NUM_FORMAT_ALL(x) (((x) & 0x3) << 8) |
| 1240 | #define G_038010_NUM_FORMAT_ALL(x) (((x) >> 8) & 0x3) |
| 1241 | #define C_038010_NUM_FORMAT_ALL 0xFFFFFCFF |
| 1242 | #define S_038010_SRF_MODE_ALL(x) (((x) & 0x1) << 10) |
| 1243 | #define G_038010_SRF_MODE_ALL(x) (((x) >> 10) & 0x1) |
| 1244 | #define C_038010_SRF_MODE_ALL 0xFFFFFBFF |
| 1245 | #define S_038010_FORCE_DEGAMMA(x) (((x) & 0x1) << 11) |
| 1246 | #define G_038010_FORCE_DEGAMMA(x) (((x) >> 11) & 0x1) |
| 1247 | #define C_038010_FORCE_DEGAMMA 0xFFFFF7FF |
| 1248 | #define S_038010_ENDIAN_SWAP(x) (((x) & 0x3) << 12) |
| 1249 | #define G_038010_ENDIAN_SWAP(x) (((x) >> 12) & 0x3) |
| 1250 | #define C_038010_ENDIAN_SWAP 0xFFFFCFFF |
| 1251 | #define S_038010_REQUEST_SIZE(x) (((x) & 0x3) << 14) |
| 1252 | #define G_038010_REQUEST_SIZE(x) (((x) >> 14) & 0x3) |
| 1253 | #define C_038010_REQUEST_SIZE 0xFFFF3FFF |
| 1254 | #define S_038010_DST_SEL_X(x) (((x) & 0x7) << 16) |
| 1255 | #define G_038010_DST_SEL_X(x) (((x) >> 16) & 0x7) |
| 1256 | #define C_038010_DST_SEL_X 0xFFF8FFFF |
| 1257 | #define S_038010_DST_SEL_Y(x) (((x) & 0x7) << 19) |
| 1258 | #define G_038010_DST_SEL_Y(x) (((x) >> 19) & 0x7) |
| 1259 | #define C_038010_DST_SEL_Y 0xFFC7FFFF |
| 1260 | #define S_038010_DST_SEL_Z(x) (((x) & 0x7) << 22) |
| 1261 | #define G_038010_DST_SEL_Z(x) (((x) >> 22) & 0x7) |
| 1262 | #define C_038010_DST_SEL_Z 0xFE3FFFFF |
| 1263 | #define S_038010_DST_SEL_W(x) (((x) & 0x7) << 25) |
| 1264 | #define G_038010_DST_SEL_W(x) (((x) >> 25) & 0x7) |
| 1265 | #define C_038010_DST_SEL_W 0xF1FFFFFF |
| 1266 | #define S_038010_BASE_LEVEL(x) (((x) & 0xF) << 28) |
| 1267 | #define G_038010_BASE_LEVEL(x) (((x) >> 28) & 0xF) |
| 1268 | #define C_038010_BASE_LEVEL 0x0FFFFFFF |
| 1269 | #define R_038014_SQ_TEX_RESOURCE_WORD5_0 0x038014 |
| 1270 | #define S_038014_LAST_LEVEL(x) (((x) & 0xF) << 0) |
| 1271 | #define G_038014_LAST_LEVEL(x) (((x) >> 0) & 0xF) |
| 1272 | #define C_038014_LAST_LEVEL 0xFFFFFFF0 |
| 1273 | #define S_038014_BASE_ARRAY(x) (((x) & 0x1FFF) << 4) |
| 1274 | #define G_038014_BASE_ARRAY(x) (((x) >> 4) & 0x1FFF) |
| 1275 | #define C_038014_BASE_ARRAY 0xFFFE000F |
| 1276 | #define S_038014_LAST_ARRAY(x) (((x) & 0x1FFF) << 17) |
| 1277 | #define G_038014_LAST_ARRAY(x) (((x) >> 17) & 0x1FFF) |
| 1278 | #define C_038014_LAST_ARRAY 0xC001FFFF |
| 1279 | #define R_0288A8_SQ_ESGS_RING_ITEMSIZE 0x0288A8 |
| 1280 | #define S_0288A8_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1281 | #define G_0288A8_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1282 | #define C_0288A8_ITEMSIZE 0xFFFF8000 |
| 1283 | #define R_008C44_SQ_ESGS_RING_SIZE 0x008C44 |
| 1284 | #define S_008C44_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1285 | #define G_008C44_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1286 | #define C_008C44_MEM_SIZE 0x00000000 |
| 1287 | #define R_0288B0_SQ_ESTMP_RING_ITEMSIZE 0x0288B0 |
| 1288 | #define S_0288B0_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1289 | #define G_0288B0_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1290 | #define C_0288B0_ITEMSIZE 0xFFFF8000 |
| 1291 | #define R_008C54_SQ_ESTMP_RING_SIZE 0x008C54 |
| 1292 | #define S_008C54_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1293 | #define G_008C54_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1294 | #define C_008C54_MEM_SIZE 0x00000000 |
| 1295 | #define R_0288C0_SQ_FBUF_RING_ITEMSIZE 0x0288C0 |
| 1296 | #define S_0288C0_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1297 | #define G_0288C0_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1298 | #define C_0288C0_ITEMSIZE 0xFFFF8000 |
| 1299 | #define R_008C74_SQ_FBUF_RING_SIZE 0x008C74 |
| 1300 | #define S_008C74_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1301 | #define G_008C74_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1302 | #define C_008C74_MEM_SIZE 0x00000000 |
| 1303 | #define R_0288B4_SQ_GSTMP_RING_ITEMSIZE 0x0288B4 |
| 1304 | #define S_0288B4_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1305 | #define G_0288B4_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1306 | #define C_0288B4_ITEMSIZE 0xFFFF8000 |
| 1307 | #define R_008C5C_SQ_GSTMP_RING_SIZE 0x008C5C |
| 1308 | #define S_008C5C_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1309 | #define G_008C5C_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1310 | #define C_008C5C_MEM_SIZE 0x00000000 |
| 1311 | #define R_0288AC_SQ_GSVS_RING_ITEMSIZE 0x0288AC |
| 1312 | #define S_0288AC_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1313 | #define G_0288AC_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1314 | #define C_0288AC_ITEMSIZE 0xFFFF8000 |
| 1315 | #define R_008C4C_SQ_GSVS_RING_SIZE 0x008C4C |
| 1316 | #define S_008C4C_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1317 | #define G_008C4C_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1318 | #define C_008C4C_MEM_SIZE 0x00000000 |
| 1319 | #define R_0288BC_SQ_PSTMP_RING_ITEMSIZE 0x0288BC |
| 1320 | #define S_0288BC_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1321 | #define G_0288BC_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1322 | #define C_0288BC_ITEMSIZE 0xFFFF8000 |
| 1323 | #define R_008C6C_SQ_PSTMP_RING_SIZE 0x008C6C |
| 1324 | #define S_008C6C_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1325 | #define G_008C6C_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1326 | #define C_008C6C_MEM_SIZE 0x00000000 |
| 1327 | #define R_0288C4_SQ_REDUC_RING_ITEMSIZE 0x0288C4 |
| 1328 | #define S_0288C4_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1329 | #define G_0288C4_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1330 | #define C_0288C4_ITEMSIZE 0xFFFF8000 |
| 1331 | #define R_008C7C_SQ_REDUC_RING_SIZE 0x008C7C |
| 1332 | #define S_008C7C_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1333 | #define G_008C7C_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1334 | #define C_008C7C_MEM_SIZE 0x00000000 |
| 1335 | #define R_0288B8_SQ_VSTMP_RING_ITEMSIZE 0x0288B8 |
| 1336 | #define S_0288B8_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1337 | #define G_0288B8_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1338 | #define C_0288B8_ITEMSIZE 0xFFFF8000 |
| 1339 | #define R_008C64_SQ_VSTMP_RING_SIZE 0x008C64 |
| 1340 | #define S_008C64_MEM_SIZE(x) (((x) & 0xFFFFFFFF) << 0) |
| 1341 | #define G_008C64_MEM_SIZE(x) (((x) >> 0) & 0xFFFFFFFF) |
| 1342 | #define C_008C64_MEM_SIZE 0x00000000 |
| 1343 | #define R_0288C8_SQ_GS_VERT_ITEMSIZE 0x0288C8 |
| 1344 | #define S_0288C8_ITEMSIZE(x) (((x) & 0x7FFF) << 0) |
| 1345 | #define G_0288C8_ITEMSIZE(x) (((x) >> 0) & 0x7FFF) |
| 1346 | #define C_0288C8_ITEMSIZE 0xFFFF8000 |
| 1347 | #define R_028010_DB_DEPTH_INFO 0x028010 |
| 1348 | #define S_028010_FORMAT(x) (((x) & 0x7) << 0) |
| 1349 | #define G_028010_FORMAT(x) (((x) >> 0) & 0x7) |
| 1350 | #define C_028010_FORMAT 0xFFFFFFF8 |
| 1351 | #define V_028010_DEPTH_INVALID 0x00000000 |
| 1352 | #define V_028010_DEPTH_16 0x00000001 |
| 1353 | #define V_028010_DEPTH_X8_24 0x00000002 |
| 1354 | #define V_028010_DEPTH_8_24 0x00000003 |
| 1355 | #define V_028010_DEPTH_X8_24_FLOAT 0x00000004 |
| 1356 | #define V_028010_DEPTH_8_24_FLOAT 0x00000005 |
| 1357 | #define V_028010_DEPTH_32_FLOAT 0x00000006 |
| 1358 | #define V_028010_DEPTH_X24_8_32_FLOAT 0x00000007 |
| 1359 | #define S_028010_READ_SIZE(x) (((x) & 0x1) << 3) |
| 1360 | #define G_028010_READ_SIZE(x) (((x) >> 3) & 0x1) |
| 1361 | #define C_028010_READ_SIZE 0xFFFFFFF7 |
| 1362 | #define S_028010_ARRAY_MODE(x) (((x) & 0xF) << 15) |
| 1363 | #define G_028010_ARRAY_MODE(x) (((x) >> 15) & 0xF) |
| 1364 | #define C_028010_ARRAY_MODE 0xFFF87FFF |
| 1365 | #define S_028010_TILE_SURFACE_ENABLE(x) (((x) & 0x1) << 25) |
| 1366 | #define G_028010_TILE_SURFACE_ENABLE(x) (((x) >> 25) & 0x1) |
| 1367 | #define C_028010_TILE_SURFACE_ENABLE 0xFDFFFFFF |
| 1368 | #define S_028010_TILE_COMPACT(x) (((x) & 0x1) << 26) |
| 1369 | #define G_028010_TILE_COMPACT(x) (((x) >> 26) & 0x1) |
| 1370 | #define C_028010_TILE_COMPACT 0xFBFFFFFF |
| 1371 | #define S_028010_ZRANGE_PRECISION(x) (((x) & 0x1) << 31) |
| 1372 | #define G_028010_ZRANGE_PRECISION(x) (((x) >> 31) & 0x1) |
| 1373 | #define C_028010_ZRANGE_PRECISION 0x7FFFFFFF |
| 1374 | #define R_028000_DB_DEPTH_SIZE 0x028000 |
| 1375 | #define S_028000_PITCH_TILE_MAX(x) (((x) & 0x3FF) << 0) |
| 1376 | #define G_028000_PITCH_TILE_MAX(x) (((x) >> 0) & 0x3FF) |
| 1377 | #define C_028000_PITCH_TILE_MAX 0xFFFFFC00 |
| 1378 | #define S_028000_SLICE_TILE_MAX(x) (((x) & 0xFFFFF) << 10) |
| 1379 | #define G_028000_SLICE_TILE_MAX(x) (((x) >> 10) & 0xFFFFF) |
| 1380 | #define C_028000_SLICE_TILE_MAX 0xC00003FF |
| 1381 | #define R_028004_DB_DEPTH_VIEW 0x028004 |
| 1382 | #define S_028004_SLICE_START(x) (((x) & 0x7FF) << 0) |
| 1383 | #define G_028004_SLICE_START(x) (((x) >> 0) & 0x7FF) |
| 1384 | #define C_028004_SLICE_START 0xFFFFF800 |
| 1385 | #define S_028004_SLICE_MAX(x) (((x) & 0x7FF) << 13) |
| 1386 | #define G_028004_SLICE_MAX(x) (((x) >> 13) & 0x7FF) |
| 1387 | #define C_028004_SLICE_MAX 0xFF001FFF |
| 1388 | #define R_028800_DB_DEPTH_CONTROL 0x028800 |
| 1389 | #define S_028800_STENCIL_ENABLE(x) (((x) & 0x1) << 0) |
| 1390 | #define G_028800_STENCIL_ENABLE(x) (((x) >> 0) & 0x1) |
| 1391 | #define C_028800_STENCIL_ENABLE 0xFFFFFFFE |
| 1392 | #define S_028800_Z_ENABLE(x) (((x) & 0x1) << 1) |
| 1393 | #define G_028800_Z_ENABLE(x) (((x) >> 1) & 0x1) |
| 1394 | #define C_028800_Z_ENABLE 0xFFFFFFFD |
| 1395 | #define S_028800_Z_WRITE_ENABLE(x) (((x) & 0x1) << 2) |
| 1396 | #define G_028800_Z_WRITE_ENABLE(x) (((x) >> 2) & 0x1) |
| 1397 | #define C_028800_Z_WRITE_ENABLE 0xFFFFFFFB |
| 1398 | #define S_028800_ZFUNC(x) (((x) & 0x7) << 4) |
| 1399 | #define G_028800_ZFUNC(x) (((x) >> 4) & 0x7) |
| 1400 | #define C_028800_ZFUNC 0xFFFFFF8F |
| 1401 | #define S_028800_BACKFACE_ENABLE(x) (((x) & 0x1) << 7) |
| 1402 | #define G_028800_BACKFACE_ENABLE(x) (((x) >> 7) & 0x1) |
| 1403 | #define C_028800_BACKFACE_ENABLE 0xFFFFFF7F |
| 1404 | #define S_028800_STENCILFUNC(x) (((x) & 0x7) << 8) |
| 1405 | #define G_028800_STENCILFUNC(x) (((x) >> 8) & 0x7) |
| 1406 | #define C_028800_STENCILFUNC 0xFFFFF8FF |
| 1407 | #define S_028800_STENCILFAIL(x) (((x) & 0x7) << 11) |
| 1408 | #define G_028800_STENCILFAIL(x) (((x) >> 11) & 0x7) |
| 1409 | #define C_028800_STENCILFAIL 0xFFFFC7FF |
| 1410 | #define S_028800_STENCILZPASS(x) (((x) & 0x7) << 14) |
| 1411 | #define G_028800_STENCILZPASS(x) (((x) >> 14) & 0x7) |
| 1412 | #define C_028800_STENCILZPASS 0xFFFE3FFF |
| 1413 | #define S_028800_STENCILZFAIL(x) (((x) & 0x7) << 17) |
| 1414 | #define G_028800_STENCILZFAIL(x) (((x) >> 17) & 0x7) |
| 1415 | #define C_028800_STENCILZFAIL 0xFFF1FFFF |
| 1416 | #define S_028800_STENCILFUNC_BF(x) (((x) & 0x7) << 20) |
| 1417 | #define G_028800_STENCILFUNC_BF(x) (((x) >> 20) & 0x7) |
| 1418 | #define C_028800_STENCILFUNC_BF 0xFF8FFFFF |
| 1419 | #define S_028800_STENCILFAIL_BF(x) (((x) & 0x7) << 23) |
| 1420 | #define G_028800_STENCILFAIL_BF(x) (((x) >> 23) & 0x7) |
| 1421 | #define C_028800_STENCILFAIL_BF 0xFC7FFFFF |
| 1422 | #define S_028800_STENCILZPASS_BF(x) (((x) & 0x7) << 26) |
| 1423 | #define G_028800_STENCILZPASS_BF(x) (((x) >> 26) & 0x7) |
| 1424 | #define C_028800_STENCILZPASS_BF 0xE3FFFFFF |
| 1425 | #define S_028800_STENCILZFAIL_BF(x) (((x) & 0x7) << 29) |
| 1426 | #define G_028800_STENCILZFAIL_BF(x) (((x) >> 29) & 0x7) |
| 1427 | #define C_028800_STENCILZFAIL_BF 0x1FFFFFFF |
Jerome Glisse | c8c15ff | 2010-01-18 13:01:36 +0100 | [diff] [blame] | 1428 | |
Jerome Glisse | 3ce0a23 | 2009-09-08 10:10:24 +1000 | [diff] [blame] | 1429 | #endif |