1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/xgi/initdef.h
2 * ,v 1.4 2000/12/02 01:16:17 dawes Exp $*/
6 #define VB_XGI301C 0x0020 /* for 301C */
9 #define VB_YPbPr525p 0x01
10 #define VB_YPbPr750p 0x02
11 #define VB_YPbPr1080i 0x03
13 #define LVDSCRT1Len 15
15 #define SupportCHTV 0x0800
16 #define SupportCRT2in301C 0x0100 /* for 301C */
17 #define SetCHTVOverScan 0x8000
18 #define PanelRGB18Bit 0x0100
19 #define PanelRGB24Bit 0x0000
21 #define Panel320x480 0x07 /*fstn*/
22 /* [ycchen] 02/12/03 Modify for Multi-Sync. LCD Support */
23 #define PanelResInfo 0x1F /* CR36 Panel Type/LCDResInfo */
24 #define Panel800x600 0x01
25 #define Panel1024x768 0x02
26 #define Panel1024x768x75 0x22
27 #define Panel1280x1024 0x03
28 #define Panel1280x1024x75 0x23
29 #define Panel640x480 0x04
30 #define Panel1280x960 0x07
31 #define Panel1400x1050 0x09
32 #define Panel1600x1200 0x0B
34 #define PanelRef60Hz 0x00
35 #define PanelRef75Hz 0x20
37 #define CRT2DisplayFlag 0x2000
39 #define YPbPr525iVCLK 0x03B
40 #define YPbPr525iVCLK_2 0x03A
42 #define XGI_CRT2_PORT_00 (0x00 - 0x030)
43 #define XGI_CRT2_PORT_04 (0x04 - 0x030)
44 #define XGI_CRT2_PORT_10 (0x10 - 0x30)
45 #define XGI_CRT2_PORT_12 (0x12 - 0x30)
46 #define XGI_CRT2_PORT_14 (0x14 - 0x30)
48 #define _PanelType00 0x00
49 #define _PanelType01 0x08
50 #define _PanelType02 0x10
51 #define _PanelType03 0x18
52 #define _PanelType04 0x20
53 #define _PanelType05 0x28
54 #define _PanelType06 0x30
55 #define _PanelType07 0x38
56 #define _PanelType08 0x40
57 #define _PanelType09 0x48
58 #define _PanelType0A 0x50
59 #define _PanelType0B 0x58
60 #define _PanelType0C 0x60
61 #define _PanelType0D 0x68
62 #define _PanelType0E 0x70
63 #define _PanelType0F 0x78
65 /* =============================================================
67 ============================================================== */
68 /* add LCDDataList for GetLCDPtr */
69 #define LCDDataList (VBIOSTablePointerStart+0x22)
71 /* Modify from 310.inc */
75 #define ModeSoftSetting 0x04
77 #define BoardTVType 0x02
79 #define SoftDRAMType 0x80 /* DRAMSetting */
81 /* ---------------- SetMode Stack */
84 #define VGA_XGI340 0x0001 /* 340 series */
86 #define VB_XGI301 0x0001 /* VB Type Info */
87 #define VB_XGI301B 0x0002 /* 301 series */
88 #define VB_XGI302B 0x0004
89 #define VB_NoLCD 0x8000
90 #define VB_XGI301LV 0x0008
91 #define VB_XGI302LV 0x0010
92 #define VB_LVDS_NS 0x0001 /* 3rd party chip */
94 #define ModeInfoFlag 0x0007
95 #define ModeText 0x0000
96 #define ModeEGA 0x0002 /* 16 colors mode */
97 #define ModeVGA 0x0003 /* 256 colors mode */
99 #define DACInfoFlag 0x0018
101 #define MemoryInfoFlag 0x01e0
102 #define MemorySizeShift 5
104 #define Charx8Dot 0x0200
105 #define LineCompareOff 0x0400
106 #define CRT2Mode 0x0800
107 #define HalfDCLK 0x1000
108 #define NoSupportSimuTV 0x2000
109 #define DoubleScanMode 0x8000
111 /* -------------- Ext_InfoFlag */
112 #define Support16Bpp 0x0005
113 #define Support32Bpp 0x0007
115 #define SupportAllCRT2 0x0078
116 #define SupportTV 0x0008
117 #define SupportHiVisionTV 0x0010
118 #define SupportLCD 0x0020
119 #define SupportRAMDAC2 0x0040
120 #define NoSupportTV 0x0070
121 #define NoSupportHiVisionTV 0x0060
122 #define NoSupportLCD 0x0058
123 #define SupportTV1024 0x0800 /* 301btest */
124 #define SupportYPbPr 0x1000 /* 301lv */
125 #define InterlaceMode 0x0080
126 #define SyncPP 0x0000
127 #define SyncPN 0x4000
128 #define SyncNP 0x8000
129 #define SyncNN 0xC000
131 /* -------------- SetMode Stack/Scratch */
132 #define SetSimuScanMode 0x0001 /* VBInfo/CR30 & CR31 */
133 #define SwitchToCRT2 0x0002
134 #define SetCRT2ToTV 0x089C
135 #define SetCRT2ToAVIDEO 0x0004
136 #define SetCRT2ToSVIDEO 0x0008
137 #define SetCRT2ToSCART 0x0010
138 #define SetCRT2ToLCD 0x0020
139 #define SetCRT2ToRAMDAC 0x0040
140 #define SetCRT2ToHiVisionTV 0x0080
141 #define SetCRT2ToLCDA 0x0100
142 #define SetInSlaveMode 0x0200
143 #define SetNotSimuMode 0x0400
144 #define SetCRT2ToYPbPr 0x0800
145 #define LoadDACFlag 0x1000
146 #define DisableCRT2Display 0x2000
147 #define DriverMode 0x4000
148 #define SetCRT2ToDualEdge 0x8000
150 #define ProgrammingCRT2 0x0001 /* Set Flag */
151 #define ReserveTVOption 0x0008
152 #define GatingCRT 0x0800
153 #define DisableChB 0x1000
154 #define EnableChB 0x2000
155 #define DisableChA 0x4000
156 #define EnableChA 0x8000
158 #define SetNTSCTV 0x0000 /* TV Info */
159 #define SetPALTV 0x0001
160 #define SetNTSCJ 0x0002
161 #define SetPALMTV 0x0004
162 #define SetPALNTV 0x0008
163 #define SetYPbPrMode525i 0x0020
164 #define SetYPbPrMode525p 0x0040
165 #define SetYPbPrMode750p 0x0080
166 #define SetYPbPrMode1080i 0x0100
167 #define SetTVLowResolution 0x0400
168 #define TVSimuMode 0x0800
169 #define RPLLDIV2XO 0x1000
170 #define NTSC1024x768 0x2000
171 #define SetTVLockMode 0x4000
173 #define LCDVESATiming 0x0001 /* LCD Info/CR37 */
174 #define EnableLVDSDDA 0x0002
175 #define EnableScalingLCD 0x0008
176 #define SetPWDEnable 0x0004
177 #define SetLCDtoNonExpanding 0x0010
178 #define SetLCDDualLink 0x0100
179 #define SetLCDLowResolution 0x0200
180 #define SetLCDStdMode 0x0400
182 /* LCD Capability shampoo */
183 #define DefaultLCDCap 0x80ea
184 #define EnableLCD24bpp 0x0004 /* default */
185 #define DisableLCD24bpp 0x0000
186 #define LCDPolarity 0x00c0 /* default: SyncNN */
187 #define LCDDualLink 0x0100
188 #define EnableSpectrum 0x0200
189 #define PWDEnable 0x0400
190 #define EnableVBCLKDRVLOW 0x4000
191 #define EnablePLLSPLOW 0x8000
193 #define LCDBToA 0x20 /* LCD SetFlag */
194 #define StLCDBToA 0x40
195 #define LockLCDBToA 0x80
196 #define LCDToFull 0x10
197 #define AVIDEOSense 0x01 /* CR32 */
198 #define SVIDEOSense 0x02
199 #define SCARTSense 0x04
200 #define LCDSense 0x08
201 #define Monitor2Sense 0x10
202 #define Monitor1Sense 0x20
203 #define HiTVSense 0x40
205 #define YPbPrSense 0x80 /* NEW SCRATCH */
209 #define TVOverScan 0x10 /* CR35 */
211 #define YPbPrMode 0xe0
212 #define YPbPrMode525i 0x00
213 #define YPbPrMode525p 0x20
214 #define YPbPrMode750p 0x40
215 #define YPbPrMode1080i 0x60
218 #define LCDRGB18Bit 0x01 /* CR37 */
219 #define LCDNonExpanding 0x10
221 #define LCDSyncBit 0xe0 /* H/V polarity & sync ID */
223 #define ScalingLCD 0x08
225 #define EnableDualEdge 0x01 /* CR38 */
226 #define SetToLCDA 0x02
227 #define SetYPbPr 0x04
229 /* ---------------------- VUMA Information */
230 #define DisplayDeviceFromCMOS 0x10
232 /* ---------------------- HK Evnet Definition */
233 #define ModeSwitchStatus 0xf0
234 #define ActiveCRT1 0x10
235 #define ActiveLCD 0x0020
236 #define ActiveTV 0x40
237 #define ActiveCRT2 0x80
239 #define ActiveAVideo 0x01
240 #define ActiveSVideo 0x02
241 #define ActiveSCART 0x04
242 #define ActiveHiTV 0x08
243 #define ActiveYPbPr 0x10
245 /* --------------------------------------------------------- */
246 /* translated from asm code 301def.h */
248 /* --------------------------------------------------------- */
251 #define LVDSCRT1Len_H 8
252 #define LVDSCRT1Len_V 7
253 #define LVDSDataLen 6
254 #define LVDSDesDataLen 6
255 #define LCDDesDataLen 6
256 #define LVDSDesDataLen2 8
257 #define LCDDesDataLen2 8
258 #define CHTVRegLen 16
261 #define StHiTVVT 1126
262 #define StHiTextTVHT 1000
263 #define StHiTextTVVT 1126
264 #define ExtHiTVHT 2100
265 #define ExtHiTVVT 1125
268 #define NTSC1024x768HT 1908
272 #define YPbPrTV525iHT 1716 /* YPbPr */
273 #define YPbPrTV525iVT 525
274 #define YPbPrTV525pHT 1716
275 #define YPbPrTV525pVT 525
276 #define YPbPrTV750pHT 1650
277 #define YPbPrTV750pVT 750
279 #define CRT2Delay1 0x04 /* XGI301 */
280 #define CRT2Delay2 0x0A /* 301B,302 */
283 #define VCLK25_175 0x00
284 #define VCLK28_322 0x01
285 #define VCLK31_5 0x02
288 #define VCLK43_163 0x05
289 #define VCLK44_9 0x06
290 #define VCLK49_5 0x07
292 #define VCLK52_406 0x09
293 #define VCLK56_25 0x0A
295 #define VCLK68_179 0x0D
296 #define VCLK72_852 0x0E
298 #define VCLK78_75 0x11
299 #define VCLK79_411 0x12
300 #define VCLK83_95 0x13
301 #define VCLK86_6 0x15
302 #define VCLK94_5 0x16
303 #define VCLK108_2 0x19
304 #define VCLK113_309 0x1B
305 #define VCLK116_406 0x1C
306 #define VCLK135_5 0x1E
307 #define VCLK139_054 0x1F
308 #define VCLK157_5 0x20
312 #define VCLK202_5 0x25
313 #define VCLK229_5 0x26
315 #define VCLK254_817 0x29
316 #define VCLK266_952 0x2B
317 #define VCLK269_655 0x2C
318 #define VCLK277_015 0x2E
319 #define VCLK291_132 0x30
320 #define VCLK291_766 0x31
321 #define VCLK315_195 0x33
322 #define VCLK323_586 0x34
323 #define VCLK330_615 0x35
324 #define VCLK340_477 0x37
325 #define VCLK375_847 0x38
326 #define VCLK388_631 0x39
327 #define VCLK125_999 0x51
328 #define VCLK148_5 0x52
329 #define VCLK217_325 0x55
330 #define YPbPr750pVCLK 0x57
332 #define TVVCLKDIV2 0x3A
334 #define HiTVVCLKDIV2 0x3C
335 #define HiTVVCLK 0x3D
336 #define HiTVSimuVCLK 0x3E
337 #define HiTVTextVCLK 0x3F
338 #define VCLK39_77 0x40
339 #define YPbPr525pVCLK 0x3A
340 #define NTSC1024VCLK 0x41
341 #define VCLK35_2 0x49 /* ; 800x480 */
342 #define VCLK122_61 0x4A
343 #define VCLK80_350 0x4B
344 #define VCLK107_385 0x4C
346 #define RES320x200 0x00
347 #define RES320x240 0x01
348 #define RES400x300 0x02
349 #define RES512x384 0x03
350 #define RES640x400 0x04
351 #define RES640x480x60 0x05
352 #define RES640x480x72 0x06
353 #define RES640x480x75 0x07
354 #define RES640x480x85 0x08
355 #define RES640x480x100 0x09
356 #define RES640x480x120 0x0A
357 #define RES640x480x160 0x0B
358 #define RES640x480x200 0x0C
359 #define RES800x600x56 0x0D
360 #define RES800x600x60 0x0E
361 #define RES800x600x72 0x0F
362 #define RES800x600x75 0x10
363 #define RES800x600x85 0x11
364 #define RES800x600x100 0x12
365 #define RES800x600x120 0x13
366 #define RES800x600x160 0x14
367 #define RES1024x768x43 0x15
368 #define RES1024x768x60 0x16
369 #define RES1024x768x70 0x17
370 #define RES1024x768x75 0x18
371 #define RES1024x768x85 0x19
372 #define RES1024x768x100 0x1A
373 #define RES1024x768x120 0x1B
374 #define RES1280x1024x43 0x1C
375 #define RES1280x1024x60 0x1D
376 #define RES1280x1024x75 0x1E
377 #define RES1280x1024x85 0x1F
378 #define RES1600x1200x60 0x20
379 #define RES1600x1200x65 0x21
380 #define RES1600x1200x70 0x22
381 #define RES1600x1200x75 0x23
382 #define RES1600x1200x85 0x24
383 #define RES1600x1200x100 0x25
384 #define RES1600x1200x120 0x26
385 #define RES1920x1440x60 0x27
386 #define RES1920x1440x65 0x28
387 #define RES1920x1440x70 0x29
388 #define RES1920x1440x75 0x2A
389 #define RES1920x1440x85 0x2B
390 #define RES1920x1440x100 0x2C
391 #define RES2048x1536x60 0x2D
392 #define RES2048x1536x65 0x2E
393 #define RES2048x1536x70 0x2F
394 #define RES2048x1536x75 0x30
395 #define RES2048x1536x85 0x31
396 #define RES800x480x60 0x32
397 #define RES800x480x75 0x33
398 #define RES800x480x85 0x34
399 #define RES1024x576x60 0x35
400 #define RES1024x576x75 0x36
401 #define RES1024x576x85 0x37
402 #define RES1280x720x60 0x38
403 #define RES1280x720x75 0x39
404 #define RES1280x720x85 0x3A
405 #define RES1280x960x60 0x3B
406 #define RES720x480x60 0x3C
407 #define RES720x576x56 0x3D
408 #define RES856x480x79I 0x3E
409 #define RES856x480x60 0x3F
410 #define RES1280x768x60 0x40
411 #define RES1400x1050x60 0x41
412 #define RES1152x864x60 0x42
413 #define RES1152x864x75 0x43
414 #define RES1024x768x160 0x44
415 #define RES1280x960x75 0x45
416 #define RES1280x960x85 0x46
417 #define RES1280x960x120 0x47