1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/xgi/initdef.h
2 * ,v 1.4 2000/12/02 01:16:17 dawes Exp $*/
11 #define SEQ_ADDRESS_PORT 0x0014
12 #define SEQ_DATA_PORT 0x0015
13 #define MISC_OUTPUT_REG_READ_PORT 0x001C
14 #define MISC_OUTPUT_REG_WRITE_PORT 0x0012
15 #define GRAPH_DATA_PORT 0x1F
16 #define GRAPH_ADDRESS_PORT 0x1E
17 #define XGI_MASK_DUAL_CHIP 0x04 /* SR3A */
18 #define CRTC_ADDRESS_PORT_COLOR 0x0024
19 #define VIDEO_SUBSYSTEM_ENABLE_PORT 0x0013
20 #define PCI_COMMAND 0x04
25 #define VB_XGI301 0x0001 /*301b*/
26 #define VB_XGI301B 0x0002
27 #define VB_XGI302B 0x0004
28 #define VB_XGI301LV 0x0008 /*301lv*/
29 #define VB_XGI302LV 0x0010
30 #define VB_XGI301C 0x0020 /* for 301C */
31 #define VB_NoLCD 0x8000
34 #define VB_YPbPrInfo 0x07 /*301lv*/
35 #define VB_YPbPr525i 0x00
36 #define VB_YPbPr525p 0x01
37 #define VB_YPbPr750p 0x02
38 #define VB_YPbPr1080i 0x03
40 /* #define CRT1Len 17 */
41 #define LVDSCRT1Len 15
42 #define CHTVRegDataLen 5
44 /* #define ModeInfoFlag 0x07 */
45 /* #define IsTextMode 0x07 */
46 /* #define ModeText 0x00 */
47 /* #define ModeCGA 0x01 */
48 /* #define ModeEGA 0x02 */
49 /* #define ModeVGA 0x03 */
50 /* #define Mode15Bpp 0x04 */
51 /* #define Mode16Bpp 0x05 */
52 /* #define Mode24Bpp 0x06 */
53 /* #define Mode32Bpp 0x07 */
55 /* #define DACInfoFlag 0x18 */
56 /* #define MemoryInfoFlag 0x1E0 */
57 /* #define MemorySizeShift 0x05 */
59 #define Charx8Dot 0x0200
60 #define LineCompareOff 0x0400
61 #define CRT2Mode 0x0800
62 #define HalfDCLK 0x1000
63 #define NoSupportSimuTV 0x2000
64 #define DoubleScanMode 0x8000
66 #define SupportAllCRT2 0x0078
67 #define SupportTV 0x0008
68 #define SupportHiVisionTV 0x0010
69 #define SupportLCD 0x0020
70 #define SupportRAMDAC2 0x0040
71 #define NoSupportTV 0x0070
72 #define NoSupportHiVisionTV 0x0060
73 #define NoSupportLCD 0x0058
74 #define SupportCHTV 0x0800
75 #define SupportCRT2in301C 0x0100 /* for 301C */
76 #define SupportTV1024 0x0800 /*301b*/
77 #define SupportYPbPr 0x1000 /*301lv*/
78 #define InterlaceMode 0x0080
82 /* #define SyncNN 0xc000 */
83 #define ECLKindex0 0x0000
84 #define ECLKindex1 0x0100
85 #define ECLKindex2 0x0200
86 #define ECLKindex3 0x0300
87 #define ECLKindex4 0x0400
89 #define SetSimuScanMode 0x0001
90 #define SwitchToCRT2 0x0002
91 /* #define SetCRT2ToTV 0x009C */
92 #define SetCRT2ToAVIDEO 0x0004
93 #define SetCRT2ToSVIDEO 0x0008
94 #define SetCRT2ToSCART 0x0010
95 #define SetCRT2ToLCD 0x0020
96 #define SetCRT2ToRAMDAC 0x0040
97 #define SetCRT2ToHiVisionTV 0x0080
98 #define SetNTSCTV 0x0000
99 /* #define SetPALTV 0x0100 */
100 #define SetInSlaveMode 0x0200
101 #define SetNotSimuMode 0x0400
102 #define SetNotSimuTVMode 0x0400
103 #define SetDispDevSwitch 0x0800
104 #define LoadDACFlag 0x1000
105 #define DisableCRT2Display 0x2000
106 #define DriverMode 0x4000
107 #define HotKeySwitch 0x8000
108 #define SetCHTVOverScan 0x8000
109 /* #define SetCRT2ToLCDA 0x8000 301b */
110 #define PanelRGB18Bit 0x0100
111 #define PanelRGB24Bit 0x0000
113 #define TVOverScan 0x10
114 #define TVOverScanShift 4
115 #define ClearBufferFlag 0x20
116 #define EnableDualEdge 0x01 /*301b*/
117 #define SetToLCDA 0x02
119 #define YPbPrModeInfo 0x38
120 /* #define YPbPrMode525i 0x00 */
121 /* #define YPbPrMode525p 0x08 */
122 /* #define YPbPrMode750p 0x10 */
123 /* #define YPbPrMode1080i 0x18 */
125 #define SetSCARTOutput 0x01
126 #define BoardTVType 0x02
127 #define EnablePALMN 0x40
128 /* #define ProgrammingCRT2 0x01 */
129 /* #define TVSimuMode 0x02 */
130 /* #define RPLLDIV2XO 0x04 */
131 /* #define LCDVESATiming 0x08 */
132 /* #define EnableLVDSDDA 0x10 */
133 #define SetDispDevSwitchFlag 0x20
134 #define CheckWinDos 0x40
135 #define SetJDOSMode 0x80
137 #define Panel320x480 0x07 /*fstn*/
138 /* [ycchen] 02/12/03 Modify for Multi-Sync. LCD Support */
139 #define PanelResInfo 0x1F /* CR36 Panel Type/LCDResInfo */
140 #define PanelRefInfo 0x60
141 #define Panel800x600 0x01
142 #define Panel1024x768 0x02
143 #define Panel1024x768x75 0x22
144 #define Panel1280x1024 0x03
145 #define Panel1280x1024x75 0x23
146 #define Panel640x480 0x04
147 #define Panel1024x600 0x05
148 #define Panel1152x864 0x06
149 #define Panel1280x960 0x07
150 #define Panel1152x768 0x08
151 #define Panel1400x1050 0x09
152 #define Panel1280x768 0x0A
153 #define Panel1600x1200 0x0B
155 #define PanelRef60Hz 0x00
156 #define PanelRef75Hz 0x20
157 #define LCDRGB18Bit 0x01
159 #define ExtChipTrumpion 0x06
160 #define ExtChipCH7005 0x08
161 #define ExtChipMitacTV 0x0a
162 #define LCDNonExpanding 0x10
163 #define LCDNonExpandingShift 4
165 #define LCDSyncBit 0xe0
166 #define LCDSyncShift 6
168 /* #define DDC2DelayTime 300 */
170 #define CRT2DisplayFlag 0x2000
171 /* #define LCDDataLen 8 */
172 /* #define HiTVDataLen 12 */
173 /* #define TVDataLen 16 */
174 /* #define SetPALTV 0x0100 */
175 #define HalfDCLK 0x1000
181 #define StHiTVVT 1126
182 #define StHiTextTVHT 1000
183 #define StHiTextTVVT 1126
184 #define ExtHiTVHT 2100
185 #define ExtHiTVVT 1125
187 #define St750pTVHT 1716
188 #define St750pTVVT 525
189 #define Ext750pTVHT 1716
190 #define Ext750pTVVT 525
191 #define St525pTVHT 1716
192 #define St525pTVVT 525
193 #define Ext525pTVHT 1716
194 #define Ext525pTVVT 525
195 #define St525iTVHT 1716
196 #define St525iTVVT 525
197 #define Ext525iTVHT 1716
198 #define Ext525iTVVT 525
200 #define VCLKStartFreq 25
201 #define SoftDramType 0x80
206 #define LCDRGB18Bit 0x01
207 #define LoadDACFlag 0x1000
208 #define AfterLockCRT2 0x4000
209 #define SetCRT2ToAVIDEO 0x0004
210 #define SetCRT2ToSCART 0x0010
211 #define Ext2StructSize 5
214 #define YPbPr525iVCLK 0x03B
215 #define YPbPr525iVCLK_2 0x03A
217 #define SwitchToCRT2 0x0002
218 /* #define LCDVESATiming 0x08 */
219 #define SetSCARTOutput 0x01
220 #define AVIDEOSense 0x01
221 #define SVIDEOSense 0x02
222 #define SCARTSense 0x04
223 #define LCDSense 0x08
224 #define Monitor1Sense 0x20
225 #define Monitor2Sense 0x10
226 #define HiTVSense 0x40
227 #define BoardTVType 0x02
228 #define HotPlugFunction 0x08
229 #define StStructSize 0x06
232 #define XGI_CRT2_PORT_00 (0x00 - 0x030)
233 #define XGI_CRT2_PORT_04 (0x04 - 0x030)
234 #define XGI_CRT2_PORT_10 (0x10 - 0x30)
235 #define XGI_CRT2_PORT_12 (0x12 - 0x30)
236 #define XGI_CRT2_PORT_14 (0x14 - 0x30)
239 #define LCDNonExpanding 0x10
240 #define ADR_CRT2PtrData 0x20E
241 #define offset_Zurac 0x210
242 #define ADR_LVDSDesPtrData 0x212
243 #define ADR_LVDSCRT1DataPtr 0x214
244 #define ADR_CHTVVCLKPtr 0x216
245 #define ADR_CHTVRegDataPtr 0x218
247 #define LVDSDataLen 6
248 /* #define EnableLVDSDDA 0x10 */
249 /* #define LVDSDesDataLen 3 */
250 #define ActiveNonExpanding 0x40
251 #define ActiveNonExpandingShift 6
252 /* #define ActivePAL 0x20 */
253 #define ActivePALShift 5
254 /* #define ModeSwitchStatus 0x0F */
255 #define SoftTVType 0x40
256 #define SoftSettingAddr 0x52
257 #define ModeSettingAddr 0x53
259 /* #define SelectCRT1Rate 0x4 */
261 #define _PanelType00 0x00
262 #define _PanelType01 0x08
263 #define _PanelType02 0x10
264 #define _PanelType03 0x18
265 #define _PanelType04 0x20
266 #define _PanelType05 0x28
267 #define _PanelType06 0x30
268 #define _PanelType07 0x38
269 #define _PanelType08 0x40
270 #define _PanelType09 0x48
271 #define _PanelType0A 0x50
272 #define _PanelType0B 0x58
273 #define _PanelType0C 0x60
274 #define _PanelType0D 0x68
275 #define _PanelType0E 0x70
276 #define _PanelType0F 0x78
278 /* 1: XGI is primary vga 0:XGI is secondary vga */
279 #define PRIMARY_VGA 0
280 #define BIOSIDCodeAddr 0x235
281 #define OEMUtilIDCodeAddr 0x237
282 #define VBModeIDTableAddr 0x239
283 #define OEMTVPtrAddr 0x241
284 #define PhaseTableAddr 0x243
285 #define NTSCFilterTableAddr 0x245
286 #define PALFilterTableAddr 0x247
287 #define OEMLCDPtr_1Addr 0x249
288 #define OEMLCDPtr_2Addr 0x24B
289 #define LCDHPosTable_1Addr 0x24D
290 #define LCDHPosTable_2Addr 0x24F
291 #define LCDVPosTable_1Addr 0x251
292 #define LCDVPosTable_2Addr 0x253
293 #define OEMLCDPIDTableAddr 0x255
295 #define VBModeStructSize 5
296 #define PhaseTableSize 4
297 #define FilterTableSize 4
298 #define LCDHPosTableSize 7
299 #define LCDVPosTableSize 5
300 #define OEMLVDSPIDTableSize 4
301 #define LVDSHPosTableSize 4
302 #define LVDSVPosTableSize 6
305 #define VB_TVTableIndex 1
306 #define VB_LCDTableIndex 2
307 #define VB_LCDHIndex 3
308 #define VB_LCDVIndex 4
310 #define OEMLCDEnable 0x0001
311 #define OEMLCDDelayEnable 0x0002
312 #define OEMLCDPOSEnable 0x0004
313 #define OEMTVEnable 0x0100
314 #define OEMTVDelayEnable 0x0200
315 #define OEMTVFlickerEnable 0x0400
316 #define OEMTVPhaseEnable 0x0800
317 #define OEMTVFilterEnable 0x1000
319 #define OEMLCDPanelIDSupport 0x0080
321 /* #define LCDVESATiming 0x0001 //LCD Info CR37 */
322 /* #define EnableLVDSDDA 0x0002 */
323 #define EnableScalingLCD 0x0008
324 #define SetPWDEnable 0x0004
325 #define SetLCDtoNonExpanding 0x0010
326 /* #define SetLCDPolarity 0x00E0 */
327 #define SetLCDDualLink 0x0100
328 #define SetLCDLowResolution 0x0200
329 #define SetLCDStdMode 0x0400
330 #define SetTVStdMode 0x0200
331 #define SetTVLowResolution 0x0400
332 /* =============================================================
334 ============================================================== */
335 #define SoftDRAMType 0x80
336 #define SoftSetting_OFFSET 0x52
337 #define SR07_OFFSET 0x7C
338 #define SR15_OFFSET 0x7D
339 #define SR16_OFFSET 0x81
340 #define SR17_OFFSET 0x85
341 #define SR19_OFFSET 0x8D
342 #define SR1F_OFFSET 0x99
343 #define SR21_OFFSET 0x9A
344 #define SR22_OFFSET 0x9B
345 #define SR23_OFFSET 0x9C
346 #define SR24_OFFSET 0x9D
347 #define SR25_OFFSET 0x9E
348 #define SR31_OFFSET 0x9F
349 #define SR32_OFFSET 0xA0
350 #define SR33_OFFSET 0xA1
352 #define CR40_OFFSET 0xA2
353 #define SR25_1_OFFSET 0xF6
354 #define CR49_OFFSET 0xF7
356 #define VB310Data_1_2_Offset 0xB6
357 #define VB310Data_4_D_Offset 0xB7
358 #define VB310Data_4_E_Offset 0xB8
359 #define VB310Data_4_10_Offset 0xBB
361 #define RGBSenseDataOffset 0xBD
362 #define YCSenseDataOffset 0xBF
363 #define VideoSenseDataOffset 0xC1
364 #define OutputSelectOffset 0xF3
366 #define ECLK_MCLK_DISTANCE 0x14
367 #define VBIOSTablePointerStart 0x200
368 #define StandTablePtrOffset (VBIOSTablePointerStart+0x02)
369 #define EModeIDTablePtrOffset (VBIOSTablePointerStart+0x04)
370 #define CRT1TablePtrOffset (VBIOSTablePointerStart+0x06)
371 #define ScreenOffsetPtrOffset (VBIOSTablePointerStart+0x08)
372 #define VCLKDataPtrOffset (VBIOSTablePointerStart+0x0A)
373 #define MCLKDataPtrOffset (VBIOSTablePointerStart+0x0E)
374 #define CRT2PtrDataPtrOffset (VBIOSTablePointerStart+0x10)
375 #define TVAntiFlickPtrOffset (VBIOSTablePointerStart+0x12)
376 #define TVDelayPtr1Offset (VBIOSTablePointerStart+0x14)
377 #define TVPhaseIncrPtr1Offset (VBIOSTablePointerStart+0x16)
378 #define TVYFilterPtr1Offset (VBIOSTablePointerStart+0x18)
379 #define LCDDelayPtr1Offset (VBIOSTablePointerStart+0x20)
380 #define TVEdgePtr1Offset (VBIOSTablePointerStart+0x24)
381 #define CRT2Delay1Offset (VBIOSTablePointerStart+0x28)
382 #define LCDDataDesOffset (VBIOSTablePointerStart-0x02)
383 #define LCDDataPtrOffset (VBIOSTablePointerStart+0x2A)
384 #define LCDDesDataPtrOffset (VBIOSTablePointerStart+0x2C)
385 /* add LCDDataList for GetLCDPtr */
386 #define LCDDataList (VBIOSTablePointerStart+0x22)
387 /* add TVDataList for GetTVPtr */
388 #define TVDataList (VBIOSTablePointerStart+0x36)
390 /* Modify from 310.inc */
395 #define ShowMsgFlag 0x20 /* SoftSetting */
396 #define ShowVESAFlag 0x10
397 #define HotPlugFunction 0x08
398 #define ModeSoftSetting 0x04
399 #define TVSoftSetting 0x02
400 #define LCDSoftSetting 0x01
402 #define GatingCRTinLCDA 0x10
403 #define SetHiTVOutput 0x08
404 #define SetYPbPrOutput 0x04
405 #define BoardTVType 0x02
406 #define SetSCARTOutput 0x01
408 /* TVModeSetting, Others as same as CR30 */
409 #define ModeSettingYPbPr 0x02
411 /* TVModeSetting same as CR35 */
413 /* LCDModeSetting same as CR37 */
415 #define EnableNewTVFont 0x10 /* MiscCapability */
417 #define EnableLCDOutput 0x80 /* LCDCfgSetting */
419 #define SoftDRAMType 0x80 /* DRAMSetting */
420 #define SoftDRAMConfig 0x40
421 #define MosSelDRAMType 0x20
426 #define EnableAGPCfgSetting 0x01 /* AGPCfgSetting */
428 /* ---------------- SetMode Stack */
431 #define DefThreshold 0x0100
432 #define ExtRegsSize ((57+8+37+70+63+28+768+1)/64+1)
434 #define VGA_XGI315 0x0001 /* VGA Type Info */
435 #define VGA_SNewis315e 0x0002 /* 315 series */
436 #define VGA_XGI550 0x0004
437 #define VGA_XGI640 0x0008
438 #define VGA_XGI740 0x0010
439 #define VGA_XGI650 0x0020
440 #define VGA_XGI650M 0x0040
441 #define VGA_XGI651 0x0080
442 #define VGA_XGI340 0x0001 /* 340 series */
443 #define VGA_XGI330 0x0001 /* 330 series */
444 #define VGA_XGI660 0x0001 /* 660 series */
446 #define VB_XGI301 0x0001 /* VB Type Info */
447 #define VB_XGI301B 0x0002 /* 301 series */
448 #define VB_XGI302B 0x0004
449 #define VB_NoLCD 0x8000
450 #define VB_XGI301LV 0x0008
451 #define VB_XGI302LV 0x0010
452 #define VB_LVDS_NS 0x0001 /* 3rd party chip */
453 #define VB_CH7017 0x0002
454 #define VB_CH7007 0x0080 /* [Billy] 07/05/03 */
455 /* #define VB_LVDS_SI 0x0004 */
457 #define ModeInfoFlag 0x0007
458 #define IsTextMode 0x0007
459 #define ModeText 0x0000
460 #define ModeCGA 0x0001
461 #define ModeEGA 0x0002 /* 16 colors mode */
462 #define ModeVGA 0x0003 /* 256 colors mode */
463 #define Mode15Bpp 0x0004 /* 15 Bpp Color Mode */
464 #define Mode16Bpp 0x0005 /* 16 Bpp Color Mode */
465 #define Mode24Bpp 0x0006 /* 24 Bpp Color Mode */
466 #define Mode32Bpp 0x0007 /* 32 Bpp Color Mode */
468 #define DACInfoFlag 0x0018
469 #define MONODAC 0x0000
470 #define CGADAC 0x0008
471 #define EGADAC 0x0010
472 #define VGADAC 0x0018
474 #define MemoryInfoFlag 0x01e0
475 #define MemorySizeShift 5
476 #define Need1MSize 0x0000
477 #define Need2MSize 0x0020
478 #define Need4MSize 0x0060
479 #define Need8MSize 0x00e0
480 #define Need16MSize 0x01e0
482 #define Charx8Dot 0x0200
483 #define LineCompareOff 0x0400
484 #define CRT2Mode 0x0800
485 #define HalfDCLK 0x1000
486 #define NoSupportSimuTV 0x2000
487 #define DoubleScanMode 0x8000
489 /* -------------- Ext_InfoFlag */
490 #define SupportModeInfo 0x0007
491 #define Support256 0x0003
492 #define Support15Bpp 0x0004
493 #define Support16Bpp 0x0005
494 #define Support24Bpp 0x0006
495 #define Support32Bpp 0x0007
497 #define SupportAllCRT2 0x0078
498 #define SupportTV 0x0008
499 #define SupportHiVisionTV 0x0010
500 #define SupportLCD 0x0020
501 #define SupportRAMDAC2 0x0040
502 #define NoSupportTV 0x0070
503 #define NoSupportHiVisionTV 0x0060
504 #define NoSupportLCD 0x0058
505 #define SupportTV1024 0x0800 /* 301btest */
506 #define SupportYPbPr 0x1000 /* 301lv */
507 #define InterlaceMode 0x0080
508 #define SyncPP 0x0000
509 #define SyncPN 0x4000
510 #define SyncNP 0x8000
511 #define SyncNN 0xC000
513 /* -------------- SetMode Stack/Scratch */
514 #define SetSimuScanMode 0x0001 /* VBInfo/CR30 & CR31 */
515 #define SwitchToCRT2 0x0002
516 #define SetCRT2ToTV1 0x009C
517 #define SetCRT2ToTV 0x089C
518 #define SetCRT2ToAVIDEO 0x0004
519 #define SetCRT2ToSVIDEO 0x0008
520 #define SetCRT2ToSCART 0x0010
521 #define SetCRT2ToLCD 0x0020
522 #define SetCRT2ToRAMDAC 0x0040
523 #define SetCRT2ToHiVisionTV 0x0080
524 #define SetCRT2ToLCDA 0x0100
525 #define SetInSlaveMode 0x0200
526 #define SetNotSimuMode 0x0400
527 #define HKEventMode 0x0800
528 #define SetCRT2ToYPbPr 0x0800
529 #define LoadDACFlag 0x1000
530 #define DisableCRT2Display 0x2000
531 #define DriverMode 0x4000
532 #define SetCRT2ToDualEdge 0x8000
533 #define HotKeySwitch 0x8000
535 #define ProgrammingCRT2 0x0001 /* Set Flag */
536 #define EnableVCMode 0x0002
537 #define SetHKEventMode 0x0004
538 #define ReserveTVOption 0x0008
539 #define DisableRelocateIO 0x0010
540 #define Win9xDOSMode 0x0020
541 #define JDOSMode 0x0040
542 /* #define SetWin9xforJap 0x0080 // not used now */
543 /* #define SetWin9xforKorea 0x0100 // not used now */
544 #define GatingCRT 0x0800
545 #define DisableChB 0x1000
546 #define EnableChB 0x2000
547 #define DisableChA 0x4000
548 #define EnableChA 0x8000
550 #define SetNTSCTV 0x0000 /* TV Info */
551 #define SetPALTV 0x0001
552 #define SetNTSCJ 0x0002
553 #define SetPALMTV 0x0004
554 #define SetPALNTV 0x0008
555 #define SetCHTVUnderScan 0x0000
556 /* #define SetCHTVOverScan 0x0010 */
557 #define SetYPbPrMode525i 0x0020
558 #define SetYPbPrMode525p 0x0040
559 #define SetYPbPrMode750p 0x0080
560 #define SetYPbPrMode1080i 0x0100
561 #define SetTVStdMode 0x0200
562 #define SetTVLowResolution 0x0400
563 #define SetTVSimuMode 0x0800
564 #define TVSimuMode 0x0800
565 #define RPLLDIV2XO 0x1000
566 #define NTSC1024x768 0x2000
567 #define SetTVLockMode 0x4000
569 #define LCDVESATiming 0x0001 /* LCD Info/CR37 */
570 #define EnableLVDSDDA 0x0002
571 #define EnableScalingLCD 0x0008
572 #define SetPWDEnable 0x0004
573 #define SetLCDtoNonExpanding 0x0010
574 #define SetLCDPolarity 0x00e0
575 #define SetLCDDualLink 0x0100
576 #define SetLCDLowResolution 0x0200
577 #define SetLCDStdMode 0x0400
579 /* LCD Capability shampoo */
580 #define DefaultLCDCap 0x80ea
581 #define RLVDSDHL00 0x0000
582 #define RLVDSDHL01 0x0001
583 #define RLVDSDHL10 0x0002 /* default */
584 #define RLVDSDHL11 0x0003
585 #define EnableLCD24bpp 0x0004 /* default */
586 #define DisableLCD24bpp 0x0000
587 #define RLVDSClkSFT0 0x0000
588 #define RLVDSClkSFT1 0x0008 /* default */
589 #define EnableLVDSDCBal 0x0010
590 #define DisableLVDSDCBal 0x0000 /* default */
591 #define SinglePolarity 0x0020 /* default */
592 #define MultiPolarity 0x0000
593 #define LCDPolarity 0x00c0 /* default: SyncNN */
594 #define LCDSingleLink 0x0000 /* default */
595 #define LCDDualLink 0x0100
596 #define EnableSpectrum 0x0200
597 #define DisableSpectrum 0x0000 /* default */
598 #define PWDEnable 0x0400
599 #define PWDDisable 0x0000 /* default */
600 #define PWMEnable 0x0800
601 #define PWMDisable 0x0000 /* default */
602 #define EnableVBCLKDRVLOW 0x4000
603 #define EnableVBCLKDRVHigh 0x0000 /* default */
604 #define EnablePLLSPLOW 0x8000
605 #define EnablePLLSPHigh 0x0000 /* default */
607 #define LCDBToA 0x20 /* LCD SetFlag */
608 #define StLCDBToA 0x40
609 #define LockLCDBToA 0x80
610 #define LCDToFull 0x10
611 #define AVIDEOSense 0x01 /* CR32 */
612 #define SVIDEOSense 0x02
613 #define SCARTSense 0x04
614 #define LCDSense 0x08
615 #define Monitor2Sense 0x10
616 #define Monitor1Sense 0x20
617 #define HiTVSense 0x40
620 #define YPbPrSense 0x80 /* NEW SCRATCH */
625 #define TVOverScan 0x10 /* CR35 */
626 #define TVOverScanShift 4
629 #define NTSCMode 0x00
631 #define NTSCJMode 0x02
632 #define PALMNMode 0x0c
633 #define YPbPrMode 0xe0
634 #define YPbPrMode525i 0x00
635 #define YPbPrMode525p 0x20
636 #define YPbPrMode750p 0x40
637 #define YPbPrMode1080i 0x60
638 #else /* Old Scratch */
639 #define ClearBufferFlag 0x20
643 #define LCDRGB18Bit 0x01 /* CR37 */
644 #define LCDNonExpanding 0x10
645 #define LCDNonExpandingShift 4
647 #define LCDSyncBit 0xe0 /* H/V polarity & sync ID */
648 #define LCDSyncShift 6
651 #define ScalingLCD 0x08
652 #else /* Old Scratch */
653 #define ExtChipType 0x0e
654 #define ExtChip301 0x02
655 #define ExtChipLVDS 0x04
656 #define ExtChipCH7019 0x06
657 #define ScalingLCD 0x10
660 #define EnableDualEdge 0x01 /* CR38 */
661 #define SetToLCDA 0x02
663 #define SetYPbPr 0x04
664 #define DisableChannelA 0x08
665 #define DisableChannelB 0x10
666 #define ExtChipType 0xe0
667 #define ExtChip301 0x20
668 #define ExtChipLVDS 0x40
669 #define ExtChipCH7019 0x60
670 #else /* Old Scratch */
671 #define YPbPrSense 0x04
672 #define SetYPbPr 0x08
673 #define YPbPrMode 0x30
674 #define YPbPrMode525i 0x00
675 #define YPbPrMode525p 0x10
676 #define YPbPrMode750p 0x20
677 #define YPbPrMode1080i 0x30
678 #define PALMNMode 0xc0
681 #define BacklightControlBit 0x01 /* CR3A */
682 #define Win9xforJap 0x40
683 #define Win9xforKorea 0x80
685 #define ForceMDBits 0x07 /* CR3B */
686 #define ForceMD_JDOS 0x00
687 #define ForceMD_640x400T 0x01
688 #define ForceMD_640x350T 0x02
689 #define ForceMD_720x400T 0x03
690 #define ForceMD_640x480E 0x04
691 #define ForceMD_640x400E 0x05
692 #define ForceP1Bit 0x10
693 #define ForceP2Bit 0x20
694 #define EnableForceMDinBIOS 0x40
695 #define EnableForceMDinDrv 0x80
697 #ifdef NewScratch /* New Scratch */
698 /* ---------------------- VUMA Information */
699 #define LCDSettingFromCMOS 0x04 /* CR3C */
700 #define TVSettingFromCMOS 0x08
701 #define DisplayDeviceFromCMOS 0x10
702 #define HKSupportInSBIOS 0x20
703 #define OSDSupportInSBIOS 0x40
704 #define DisableLogo 0x80
706 /* ---------------------- HK Evnet Definition */
707 #define HKEvent 0x0f /* CR3D */
708 #define HK_ModeSwitch 0x01
709 #define HK_Expanding 0x02
710 #define HK_OverScan 0x03
711 #define HK_Brightness 0x04
712 #define HK_Contrast 0x05
714 #define HK_Volume 0x07
715 #define ModeSwitchStatus 0xf0
716 #define ActiveCRT1 0x10
717 #define ActiveLCD 0x0020
718 #define ActiveTV 0x40
719 #define ActiveCRT2 0x80
721 #define TVSwitchStatus 0x1f /* CR3E */
722 #define ActiveAVideo 0x01
723 #define ActiveSVideo 0x02
724 #define ActiveSCART 0x04
725 #define ActiveHiTV 0x08
726 #define ActiveYPbPr 0x10
728 #define EnableHKEvent 0x01 /* CR3F */
729 #define EnableOSDEvent 0x02
730 #define StartOSDEvent 0x04
731 #define IgnoreHKEvent 0x08
732 #define IgnoreOSDEvent 0x10
733 #else /* Old Scratch */
734 #define OSD_SBIOS 0x02 /* SR17 */
735 #define DisableLogo 0x04
736 #define SelectKDOS 0x08
737 #define KorWinMode 0x10
738 #define KorMode3Bit 0x0020
739 #define PSCCtrlBit 0x40
740 #define NPSCCtrlBitShift 6
741 #define BlueScreenBit 0x80
743 #define HKEvent 0x0f /* CR79 */
744 #define HK_ModeSwitch 0x01
745 #define HK_Expanding 0x02
746 #define HK_OverScan 0x03
747 #define HK_Brightness 0x04
748 #define HK_Contrast 0x05
750 #define HK_Volume 0x07
751 #define ActivePAL 0x0020
752 #define ActivePALShift 5
753 #define ActiveNonExpanding 0x40
754 #define ActiveNonExpandingShift 6
755 #define ActiveOverScan 0x80
756 #define ActiveOverScanShift 7
758 #define ModeSwitchStatus 0x0b /* SR15 */
759 #define ActiveCRT1 0x01
760 #define ActiveLCD 0x02
761 #define ActiveCRT2 0x08
763 #define TVSwitchStatus 0xf0 /* SR16 */
764 #define TVConfigShift 3
765 #define ActiveTV 0x01
766 #define ActiveYPbPr 0x04
767 #define ActiveAVideo 0x10
768 #define ActiveSVideo 0x0020
769 #define ActiveSCART 0x40
770 #define ActiveHiTV 0x80
772 #define EnableHKEvent 0x01 /* CR7A */
773 #define EnableOSDEvent 0x02
774 #define StartOSDEvent 0x04
775 #define CMOSSupport 0x08
776 #define HotKeySupport 0x10
777 #define IngoreHKOSDEvent 0x20
780 /* //------------- Misc. Definition */
781 #define SelectCRT1Rate 00h
782 /* #define SelectCRT2Rate 04h */
784 #define DDC1DelayTime 1000
786 #define DDC2DelayTime 15
788 #define DDC2DelayTime 150
791 #define R_FACTOR 04Dh
792 #define G_FACTOR 097h
793 #define B_FACTOR 01Ch
794 /* --------------------------------------------------------- */
795 /* translated from asm code 301def.h */
797 /* --------------------------------------------------------- */
799 #define HiTVDataLen 12
801 #define LVDSCRT1Len_H 8
802 #define LVDSCRT1Len_V 7
803 #define LVDSDataLen 6
804 #define LVDSDesDataLen 6
805 #define LCDDesDataLen 6
806 #define LVDSDesDataLen2 8
807 #define LCDDesDataLen2 8
808 #define CHTVRegLen 16
809 #define CHLVRegLen 12
812 #define StHiTVVT 1126
813 #define StHiTextTVHT 1000
814 #define StHiTextTVVT 1126
815 #define ExtHiTVHT 2100
816 #define ExtHiTVVT 1125
819 #define NTSC1024x768HT 1908
820 #define NTSC1024x768VT 525
824 #define YPbPrTV525iHT 1716 /* YPbPr */
825 #define YPbPrTV525iVT 525
826 #define YPbPrTV525pHT 1716
827 #define YPbPrTV525pVT 525
828 #define YPbPrTV750pHT 1650
829 #define YPbPrTV750pVT 750
831 #define CRT2VCLKSel 0xc0
833 #define CRT2Delay1 0x04 /* XGI301 */
834 #define CRT2Delay2 0x0A /* 301B,302 */
837 #define VCLK25_175 0x00
838 #define VCLK28_322 0x01
839 #define VCLK31_5 0x02
842 #define VCLK43_163 0x05
843 #define VCLK44_9 0x06
844 #define VCLK49_5 0x07
846 #define VCLK52_406 0x09
847 #define VCLK56_25 0x0A
849 #define VCLK67_765 0x0C
850 #define VCLK68_179 0x0D
851 #define VCLK72_852 0x0E
853 #define VCLK75_8 0x10
854 #define VCLK78_75 0x11
855 #define VCLK79_411 0x12
856 #define VCLK83_95 0x13
857 #define VCLK84_8 0x14
858 #define VCLK86_6 0x15
859 #define VCLK94_5 0x16
860 #define VCLK104_998 0x17
861 #define VCLK105_882 0x18
862 #define VCLK108_2 0x19
863 #define VCLK109_175 0x1A
864 #define VCLK113_309 0x1B
865 #define VCLK116_406 0x1C
866 #define VCLK132_258 0x1D
867 #define VCLK135_5 0x1E
868 #define VCLK139_054 0x1F
869 #define VCLK157_5 0x20
873 #define VCLK194_4 0x24
874 #define VCLK202_5 0x25
875 #define VCLK229_5 0x26
877 #define VCLK252_699 0x28
878 #define VCLK254_817 0x29
879 #define VCLK265_728 0x2A
880 #define VCLK266_952 0x2B
881 #define VCLK269_655 0x2C
882 #define VCLK272_042 0x2D
883 #define VCLK277_015 0x2E
884 #define VCLK286_359 0x2F
885 #define VCLK291_132 0x30
886 #define VCLK291_766 0x31
887 #define VCLK309_789 0x32
888 #define VCLK315_195 0x33
889 #define VCLK323_586 0x34
890 #define VCLK330_615 0x35
891 #define VCLK332_177 0x36
892 #define VCLK340_477 0x37
893 #define VCLK375_847 0x38
894 #define VCLK388_631 0x39
895 #define VCLK125_999 0x51
896 #define VCLK148_5 0x52
897 #define VCLK178_992 0x54
898 #define VCLK217_325 0x55
899 #define VCLK299_505 0x56
900 #define YPbPr750pVCLK 0x57
902 #define TVVCLKDIV2 0x3A
904 #define HiTVVCLKDIV2 0x3C
905 #define HiTVVCLK 0x3D
906 #define HiTVSimuVCLK 0x3E
907 #define HiTVTextVCLK 0x3F
908 #define VCLK39_77 0x40
909 /* #define YPbPr750pVCLK 0x0F */
910 #define YPbPr525pVCLK 0x3A
911 /* #define ;;YPbPr525iVCLK 0x3B */
912 /* #define ;;YPbPr525iVCLK_2 0x3A */
913 #define NTSC1024VCLK 0x41
914 #define VCLK25_175_41 0x42 /* ; ScaleLCD */
915 #define VCLK25_175_42 0x43
916 #define VCLK28_322_43 0x44
917 #define VCLK40_44 0x45
918 #define VCLKQVGA_1 0x46 /* ; QVGA */
919 #define VCLKQVGA_2 0x47
920 #define VCLKQVGA_3 0x48
921 #define VCLK35_2 0x49 /* ; 800x480 */
922 #define VCLK122_61 0x4A
923 #define VCLK80_350 0x4B
924 #define VCLK107_385 0x4C
926 #define CHTVVCLK30_2 0x50 /* ;;CHTV */
927 #define CHTVVCLK28_1 0x51
928 #define CHTVVCLK43_6 0x52
929 #define CHTVVCLK26_4 0x53
930 #define CHTVVCLK24_6 0x54
931 #define CHTVVCLK47_8 0x55
932 #define CHTVVCLK31_5 0x56
933 #define CHTVVCLK26_2 0x57
934 #define CHTVVCLK39 0x58
935 #define CHTVVCLK36 0x59
937 #define CH7007TVVCLK30_2 0x00 /* [Billy] 2007/05/18 For CH7007 */
938 #define CH7007TVVCLK28_1 0x01
939 #define CH7007TVVCLK43_6 0x02
940 #define CH7007TVVCLK26_4 0x03
941 #define CH7007TVVCLK24_6 0x04
942 #define CH7007TVVCLK47_8 0x05
943 #define CH7007TVVCLK31_5 0x06
944 #define CH7007TVVCLK26_2 0x07
945 #define CH7007TVVCLK39 0x08
946 #define CH7007TVVCLK36 0x09
948 #define RES320x200 0x00
949 #define RES320x240 0x01
950 #define RES400x300 0x02
951 #define RES512x384 0x03
952 #define RES640x400 0x04
953 #define RES640x480x60 0x05
954 #define RES640x480x72 0x06
955 #define RES640x480x75 0x07
956 #define RES640x480x85 0x08
957 #define RES640x480x100 0x09
958 #define RES640x480x120 0x0A
959 #define RES640x480x160 0x0B
960 #define RES640x480x200 0x0C
961 #define RES800x600x56 0x0D
962 #define RES800x600x60 0x0E
963 #define RES800x600x72 0x0F
964 #define RES800x600x75 0x10
965 #define RES800x600x85 0x11
966 #define RES800x600x100 0x12
967 #define RES800x600x120 0x13
968 #define RES800x600x160 0x14
969 #define RES1024x768x43 0x15
970 #define RES1024x768x60 0x16
971 #define RES1024x768x70 0x17
972 #define RES1024x768x75 0x18
973 #define RES1024x768x85 0x19
974 #define RES1024x768x100 0x1A
975 #define RES1024x768x120 0x1B
976 #define RES1280x1024x43 0x1C
977 #define RES1280x1024x60 0x1D
978 #define RES1280x1024x75 0x1E
979 #define RES1280x1024x85 0x1F
980 #define RES1600x1200x60 0x20
981 #define RES1600x1200x65 0x21
982 #define RES1600x1200x70 0x22
983 #define RES1600x1200x75 0x23
984 #define RES1600x1200x85 0x24
985 #define RES1600x1200x100 0x25
986 #define RES1600x1200x120 0x26
987 #define RES1920x1440x60 0x27
988 #define RES1920x1440x65 0x28
989 #define RES1920x1440x70 0x29
990 #define RES1920x1440x75 0x2A
991 #define RES1920x1440x85 0x2B
992 #define RES1920x1440x100 0x2C
993 #define RES2048x1536x60 0x2D
994 #define RES2048x1536x65 0x2E
995 #define RES2048x1536x70 0x2F
996 #define RES2048x1536x75 0x30
997 #define RES2048x1536x85 0x31
998 #define RES800x480x60 0x32
999 #define RES800x480x75 0x33
1000 #define RES800x480x85 0x34
1001 #define RES1024x576x60 0x35
1002 #define RES1024x576x75 0x36
1003 #define RES1024x576x85 0x37
1004 #define RES1280x720x60 0x38
1005 #define RES1280x720x75 0x39
1006 #define RES1280x720x85 0x3A
1007 #define RES1280x960x60 0x3B
1008 #define RES720x480x60 0x3C
1009 #define RES720x576x56 0x3D
1010 #define RES856x480x79I 0x3E
1011 #define RES856x480x60 0x3F
1012 #define RES1280x768x60 0x40
1013 #define RES1400x1050x60 0x41
1014 #define RES1152x864x60 0x42
1015 #define RES1152x864x75 0x43
1016 #define RES1024x768x160 0x44
1017 #define RES1280x960x75 0x45
1018 #define RES1280x960x85 0x46
1019 #define RES1280x960x120 0x47
1021 #define LFBDRAMTrap 0x30