Mercurial > mplayer.hg
comparison drivers/radeon/radeon.h @ 1915:31fdf7bb1a8e
A lot of VE related improvements and code cleanup
author | nick |
---|---|
date | Tue, 18 Sep 2001 16:28:30 +0000 |
parents | 838bfa146fa3 |
children | 0f204bd39635 |
comparison
equal
deleted
inserted
replaced
1914:838bfa146fa3 | 1915:31fdf7bb1a8e |
---|---|
7 #define PCI_DEVICE_ID_RADEON_QE 0x5145 | 7 #define PCI_DEVICE_ID_RADEON_QE 0x5145 |
8 #define PCI_DEVICE_ID_RADEON_QF 0x5146 | 8 #define PCI_DEVICE_ID_RADEON_QF 0x5146 |
9 #define PCI_DEVICE_ID_RADEON_QG 0x5147 | 9 #define PCI_DEVICE_ID_RADEON_QG 0x5147 |
10 #define PCI_DEVICE_ID_RADEON_QY 0x5159 | 10 #define PCI_DEVICE_ID_RADEON_QY 0x5159 |
11 #define PCI_DEVICE_ID_RADEON_QZ 0x515A | 11 #define PCI_DEVICE_ID_RADEON_QZ 0x515A |
12 #define PCI_DEVICE_ID_RADEON_LY 0x4C59 | |
13 #define PCI_DEVICE_ID_RADEON_LZ 0x4C5A | |
14 #define PCI_DEVICE_ID_RADEON_LW 0x4C57 | |
12 | 15 |
13 #define RADEON_REGSIZE 0x4000 | 16 #define RADEON_REGSIZE 0x4000 |
14 | 17 |
15 | 18 |
16 #define MM_INDEX 0x0000 | 19 #define MM_INDEX 0x0000 |
20 /* MM_INDEX bit constants */ | |
21 # define MM_APER 0x80000000 | |
17 #define MM_DATA 0x0004 | 22 #define MM_DATA 0x0004 |
18 #define BUS_CNTL 0x0030 | 23 #define BUS_CNTL 0x0030 |
24 /* BUS_CNTL bit constants */ | |
25 # define BUS_DBL_RESYNC 0x00000001 | |
26 # define BUS_MSTR_RESET 0x00000002 | |
27 # define BUS_FLUSH_BUF 0x00000004 | |
28 # define BUS_STOP_REQ_DIS 0x00000008 | |
29 # define BUS_ROTATION_DIS 0x00000010 | |
30 # define BUS_MASTER_DIS 0x00000040 | |
31 # define BUS_ROM_WRT_EN 0x00000080 | |
32 # define BUS_DIS_ROM 0x00001000 | |
33 # define BUS_PCI_READ_RETRY_EN 0x00002000 | |
34 # define BUS_AGP_AD_STEPPING_EN 0x00004000 | |
35 # define BUS_PCI_WRT_RETRY_EN 0x00008000 | |
36 # define BUS_MSTR_RD_MULT 0x00100000 | |
37 # define BUS_MSTR_RD_LINE 0x00200000 | |
38 # define BUS_SUSPEND 0x00400000 | |
39 # define LAT_16X 0x00800000 | |
40 # define BUS_RD_DISCARD_EN 0x01000000 | |
41 # define BUS_RD_ABORT_EN 0x02000000 | |
42 # define BUS_MSTR_WS 0x04000000 | |
43 # define BUS_PARKING_DIS 0x08000000 | |
44 # define BUS_MSTR_DISCONNECT_EN 0x10000000 | |
45 # define BUS_WRT_BURST 0x20000000 | |
46 # define BUS_READ_BURST 0x40000000 | |
47 # define BUS_RDY_READ_DLY 0x80000000 | |
19 #define HI_STAT 0x004C | 48 #define HI_STAT 0x004C |
20 #define BUS_CNTL1 0x0034 | 49 #define BUS_CNTL1 0x0034 |
50 # define BUS_WAIT_ON_LOCK_EN (1 << 4) | |
21 #define I2C_CNTL_1 0x0094 | 51 #define I2C_CNTL_1 0x0094 |
22 #define CONFIG_CNTL 0x00E0 | 52 #define CONFIG_CNTL 0x00E0 |
53 /* CONFIG_CNTL bit constants */ | |
54 # define CFG_VGA_RAM_EN 0x00000100 | |
23 #define CONFIG_MEMSIZE 0x00F8 | 55 #define CONFIG_MEMSIZE 0x00F8 |
24 #define CONFIG_APER_0_BASE 0x0100 | 56 #define CONFIG_APER_0_BASE 0x0100 |
25 #define CONFIG_APER_1_BASE 0x0104 | 57 #define CONFIG_APER_1_BASE 0x0104 |
26 #define CONFIG_APER_SIZE 0x0108 | 58 #define CONFIG_APER_SIZE 0x0108 |
27 #define CONFIG_REG_1_BASE 0x010C | 59 #define CONFIG_REG_1_BASE 0x010C |
28 #define CONFIG_REG_APER_SIZE 0x0110 | 60 #define CONFIG_REG_APER_SIZE 0x0110 |
29 #define PAD_AGPINPUT_DELAY 0x0164 | 61 #define PAD_AGPINPUT_DELAY 0x0164 |
30 #define PAD_CTLR_STRENGTH 0x0168 | 62 #define PAD_CTLR_STRENGTH 0x0168 |
31 #define PAD_CTLR_UPDATE 0x016C | 63 #define PAD_CTLR_UPDATE 0x016C |
32 #define AGP_CNTL 0x0174 | 64 #define AGP_CNTL 0x0174 |
65 # define AGP_APER_SIZE_256MB (0x00 << 0) | |
66 # define AGP_APER_SIZE_128MB (0x20 << 0) | |
67 # define AGP_APER_SIZE_64MB (0x30 << 0) | |
68 # define AGP_APER_SIZE_32MB (0x38 << 0) | |
69 # define AGP_APER_SIZE_16MB (0x3c << 0) | |
70 # define AGP_APER_SIZE_8MB (0x3e << 0) | |
71 # define AGP_APER_SIZE_4MB (0x3f << 0) | |
72 # define AGP_APER_SIZE_MASK (0x3f << 0) | |
33 #define BM_STATUS 0x0160 | 73 #define BM_STATUS 0x0160 |
34 #define CAP0_TRIG_CNTL 0x0950 | 74 #define CAP0_TRIG_CNTL 0x0950 |
35 #define VIPH_CONTROL 0x0C40 | 75 #define VIPH_CONTROL 0x0C40 |
36 #define VENDOR_ID 0x0F00 | 76 #define VENDOR_ID 0x0F00 |
37 #define DEVICE_ID 0x0F02 | 77 #define DEVICE_ID 0x0F02 |
61 #define PMI_PMC_REG 0x0F52 | 101 #define PMI_PMC_REG 0x0F52 |
62 #define PM_STATUS 0x0F54 | 102 #define PM_STATUS 0x0F54 |
63 #define PMI_DATA 0x0F57 | 103 #define PMI_DATA 0x0F57 |
64 #define AGP_CAP_ID 0x0F58 | 104 #define AGP_CAP_ID 0x0F58 |
65 #define AGP_STATUS 0x0F5C | 105 #define AGP_STATUS 0x0F5C |
106 # define AGP_1X_MODE 0x01 | |
107 # define AGP_2X_MODE 0x02 | |
108 # define AGP_4X_MODE 0x04 | |
109 # define AGP_MODE_MASK 0x07 | |
66 #define AGP_COMMAND 0x0F60 | 110 #define AGP_COMMAND 0x0F60 |
67 #define AIC_CTRL 0x01D0 | 111 #define AIC_CTRL 0x01D0 |
68 #define AIC_STAT 0x01D4 | 112 #define AIC_STAT 0x01D4 |
69 #define AIC_PT_BASE 0x01D8 | 113 #define AIC_PT_BASE 0x01D8 |
70 #define AIC_LO_ADDR 0x01DC | 114 #define AIC_LO_ADDR 0x01DC |
71 #define AIC_HI_ADDR 0x01E0 | 115 #define AIC_HI_ADDR 0x01E0 |
72 #define AIC_TLB_ADDR 0x01E4 | 116 #define AIC_TLB_ADDR 0x01E4 |
73 #define AIC_TLB_DATA 0x01E8 | 117 #define AIC_TLB_DATA 0x01E8 |
74 #define DAC_CNTL 0x0058 | 118 #define DAC_CNTL 0x0058 |
119 /* DAC_CNTL bit constants */ | |
120 # define DAC_8BIT_EN 0x00000100 | |
121 # define DAC_4BPP_PIX_ORDER 0x00000200 | |
122 # define DAC_CRC_EN 0x00080000 | |
123 # define DAC_MASK_ALL (0xff << 24) | |
124 # define DAC_VGA_ADR_EN (1 << 13) | |
125 # define DAC_RANGE_CNTL (3 << 0) | |
126 # define DAC_BLANKING (1 << 2) | |
127 #define DAC_CNTL2 0x007c | |
128 /* DAC_CNTL2 bit constants */ | |
129 # define DAC2_DAC_CLK_SEL (1 << 0) | |
130 # define DAC2_DAC2_CLK_SEL (1 << 1) | |
131 # define DAC2_PALETTE_ACC_CTL (1 << 5) | |
132 #define TV_DAC_CNTL 0x088c | |
133 /* TV_DAC_CNTL bit constants */ | |
134 # define TV_DAC_STD_MASK 0x0300 | |
135 # define TV_DAC_RDACPD (1 << 24) | |
136 # define TV_DAC_GDACPD (1 << 25) | |
137 # define TV_DAC_BDACPD (1 << 26) | |
75 #define CRTC_GEN_CNTL 0x0050 | 138 #define CRTC_GEN_CNTL 0x0050 |
139 /* CRTC_GEN_CNTL bit constants */ | |
140 # define CRTC_DBL_SCAN_EN 0x00000001 | |
141 # define CRTC_INTERLACE_EN (1 << 1) | |
142 # define CRTC_CSYNC_EN (1 << 4) | |
143 # define CRTC_CUR_EN 0x00010000 | |
144 # define CRTC_CUR_MODE_MASK (7 << 17) | |
145 # define CRTC_ICON_EN (1 << 20) | |
146 # define CRTC_EXT_DISP_EN (1 << 24) | |
147 # define CRTC_EN (1 << 25) | |
148 # define CRTC_DISP_REQ_EN_B (1 << 26) | |
149 #define CRTC2_GEN_CNTL 0x03f8 | |
150 /* CRTC2_GEN_CNTL bit constants */ | |
151 # define CRTC2_DBL_SCAN_EN (1 << 0) | |
152 # define CRTC2_INTERLACE_EN (1 << 1) | |
153 # define CRTC2_SYNC_TRISTAT (1 << 4) | |
154 # define CRTC2_HSYNC_TRISTAT (1 << 5) | |
155 # define CRTC2_VSYNC_TRISTAT (1 << 6) | |
156 # define CRTC2_CRT2_ON (1 << 7) | |
157 # define CRTC2_ICON_EN (1 << 15) | |
158 # define CRTC2_CUR_EN (1 << 16) | |
159 # define CRTC2_CUR_MODE_MASK (7 << 20) | |
160 # define CRTC2_DISP_DIS (1 << 23) | |
161 # define CRTC2_EN (1 << 25) | |
162 # define CRTC2_DISP_REQ_EN_B (1 << 26) | |
163 # define CRTC2_HSYNC_DIS (1 << 28) | |
164 # define CRTC2_VSYNC_DIS (1 << 29) | |
76 #define MEM_CNTL 0x0140 | 165 #define MEM_CNTL 0x0140 |
166 /* MEM_CNTL bit constants */ | |
167 # define MEM_CTLR_STATUS_IDLE 0x00000000 | |
168 # define MEM_CTLR_STATUS_BUSY 0x00100000 | |
169 # define MEM_SEQNCR_STATUS_IDLE 0x00000000 | |
170 # define MEM_SEQNCR_STATUS_BUSY 0x00200000 | |
171 # define MEM_ARBITER_STATUS_IDLE 0x00000000 | |
172 # define MEM_ARBITER_STATUS_BUSY 0x00400000 | |
173 # define MEM_REQ_UNLOCK 0x00000000 | |
174 # define MEM_REQ_LOCK 0x00800000 | |
77 #define EXT_MEM_CNTL 0x0144 | 175 #define EXT_MEM_CNTL 0x0144 |
78 #define MC_AGP_LOCATION 0x014C | 176 #define MC_AGP_LOCATION 0x014C |
79 #define MEM_IO_CNTL_A0 0x0178 | 177 #define MEM_IO_CNTL_A0 0x0178 |
80 #define MEM_INIT_LATENCY_TIMER 0x0154 | 178 #define MEM_INIT_LATENCY_TIMER 0x0154 |
81 #define MEM_SDRAM_MODE_REG 0x0158 | 179 #define MEM_SDRAM_MODE_REG 0x0158 |
91 #define MEM_VGA_WP_SEL 0x0038 | 189 #define MEM_VGA_WP_SEL 0x0038 |
92 #define MEM_VGA_RP_SEL 0x003C | 190 #define MEM_VGA_RP_SEL 0x003C |
93 #define HDP_DEBUG 0x0138 | 191 #define HDP_DEBUG 0x0138 |
94 #define SW_SEMAPHORE 0x013C | 192 #define SW_SEMAPHORE 0x013C |
95 #define SURFACE_CNTL 0x0B00 | 193 #define SURFACE_CNTL 0x0B00 |
194 /* SURFACE_CNTL bit constants */ | |
195 # define SURF_TRANSLATION_DIS (1 << 8) | |
196 # define NONSURF_AP0_SWP_16BPP (1 << 20) | |
197 # define NONSURF_AP0_SWP_32BPP (2 << 20) | |
96 #define SURFACE0_LOWER_BOUND 0x0B04 | 198 #define SURFACE0_LOWER_BOUND 0x0B04 |
97 #define SURFACE1_LOWER_BOUND 0x0B14 | 199 #define SURFACE1_LOWER_BOUND 0x0B14 |
98 #define SURFACE2_LOWER_BOUND 0x0B24 | 200 #define SURFACE2_LOWER_BOUND 0x0B24 |
99 #define SURFACE3_LOWER_BOUND 0x0B34 | 201 #define SURFACE3_LOWER_BOUND 0x0B34 |
100 #define SURFACE4_LOWER_BOUND 0x0B44 | 202 #define SURFACE4_LOWER_BOUND 0x0B44 |
119 #define SURFACE7_INFO 0x0B7C | 221 #define SURFACE7_INFO 0x0B7C |
120 #define SURFACE_ACCESS_FLAGS 0x0BF8 | 222 #define SURFACE_ACCESS_FLAGS 0x0BF8 |
121 #define SURFACE_ACCESS_CLR 0x0BFC | 223 #define SURFACE_ACCESS_CLR 0x0BFC |
122 #define GEN_INT_CNTL 0x0040 | 224 #define GEN_INT_CNTL 0x0040 |
123 #define GEN_INT_STATUS 0x0044 | 225 #define GEN_INT_STATUS 0x0044 |
226 # define VSYNC_INT_AK (1 << 2) | |
227 # define VSYNC_INT (1 << 2) | |
124 #define CRTC_EXT_CNTL 0x0054 | 228 #define CRTC_EXT_CNTL 0x0054 |
229 /* CRTC_EXT_CNTL bit constants */ | |
230 # define CRTC_VGA_XOVERSCAN (1 << 0) | |
231 # define VGA_ATI_LINEAR 0x00000008 | |
232 # define VGA_128KAP_PAGING 0x00000010 | |
233 # define XCRT_CNT_EN (1 << 6) | |
234 # define CRTC_HSYNC_DIS (1 << 8) | |
235 # define CRTC_VSYNC_DIS (1 << 9) | |
236 # define CRTC_DISPLAY_DIS (1 << 10) | |
237 # define CRTC_SYNC_TRISTAT (1 << 11) | |
238 # define CRTC_CRT_ON (1 << 15) | |
239 #define CRTC_EXT_CNTL_DPMS_BYTE 0x0055 | |
240 # define CRTC_HSYNC_DIS_BYTE (1 << 0) | |
241 # define CRTC_VSYNC_DIS_BYTE (1 << 1) | |
242 # define CRTC_DISPLAY_DIS_BYTE (1 << 2) | |
125 #define RB3D_CNTL 0x1C3C | 243 #define RB3D_CNTL 0x1C3C |
126 #define WAIT_UNTIL 0x1720 | 244 #define WAIT_UNTIL 0x1720 |
127 #define ISYNC_CNTL 0x1724 | 245 #define ISYNC_CNTL 0x1724 |
128 #define RBBM_GUICNTL 0x172C | 246 #define RBBM_GUICNTL 0x172C |
129 #define RBBM_STATUS 0x0E40 | 247 #define RBBM_STATUS 0x0E40 |
130 #define RBBM_STATUS_alt_1 0x1740 | 248 #define RBBM_STATUS_alt_1 0x1740 |
131 #define RBBM_CNTL 0x00EC | 249 #define RBBM_CNTL 0x00EC |
132 #define RBBM_CNTL_alt_1 0x0E44 | 250 #define RBBM_CNTL_alt_1 0x0E44 |
133 #define RBBM_SOFT_RESET 0x00F0 | 251 #define RBBM_SOFT_RESET 0x00F0 |
252 /* RBBM_SOFT_RESET bit constants */ | |
253 # define SOFT_RESET_CP (1 << 0) | |
254 # define SOFT_RESET_HI (1 << 1) | |
255 # define SOFT_RESET_SE (1 << 2) | |
256 # define SOFT_RESET_RE (1 << 3) | |
257 # define SOFT_RESET_PP (1 << 4) | |
258 # define SOFT_RESET_E2 (1 << 5) | |
259 # define SOFT_RESET_RB (1 << 6) | |
260 # define SOFT_RESET_HDP (1 << 7) | |
134 #define RBBM_SOFT_RESET_alt_1 0x0E48 | 261 #define RBBM_SOFT_RESET_alt_1 0x0E48 |
135 #define NQWAIT_UNTIL 0x0E50 | 262 #define NQWAIT_UNTIL 0x0E50 |
136 #define RBBM_DEBUG 0x0E6C | 263 #define RBBM_DEBUG 0x0E6C |
137 #define RBBM_CMDFIFO_ADDR 0x0E70 | 264 #define RBBM_CMDFIFO_ADDR 0x0E70 |
138 #define RBBM_CMDFIFO_DATAL 0x0E74 | 265 #define RBBM_CMDFIFO_DATAL 0x0E74 |
139 #define RBBM_CMDFIFO_DATAH 0x0E78 | 266 #define RBBM_CMDFIFO_DATAH 0x0E78 |
140 #define RBBM_CMDFIFO_STAT 0x0E7C | 267 #define RBBM_CMDFIFO_STAT 0x0E7C |
141 #define CRTC_STATUS 0x005C | 268 #define CRTC_STATUS 0x005C |
269 /* CRTC_STATUS bit constants */ | |
270 # define CRTC_VBLANK 0x00000001 | |
271 # define CRTC_VBLANK_SAVE (1 << 1) | |
142 #define GPIO_VGA_DDC 0x0060 | 272 #define GPIO_VGA_DDC 0x0060 |
143 #define GPIO_DVI_DDC 0x0064 | 273 #define GPIO_DVI_DDC 0x0064 |
144 #define GPIO_MONID 0x0068 | 274 #define GPIO_MONID 0x0068 |
145 #define PALETTE_INDEX 0x00B0 | 275 #define PALETTE_INDEX 0x00B0 |
146 #define PALETTE_DATA 0x00B4 | 276 #define PALETTE_DATA 0x00B4 |
147 #define PALETTE_30_DATA 0x00B8 | 277 #define PALETTE_30_DATA 0x00B8 |
148 #define CRTC_H_TOTAL_DISP 0x0200 | 278 #define CRTC_H_TOTAL_DISP 0x0200 |
279 # define CRTC_H_TOTAL (0x03ff << 0) | |
280 # define CRTC_H_TOTAL_SHIFT 0 | |
281 # define CRTC_H_DISP (0x01ff << 16) | |
282 # define CRTC_H_DISP_SHIFT 16 | |
283 #define CRTC2_H_TOTAL_DISP 0x0300 | |
284 # define CRTC2_H_TOTAL (0x03ff << 0) | |
285 # define CRTC2_H_TOTAL_SHIFT 0 | |
286 # define CRTC2_H_DISP (0x01ff << 16) | |
287 # define CRTC2_H_DISP_SHIFT 16 | |
149 #define CRTC_H_SYNC_STRT_WID 0x0204 | 288 #define CRTC_H_SYNC_STRT_WID 0x0204 |
289 # define CRTC_H_SYNC_STRT_PIX (0x07 << 0) | |
290 # define CRTC_H_SYNC_STRT_CHAR (0x3ff << 3) | |
291 # define CRTC_H_SYNC_STRT_CHAR_SHIFT 3 | |
292 # define CRTC_H_SYNC_WID (0x3f << 16) | |
293 # define CRTC_H_SYNC_WID_SHIFT 16 | |
294 # define CRTC_H_SYNC_POL (1 << 23) | |
295 #define CRTC2_H_SYNC_STRT_WID 0x0304 | |
296 # define CRTC2_H_SYNC_STRT_PIX (0x07 << 0) | |
297 # define CRTC2_H_SYNC_STRT_CHAR (0x3ff << 3) | |
298 # define CRTC2_H_SYNC_STRT_CHAR_SHIFT 3 | |
299 # define CRTC2_H_SYNC_WID (0x3f << 16) | |
300 # define CRTC2_H_SYNC_WID_SHIFT 16 | |
301 # define CRTC2_H_SYNC_POL (1 << 23) | |
150 #define CRTC_V_TOTAL_DISP 0x0208 | 302 #define CRTC_V_TOTAL_DISP 0x0208 |
303 # define CRTC_V_TOTAL (0x07ff << 0) | |
304 # define CRTC_V_TOTAL_SHIFT 0 | |
305 # define CRTC_V_DISP (0x07ff << 16) | |
306 # define CRTC_V_DISP_SHIFT 16 | |
307 #define CRTC2_V_TOTAL_DISP 0x0308 | |
308 # define CRTC2_V_TOTAL (0x07ff << 0) | |
309 # define CRTC2_V_TOTAL_SHIFT 0 | |
310 # define CRTC2_V_DISP (0x07ff << 16) | |
311 # define CRTC2_V_DISP_SHIFT 16 | |
151 #define CRTC_V_SYNC_STRT_WID 0x020C | 312 #define CRTC_V_SYNC_STRT_WID 0x020C |
313 # define CRTC_V_SYNC_STRT (0x7ff << 0) | |
314 # define CRTC_V_SYNC_STRT_SHIFT 0 | |
315 # define CRTC_V_SYNC_WID (0x1f << 16) | |
316 # define CRTC_V_SYNC_WID_SHIFT 16 | |
317 # define CRTC_V_SYNC_POL (1 << 23) | |
318 #define CRTC2_V_SYNC_STRT_WID 0x030C | |
319 # define CRTC2_V_SYNC_STRT (0x7ff << 0) | |
320 # define CRTC2_V_SYNC_STRT_SHIFT 0 | |
321 # define CRTC2_V_SYNC_WID (0x1f << 16) | |
322 # define CRTC2_V_SYNC_WID_SHIFT 16 | |
323 # define CRTC2_V_SYNC_POL (1 << 23) | |
152 #define CRTC_VLINE_CRNT_VLINE 0x0210 | 324 #define CRTC_VLINE_CRNT_VLINE 0x0210 |
325 # define CRTC_CRNT_VLINE_MASK (0x7ff << 16) | |
326 #define CRTC2_VLINE_CRNT_VLINE 0x0310 | |
153 #define CRTC_CRNT_FRAME 0x0214 | 327 #define CRTC_CRNT_FRAME 0x0214 |
328 #define CRTC2_CRNT_FRAME 0x0314 | |
154 #define CRTC_GUI_TRIG_VLINE 0x0218 | 329 #define CRTC_GUI_TRIG_VLINE 0x0218 |
330 #define CRTC2_GUI_TRIG_VLINE 0x0318 | |
155 #define CRTC_DEBUG 0x021C | 331 #define CRTC_DEBUG 0x021C |
332 #define CRTC2_DEBUG 0x031C | |
156 #define CRTC_OFFSET_RIGHT 0x0220 | 333 #define CRTC_OFFSET_RIGHT 0x0220 |
157 #define CRTC_OFFSET 0x0224 | 334 #define CRTC_OFFSET 0x0224 |
335 #define CRTC2_OFFSET 0x0324 | |
158 #define CRTC_OFFSET_CNTL 0x0228 | 336 #define CRTC_OFFSET_CNTL 0x0228 |
337 # define CRTC_TILE_EN (1 << 15) | |
338 #define CRTC2_OFFSET_CNTL 0x0328 | |
339 # define CRTC2_TILE_EN (1 << 15) | |
159 #define CRTC_PITCH 0x022C | 340 #define CRTC_PITCH 0x022C |
341 #define CRTC2_PITCH 0x032C | |
160 #define OVR_CLR 0x0230 | 342 #define OVR_CLR 0x0230 |
161 #define OVR_WID_LEFT_RIGHT 0x0234 | 343 #define OVR_WID_LEFT_RIGHT 0x0234 |
162 #define OVR_WID_TOP_BOTTOM 0x0238 | 344 #define OVR_WID_TOP_BOTTOM 0x0238 |
163 #define DISPLAY_BASE_ADDR 0x023C | 345 #define DISPLAY_BASE_ADDR 0x023C |
164 #define SNAPSHOT_VH_COUNTS 0x0240 | 346 #define SNAPSHOT_VH_COUNTS 0x0240 |
165 #define SNAPSHOT_F_COUNT 0x0244 | 347 #define SNAPSHOT_F_COUNT 0x0244 |
166 #define N_VIF_COUNT 0x0248 | 348 #define N_VIF_COUNT 0x0248 |
167 #define SNAPSHOT_VIF_COUNT 0x024C | 349 #define SNAPSHOT_VIF_COUNT 0x024C |
168 #define FP_CRTC_H_TOTAL_DISP 0x0250 | 350 #define FP_CRTC_H_TOTAL_DISP 0x0250 |
351 #define FP_CRTC2_H_TOTAL_DISP 0x0350 | |
169 #define FP_CRTC_V_TOTAL_DISP 0x0254 | 352 #define FP_CRTC_V_TOTAL_DISP 0x0254 |
353 #define FP_CRTC2_V_TOTAL_DISP 0x0354 | |
170 #define CRT_CRTC_H_SYNC_STRT_WID 0x0258 | 354 #define CRT_CRTC_H_SYNC_STRT_WID 0x0258 |
171 #define CRT_CRTC_V_SYNC_STRT_WID 0x025C | 355 #define CRT_CRTC_V_SYNC_STRT_WID 0x025C |
172 #define CUR_OFFSET 0x0260 | 356 #define CUR_OFFSET 0x0260 |
173 #define CUR_HORZ_VERT_POSN 0x0264 | 357 #define CUR_HORZ_VERT_POSN 0x0264 |
174 #define CUR_HORZ_VERT_OFF 0x0268 | 358 #define CUR_HORZ_VERT_OFF 0x0268 |
359 /* CUR_OFFSET, CUR_HORZ_VERT_POSN, CUR_HORZ_VERT_OFF bit constants */ | |
360 # define CUR_LOCK 0x80000000 | |
175 #define CUR_CLR0 0x026C | 361 #define CUR_CLR0 0x026C |
176 #define CUR_CLR1 0x0270 | 362 #define CUR_CLR1 0x0270 |
363 #define CUR2_OFFSET 0x0360 | |
364 #define CUR2_HORZ_VERT_POSN 0x0364 | |
365 #define CUR2_HORZ_VERT_OFF 0x0368 | |
366 # define CUR2_LOCK (1 << 31) | |
367 #define CUR2_CLR0 0x036c | |
368 #define CUR2_CLR1 0x0370 | |
177 #define FP_HORZ_VERT_ACTIVE 0x0278 | 369 #define FP_HORZ_VERT_ACTIVE 0x0278 |
178 #define CRTC_MORE_CNTL 0x027C | 370 #define CRTC_MORE_CNTL 0x027C |
179 #define DAC_EXT_CNTL 0x0280 | 371 #define DAC_EXT_CNTL 0x0280 |
180 #define FP_GEN_CNTL 0x0284 | 372 #define FP_GEN_CNTL 0x0284 |
373 /* FP_GEN_CNTL bit constants */ | |
374 # define FP_FPON (1 << 0) | |
375 # define FP_TMDS_EN (1 << 2) | |
376 # define FP_EN_TMDS (1 << 7) | |
377 # define FP_DETECT_SENSE (1 << 8) | |
378 # define FP_SEL_CRTC2 (1 << 13) | |
379 # define FP_CRTC_DONT_SHADOW_HPAR (1 << 15) | |
380 # define FP_CRTC_DONT_SHADOW_VPAR (1 << 16) | |
381 # define FP_CRTC_DONT_SHADOW_HEND (1 << 17) | |
382 # define FP_CRTC_USE_SHADOW_VEND (1 << 18) | |
383 # define FP_RMX_HVSYNC_CONTROL_EN (1 << 20) | |
384 # define FP_DFP_SYNC_SEL (1 << 21) | |
385 # define FP_CRTC_LOCK_8DOT (1 << 22) | |
386 # define FP_CRT_SYNC_SEL (1 << 23) | |
387 # define FP_USE_SHADOW_EN (1 << 24) | |
388 # define FP_CRT_SYNC_ALT (1 << 26) | |
389 #define FP2_GEN_CNTL 0x0288 | |
390 /* FP2_GEN_CNTL bit constants */ | |
391 # define FP2_FPON (1 << 0) | |
392 # define FP2_TMDS_EN (1 << 2) | |
393 # define FP2_EN_TMDS (1 << 7) | |
394 # define FP2_DETECT_SENSE (1 << 8) | |
395 # define FP2_SEL_CRTC2 (1 << 13) | |
396 # define FP2_FP_POL (1 << 16) | |
397 # define FP2_LP_POL (1 << 17) | |
398 # define FP2_SCK_POL (1 << 18) | |
399 # define FP2_LCD_CNTL_MASK (7 << 19) | |
400 # define FP2_PAD_FLOP_EN (1 << 22) | |
401 # define FP2_CRC_EN (1 << 23) | |
402 # define FP2_CRC_READ_EN (1 << 24) | |
181 #define FP_HORZ_STRETCH 0x028C | 403 #define FP_HORZ_STRETCH 0x028C |
182 #define FP_VERT_STRETCH 0x0290 | 404 #define FP_VERT_STRETCH 0x0290 |
183 #define FP_H_SYNC_STRT_WID 0x02C4 | 405 #define FP_H_SYNC_STRT_WID 0x02C4 |
406 #define FP_H2_SYNC_STRT_WID 0x03C4 | |
184 #define FP_V_SYNC_STRT_WID 0x02C8 | 407 #define FP_V_SYNC_STRT_WID 0x02C8 |
408 #define FP_V2_SYNC_STRT_WID 0x03C8 | |
409 #define FP_HORZ_STRETCH 0x028C | |
410 #define FP_HORZ2_STRETCH 0x038C | |
411 #define FP_VERT_STRETCH 0x0290 | |
412 #define FP_VERT2_STRETCH 0x0390 | |
185 #define AUX_WINDOW_HORZ_CNTL 0x02D8 | 413 #define AUX_WINDOW_HORZ_CNTL 0x02D8 |
186 #define AUX_WINDOW_VERT_CNTL 0x02DC | 414 #define AUX_WINDOW_VERT_CNTL 0x02DC |
187 #define DDA_CONFIG 0x02e0 | 415 #define DDA_CONFIG 0x02e0 |
188 #define DDA_ON_OFF 0x02e4 | 416 #define DDA_ON_OFF 0x02e4 |
189 #define GRPH_BUFFER_CNTL 0x02F0 | 417 #define GRPH_BUFFER_CNTL 0x02F0 |
248 #define SUBPIC_PALETTE_INDEX 0x057C | 476 #define SUBPIC_PALETTE_INDEX 0x057C |
249 #define SUBPIC_PALETTE_DATA 0x0580 | 477 #define SUBPIC_PALETTE_DATA 0x0580 |
250 #define SUBPIC_H_ACCUM_INIT 0x0584 | 478 #define SUBPIC_H_ACCUM_INIT 0x0584 |
251 #define SUBPIC_V_ACCUM_INIT 0x0588 | 479 #define SUBPIC_V_ACCUM_INIT 0x0588 |
252 #define DISP_MISC_CNTL 0x0D00 | 480 #define DISP_MISC_CNTL 0x0D00 |
481 # define SOFT_RESET_GRPH_PP (1 << 0) | |
253 #define DAC_MACRO_CNTL 0x0D04 | 482 #define DAC_MACRO_CNTL 0x0D04 |
254 #define DISP_PWR_MAN 0x0D08 | 483 #define DISP_PWR_MAN 0x0D08 |
255 #define DISP_TEST_DEBUG_CNTL 0x0D10 | 484 #define DISP_TEST_DEBUG_CNTL 0x0D10 |
256 #define DISP_HW_DEBUG 0x0D14 | 485 #define DISP_HW_DEBUG 0x0D14 |
257 #define DAC_CRC_SIG1 0x0D18 | 486 #define DAC_CRC_SIG1 0x0D18 |
268 #define OV0_GAMMA_40_7F 0x0D4C | 497 #define OV0_GAMMA_40_7F 0x0D4C |
269 #define OV0_GAMMA_380_3BF 0x0D50 | 498 #define OV0_GAMMA_380_3BF 0x0D50 |
270 #define OV0_GAMMA_3C0_3FF 0x0D54 | 499 #define OV0_GAMMA_3C0_3FF 0x0D54 |
271 #define DISP_MERGE_CNTL 0x0D60 | 500 #define DISP_MERGE_CNTL 0x0D60 |
272 #define DISP_OUTPUT_CNTL 0x0D64 | 501 #define DISP_OUTPUT_CNTL 0x0D64 |
502 # define DISP_DAC_SOURCE_MASK 0x03 | |
503 # define DISP_DAC_SOURCE_CRTC2 0x01 | |
273 #define DISP_LIN_TRANS_GRPH_A 0x0D80 | 504 #define DISP_LIN_TRANS_GRPH_A 0x0D80 |
274 #define DISP_LIN_TRANS_GRPH_B 0x0D84 | 505 #define DISP_LIN_TRANS_GRPH_B 0x0D84 |
275 #define DISP_LIN_TRANS_GRPH_C 0x0D88 | 506 #define DISP_LIN_TRANS_GRPH_C 0x0D88 |
276 #define DISP_LIN_TRANS_GRPH_D 0x0D8C | 507 #define DISP_LIN_TRANS_GRPH_D 0x0D8C |
277 #define DISP_LIN_TRANS_GRPH_E 0x0D90 | 508 #define DISP_LIN_TRANS_GRPH_E 0x0D90 |
292 #define DAC_INCR 0x0DCC | 523 #define DAC_INCR 0x0DCC |
293 #define DAC_NEG_SYNC_LEVEL 0x0DD0 | 524 #define DAC_NEG_SYNC_LEVEL 0x0DD0 |
294 #define DAC_POS_SYNC_LEVEL 0x0DD4 | 525 #define DAC_POS_SYNC_LEVEL 0x0DD4 |
295 #define DAC_BLANK_LEVEL 0x0DD8 | 526 #define DAC_BLANK_LEVEL 0x0DD8 |
296 #define CLOCK_CNTL_INDEX 0x0008 | 527 #define CLOCK_CNTL_INDEX 0x0008 |
528 /* CLOCK_CNTL_INDEX bit constants */ | |
529 # define PLL_WR_EN 0x00000080 | |
530 # define RADEON_PLL_DIV_SEL (3 << 8) | |
531 # define RADEON_PLL2_DIV_SEL_MASK ~(3 << 8) | |
297 #define CLOCK_CNTL_DATA 0x000C | 532 #define CLOCK_CNTL_DATA 0x000C |
298 #define CP_RB_CNTL 0x0704 | 533 #define CP_RB_CNTL 0x0704 |
299 #define CP_RB_BASE 0x0700 | 534 #define CP_RB_BASE 0x0700 |
300 #define CP_RB_RPTR_ADDR 0x070C | 535 #define CP_RB_RPTR_ADDR 0x070C |
301 #define CP_RB_RPTR 0x0710 | 536 #define CP_RB_RPTR 0x0710 |
352 #define SC_TOP 0x1648 | 587 #define SC_TOP 0x1648 |
353 #define SC_BOTTOM 0x164C | 588 #define SC_BOTTOM 0x164C |
354 #define SRC_SC_RIGHT 0x1654 | 589 #define SRC_SC_RIGHT 0x1654 |
355 #define SRC_SC_BOTTOM 0x165C | 590 #define SRC_SC_BOTTOM 0x165C |
356 #define DP_CNTL 0x16C0 | 591 #define DP_CNTL 0x16C0 |
592 /* DP_CNTL bit constants */ | |
593 # define DST_X_RIGHT_TO_LEFT 0x00000000 | |
594 # define DST_X_LEFT_TO_RIGHT 0x00000001 | |
595 # define DST_Y_BOTTOM_TO_TOP 0x00000000 | |
596 # define DST_Y_TOP_TO_BOTTOM 0x00000002 | |
597 # define DST_X_MAJOR 0x00000000 | |
598 # define DST_Y_MAJOR 0x00000004 | |
599 # define DST_X_TILE 0x00000008 | |
600 # define DST_Y_TILE 0x00000010 | |
601 # define DST_LAST_PEL 0x00000020 | |
602 # define DST_TRAIL_X_RIGHT_TO_LEFT 0x00000000 | |
603 # define DST_TRAIL_X_LEFT_TO_RIGHT 0x00000040 | |
604 # define DST_TRAP_FILL_RIGHT_TO_LEFT 0x00000000 | |
605 # define DST_TRAP_FILL_LEFT_TO_RIGHT 0x00000080 | |
606 # define DST_BRES_SIGN 0x00000100 | |
607 # define DST_HOST_BIG_ENDIAN_EN 0x00000200 | |
608 # define DST_POLYLINE_NONLAST 0x00008000 | |
609 # define DST_RASTER_STALL 0x00010000 | |
610 # define DST_POLY_EDGE 0x00040000 | |
357 #define DP_CNTL_XDIR_YDIR_YMAJOR 0x16D0 | 611 #define DP_CNTL_XDIR_YDIR_YMAJOR 0x16D0 |
612 /* DP_CNTL_XDIR_YDIR_YMAJOR bit constants (short version of DP_CNTL) */ | |
613 # define DST_X_MAJOR_S 0x00000000 | |
614 # define DST_Y_MAJOR_S 0x00000001 | |
615 # define DST_Y_BOTTOM_TO_TOP_S 0x00000000 | |
616 # define DST_Y_TOP_TO_BOTTOM_S 0x00008000 | |
617 # define DST_X_RIGHT_TO_LEFT_S 0x00000000 | |
618 # define DST_X_LEFT_TO_RIGHT_S 0x80000000 | |
358 #define DP_DATATYPE 0x16C4 | 619 #define DP_DATATYPE 0x16C4 |
620 /* DP_DATATYPE bit constants */ | |
621 # define DST_8BPP 0x00000002 | |
622 # define DST_15BPP 0x00000003 | |
623 # define DST_16BPP 0x00000004 | |
624 # define DST_24BPP 0x00000005 | |
625 # define DST_32BPP 0x00000006 | |
626 # define DST_8BPP_RGB332 0x00000007 | |
627 # define DST_8BPP_Y8 0x00000008 | |
628 # define DST_8BPP_RGB8 0x00000009 | |
629 # define DST_16BPP_VYUY422 0x0000000b | |
630 # define DST_16BPP_YVYU422 0x0000000c | |
631 # define DST_32BPP_AYUV444 0x0000000e | |
632 # define DST_16BPP_ARGB4444 0x0000000f | |
633 # define BRUSH_SOLIDCOLOR 0x00000d00 | |
634 # define SRC_MONO 0x00000000 | |
635 # define SRC_MONO_LBKGD 0x00010000 | |
636 # define SRC_DSTCOLOR 0x00030000 | |
637 # define BYTE_ORDER_MSB_TO_LSB 0x00000000 | |
638 # define BYTE_ORDER_LSB_TO_MSB 0x40000000 | |
639 # define DP_CONVERSION_TEMP 0x80000000 | |
640 # define HOST_BIG_ENDIAN_EN (1 << 29) | |
359 #define DP_MIX 0x16C8 | 641 #define DP_MIX 0x16C8 |
642 /* DP_MIX bit constants */ | |
643 # define DP_SRC_RECT 0x00000200 | |
644 # define DP_SRC_HOST 0x00000300 | |
645 # define DP_SRC_HOST_BYTEALIGN 0x00000400 | |
360 #define DP_WRITE_MSK 0x16CC | 646 #define DP_WRITE_MSK 0x16CC |
361 #define DP_XOP 0x17F8 | 647 #define DP_XOP 0x17F8 |
362 #define CLR_CMP_CLR_SRC 0x15C4 | 648 #define CLR_CMP_CLR_SRC 0x15C4 |
363 #define CLR_CMP_CLR_DST 0x15C8 | 649 #define CLR_CMP_CLR_DST 0x15C8 |
364 #define CLR_CMP_CNTL 0x15C0 | 650 #define CLR_CMP_CNTL 0x15C0 |
651 /* CLR_CMP_CNTL bit constants */ | |
652 # define COMPARE_SRC_FALSE 0x00000000 | |
653 # define COMPARE_SRC_TRUE 0x00000001 | |
654 # define COMPARE_SRC_NOT_EQUAL 0x00000004 | |
655 # define COMPARE_SRC_EQUAL 0x00000005 | |
656 # define COMPARE_SRC_EQUAL_FLIP 0x00000007 | |
657 # define COMPARE_DST_FALSE 0x00000000 | |
658 # define COMPARE_DST_TRUE 0x00000100 | |
659 # define COMPARE_DST_NOT_EQUAL 0x00000400 | |
660 # define COMPARE_DST_EQUAL 0x00000500 | |
661 # define COMPARE_DESTINATION 0x00000000 | |
662 # define COMPARE_SOURCE 0x01000000 | |
663 # define COMPARE_SRC_AND_DST 0x02000000 | |
365 #define CLR_CMP_MSK 0x15CC | 664 #define CLR_CMP_MSK 0x15CC |
366 #define DSTCACHE_MODE 0x1710 | 665 #define DSTCACHE_MODE 0x1710 |
367 #define DSTCACHE_CTLSTAT 0x1714 | 666 #define DSTCACHE_CTLSTAT 0x1714 |
667 /* DSTCACHE_CTLSTAT bit constants */ | |
668 # define RB2D_DC_FLUSH (3 << 0) | |
669 # define RB2D_DC_FLUSH_ALL 0xf | |
670 # define RB2D_DC_BUSY (1 << 31) | |
368 #define DEFAULT_PITCH_OFFSET 0x16E0 | 671 #define DEFAULT_PITCH_OFFSET 0x16E0 |
369 #define DEFAULT_SC_BOTTOM_RIGHT 0x16E8 | 672 #define DEFAULT_SC_BOTTOM_RIGHT 0x16E8 |
673 /* DEFAULT_SC_BOTTOM_RIGHT bit constants */ | |
674 # define DEFAULT_SC_RIGHT_MAX (0x1fff << 0) | |
675 # define DEFAULT_SC_BOTTOM_MAX (0x1fff << 16) | |
370 #define DP_GUI_MASTER_CNTL 0x146C | 676 #define DP_GUI_MASTER_CNTL 0x146C |
677 /* DP_GUI_MASTER_CNTL bit constants */ | |
678 # define GMC_SRC_PITCH_OFFSET_DEFAULT 0x00000000 | |
679 # define GMC_SRC_PITCH_OFFSET_LEAVE 0x00000001 | |
680 # define GMC_DST_PITCH_OFFSET_DEFAULT 0x00000000 | |
681 # define GMC_DST_PITCH_OFFSET_LEAVE 0x00000002 | |
682 # define GMC_SRC_CLIP_DEFAULT 0x00000000 | |
683 # define GMC_SRC_CLIP_LEAVE 0x00000004 | |
684 # define GMC_DST_CLIP_DEFAULT 0x00000000 | |
685 # define GMC_DST_CLIP_LEAVE 0x00000008 | |
686 # define GMC_BRUSH_8x8MONO 0x00000000 | |
687 # define GMC_BRUSH_8x8MONO_LBKGD 0x00000010 | |
688 # define GMC_BRUSH_8x1MONO 0x00000020 | |
689 # define GMC_BRUSH_8x1MONO_LBKGD 0x00000030 | |
690 # define GMC_BRUSH_1x8MONO 0x00000040 | |
691 # define GMC_BRUSH_1x8MONO_LBKGD 0x00000050 | |
692 # define GMC_BRUSH_32x1MONO 0x00000060 | |
693 # define GMC_BRUSH_32x1MONO_LBKGD 0x00000070 | |
694 # define GMC_BRUSH_32x32MONO 0x00000080 | |
695 # define GMC_BRUSH_32x32MONO_LBKGD 0x00000090 | |
696 # define GMC_BRUSH_8x8COLOR 0x000000a0 | |
697 # define GMC_BRUSH_8x1COLOR 0x000000b0 | |
698 # define GMC_BRUSH_1x8COLOR 0x000000c0 | |
699 # define GMC_BRUSH_SOLID_COLOR 0x000000d0 | |
700 # define GMC_DST_8BPP 0x00000200 | |
701 # define GMC_DST_15BPP 0x00000300 | |
702 # define GMC_DST_16BPP 0x00000400 | |
703 # define GMC_DST_24BPP 0x00000500 | |
704 # define GMC_DST_32BPP 0x00000600 | |
705 # define GMC_DST_8BPP_RGB332 0x00000700 | |
706 # define GMC_DST_8BPP_Y8 0x00000800 | |
707 # define GMC_DST_8BPP_RGB8 0x00000900 | |
708 # define GMC_DST_16BPP_VYUY422 0x00000b00 | |
709 # define GMC_DST_16BPP_YVYU422 0x00000c00 | |
710 # define GMC_DST_32BPP_AYUV444 0x00000e00 | |
711 # define GMC_DST_16BPP_ARGB4444 0x00000f00 | |
712 # define GMC_SRC_MONO 0x00000000 | |
713 # define GMC_SRC_MONO_LBKGD 0x00001000 | |
714 # define GMC_SRC_DSTCOLOR 0x00003000 | |
715 # define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 | |
716 # define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 | |
717 # define GMC_DP_CONVERSION_TEMP_9300 0x00008000 | |
718 # define GMC_DP_CONVERSION_TEMP_6500 0x00000000 | |
719 # define GMC_DP_SRC_RECT 0x02000000 | |
720 # define GMC_DP_SRC_HOST 0x03000000 | |
721 # define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 | |
722 # define GMC_3D_FCN_EN_CLR 0x00000000 | |
723 # define GMC_3D_FCN_EN_SET 0x08000000 | |
724 # define GMC_DST_CLR_CMP_FCN_LEAVE 0x00000000 | |
725 # define GMC_DST_CLR_CMP_FCN_CLEAR 0x10000000 | |
726 # define GMC_AUX_CLIP_LEAVE 0x00000000 | |
727 # define GMC_AUX_CLIP_CLEAR 0x20000000 | |
728 # define GMC_WRITE_MASK_LEAVE 0x00000000 | |
729 # define GMC_WRITE_MASK_SET 0x40000000 | |
730 # define GMC_CLR_CMP_CNTL_DIS (1 << 28) | |
731 # define GMC_SRC_DATATYPE_COLOR (3 << 12) | |
732 # define ROP3_S 0x00cc0000 | |
733 # define ROP3_SRCCOPY 0x00cc0000 | |
734 # define ROP3_P 0x00f00000 | |
735 # define ROP3_PATCOPY 0x00f00000 | |
736 # define DP_SRC_SOURCE_MASK (7 << 24) | |
737 # define GMC_BRUSH_NONE (15 << 4) | |
738 # define DP_SRC_SOURCE_MEMORY (2 << 24) | |
739 # define GMC_BRUSH_SOLIDCOLOR 0x000000d0 | |
371 #define SC_TOP_LEFT 0x16EC | 740 #define SC_TOP_LEFT 0x16EC |
372 #define SC_BOTTOM_RIGHT 0x16F0 | 741 #define SC_BOTTOM_RIGHT 0x16F0 |
373 #define SRC_SC_BOTTOM_RIGHT 0x16F4 | 742 #define SRC_SC_BOTTOM_RIGHT 0x16F4 |
374 #define RB2D_DSTCACHE_CTLSTAT 0x342C | 743 #define RB2D_DSTCACHE_CTLSTAT 0x342C |
744 | |
745 #define RADEON_BASE_CODE 0x0f0b | |
746 #define RADEON_BIOS_0_SCRATCH 0x0010 | |
747 #define RADEON_BIOS_1_SCRATCH 0x0014 | |
748 #define RADEON_BIOS_2_SCRATCH 0x0018 | |
749 #define RADEON_BIOS_3_SCRATCH 0x001c | |
750 #define RADEON_BIOS_4_SCRATCH 0x0020 | |
751 #define RADEON_BIOS_5_SCRATCH 0x0024 | |
752 #define RADEON_BIOS_6_SCRATCH 0x0028 | |
753 #define RADEON_BIOS_7_SCRATCH 0x002c | |
375 | 754 |
376 | 755 |
377 #define CLK_PIN_CNTL 0x0001 | 756 #define CLK_PIN_CNTL 0x0001 |
378 #define PPLL_CNTL 0x0002 | 757 #define PPLL_CNTL 0x0002 |
379 #define PPLL_REF_DIV 0x0003 | 758 #define PPLL_REF_DIV 0x0003 |
387 #define AGP_PLL_CNTL 0x000b | 766 #define AGP_PLL_CNTL 0x000b |
388 #define SPLL_CNTL 0x000c | 767 #define SPLL_CNTL 0x000c |
389 #define SCLK_CNTL 0x000d | 768 #define SCLK_CNTL 0x000d |
390 #define MPLL_CNTL 0x000e | 769 #define MPLL_CNTL 0x000e |
391 #define MCLK_CNTL 0x0012 | 770 #define MCLK_CNTL 0x0012 |
771 /* MCLK_CNTL bit constants */ | |
772 # define FORCEON_MCLKA (1 << 16) | |
773 # define FORCEON_MCLKB (1 << 17) | |
774 # define FORCEON_YCLKA (1 << 18) | |
775 # define FORCEON_YCLKB (1 << 19) | |
776 # define FORCEON_MC (1 << 20) | |
777 # define FORCEON_AIC (1 << 21) | |
392 #define AGP_PLL_CNTL 0x000b | 778 #define AGP_PLL_CNTL 0x000b |
393 #define PLL_TEST_CNTL 0x0013 | 779 #define PLL_TEST_CNTL 0x0013 |
394 | |
395 | |
396 /* MCLK_CNTL bit constants */ | |
397 #define FORCEON_MCLKA (1 << 16) | |
398 #define FORCEON_MCLKB (1 << 17) | |
399 #define FORCEON_YCLKA (1 << 18) | |
400 #define FORCEON_YCLKB (1 << 19) | |
401 #define FORCEON_MC (1 << 20) | |
402 #define FORCEON_AIC (1 << 21) | |
403 | |
404 | |
405 /* BUS_CNTL bit constants */ | |
406 #define BUS_DBL_RESYNC 0x00000001 | |
407 #define BUS_MSTR_RESET 0x00000002 | |
408 #define BUS_FLUSH_BUF 0x00000004 | |
409 #define BUS_STOP_REQ_DIS 0x00000008 | |
410 #define BUS_ROTATION_DIS 0x00000010 | |
411 #define BUS_MASTER_DIS 0x00000040 | |
412 #define BUS_ROM_WRT_EN 0x00000080 | |
413 #define BUS_DIS_ROM 0x00001000 | |
414 #define BUS_PCI_READ_RETRY_EN 0x00002000 | |
415 #define BUS_AGP_AD_STEPPING_EN 0x00004000 | |
416 #define BUS_PCI_WRT_RETRY_EN 0x00008000 | |
417 #define BUS_MSTR_RD_MULT 0x00100000 | |
418 #define BUS_MSTR_RD_LINE 0x00200000 | |
419 #define BUS_SUSPEND 0x00400000 | |
420 #define LAT_16X 0x00800000 | |
421 #define BUS_RD_DISCARD_EN 0x01000000 | |
422 #define BUS_RD_ABORT_EN 0x02000000 | |
423 #define BUS_MSTR_WS 0x04000000 | |
424 #define BUS_PARKING_DIS 0x08000000 | |
425 #define BUS_MSTR_DISCONNECT_EN 0x10000000 | |
426 #define BUS_WRT_BURST 0x20000000 | |
427 #define BUS_READ_BURST 0x40000000 | |
428 #define BUS_RDY_READ_DLY 0x80000000 | |
429 | |
430 | |
431 /* CLOCK_CNTL_INDEX bit constants */ | |
432 #define PLL_WR_EN 0x00000080 | |
433 | |
434 /* CONFIG_CNTL bit constants */ | |
435 #define CFG_VGA_RAM_EN 0x00000100 | |
436 | |
437 /* CRTC_EXT_CNTL bit constants */ | |
438 #define VGA_ATI_LINEAR 0x00000008 | |
439 #define VGA_128KAP_PAGING 0x00000010 | |
440 #define XCRT_CNT_EN (1 << 6) | |
441 #define CRTC_HSYNC_DIS (1 << 8) | |
442 #define CRTC_VSYNC_DIS (1 << 9) | |
443 #define CRTC_DISPLAY_DIS (1 << 10) | |
444 | |
445 | |
446 /* DSTCACHE_CTLSTAT bit constants */ | |
447 #define RB2D_DC_FLUSH (3 << 0) | |
448 #define RB2D_DC_FLUSH_ALL 0xf | |
449 #define RB2D_DC_BUSY (1 << 31) | |
450 | |
451 | |
452 /* CRTC_GEN_CNTL bit constants */ | |
453 #define CRTC_DBL_SCAN_EN 0x00000001 | |
454 #define CRTC_CUR_EN 0x00010000 | |
455 #define CRTC_EXT_DISP_EN (1 << 24) | |
456 #define CRTC_EN (1 << 25) | |
457 | |
458 /* CRTC_STATUS bit constants */ | |
459 #define CRTC_VBLANK 0x00000001 | |
460 | |
461 /* CUR_OFFSET, CUR_HORZ_VERT_POSN, CUR_HORZ_VERT_OFF bit constants */ | |
462 #define CUR_LOCK 0x80000000 | |
463 | |
464 /* DAC_CNTL bit constants */ | |
465 #define DAC_8BIT_EN 0x00000100 | |
466 #define DAC_4BPP_PIX_ORDER 0x00000200 | |
467 #define DAC_CRC_EN 0x00080000 | |
468 #define DAC_MASK_ALL (0xff << 24) | |
469 #define DAC_VGA_ADR_EN (1 << 13) | |
470 #define DAC_RANGE_CNTL (3 << 0) | |
471 #define DAC_BLANKING (1 << 2) | |
472 | |
473 /* GEN_RESET_CNTL bit constants */ | |
474 #define SOFT_RESET_GUI 0x00000001 | |
475 #define SOFT_RESET_VCLK 0x00000100 | |
476 #define SOFT_RESET_PCLK 0x00000200 | |
477 #define SOFT_RESET_ECP 0x00000400 | |
478 #define SOFT_RESET_DISPENG_XCLK 0x00000800 | |
479 | |
480 /* MEM_CNTL bit constants */ | |
481 #define MEM_CTLR_STATUS_IDLE 0x00000000 | |
482 #define MEM_CTLR_STATUS_BUSY 0x00100000 | |
483 #define MEM_SEQNCR_STATUS_IDLE 0x00000000 | |
484 #define MEM_SEQNCR_STATUS_BUSY 0x00200000 | |
485 #define MEM_ARBITER_STATUS_IDLE 0x00000000 | |
486 #define MEM_ARBITER_STATUS_BUSY 0x00400000 | |
487 #define MEM_REQ_UNLOCK 0x00000000 | |
488 #define MEM_REQ_LOCK 0x00800000 | |
489 | |
490 | |
491 /* SURFACE_CNTL bit constants */ | |
492 #define SURF_TRANSLATION_DIS (1 << 8) | |
493 #define NONSURF_AP0_SWP_16BPP (1 << 20) | |
494 #define NONSURF_AP0_SWP_32BPP (2 << 20) | |
495 | |
496 | |
497 /* RBBM_SOFT_RESET bit constants */ | |
498 #define SOFT_RESET_CP (1 << 0) | |
499 #define SOFT_RESET_HI (1 << 1) | |
500 #define SOFT_RESET_SE (1 << 2) | |
501 #define SOFT_RESET_RE (1 << 3) | |
502 #define SOFT_RESET_PP (1 << 4) | |
503 #define SOFT_RESET_E2 (1 << 5) | |
504 #define SOFT_RESET_RB (1 << 6) | |
505 #define SOFT_RESET_HDP (1 << 7) | |
506 | |
507 | |
508 /* DEFAULT_SC_BOTTOM_RIGHT bit constants */ | |
509 #define DEFAULT_SC_RIGHT_MAX (0x1fff << 0) | |
510 #define DEFAULT_SC_BOTTOM_MAX (0x1fff << 16) | |
511 | |
512 /* MM_INDEX bit constants */ | |
513 #define MM_APER 0x80000000 | |
514 | |
515 /* CLR_CMP_CNTL bit constants */ | |
516 #define COMPARE_SRC_FALSE 0x00000000 | |
517 #define COMPARE_SRC_TRUE 0x00000001 | |
518 #define COMPARE_SRC_NOT_EQUAL 0x00000004 | |
519 #define COMPARE_SRC_EQUAL 0x00000005 | |
520 #define COMPARE_SRC_EQUAL_FLIP 0x00000007 | |
521 #define COMPARE_DST_FALSE 0x00000000 | |
522 #define COMPARE_DST_TRUE 0x00000100 | |
523 #define COMPARE_DST_NOT_EQUAL 0x00000400 | |
524 #define COMPARE_DST_EQUAL 0x00000500 | |
525 #define COMPARE_DESTINATION 0x00000000 | |
526 #define COMPARE_SOURCE 0x01000000 | |
527 #define COMPARE_SRC_AND_DST 0x02000000 | |
528 | |
529 | |
530 /* DP_CNTL bit constants */ | |
531 #define DST_X_RIGHT_TO_LEFT 0x00000000 | |
532 #define DST_X_LEFT_TO_RIGHT 0x00000001 | |
533 #define DST_Y_BOTTOM_TO_TOP 0x00000000 | |
534 #define DST_Y_TOP_TO_BOTTOM 0x00000002 | |
535 #define DST_X_MAJOR 0x00000000 | |
536 #define DST_Y_MAJOR 0x00000004 | |
537 #define DST_X_TILE 0x00000008 | |
538 #define DST_Y_TILE 0x00000010 | |
539 #define DST_LAST_PEL 0x00000020 | |
540 #define DST_TRAIL_X_RIGHT_TO_LEFT 0x00000000 | |
541 #define DST_TRAIL_X_LEFT_TO_RIGHT 0x00000040 | |
542 #define DST_TRAP_FILL_RIGHT_TO_LEFT 0x00000000 | |
543 #define DST_TRAP_FILL_LEFT_TO_RIGHT 0x00000080 | |
544 #define DST_BRES_SIGN 0x00000100 | |
545 #define DST_HOST_BIG_ENDIAN_EN 0x00000200 | |
546 #define DST_POLYLINE_NONLAST 0x00008000 | |
547 #define DST_RASTER_STALL 0x00010000 | |
548 #define DST_POLY_EDGE 0x00040000 | |
549 | |
550 | |
551 /* DP_CNTL_YDIR_XDIR_YMAJOR bit constants (short version of DP_CNTL) */ | |
552 #define DST_X_MAJOR_S 0x00000000 | |
553 #define DST_Y_MAJOR_S 0x00000001 | |
554 #define DST_Y_BOTTOM_TO_TOP_S 0x00000000 | |
555 #define DST_Y_TOP_TO_BOTTOM_S 0x00008000 | |
556 #define DST_X_RIGHT_TO_LEFT_S 0x00000000 | |
557 #define DST_X_LEFT_TO_RIGHT_S 0x80000000 | |
558 | |
559 | |
560 /* DP_DATATYPE bit constants */ | |
561 #define DST_8BPP 0x00000002 | |
562 #define DST_15BPP 0x00000003 | |
563 #define DST_16BPP 0x00000004 | |
564 #define DST_24BPP 0x00000005 | |
565 #define DST_32BPP 0x00000006 | |
566 #define DST_8BPP_RGB332 0x00000007 | |
567 #define DST_8BPP_Y8 0x00000008 | |
568 #define DST_8BPP_RGB8 0x00000009 | |
569 #define DST_16BPP_VYUY422 0x0000000b | |
570 #define DST_16BPP_YVYU422 0x0000000c | |
571 #define DST_32BPP_AYUV444 0x0000000e | |
572 #define DST_16BPP_ARGB4444 0x0000000f | |
573 #define BRUSH_SOLIDCOLOR 0x00000d00 | |
574 #define SRC_MONO 0x00000000 | |
575 #define SRC_MONO_LBKGD 0x00010000 | |
576 #define SRC_DSTCOLOR 0x00030000 | |
577 #define BYTE_ORDER_MSB_TO_LSB 0x00000000 | |
578 #define BYTE_ORDER_LSB_TO_MSB 0x40000000 | |
579 #define DP_CONVERSION_TEMP 0x80000000 | |
580 #define HOST_BIG_ENDIAN_EN (1 << 29) | |
581 | |
582 | |
583 /* DP_GUI_MASTER_CNTL bit constants */ | |
584 #define GMC_SRC_PITCH_OFFSET_DEFAULT 0x00000000 | |
585 #define GMC_SRC_PITCH_OFFSET_LEAVE 0x00000001 | |
586 #define GMC_DST_PITCH_OFFSET_DEFAULT 0x00000000 | |
587 #define GMC_DST_PITCH_OFFSET_LEAVE 0x00000002 | |
588 #define GMC_SRC_CLIP_DEFAULT 0x00000000 | |
589 #define GMC_SRC_CLIP_LEAVE 0x00000004 | |
590 #define GMC_DST_CLIP_DEFAULT 0x00000000 | |
591 #define GMC_DST_CLIP_LEAVE 0x00000008 | |
592 #define GMC_BRUSH_8x8MONO 0x00000000 | |
593 #define GMC_BRUSH_8x8MONO_LBKGD 0x00000010 | |
594 #define GMC_BRUSH_8x1MONO 0x00000020 | |
595 #define GMC_BRUSH_8x1MONO_LBKGD 0x00000030 | |
596 #define GMC_BRUSH_1x8MONO 0x00000040 | |
597 #define GMC_BRUSH_1x8MONO_LBKGD 0x00000050 | |
598 #define GMC_BRUSH_32x1MONO 0x00000060 | |
599 #define GMC_BRUSH_32x1MONO_LBKGD 0x00000070 | |
600 #define GMC_BRUSH_32x32MONO 0x00000080 | |
601 #define GMC_BRUSH_32x32MONO_LBKGD 0x00000090 | |
602 #define GMC_BRUSH_8x8COLOR 0x000000a0 | |
603 #define GMC_BRUSH_8x1COLOR 0x000000b0 | |
604 #define GMC_BRUSH_1x8COLOR 0x000000c0 | |
605 #define GMC_BRUSH_SOLID_COLOR 0x000000d0 | |
606 #define GMC_DST_8BPP 0x00000200 | |
607 #define GMC_DST_15BPP 0x00000300 | |
608 #define GMC_DST_16BPP 0x00000400 | |
609 #define GMC_DST_24BPP 0x00000500 | |
610 #define GMC_DST_32BPP 0x00000600 | |
611 #define GMC_DST_8BPP_RGB332 0x00000700 | |
612 #define GMC_DST_8BPP_Y8 0x00000800 | |
613 #define GMC_DST_8BPP_RGB8 0x00000900 | |
614 #define GMC_DST_16BPP_VYUY422 0x00000b00 | |
615 #define GMC_DST_16BPP_YVYU422 0x00000c00 | |
616 #define GMC_DST_32BPP_AYUV444 0x00000e00 | |
617 #define GMC_DST_16BPP_ARGB4444 0x00000f00 | |
618 #define GMC_SRC_MONO 0x00000000 | |
619 #define GMC_SRC_MONO_LBKGD 0x00001000 | |
620 #define GMC_SRC_DSTCOLOR 0x00003000 | |
621 #define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 | |
622 #define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 | |
623 #define GMC_DP_CONVERSION_TEMP_9300 0x00008000 | |
624 #define GMC_DP_CONVERSION_TEMP_6500 0x00000000 | |
625 #define GMC_DP_SRC_RECT 0x02000000 | |
626 #define GMC_DP_SRC_HOST 0x03000000 | |
627 #define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 | |
628 #define GMC_3D_FCN_EN_CLR 0x00000000 | |
629 #define GMC_3D_FCN_EN_SET 0x08000000 | |
630 #define GMC_DST_CLR_CMP_FCN_LEAVE 0x00000000 | |
631 #define GMC_DST_CLR_CMP_FCN_CLEAR 0x10000000 | |
632 #define GMC_AUX_CLIP_LEAVE 0x00000000 | |
633 #define GMC_AUX_CLIP_CLEAR 0x20000000 | |
634 #define GMC_WRITE_MASK_LEAVE 0x00000000 | |
635 #define GMC_WRITE_MASK_SET 0x40000000 | |
636 #define GMC_CLR_CMP_CNTL_DIS (1 << 28) | |
637 #define GMC_SRC_DATATYPE_COLOR (3 << 12) | |
638 #define ROP3_S 0x00cc0000 | |
639 #define ROP3_SRCCOPY 0x00cc0000 | |
640 #define ROP3_P 0x00f00000 | |
641 #define ROP3_PATCOPY 0x00f00000 | |
642 #define DP_SRC_SOURCE_MASK (7 << 24) | |
643 #define GMC_BRUSH_NONE (15 << 4) | |
644 #define DP_SRC_SOURCE_MEMORY (2 << 24) | |
645 #define GMC_BRUSH_SOLIDCOLOR 0x000000d0 | |
646 | |
647 /* DP_MIX bit constants */ | |
648 #define DP_SRC_RECT 0x00000200 | |
649 #define DP_SRC_HOST 0x00000300 | |
650 #define DP_SRC_HOST_BYTEALIGN 0x00000400 | |
651 | |
652 | 780 |
653 /* masks */ | 781 /* masks */ |
654 | 782 |
655 #define CONFIG_MEMSIZE_MASK 0x1f000000 | 783 #define CONFIG_MEMSIZE_MASK 0x1f000000 |
656 #define MEM_CFG_TYPE 0x40000000 | 784 #define MEM_CFG_TYPE 0x40000000 |
667 #define PPLL_ATOMIC_UPDATE_W 0x00008000 | 795 #define PPLL_ATOMIC_UPDATE_W 0x00008000 |
668 #define PPLL_VGA_ATOMIC_UPDATE_EN 0x00020000 | 796 #define PPLL_VGA_ATOMIC_UPDATE_EN 0x00020000 |
669 | 797 |
670 #define GUI_ACTIVE 0x80000000 | 798 #define GUI_ACTIVE 0x80000000 |
671 | 799 |
800 /* GEN_RESET_CNTL bit constants */ | |
801 #define SOFT_RESET_GUI 0x00000001 | |
802 #define SOFT_RESET_VCLK 0x00000100 | |
803 #define SOFT_RESET_PCLK 0x00000200 | |
804 #define SOFT_RESET_ECP 0x00000400 | |
805 #define SOFT_RESET_DISPENG_XCLK 0x00000800 | |
806 | |
672 #endif /* _RADEON_H */ | 807 #endif /* _RADEON_H */ |
673 | 808 |