1911
|
1 #ifndef _RADEON_H
|
|
2 #define _RADEON_H
|
|
3
|
|
4
|
|
5 /* radeon PCI ids */
|
|
6 #define PCI_DEVICE_ID_RADEON_QD 0x5144
|
|
7 #define PCI_DEVICE_ID_RADEON_QE 0x5145
|
|
8 #define PCI_DEVICE_ID_RADEON_QF 0x5146
|
|
9 #define PCI_DEVICE_ID_RADEON_QG 0x5147
|
1913
|
10 #define PCI_DEVICE_ID_RADEON_QY 0x5159
|
|
11 #define PCI_DEVICE_ID_RADEON_QZ 0x515A
|
1915
|
12 #define PCI_DEVICE_ID_RADEON_LY 0x4C59
|
|
13 #define PCI_DEVICE_ID_RADEON_LZ 0x4C5A
|
|
14 #define PCI_DEVICE_ID_RADEON_LW 0x4C57
|
1967
|
15 #define PCI_DEVICE_ID_R200_QL 0x514C
|
|
16 #define PCI_DEVICE_ID_RV200_QW 0x5157
|
1911
|
17
|
|
18 #define RADEON_REGSIZE 0x4000
|
|
19
|
|
20
|
|
21 #define MM_INDEX 0x0000
|
1915
|
22 /* MM_INDEX bit constants */
|
|
23 # define MM_APER 0x80000000
|
1911
|
24 #define MM_DATA 0x0004
|
|
25 #define BUS_CNTL 0x0030
|
1915
|
26 /* BUS_CNTL bit constants */
|
|
27 # define BUS_DBL_RESYNC 0x00000001
|
|
28 # define BUS_MSTR_RESET 0x00000002
|
|
29 # define BUS_FLUSH_BUF 0x00000004
|
|
30 # define BUS_STOP_REQ_DIS 0x00000008
|
|
31 # define BUS_ROTATION_DIS 0x00000010
|
|
32 # define BUS_MASTER_DIS 0x00000040
|
|
33 # define BUS_ROM_WRT_EN 0x00000080
|
|
34 # define BUS_DIS_ROM 0x00001000
|
|
35 # define BUS_PCI_READ_RETRY_EN 0x00002000
|
|
36 # define BUS_AGP_AD_STEPPING_EN 0x00004000
|
|
37 # define BUS_PCI_WRT_RETRY_EN 0x00008000
|
|
38 # define BUS_MSTR_RD_MULT 0x00100000
|
|
39 # define BUS_MSTR_RD_LINE 0x00200000
|
|
40 # define BUS_SUSPEND 0x00400000
|
|
41 # define LAT_16X 0x00800000
|
|
42 # define BUS_RD_DISCARD_EN 0x01000000
|
|
43 # define BUS_RD_ABORT_EN 0x02000000
|
|
44 # define BUS_MSTR_WS 0x04000000
|
|
45 # define BUS_PARKING_DIS 0x08000000
|
|
46 # define BUS_MSTR_DISCONNECT_EN 0x10000000
|
|
47 # define BUS_WRT_BURST 0x20000000
|
|
48 # define BUS_READ_BURST 0x40000000
|
|
49 # define BUS_RDY_READ_DLY 0x80000000
|
1911
|
50 #define HI_STAT 0x004C
|
|
51 #define BUS_CNTL1 0x0034
|
1915
|
52 # define BUS_WAIT_ON_LOCK_EN (1 << 4)
|
1911
|
53 #define I2C_CNTL_1 0x0094
|
|
54 #define CONFIG_CNTL 0x00E0
|
1915
|
55 /* CONFIG_CNTL bit constants */
|
|
56 # define CFG_VGA_RAM_EN 0x00000100
|
1911
|
57 #define CONFIG_MEMSIZE 0x00F8
|
|
58 #define CONFIG_APER_0_BASE 0x0100
|
|
59 #define CONFIG_APER_1_BASE 0x0104
|
|
60 #define CONFIG_APER_SIZE 0x0108
|
|
61 #define CONFIG_REG_1_BASE 0x010C
|
|
62 #define CONFIG_REG_APER_SIZE 0x0110
|
|
63 #define PAD_AGPINPUT_DELAY 0x0164
|
|
64 #define PAD_CTLR_STRENGTH 0x0168
|
|
65 #define PAD_CTLR_UPDATE 0x016C
|
|
66 #define AGP_CNTL 0x0174
|
1915
|
67 # define AGP_APER_SIZE_256MB (0x00 << 0)
|
|
68 # define AGP_APER_SIZE_128MB (0x20 << 0)
|
|
69 # define AGP_APER_SIZE_64MB (0x30 << 0)
|
|
70 # define AGP_APER_SIZE_32MB (0x38 << 0)
|
|
71 # define AGP_APER_SIZE_16MB (0x3c << 0)
|
|
72 # define AGP_APER_SIZE_8MB (0x3e << 0)
|
|
73 # define AGP_APER_SIZE_4MB (0x3f << 0)
|
|
74 # define AGP_APER_SIZE_MASK (0x3f << 0)
|
1945
|
75 #define AMCGPIO_A_REG 0x01a0
|
|
76 #define AMCGPIO_EN_REG 0x01a8
|
|
77 #define AMCGPIO_MASK 0x0194
|
|
78 #define AMCGPIO_Y_REG 0x01a4
|
1911
|
79 #define BM_STATUS 0x0160
|
1945
|
80 #define MPP_TB_CONFIG 0x01c0 /* ? */
|
|
81 #define MPP_GP_CONFIG 0x01c8 /* ? */
|
1911
|
82 #define CAP0_TRIG_CNTL 0x0950
|
1945
|
83 #define CAP1_TRIG_CNTL 0x09c0 /* ? */
|
1911
|
84 #define VIPH_CONTROL 0x0C40
|
|
85 #define VENDOR_ID 0x0F00
|
|
86 #define DEVICE_ID 0x0F02
|
|
87 #define COMMAND 0x0F04
|
|
88 #define STATUS 0x0F06
|
|
89 #define REVISION_ID 0x0F08
|
|
90 #define REGPROG_INF 0x0F09
|
|
91 #define SUB_CLASS 0x0F0A
|
|
92 #define BASE_CODE 0x0F0B
|
|
93 #define CACHE_LINE 0x0F0C
|
|
94 #define LATENCY 0x0F0D
|
|
95 #define HEADER 0x0F0E
|
|
96 #define BIST 0x0F0F
|
|
97 #define REG_MEM_BASE 0x0F10
|
|
98 #define REG_IO_BASE 0x0F14
|
|
99 #define REG_REG_BASE 0x0F18
|
|
100 #define ADAPTER_ID 0x0F2C
|
|
101 #define BIOS_ROM 0x0F30
|
|
102 #define CAPABILITIES_PTR 0x0F34
|
|
103 #define INTERRUPT_LINE 0x0F3C
|
|
104 #define INTERRUPT_PIN 0x0F3D
|
|
105 #define MIN_GRANT 0x0F3E
|
|
106 #define MAX_LATENCY 0x0F3F
|
|
107 #define ADAPTER_ID_W 0x0F4C
|
|
108 #define PMI_CAP_ID 0x0F50
|
|
109 #define PMI_NXT_CAP_PTR 0x0F51
|
|
110 #define PMI_PMC_REG 0x0F52
|
|
111 #define PM_STATUS 0x0F54
|
|
112 #define PMI_DATA 0x0F57
|
|
113 #define AGP_CAP_ID 0x0F58
|
|
114 #define AGP_STATUS 0x0F5C
|
1915
|
115 # define AGP_1X_MODE 0x01
|
|
116 # define AGP_2X_MODE 0x02
|
|
117 # define AGP_4X_MODE 0x04
|
|
118 # define AGP_MODE_MASK 0x07
|
1911
|
119 #define AGP_COMMAND 0x0F60
|
|
120 #define AIC_CTRL 0x01D0
|
|
121 #define AIC_STAT 0x01D4
|
|
122 #define AIC_PT_BASE 0x01D8
|
|
123 #define AIC_LO_ADDR 0x01DC
|
|
124 #define AIC_HI_ADDR 0x01E0
|
|
125 #define AIC_TLB_ADDR 0x01E4
|
|
126 #define AIC_TLB_DATA 0x01E8
|
|
127 #define DAC_CNTL 0x0058
|
1915
|
128 /* DAC_CNTL bit constants */
|
|
129 # define DAC_8BIT_EN 0x00000100
|
|
130 # define DAC_4BPP_PIX_ORDER 0x00000200
|
|
131 # define DAC_CRC_EN 0x00080000
|
|
132 # define DAC_MASK_ALL (0xff << 24)
|
|
133 # define DAC_VGA_ADR_EN (1 << 13)
|
|
134 # define DAC_RANGE_CNTL (3 << 0)
|
|
135 # define DAC_BLANKING (1 << 2)
|
|
136 #define DAC_CNTL2 0x007c
|
|
137 /* DAC_CNTL2 bit constants */
|
|
138 # define DAC2_DAC_CLK_SEL (1 << 0)
|
|
139 # define DAC2_DAC2_CLK_SEL (1 << 1)
|
|
140 # define DAC2_PALETTE_ACC_CTL (1 << 5)
|
|
141 #define TV_DAC_CNTL 0x088c
|
|
142 /* TV_DAC_CNTL bit constants */
|
|
143 # define TV_DAC_STD_MASK 0x0300
|
|
144 # define TV_DAC_RDACPD (1 << 24)
|
|
145 # define TV_DAC_GDACPD (1 << 25)
|
|
146 # define TV_DAC_BDACPD (1 << 26)
|
1911
|
147 #define CRTC_GEN_CNTL 0x0050
|
1915
|
148 /* CRTC_GEN_CNTL bit constants */
|
|
149 # define CRTC_DBL_SCAN_EN 0x00000001
|
|
150 # define CRTC_INTERLACE_EN (1 << 1)
|
|
151 # define CRTC_CSYNC_EN (1 << 4)
|
|
152 # define CRTC_CUR_EN 0x00010000
|
|
153 # define CRTC_CUR_MODE_MASK (7 << 17)
|
|
154 # define CRTC_ICON_EN (1 << 20)
|
|
155 # define CRTC_EXT_DISP_EN (1 << 24)
|
|
156 # define CRTC_EN (1 << 25)
|
|
157 # define CRTC_DISP_REQ_EN_B (1 << 26)
|
|
158 #define CRTC2_GEN_CNTL 0x03f8
|
|
159 /* CRTC2_GEN_CNTL bit constants */
|
|
160 # define CRTC2_DBL_SCAN_EN (1 << 0)
|
|
161 # define CRTC2_INTERLACE_EN (1 << 1)
|
|
162 # define CRTC2_SYNC_TRISTAT (1 << 4)
|
|
163 # define CRTC2_HSYNC_TRISTAT (1 << 5)
|
|
164 # define CRTC2_VSYNC_TRISTAT (1 << 6)
|
|
165 # define CRTC2_CRT2_ON (1 << 7)
|
|
166 # define CRTC2_ICON_EN (1 << 15)
|
|
167 # define CRTC2_CUR_EN (1 << 16)
|
|
168 # define CRTC2_CUR_MODE_MASK (7 << 20)
|
|
169 # define CRTC2_DISP_DIS (1 << 23)
|
|
170 # define CRTC2_EN (1 << 25)
|
|
171 # define CRTC2_DISP_REQ_EN_B (1 << 26)
|
|
172 # define CRTC2_HSYNC_DIS (1 << 28)
|
|
173 # define CRTC2_VSYNC_DIS (1 << 29)
|
1911
|
174 #define MEM_CNTL 0x0140
|
1915
|
175 /* MEM_CNTL bit constants */
|
|
176 # define MEM_CTLR_STATUS_IDLE 0x00000000
|
|
177 # define MEM_CTLR_STATUS_BUSY 0x00100000
|
|
178 # define MEM_SEQNCR_STATUS_IDLE 0x00000000
|
|
179 # define MEM_SEQNCR_STATUS_BUSY 0x00200000
|
|
180 # define MEM_ARBITER_STATUS_IDLE 0x00000000
|
|
181 # define MEM_ARBITER_STATUS_BUSY 0x00400000
|
|
182 # define MEM_REQ_UNLOCK 0x00000000
|
|
183 # define MEM_REQ_LOCK 0x00800000
|
1911
|
184 #define EXT_MEM_CNTL 0x0144
|
|
185 #define MC_AGP_LOCATION 0x014C
|
|
186 #define MEM_IO_CNTL_A0 0x0178
|
|
187 #define MEM_INIT_LATENCY_TIMER 0x0154
|
|
188 #define MEM_SDRAM_MODE_REG 0x0158
|
|
189 #define AGP_BASE 0x0170
|
|
190 #define MEM_IO_CNTL_A1 0x017C
|
|
191 #define MEM_IO_CNTL_B0 0x0180
|
|
192 #define MEM_IO_CNTL_B1 0x0184
|
|
193 #define MC_DEBUG 0x0188
|
|
194 #define MC_STATUS 0x0150
|
|
195 #define MEM_IO_OE_CNTL 0x018C
|
|
196 #define MC_FB_LOCATION 0x0148
|
|
197 #define HOST_PATH_CNTL 0x0130
|
|
198 #define MEM_VGA_WP_SEL 0x0038
|
|
199 #define MEM_VGA_RP_SEL 0x003C
|
|
200 #define HDP_DEBUG 0x0138
|
|
201 #define SW_SEMAPHORE 0x013C
|
|
202 #define SURFACE_CNTL 0x0B00
|
1915
|
203 /* SURFACE_CNTL bit constants */
|
|
204 # define SURF_TRANSLATION_DIS (1 << 8)
|
|
205 # define NONSURF_AP0_SWP_16BPP (1 << 20)
|
|
206 # define NONSURF_AP0_SWP_32BPP (2 << 20)
|
1911
|
207 #define SURFACE0_LOWER_BOUND 0x0B04
|
|
208 #define SURFACE1_LOWER_BOUND 0x0B14
|
|
209 #define SURFACE2_LOWER_BOUND 0x0B24
|
|
210 #define SURFACE3_LOWER_BOUND 0x0B34
|
|
211 #define SURFACE4_LOWER_BOUND 0x0B44
|
|
212 #define SURFACE5_LOWER_BOUND 0x0B54
|
|
213 #define SURFACE6_LOWER_BOUND 0x0B64
|
|
214 #define SURFACE7_LOWER_BOUND 0x0B74
|
|
215 #define SURFACE0_UPPER_BOUND 0x0B08
|
|
216 #define SURFACE1_UPPER_BOUND 0x0B18
|
|
217 #define SURFACE2_UPPER_BOUND 0x0B28
|
|
218 #define SURFACE3_UPPER_BOUND 0x0B38
|
|
219 #define SURFACE4_UPPER_BOUND 0x0B48
|
|
220 #define SURFACE5_UPPER_BOUND 0x0B58
|
|
221 #define SURFACE6_UPPER_BOUND 0x0B68
|
|
222 #define SURFACE7_UPPER_BOUND 0x0B78
|
|
223 #define SURFACE0_INFO 0x0B0C
|
|
224 #define SURFACE1_INFO 0x0B1C
|
|
225 #define SURFACE2_INFO 0x0B2C
|
|
226 #define SURFACE3_INFO 0x0B3C
|
|
227 #define SURFACE4_INFO 0x0B4C
|
|
228 #define SURFACE5_INFO 0x0B5C
|
|
229 #define SURFACE6_INFO 0x0B6C
|
|
230 #define SURFACE7_INFO 0x0B7C
|
|
231 #define SURFACE_ACCESS_FLAGS 0x0BF8
|
|
232 #define SURFACE_ACCESS_CLR 0x0BFC
|
|
233 #define GEN_INT_CNTL 0x0040
|
|
234 #define GEN_INT_STATUS 0x0044
|
1915
|
235 # define VSYNC_INT_AK (1 << 2)
|
|
236 # define VSYNC_INT (1 << 2)
|
1911
|
237 #define CRTC_EXT_CNTL 0x0054
|
1915
|
238 /* CRTC_EXT_CNTL bit constants */
|
|
239 # define CRTC_VGA_XOVERSCAN (1 << 0)
|
|
240 # define VGA_ATI_LINEAR 0x00000008
|
|
241 # define VGA_128KAP_PAGING 0x00000010
|
|
242 # define XCRT_CNT_EN (1 << 6)
|
|
243 # define CRTC_HSYNC_DIS (1 << 8)
|
|
244 # define CRTC_VSYNC_DIS (1 << 9)
|
|
245 # define CRTC_DISPLAY_DIS (1 << 10)
|
|
246 # define CRTC_SYNC_TRISTAT (1 << 11)
|
|
247 # define CRTC_CRT_ON (1 << 15)
|
|
248 #define CRTC_EXT_CNTL_DPMS_BYTE 0x0055
|
|
249 # define CRTC_HSYNC_DIS_BYTE (1 << 0)
|
|
250 # define CRTC_VSYNC_DIS_BYTE (1 << 1)
|
|
251 # define CRTC_DISPLAY_DIS_BYTE (1 << 2)
|
1911
|
252 #define RB3D_CNTL 0x1C3C
|
|
253 #define WAIT_UNTIL 0x1720
|
|
254 #define ISYNC_CNTL 0x1724
|
|
255 #define RBBM_GUICNTL 0x172C
|
|
256 #define RBBM_STATUS 0x0E40
|
|
257 #define RBBM_STATUS_alt_1 0x1740
|
|
258 #define RBBM_CNTL 0x00EC
|
|
259 #define RBBM_CNTL_alt_1 0x0E44
|
|
260 #define RBBM_SOFT_RESET 0x00F0
|
1915
|
261 /* RBBM_SOFT_RESET bit constants */
|
|
262 # define SOFT_RESET_CP (1 << 0)
|
|
263 # define SOFT_RESET_HI (1 << 1)
|
|
264 # define SOFT_RESET_SE (1 << 2)
|
|
265 # define SOFT_RESET_RE (1 << 3)
|
|
266 # define SOFT_RESET_PP (1 << 4)
|
|
267 # define SOFT_RESET_E2 (1 << 5)
|
|
268 # define SOFT_RESET_RB (1 << 6)
|
|
269 # define SOFT_RESET_HDP (1 << 7)
|
1911
|
270 #define RBBM_SOFT_RESET_alt_1 0x0E48
|
|
271 #define NQWAIT_UNTIL 0x0E50
|
|
272 #define RBBM_DEBUG 0x0E6C
|
|
273 #define RBBM_CMDFIFO_ADDR 0x0E70
|
|
274 #define RBBM_CMDFIFO_DATAL 0x0E74
|
|
275 #define RBBM_CMDFIFO_DATAH 0x0E78
|
|
276 #define RBBM_CMDFIFO_STAT 0x0E7C
|
|
277 #define CRTC_STATUS 0x005C
|
1915
|
278 /* CRTC_STATUS bit constants */
|
|
279 # define CRTC_VBLANK 0x00000001
|
|
280 # define CRTC_VBLANK_SAVE (1 << 1)
|
1911
|
281 #define GPIO_VGA_DDC 0x0060
|
|
282 #define GPIO_DVI_DDC 0x0064
|
|
283 #define GPIO_MONID 0x0068
|
|
284 #define PALETTE_INDEX 0x00B0
|
|
285 #define PALETTE_DATA 0x00B4
|
|
286 #define PALETTE_30_DATA 0x00B8
|
|
287 #define CRTC_H_TOTAL_DISP 0x0200
|
1915
|
288 # define CRTC_H_TOTAL (0x03ff << 0)
|
|
289 # define CRTC_H_TOTAL_SHIFT 0
|
|
290 # define CRTC_H_DISP (0x01ff << 16)
|
|
291 # define CRTC_H_DISP_SHIFT 16
|
|
292 #define CRTC2_H_TOTAL_DISP 0x0300
|
|
293 # define CRTC2_H_TOTAL (0x03ff << 0)
|
|
294 # define CRTC2_H_TOTAL_SHIFT 0
|
|
295 # define CRTC2_H_DISP (0x01ff << 16)
|
|
296 # define CRTC2_H_DISP_SHIFT 16
|
1911
|
297 #define CRTC_H_SYNC_STRT_WID 0x0204
|
1915
|
298 # define CRTC_H_SYNC_STRT_PIX (0x07 << 0)
|
|
299 # define CRTC_H_SYNC_STRT_CHAR (0x3ff << 3)
|
|
300 # define CRTC_H_SYNC_STRT_CHAR_SHIFT 3
|
|
301 # define CRTC_H_SYNC_WID (0x3f << 16)
|
|
302 # define CRTC_H_SYNC_WID_SHIFT 16
|
|
303 # define CRTC_H_SYNC_POL (1 << 23)
|
|
304 #define CRTC2_H_SYNC_STRT_WID 0x0304
|
|
305 # define CRTC2_H_SYNC_STRT_PIX (0x07 << 0)
|
|
306 # define CRTC2_H_SYNC_STRT_CHAR (0x3ff << 3)
|
|
307 # define CRTC2_H_SYNC_STRT_CHAR_SHIFT 3
|
|
308 # define CRTC2_H_SYNC_WID (0x3f << 16)
|
|
309 # define CRTC2_H_SYNC_WID_SHIFT 16
|
|
310 # define CRTC2_H_SYNC_POL (1 << 23)
|
1911
|
311 #define CRTC_V_TOTAL_DISP 0x0208
|
1915
|
312 # define CRTC_V_TOTAL (0x07ff << 0)
|
|
313 # define CRTC_V_TOTAL_SHIFT 0
|
|
314 # define CRTC_V_DISP (0x07ff << 16)
|
|
315 # define CRTC_V_DISP_SHIFT 16
|
|
316 #define CRTC2_V_TOTAL_DISP 0x0308
|
|
317 # define CRTC2_V_TOTAL (0x07ff << 0)
|
|
318 # define CRTC2_V_TOTAL_SHIFT 0
|
|
319 # define CRTC2_V_DISP (0x07ff << 16)
|
|
320 # define CRTC2_V_DISP_SHIFT 16
|
1911
|
321 #define CRTC_V_SYNC_STRT_WID 0x020C
|
1915
|
322 # define CRTC_V_SYNC_STRT (0x7ff << 0)
|
|
323 # define CRTC_V_SYNC_STRT_SHIFT 0
|
|
324 # define CRTC_V_SYNC_WID (0x1f << 16)
|
|
325 # define CRTC_V_SYNC_WID_SHIFT 16
|
|
326 # define CRTC_V_SYNC_POL (1 << 23)
|
|
327 #define CRTC2_V_SYNC_STRT_WID 0x030C
|
|
328 # define CRTC2_V_SYNC_STRT (0x7ff << 0)
|
|
329 # define CRTC2_V_SYNC_STRT_SHIFT 0
|
|
330 # define CRTC2_V_SYNC_WID (0x1f << 16)
|
|
331 # define CRTC2_V_SYNC_WID_SHIFT 16
|
|
332 # define CRTC2_V_SYNC_POL (1 << 23)
|
1911
|
333 #define CRTC_VLINE_CRNT_VLINE 0x0210
|
1915
|
334 # define CRTC_CRNT_VLINE_MASK (0x7ff << 16)
|
|
335 #define CRTC2_VLINE_CRNT_VLINE 0x0310
|
1911
|
336 #define CRTC_CRNT_FRAME 0x0214
|
1915
|
337 #define CRTC2_CRNT_FRAME 0x0314
|
1911
|
338 #define CRTC_GUI_TRIG_VLINE 0x0218
|
1915
|
339 #define CRTC2_GUI_TRIG_VLINE 0x0318
|
1911
|
340 #define CRTC_DEBUG 0x021C
|
1915
|
341 #define CRTC2_DEBUG 0x031C
|
1911
|
342 #define CRTC_OFFSET_RIGHT 0x0220
|
|
343 #define CRTC_OFFSET 0x0224
|
1915
|
344 #define CRTC2_OFFSET 0x0324
|
1911
|
345 #define CRTC_OFFSET_CNTL 0x0228
|
1915
|
346 # define CRTC_TILE_EN (1 << 15)
|
|
347 #define CRTC2_OFFSET_CNTL 0x0328
|
|
348 # define CRTC2_TILE_EN (1 << 15)
|
1911
|
349 #define CRTC_PITCH 0x022C
|
1915
|
350 #define CRTC2_PITCH 0x032C
|
1945
|
351 #define TMDS_CRC 0x02a0
|
1911
|
352 #define OVR_CLR 0x0230
|
|
353 #define OVR_WID_LEFT_RIGHT 0x0234
|
|
354 #define OVR_WID_TOP_BOTTOM 0x0238
|
|
355 #define DISPLAY_BASE_ADDR 0x023C
|
|
356 #define SNAPSHOT_VH_COUNTS 0x0240
|
|
357 #define SNAPSHOT_F_COUNT 0x0244
|
|
358 #define N_VIF_COUNT 0x0248
|
|
359 #define SNAPSHOT_VIF_COUNT 0x024C
|
|
360 #define FP_CRTC_H_TOTAL_DISP 0x0250
|
1915
|
361 #define FP_CRTC2_H_TOTAL_DISP 0x0350
|
1911
|
362 #define FP_CRTC_V_TOTAL_DISP 0x0254
|
1915
|
363 #define FP_CRTC2_V_TOTAL_DISP 0x0354
|
1945
|
364 # define FP_CRTC_H_TOTAL_MASK 0x000003ff
|
|
365 # define FP_CRTC_H_DISP_MASK 0x01ff0000
|
|
366 # define FP_CRTC_V_TOTAL_MASK 0x00000fff
|
|
367 # define FP_CRTC_V_DISP_MASK 0x0fff0000
|
|
368 # define FP_H_SYNC_STRT_CHAR_MASK 0x00001ff8
|
|
369 # define FP_H_SYNC_WID_MASK 0x003f0000
|
|
370 # define FP_V_SYNC_STRT_MASK 0x00000fff
|
|
371 # define FP_V_SYNC_WID_MASK 0x001f0000
|
|
372 # define FP_CRTC_H_TOTAL_SHIFT 0x00000000
|
|
373 # define FP_CRTC_H_DISP_SHIFT 0x00000010
|
|
374 # define FP_CRTC_V_TOTAL_SHIFT 0x00000000
|
|
375 # define FP_CRTC_V_DISP_SHIFT 0x00000010
|
|
376 # define FP_H_SYNC_STRT_CHAR_SHIFT 0x00000003
|
|
377 # define FP_H_SYNC_WID_SHIFT 0x00000010
|
|
378 # define FP_V_SYNC_STRT_SHIFT 0x00000000
|
|
379 # define FP_V_SYNC_WID_SHIFT 0x00000010
|
1911
|
380 #define CRT_CRTC_H_SYNC_STRT_WID 0x0258
|
|
381 #define CRT_CRTC_V_SYNC_STRT_WID 0x025C
|
|
382 #define CUR_OFFSET 0x0260
|
|
383 #define CUR_HORZ_VERT_POSN 0x0264
|
|
384 #define CUR_HORZ_VERT_OFF 0x0268
|
1915
|
385 /* CUR_OFFSET, CUR_HORZ_VERT_POSN, CUR_HORZ_VERT_OFF bit constants */
|
|
386 # define CUR_LOCK 0x80000000
|
1911
|
387 #define CUR_CLR0 0x026C
|
|
388 #define CUR_CLR1 0x0270
|
1915
|
389 #define CUR2_OFFSET 0x0360
|
|
390 #define CUR2_HORZ_VERT_POSN 0x0364
|
|
391 #define CUR2_HORZ_VERT_OFF 0x0368
|
|
392 # define CUR2_LOCK (1 << 31)
|
|
393 #define CUR2_CLR0 0x036c
|
|
394 #define CUR2_CLR1 0x0370
|
1911
|
395 #define FP_HORZ_VERT_ACTIVE 0x0278
|
|
396 #define CRTC_MORE_CNTL 0x027C
|
|
397 #define DAC_EXT_CNTL 0x0280
|
|
398 #define FP_GEN_CNTL 0x0284
|
1915
|
399 /* FP_GEN_CNTL bit constants */
|
|
400 # define FP_FPON (1 << 0)
|
|
401 # define FP_TMDS_EN (1 << 2)
|
|
402 # define FP_EN_TMDS (1 << 7)
|
|
403 # define FP_DETECT_SENSE (1 << 8)
|
|
404 # define FP_SEL_CRTC2 (1 << 13)
|
|
405 # define FP_CRTC_DONT_SHADOW_HPAR (1 << 15)
|
|
406 # define FP_CRTC_DONT_SHADOW_VPAR (1 << 16)
|
|
407 # define FP_CRTC_DONT_SHADOW_HEND (1 << 17)
|
|
408 # define FP_CRTC_USE_SHADOW_VEND (1 << 18)
|
|
409 # define FP_RMX_HVSYNC_CONTROL_EN (1 << 20)
|
|
410 # define FP_DFP_SYNC_SEL (1 << 21)
|
|
411 # define FP_CRTC_LOCK_8DOT (1 << 22)
|
|
412 # define FP_CRT_SYNC_SEL (1 << 23)
|
|
413 # define FP_USE_SHADOW_EN (1 << 24)
|
|
414 # define FP_CRT_SYNC_ALT (1 << 26)
|
|
415 #define FP2_GEN_CNTL 0x0288
|
|
416 /* FP2_GEN_CNTL bit constants */
|
|
417 # define FP2_FPON (1 << 0)
|
|
418 # define FP2_TMDS_EN (1 << 2)
|
|
419 # define FP2_EN_TMDS (1 << 7)
|
|
420 # define FP2_DETECT_SENSE (1 << 8)
|
|
421 # define FP2_SEL_CRTC2 (1 << 13)
|
|
422 # define FP2_FP_POL (1 << 16)
|
|
423 # define FP2_LP_POL (1 << 17)
|
|
424 # define FP2_SCK_POL (1 << 18)
|
|
425 # define FP2_LCD_CNTL_MASK (7 << 19)
|
|
426 # define FP2_PAD_FLOP_EN (1 << 22)
|
|
427 # define FP2_CRC_EN (1 << 23)
|
|
428 # define FP2_CRC_READ_EN (1 << 24)
|
|
429 #define FP_HORZ_STRETCH 0x028C
|
|
430 #define FP_HORZ2_STRETCH 0x038C
|
1945
|
431 # define HORZ_STRETCH_RATIO_MASK 0xffff
|
|
432 # define HORZ_STRETCH_RATIO_MAX 4096
|
|
433 # define HORZ_PANEL_SIZE (0x1ff << 16)
|
|
434 # define HORZ_PANEL_SHIFT 16
|
|
435 # define HORZ_STRETCH_PIXREP (0 << 25)
|
|
436 # define HORZ_STRETCH_BLEND (1 << 26)
|
|
437 # define HORZ_STRETCH_ENABLE (1 << 25)
|
|
438 # define HORZ_AUTO_RATIO (1 << 27)
|
|
439 # define HORZ_FP_LOOP_STRETCH (0x7 << 28)
|
|
440 # define HORZ_AUTO_RATIO_INC (1 << 31)
|
1915
|
441 #define FP_VERT_STRETCH 0x0290
|
|
442 #define FP_VERT2_STRETCH 0x0390
|
1945
|
443 # define VERT_PANEL_SIZE (0xfff << 12)
|
|
444 # define VERT_PANEL_SHIFT 12
|
|
445 # define VERT_STRETCH_RATIO_MASK 0xfff
|
|
446 # define VERT_STRETCH_RATIO_SHIFT 0
|
|
447 # define VERT_STRETCH_RATIO_MAX 4096
|
|
448 # define VERT_STRETCH_ENABLE (1 << 25)
|
|
449 # define VERT_STRETCH_LINEREP (0 << 26)
|
|
450 # define VERT_STRETCH_BLEND (1 << 26)
|
|
451 # define VERT_AUTO_RATIO_EN (1 << 27)
|
|
452 # define VERT_STRETCH_RESERVED 0xf1000000
|
|
453 #define FP_H_SYNC_STRT_WID 0x02C4
|
|
454 #define FP_H2_SYNC_STRT_WID 0x03C4
|
|
455 #define FP_V_SYNC_STRT_WID 0x02C8
|
|
456 #define FP_V2_SYNC_STRT_WID 0x03C8
|
|
457 #define LVDS_GEN_CNTL 0x02d0
|
|
458 # define LVDS_ON (1 << 0)
|
|
459 # define LVDS_DISPLAY_DIS (1 << 1)
|
|
460 # define LVDS_PANEL_TYPE (1 << 2)
|
|
461 # define LVDS_PANEL_FORMAT (1 << 3)
|
|
462 # define LVDS_EN (1 << 7)
|
|
463 # define LVDS_DIGON (1 << 18)
|
|
464 # define LVDS_BLON (1 << 19)
|
|
465 # define LVDS_SEL_CRTC2 (1 << 23)
|
|
466 #define LVDS_PLL_CNTL 0x02d4
|
|
467 # define HSYNC_DELAY_SHIFT 28
|
|
468 # define HSYNC_DELAY_MASK (0xf << 28)
|
1911
|
469 #define AUX_WINDOW_HORZ_CNTL 0x02D8
|
|
470 #define AUX_WINDOW_VERT_CNTL 0x02DC
|
|
471 #define DDA_CONFIG 0x02e0
|
|
472 #define DDA_ON_OFF 0x02e4
|
|
473 #define GRPH_BUFFER_CNTL 0x02F0
|
|
474 #define VGA_BUFFER_CNTL 0x02F4
|
1945
|
475 /* first overlay unit (there is only one) */
|
1911
|
476 #define OV0_Y_X_START 0x0400
|
|
477 #define OV0_Y_X_END 0x0404
|
|
478 #define OV0_PIPELINE_CNTL 0x0408
|
1945
|
479 #define OV0_EXCLUSIVE_HORZ 0x0408
|
|
480 # define EXCL_HORZ_START_MASK 0x000000ff
|
|
481 # define EXCL_HORZ_END_MASK 0x0000ff00
|
|
482 # define EXCL_HORZ_BACK_PORCH_MASK 0x00ff0000
|
|
483 # define EXCL_HORZ_EXCLUSIVE_EN 0x80000000
|
|
484 #define OV0_EXCLUSIVE_VERT 0x040C
|
|
485 # define EXCL_VERT_START_MASK 0x000003ff
|
|
486 # define EXCL_VERT_END_MASK 0x03ff0000
|
1911
|
487 #define OV0_REG_LOAD_CNTL 0x0410
|
1945
|
488 # define REG_LD_CTL_LOCK 0x00000001L
|
|
489 # define REG_LD_CTL_VBLANK_DURING_LOCK 0x00000002L
|
|
490 # define REG_LD_CTL_STALL_GUI_UNTIL_FLIP 0x00000004L
|
|
491 # define REG_LD_CTL_LOCK_READBACK 0x00000008L
|
1911
|
492 #define OV0_SCALE_CNTL 0x0420
|
1945
|
493 # define SCALER_PIX_EXPAND 0x00000001L
|
|
494 # define SCALER_Y2R_TEMP 0x00000002L
|
|
495 # define SCALER_HORZ_PICK_NEAREST 0x00000003L
|
|
496 # define SCALER_VERT_PICK_NEAREST 0x00000004L
|
|
497 # define SCALER_SIGNED_UV 0x00000010L
|
|
498 # define SCALER_GAMMA_SEL_MASK 0x00000060L
|
|
499 # define SCALER_GAMMA_SEL_BRIGHT 0x00000000L
|
|
500 # define SCALER_GAMMA_SEL_G22 0x00000020L
|
|
501 # define SCALER_GAMMA_SEL_G18 0x00000040L
|
|
502 # define SCALER_GAMMA_SEL_G14 0x00000060L
|
|
503 # define SCALER_COMCORE_SHIFT_UP_ONE 0x00000080L
|
|
504 # define SCALER_SURFAC_FORMAT 0x00000f00L
|
|
505 # define SCALER_SOURCE_15BPP 0x00000300L
|
|
506 # define SCALER_SOURCE_16BPP 0x00000400L
|
|
507 # define SCALER_SOURCE_32BPP 0x00000600L
|
|
508 # define SCALER_SOURCE_YUV9 0x00000900L
|
|
509 # define SCALER_SOURCE_YUV12 0x00000A00L
|
|
510 # define SCALER_SOURCE_VYUY422 0x00000B00L
|
|
511 # define SCALER_SOURCE_YVYU422 0x00000C00L
|
|
512 # define SCALER_SMART_SWITCH 0x00008000L
|
|
513 # define SCALER_BURST_PER_PLANE 0x00ff0000L
|
|
514 # define SCALER_DOUBLE_BUFFER 0x01000000L
|
|
515 # define SCALER_DIS_LIMIT 0x08000000L
|
|
516 # define SCALER_PRG_LOAD_START 0x10000000L
|
|
517 # define SCALER_INT_EMU 0x20000000L
|
|
518 # define SCALER_ENABLE 0x40000000L
|
|
519 # define SCALER_SOFT_RESET 0x80000000L
|
1911
|
520 #define OV0_V_INC 0x0424
|
|
521 #define OV0_P1_V_ACCUM_INIT 0x0428
|
1945
|
522 # define OV0_P1_MAX_LN_IN_PER_LN_OUT 0x00000003L
|
|
523 # define OV0_P1_V_ACCUM_INIT_MASK 0x01ff8000L
|
1911
|
524 #define OV0_P23_V_ACCUM_INIT 0x042C
|
|
525 #define OV0_P1_BLANK_LINES_AT_TOP 0x0430
|
1945
|
526 # define P1_BLNK_LN_AT_TOP_M1_MASK 0x00000fffL
|
|
527 # define P1_ACTIVE_LINES_M1 0x0fff0000L
|
1911
|
528 #define OV0_P23_BLANK_LINES_AT_TOP 0x0434
|
1945
|
529 # define P23_BLNK_LN_AT_TOP_M1_MASK 0x000007ffL
|
|
530 # define P23_ACTIVE_LINES_M1 0x07ff0000L
|
1911
|
531 #define OV0_BASE_ADDR 0x043C
|
|
532 #define OV0_VID_BUF0_BASE_ADRS 0x0440
|
1945
|
533 # define VIF_BUF0_PITCH_SEL 0x00000001L
|
|
534 # define VIF_BUF0_TILE_ADRS 0x00000002L
|
|
535 # define VIF_BUF0_BASE_ADRS_MASK 0x03fffff0L
|
|
536 # define VIF_BUF0_1ST_LINE_LSBS_MASK 0x48000000L
|
1911
|
537 #define OV0_VID_BUF1_BASE_ADRS 0x0444
|
1945
|
538 # define VIF_BUF1_PITCH_SEL 0x00000001L
|
|
539 # define VIF_BUF1_TILE_ADRS 0x00000002L
|
|
540 # define VIF_BUF1_BASE_ADRS_MASK 0x03fffff0L
|
|
541 # define VIF_BUF1_1ST_LINE_LSBS_MASK 0x48000000L
|
1911
|
542 #define OV0_VID_BUF2_BASE_ADRS 0x0448
|
1945
|
543 # define VIF_BUF2_PITCH_SEL 0x00000001L
|
|
544 # define VIF_BUF2_TILE_ADRS 0x00000002L
|
|
545 # define VIF_BUF2_BASE_ADRS_MASK 0x03fffff0L
|
|
546 # define VIF_BUF2_1ST_LINE_LSBS_MASK 0x48000000L
|
1911
|
547 #define OV0_VID_BUF3_BASE_ADRS 0x044C
|
|
548 #define OV0_VID_BUF4_BASE_ADRS 0x0450
|
|
549 #define OV0_VID_BUF5_BASE_ADRS 0x0454
|
|
550 #define OV0_VID_BUF_PITCH0_VALUE 0x0460
|
|
551 #define OV0_VID_BUF_PITCH1_VALUE 0x0464
|
|
552 #define OV0_AUTO_FLIP_CNTRL 0x0470
|
|
553 #define OV0_DEINTERLACE_PATTERN 0x0474
|
|
554 #define OV0_SUBMIT_HISTORY 0x0478
|
|
555 #define OV0_H_INC 0x0480
|
|
556 #define OV0_STEP_BY 0x0484
|
|
557 #define OV0_P1_H_ACCUM_INIT 0x0488
|
|
558 #define OV0_P23_H_ACCUM_INIT 0x048C
|
|
559 #define OV0_P1_X_START_END 0x0494
|
|
560 #define OV0_P2_X_START_END 0x0498
|
|
561 #define OV0_P3_X_START_END 0x049C
|
|
562 #define OV0_FILTER_CNTL 0x04A0
|
|
563 #define OV0_FOUR_TAP_COEF_0 0x04B0
|
|
564 #define OV0_FOUR_TAP_COEF_1 0x04B4
|
|
565 #define OV0_FOUR_TAP_COEF_2 0x04B8
|
|
566 #define OV0_FOUR_TAP_COEF_3 0x04BC
|
|
567 #define OV0_FOUR_TAP_COEF_4 0x04C0
|
|
568 #define OV0_FLAG_CNTRL 0x04DC
|
|
569 #define OV0_SLICE_CNTL 0x04E0
|
|
570 #define OV0_VID_KEY_CLR_LOW 0x04E4
|
|
571 #define OV0_VID_KEY_CLR_HIGH 0x04E8
|
|
572 #define OV0_GRPH_KEY_CLR_LOW 0x04EC
|
|
573 #define OV0_GRPH_KEY_CLR_HIGH 0x04F0
|
|
574 #define OV0_KEY_CNTL 0x04F4
|
1945
|
575 # define VIDEO_KEY_FN_MASK 0x00000007L
|
|
576 # define VIDEO_KEY_FN_FALSE 0x00000000L
|
|
577 # define VIDEO_KEY_FN_TRUE 0x00000001L
|
|
578 # define VIDEO_KEY_FN_EQ 0x00000004L
|
|
579 # define VIDEO_KEY_FN_NE 0x00000005L
|
|
580 # define GRAPHIC_KEY_FN_MASK 0x00000070L
|
|
581 # define GRAPHIC_KEY_FN_FALSE 0x00000000L
|
|
582 # define GRAPHIC_KEY_FN_TRUE 0x00000010L
|
|
583 # define GRAPHIC_KEY_FN_EQ 0x00000040L
|
|
584 # define GRAPHIC_KEY_FN_NE 0x00000050L
|
|
585 # define CMP_MIX_MASK 0x00000100L
|
|
586 # define CMP_MIX_OR 0x00000000L
|
|
587 # define CMP_MIX_AND 0x00000100L
|
1911
|
588 #define OV0_TEST 0x04F8
|
|
589 #define SUBPIC_CNTL 0x0540
|
|
590 #define SUBPIC_DEFCOLCON 0x0544
|
|
591 #define SUBPIC_Y_X_START 0x054C
|
|
592 #define SUBPIC_Y_X_END 0x0550
|
|
593 #define SUBPIC_V_INC 0x0554
|
|
594 #define SUBPIC_H_INC 0x0558
|
|
595 #define SUBPIC_BUF0_OFFSET 0x055C
|
|
596 #define SUBPIC_BUF1_OFFSET 0x0560
|
|
597 #define SUBPIC_LC0_OFFSET 0x0564
|
|
598 #define SUBPIC_LC1_OFFSET 0x0568
|
|
599 #define SUBPIC_PITCH 0x056C
|
|
600 #define SUBPIC_BTN_HLI_COLCON 0x0570
|
|
601 #define SUBPIC_BTN_HLI_Y_X_START 0x0574
|
|
602 #define SUBPIC_BTN_HLI_Y_X_END 0x0578
|
|
603 #define SUBPIC_PALETTE_INDEX 0x057C
|
|
604 #define SUBPIC_PALETTE_DATA 0x0580
|
|
605 #define SUBPIC_H_ACCUM_INIT 0x0584
|
|
606 #define SUBPIC_V_ACCUM_INIT 0x0588
|
|
607 #define DISP_MISC_CNTL 0x0D00
|
1915
|
608 # define SOFT_RESET_GRPH_PP (1 << 0)
|
1911
|
609 #define DAC_MACRO_CNTL 0x0D04
|
|
610 #define DISP_PWR_MAN 0x0D08
|
|
611 #define DISP_TEST_DEBUG_CNTL 0x0D10
|
|
612 #define DISP_HW_DEBUG 0x0D14
|
|
613 #define DAC_CRC_SIG1 0x0D18
|
|
614 #define DAC_CRC_SIG2 0x0D1C
|
|
615 #define OV0_LIN_TRANS_A 0x0D20
|
|
616 #define OV0_LIN_TRANS_B 0x0D24
|
|
617 #define OV0_LIN_TRANS_C 0x0D28
|
|
618 #define OV0_LIN_TRANS_D 0x0D2C
|
|
619 #define OV0_LIN_TRANS_E 0x0D30
|
|
620 #define OV0_LIN_TRANS_F 0x0D34
|
|
621 #define OV0_GAMMA_0_F 0x0D40
|
|
622 #define OV0_GAMMA_10_1F 0x0D44
|
|
623 #define OV0_GAMMA_20_3F 0x0D48
|
|
624 #define OV0_GAMMA_40_7F 0x0D4C
|
|
625 #define OV0_GAMMA_380_3BF 0x0D50
|
|
626 #define OV0_GAMMA_3C0_3FF 0x0D54
|
|
627 #define DISP_MERGE_CNTL 0x0D60
|
|
628 #define DISP_OUTPUT_CNTL 0x0D64
|
1915
|
629 # define DISP_DAC_SOURCE_MASK 0x03
|
|
630 # define DISP_DAC_SOURCE_CRTC2 0x01
|
1911
|
631 #define DISP_LIN_TRANS_GRPH_A 0x0D80
|
|
632 #define DISP_LIN_TRANS_GRPH_B 0x0D84
|
|
633 #define DISP_LIN_TRANS_GRPH_C 0x0D88
|
|
634 #define DISP_LIN_TRANS_GRPH_D 0x0D8C
|
|
635 #define DISP_LIN_TRANS_GRPH_E 0x0D90
|
|
636 #define DISP_LIN_TRANS_GRPH_F 0x0D94
|
|
637 #define DISP_LIN_TRANS_VID_A 0x0D98
|
|
638 #define DISP_LIN_TRANS_VID_B 0x0D9C
|
|
639 #define DISP_LIN_TRANS_VID_C 0x0DA0
|
|
640 #define DISP_LIN_TRANS_VID_D 0x0DA4
|
|
641 #define DISP_LIN_TRANS_VID_E 0x0DA8
|
|
642 #define DISP_LIN_TRANS_VID_F 0x0DAC
|
|
643 #define RMX_HORZ_FILTER_0TAP_COEF 0x0DB0
|
|
644 #define RMX_HORZ_FILTER_1TAP_COEF 0x0DB4
|
|
645 #define RMX_HORZ_FILTER_2TAP_COEF 0x0DB8
|
|
646 #define RMX_HORZ_PHASE 0x0DBC
|
|
647 #define DAC_EMBEDDED_SYNC_CNTL 0x0DC0
|
|
648 #define DAC_BROAD_PULSE 0x0DC4
|
|
649 #define DAC_SKEW_CLKS 0x0DC8
|
|
650 #define DAC_INCR 0x0DCC
|
|
651 #define DAC_NEG_SYNC_LEVEL 0x0DD0
|
|
652 #define DAC_POS_SYNC_LEVEL 0x0DD4
|
|
653 #define DAC_BLANK_LEVEL 0x0DD8
|
|
654 #define CLOCK_CNTL_INDEX 0x0008
|
1915
|
655 /* CLOCK_CNTL_INDEX bit constants */
|
|
656 # define PLL_WR_EN 0x00000080
|
1945
|
657 # define PLL_DIV_SEL (3 << 8)
|
|
658 # define PLL2_DIV_SEL_MASK ~(3 << 8)
|
1911
|
659 #define CLOCK_CNTL_DATA 0x000C
|
|
660 #define CP_RB_CNTL 0x0704
|
|
661 #define CP_RB_BASE 0x0700
|
|
662 #define CP_RB_RPTR_ADDR 0x070C
|
|
663 #define CP_RB_RPTR 0x0710
|
|
664 #define CP_RB_WPTR 0x0714
|
|
665 #define CP_RB_WPTR_DELAY 0x0718
|
|
666 #define CP_IB_BASE 0x0738
|
|
667 #define CP_IB_BUFSZ 0x073C
|
|
668 #define SCRATCH_REG0 0x15E0
|
|
669 #define GUI_SCRATCH_REG0 0x15E0
|
|
670 #define SCRATCH_REG1 0x15E4
|
|
671 #define GUI_SCRATCH_REG1 0x15E4
|
|
672 #define SCRATCH_REG2 0x15E8
|
|
673 #define GUI_SCRATCH_REG2 0x15E8
|
|
674 #define SCRATCH_REG3 0x15EC
|
|
675 #define GUI_SCRATCH_REG3 0x15EC
|
|
676 #define SCRATCH_REG4 0x15F0
|
|
677 #define GUI_SCRATCH_REG4 0x15F0
|
|
678 #define SCRATCH_REG5 0x15F4
|
|
679 #define GUI_SCRATCH_REG5 0x15F4
|
|
680 #define SCRATCH_UMSK 0x0770
|
|
681 #define SCRATCH_ADDR 0x0774
|
|
682 #define DP_BRUSH_FRGD_CLR 0x147C
|
|
683 #define DP_BRUSH_BKGD_CLR 0x1478
|
|
684 #define DST_LINE_START 0x1600
|
|
685 #define DST_LINE_END 0x1604
|
|
686 #define SRC_OFFSET 0x15AC
|
|
687 #define SRC_PITCH 0x15B0
|
|
688 #define SRC_TILE 0x1704
|
|
689 #define SRC_PITCH_OFFSET 0x1428
|
|
690 #define SRC_X 0x1414
|
|
691 #define SRC_Y 0x1418
|
|
692 #define SRC_X_Y 0x1590
|
|
693 #define SRC_Y_X 0x1434
|
|
694 #define DST_Y_X 0x1438
|
|
695 #define DST_WIDTH_HEIGHT 0x1598
|
|
696 #define DST_HEIGHT_WIDTH 0x143c
|
|
697 #define SRC_CLUT_ADDRESS 0x1780
|
|
698 #define SRC_CLUT_DATA 0x1784
|
|
699 #define SRC_CLUT_DATA_RD 0x1788
|
|
700 #define HOST_DATA0 0x17C0
|
|
701 #define HOST_DATA1 0x17C4
|
|
702 #define HOST_DATA2 0x17C8
|
|
703 #define HOST_DATA3 0x17CC
|
|
704 #define HOST_DATA4 0x17D0
|
|
705 #define HOST_DATA5 0x17D4
|
|
706 #define HOST_DATA6 0x17D8
|
|
707 #define HOST_DATA7 0x17DC
|
|
708 #define HOST_DATA_LAST 0x17E0
|
|
709 #define DP_SRC_ENDIAN 0x15D4
|
|
710 #define DP_SRC_FRGD_CLR 0x15D8
|
|
711 #define DP_SRC_BKGD_CLR 0x15DC
|
|
712 #define SC_LEFT 0x1640
|
|
713 #define SC_RIGHT 0x1644
|
|
714 #define SC_TOP 0x1648
|
|
715 #define SC_BOTTOM 0x164C
|
|
716 #define SRC_SC_RIGHT 0x1654
|
|
717 #define SRC_SC_BOTTOM 0x165C
|
|
718 #define DP_CNTL 0x16C0
|
1915
|
719 /* DP_CNTL bit constants */
|
|
720 # define DST_X_RIGHT_TO_LEFT 0x00000000
|
|
721 # define DST_X_LEFT_TO_RIGHT 0x00000001
|
|
722 # define DST_Y_BOTTOM_TO_TOP 0x00000000
|
|
723 # define DST_Y_TOP_TO_BOTTOM 0x00000002
|
|
724 # define DST_X_MAJOR 0x00000000
|
|
725 # define DST_Y_MAJOR 0x00000004
|
|
726 # define DST_X_TILE 0x00000008
|
|
727 # define DST_Y_TILE 0x00000010
|
|
728 # define DST_LAST_PEL 0x00000020
|
|
729 # define DST_TRAIL_X_RIGHT_TO_LEFT 0x00000000
|
|
730 # define DST_TRAIL_X_LEFT_TO_RIGHT 0x00000040
|
|
731 # define DST_TRAP_FILL_RIGHT_TO_LEFT 0x00000000
|
|
732 # define DST_TRAP_FILL_LEFT_TO_RIGHT 0x00000080
|
|
733 # define DST_BRES_SIGN 0x00000100
|
|
734 # define DST_HOST_BIG_ENDIAN_EN 0x00000200
|
|
735 # define DST_POLYLINE_NONLAST 0x00008000
|
|
736 # define DST_RASTER_STALL 0x00010000
|
|
737 # define DST_POLY_EDGE 0x00040000
|
1911
|
738 #define DP_CNTL_XDIR_YDIR_YMAJOR 0x16D0
|
1915
|
739 /* DP_CNTL_XDIR_YDIR_YMAJOR bit constants (short version of DP_CNTL) */
|
|
740 # define DST_X_MAJOR_S 0x00000000
|
|
741 # define DST_Y_MAJOR_S 0x00000001
|
|
742 # define DST_Y_BOTTOM_TO_TOP_S 0x00000000
|
|
743 # define DST_Y_TOP_TO_BOTTOM_S 0x00008000
|
|
744 # define DST_X_RIGHT_TO_LEFT_S 0x00000000
|
|
745 # define DST_X_LEFT_TO_RIGHT_S 0x80000000
|
1911
|
746 #define DP_DATATYPE 0x16C4
|
1915
|
747 /* DP_DATATYPE bit constants */
|
|
748 # define DST_8BPP 0x00000002
|
|
749 # define DST_15BPP 0x00000003
|
|
750 # define DST_16BPP 0x00000004
|
|
751 # define DST_24BPP 0x00000005
|
|
752 # define DST_32BPP 0x00000006
|
|
753 # define DST_8BPP_RGB332 0x00000007
|
|
754 # define DST_8BPP_Y8 0x00000008
|
|
755 # define DST_8BPP_RGB8 0x00000009
|
|
756 # define DST_16BPP_VYUY422 0x0000000b
|
|
757 # define DST_16BPP_YVYU422 0x0000000c
|
|
758 # define DST_32BPP_AYUV444 0x0000000e
|
|
759 # define DST_16BPP_ARGB4444 0x0000000f
|
|
760 # define BRUSH_SOLIDCOLOR 0x00000d00
|
|
761 # define SRC_MONO 0x00000000
|
|
762 # define SRC_MONO_LBKGD 0x00010000
|
|
763 # define SRC_DSTCOLOR 0x00030000
|
|
764 # define BYTE_ORDER_MSB_TO_LSB 0x00000000
|
|
765 # define BYTE_ORDER_LSB_TO_MSB 0x40000000
|
|
766 # define DP_CONVERSION_TEMP 0x80000000
|
|
767 # define HOST_BIG_ENDIAN_EN (1 << 29)
|
1911
|
768 #define DP_MIX 0x16C8
|
1915
|
769 /* DP_MIX bit constants */
|
|
770 # define DP_SRC_RECT 0x00000200
|
|
771 # define DP_SRC_HOST 0x00000300
|
|
772 # define DP_SRC_HOST_BYTEALIGN 0x00000400
|
1911
|
773 #define DP_WRITE_MSK 0x16CC
|
|
774 #define DP_XOP 0x17F8
|
|
775 #define CLR_CMP_CLR_SRC 0x15C4
|
|
776 #define CLR_CMP_CLR_DST 0x15C8
|
|
777 #define CLR_CMP_CNTL 0x15C0
|
1915
|
778 /* CLR_CMP_CNTL bit constants */
|
|
779 # define COMPARE_SRC_FALSE 0x00000000
|
|
780 # define COMPARE_SRC_TRUE 0x00000001
|
|
781 # define COMPARE_SRC_NOT_EQUAL 0x00000004
|
|
782 # define COMPARE_SRC_EQUAL 0x00000005
|
|
783 # define COMPARE_SRC_EQUAL_FLIP 0x00000007
|
|
784 # define COMPARE_DST_FALSE 0x00000000
|
|
785 # define COMPARE_DST_TRUE 0x00000100
|
|
786 # define COMPARE_DST_NOT_EQUAL 0x00000400
|
|
787 # define COMPARE_DST_EQUAL 0x00000500
|
|
788 # define COMPARE_DESTINATION 0x00000000
|
|
789 # define COMPARE_SOURCE 0x01000000
|
|
790 # define COMPARE_SRC_AND_DST 0x02000000
|
1911
|
791 #define CLR_CMP_MSK 0x15CC
|
|
792 #define DSTCACHE_MODE 0x1710
|
|
793 #define DSTCACHE_CTLSTAT 0x1714
|
1915
|
794 /* DSTCACHE_CTLSTAT bit constants */
|
|
795 # define RB2D_DC_FLUSH (3 << 0)
|
|
796 # define RB2D_DC_FLUSH_ALL 0xf
|
|
797 # define RB2D_DC_BUSY (1 << 31)
|
1911
|
798 #define DEFAULT_PITCH_OFFSET 0x16E0
|
|
799 #define DEFAULT_SC_BOTTOM_RIGHT 0x16E8
|
1915
|
800 /* DEFAULT_SC_BOTTOM_RIGHT bit constants */
|
|
801 # define DEFAULT_SC_RIGHT_MAX (0x1fff << 0)
|
|
802 # define DEFAULT_SC_BOTTOM_MAX (0x1fff << 16)
|
1911
|
803 #define DP_GUI_MASTER_CNTL 0x146C
|
1915
|
804 /* DP_GUI_MASTER_CNTL bit constants */
|
|
805 # define GMC_SRC_PITCH_OFFSET_DEFAULT 0x00000000
|
|
806 # define GMC_SRC_PITCH_OFFSET_LEAVE 0x00000001
|
|
807 # define GMC_DST_PITCH_OFFSET_DEFAULT 0x00000000
|
|
808 # define GMC_DST_PITCH_OFFSET_LEAVE 0x00000002
|
|
809 # define GMC_SRC_CLIP_DEFAULT 0x00000000
|
|
810 # define GMC_SRC_CLIP_LEAVE 0x00000004
|
|
811 # define GMC_DST_CLIP_DEFAULT 0x00000000
|
|
812 # define GMC_DST_CLIP_LEAVE 0x00000008
|
|
813 # define GMC_BRUSH_8x8MONO 0x00000000
|
|
814 # define GMC_BRUSH_8x8MONO_LBKGD 0x00000010
|
|
815 # define GMC_BRUSH_8x1MONO 0x00000020
|
|
816 # define GMC_BRUSH_8x1MONO_LBKGD 0x00000030
|
|
817 # define GMC_BRUSH_1x8MONO 0x00000040
|
|
818 # define GMC_BRUSH_1x8MONO_LBKGD 0x00000050
|
|
819 # define GMC_BRUSH_32x1MONO 0x00000060
|
|
820 # define GMC_BRUSH_32x1MONO_LBKGD 0x00000070
|
|
821 # define GMC_BRUSH_32x32MONO 0x00000080
|
|
822 # define GMC_BRUSH_32x32MONO_LBKGD 0x00000090
|
|
823 # define GMC_BRUSH_8x8COLOR 0x000000a0
|
|
824 # define GMC_BRUSH_8x1COLOR 0x000000b0
|
|
825 # define GMC_BRUSH_1x8COLOR 0x000000c0
|
|
826 # define GMC_BRUSH_SOLID_COLOR 0x000000d0
|
|
827 # define GMC_DST_8BPP 0x00000200
|
|
828 # define GMC_DST_15BPP 0x00000300
|
|
829 # define GMC_DST_16BPP 0x00000400
|
|
830 # define GMC_DST_24BPP 0x00000500
|
|
831 # define GMC_DST_32BPP 0x00000600
|
|
832 # define GMC_DST_8BPP_RGB332 0x00000700
|
|
833 # define GMC_DST_8BPP_Y8 0x00000800
|
|
834 # define GMC_DST_8BPP_RGB8 0x00000900
|
|
835 # define GMC_DST_16BPP_VYUY422 0x00000b00
|
|
836 # define GMC_DST_16BPP_YVYU422 0x00000c00
|
|
837 # define GMC_DST_32BPP_AYUV444 0x00000e00
|
|
838 # define GMC_DST_16BPP_ARGB4444 0x00000f00
|
|
839 # define GMC_SRC_MONO 0x00000000
|
|
840 # define GMC_SRC_MONO_LBKGD 0x00001000
|
|
841 # define GMC_SRC_DSTCOLOR 0x00003000
|
|
842 # define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000
|
|
843 # define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000
|
|
844 # define GMC_DP_CONVERSION_TEMP_9300 0x00008000
|
|
845 # define GMC_DP_CONVERSION_TEMP_6500 0x00000000
|
|
846 # define GMC_DP_SRC_RECT 0x02000000
|
|
847 # define GMC_DP_SRC_HOST 0x03000000
|
|
848 # define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000
|
|
849 # define GMC_3D_FCN_EN_CLR 0x00000000
|
|
850 # define GMC_3D_FCN_EN_SET 0x08000000
|
|
851 # define GMC_DST_CLR_CMP_FCN_LEAVE 0x00000000
|
|
852 # define GMC_DST_CLR_CMP_FCN_CLEAR 0x10000000
|
|
853 # define GMC_AUX_CLIP_LEAVE 0x00000000
|
|
854 # define GMC_AUX_CLIP_CLEAR 0x20000000
|
|
855 # define GMC_WRITE_MASK_LEAVE 0x00000000
|
|
856 # define GMC_WRITE_MASK_SET 0x40000000
|
|
857 # define GMC_CLR_CMP_CNTL_DIS (1 << 28)
|
|
858 # define GMC_SRC_DATATYPE_COLOR (3 << 12)
|
|
859 # define ROP3_S 0x00cc0000
|
|
860 # define ROP3_SRCCOPY 0x00cc0000
|
|
861 # define ROP3_P 0x00f00000
|
|
862 # define ROP3_PATCOPY 0x00f00000
|
|
863 # define DP_SRC_SOURCE_MASK (7 << 24)
|
|
864 # define GMC_BRUSH_NONE (15 << 4)
|
|
865 # define DP_SRC_SOURCE_MEMORY (2 << 24)
|
|
866 # define GMC_BRUSH_SOLIDCOLOR 0x000000d0
|
1911
|
867 #define SC_TOP_LEFT 0x16EC
|
|
868 #define SC_BOTTOM_RIGHT 0x16F0
|
|
869 #define SRC_SC_BOTTOM_RIGHT 0x16F4
|
|
870 #define RB2D_DSTCACHE_CTLSTAT 0x342C
|
|
871
|
1915
|
872 #define RADEON_BASE_CODE 0x0f0b
|
|
873 #define RADEON_BIOS_0_SCRATCH 0x0010
|
|
874 #define RADEON_BIOS_1_SCRATCH 0x0014
|
|
875 #define RADEON_BIOS_2_SCRATCH 0x0018
|
|
876 #define RADEON_BIOS_3_SCRATCH 0x001c
|
|
877 #define RADEON_BIOS_4_SCRATCH 0x0020
|
|
878 #define RADEON_BIOS_5_SCRATCH 0x0024
|
|
879 #define RADEON_BIOS_6_SCRATCH 0x0028
|
|
880 #define RADEON_BIOS_7_SCRATCH 0x002c
|
|
881
|
1911
|
882
|
|
883 #define CLK_PIN_CNTL 0x0001
|
|
884 #define PPLL_CNTL 0x0002
|
1945
|
885 # define PPLL_RESET (1 << 0)
|
|
886 # define PPLL_SLEEP (1 << 1)
|
|
887 # define PPLL_ATOMIC_UPDATE_EN (1 << 16)
|
|
888 # define PPLL_VGA_ATOMIC_UPDATE_EN (1 << 17)
|
|
889 # define PPLL_ATOMIC_UPDATE_VSYNC (1 << 18)
|
1911
|
890 #define PPLL_REF_DIV 0x0003
|
1945
|
891 # define PPLL_REF_DIV_MASK 0x03ff
|
|
892 # define PPLL_ATOMIC_UPDATE_R (1 << 15) /* same as _W */
|
|
893 # define PPLL_ATOMIC_UPDATE_W (1 << 15) /* same as _R */
|
1911
|
894 #define PPLL_DIV_0 0x0004
|
|
895 #define PPLL_DIV_1 0x0005
|
|
896 #define PPLL_DIV_2 0x0006
|
|
897 #define PPLL_DIV_3 0x0007
|
|
898 #define VCLK_ECP_CNTL 0x0008
|
|
899 #define HTOTAL_CNTL 0x0009
|
1945
|
900 #define HTOTAL2_CNTL 0x002e /* PLL */
|
1911
|
901 #define M_SPLL_REF_FB_DIV 0x000a
|
|
902 #define AGP_PLL_CNTL 0x000b
|
|
903 #define SPLL_CNTL 0x000c
|
|
904 #define SCLK_CNTL 0x000d
|
|
905 #define MPLL_CNTL 0x000e
|
|
906 #define MCLK_CNTL 0x0012
|
1915
|
907 /* MCLK_CNTL bit constants */
|
|
908 # define FORCEON_MCLKA (1 << 16)
|
|
909 # define FORCEON_MCLKB (1 << 17)
|
|
910 # define FORCEON_YCLKA (1 << 18)
|
|
911 # define FORCEON_YCLKB (1 << 19)
|
|
912 # define FORCEON_MC (1 << 20)
|
|
913 # define FORCEON_AIC (1 << 21)
|
1911
|
914 #define PLL_TEST_CNTL 0x0013
|
1945
|
915 #define P2PLL_CNTL 0x002a /* P2PLL */
|
|
916 # define P2PLL_RESET (1 << 0)
|
|
917 # define P2PLL_SLEEP (1 << 1)
|
|
918 # define P2PLL_ATOMIC_UPDATE_EN (1 << 16)
|
|
919 # define P2PLL_VGA_ATOMIC_UPDATE_EN (1 << 17)
|
|
920 # define P2PLL_ATOMIC_UPDATE_VSYNC (1 << 18)
|
|
921 #define P2PLL_DIV_0 0x002c
|
|
922 # define P2PLL_FB0_DIV_MASK 0x07ff
|
|
923 # define P2PLL_POST0_DIV_MASK 0x00070000
|
|
924 #define P2PLL_REF_DIV 0x002B /* PLL */
|
|
925 # define P2PLL_REF_DIV_MASK 0x03ff
|
|
926 # define P2PLL_ATOMIC_UPDATE_R (1 << 15) /* same as _W */
|
|
927 # define P2PLL_ATOMIC_UPDATE_W (1 << 15) /* same as _R */
|
1911
|
928
|
|
929 /* masks */
|
|
930
|
|
931 #define CONFIG_MEMSIZE_MASK 0x1f000000
|
|
932 #define MEM_CFG_TYPE 0x40000000
|
|
933 #define DST_OFFSET_MASK 0x003fffff
|
|
934 #define DST_PITCH_MASK 0x3fc00000
|
|
935 #define DEFAULT_TILE_MASK 0xc0000000
|
|
936 #define PPLL_DIV_SEL_MASK 0x00000300
|
|
937 #define PPLL_FB3_DIV_MASK 0x000007ff
|
|
938 #define PPLL_POST3_DIV_MASK 0x00070000
|
|
939
|
|
940 #define GUI_ACTIVE 0x80000000
|
|
941
|
1915
|
942 /* GEN_RESET_CNTL bit constants */
|
|
943 #define SOFT_RESET_GUI 0x00000001
|
|
944 #define SOFT_RESET_VCLK 0x00000100
|
|
945 #define SOFT_RESET_PCLK 0x00000200
|
|
946 #define SOFT_RESET_ECP 0x00000400
|
|
947 #define SOFT_RESET_DISPENG_XCLK 0x00000800
|
|
948
|
1911
|
949 #endif /* _RADEON_H */
|
|
950
|