DRI XFree86-4_3_99_12-merge import
[xf86-video-sis/mirage.git] / src / 300vtbl.h
blobc058895fd7a1aa21fc2d05e94c947ec117bba397
1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/300vtbl.h,v 1.14 2003/07/28 12:39:45 twini Exp $ */
2 /*
3 * Register settings for SiS 300 series
5 * Copyright 2002, 2003 by Thomas Winischhofer, Vienna, Austria
7 * If distributed as part of the linux kernel, the contents of this file
8 * is entirely covered by the GPL.
10 * Otherwise, the following terms apply:
12 * Permission to use, copy, modify, distribute, and sell this software and its
13 * documentation for any purpose is hereby granted without fee, provided that
14 * the above copyright notice appear in all copies and that both that
15 * copyright notice and this permission notice appear in supporting
16 * documentation, and that the name of the copyright holder not be used in
17 * advertising or publicity pertaining to distribution of the software without
18 * specific, written prior permission. The copyright holder makes no representations
19 * about the suitability of this software for any purpose. It is provided
20 * "as is" without express or implied warranty.
22 * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
23 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
24 * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
25 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
26 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
27 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28 * PERFORMANCE OF THIS SOFTWARE.
30 * Author: Thomas Winischhofer <thomas@winischhofer.net>
32 * Based on code by Silicon Intergrated Systems
36 typedef struct _SiS300_StStruct
38 UCHAR St_ModeID;
39 USHORT St_ModeFlag;
40 UCHAR St_StTableIndex;
41 UCHAR St_CRT2CRTC;
42 UCHAR St_ResInfo;
43 UCHAR VB_StTVFlickerIndex;
44 UCHAR VB_StTVEdgeIndex;
45 UCHAR VB_StTVYFilterIndex;
46 } SiS300_StStruct;
48 static const SiS300_StStruct SiS300_SModeIDTable[] =
50 {0x01,0x9208,0x01,0x00,0x00,0x00,0x00,0x00},
51 {0x01,0x1210,0x14,0x01,0x01,0x00,0x00,0x00},
52 {0x01,0x1010,0x17,0x02,0x02,0x00,0x00,0x00},
53 {0x03,0x8208,0x03,0x00,0x00,0x00,0x00,0x00},
54 {0x03,0x0210,0x16,0x01,0x01,0x00,0x00,0x00},
55 {0x03,0x0010,0x18,0x02,0x02,0x00,0x00,0x00},
56 {0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x00},
57 {0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x00},
58 {0x07,0x0000,0x07,0x03,0x03,0x00,0x00,0x00},
59 {0x07,0x0000,0x19,0x02,0x02,0x00,0x00,0x00},
60 {0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x00},
61 {0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x00},
62 {0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x00},
63 {0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x00},
64 {0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x00},
65 {0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x00},
66 {0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x00},
67 {0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x00},
68 {0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x00},
69 {0xff, 0, 0, 0, 0, 0, 0, 0}
72 typedef struct _SiS300_ExtStruct
74 UCHAR Ext_ModeID;
75 USHORT Ext_ModeFlag;
76 USHORT Ext_ModeInfo;
77 USHORT Ext_VESAID;
78 UCHAR Ext_RESINFO;
79 UCHAR VB_ExtTVFlickerIndex;
80 UCHAR VB_ExtTVEdgeIndex;
81 UCHAR VB_ExtTVYFilterIndex;
82 UCHAR REFindex;
83 } SiS300_ExtStruct;
85 static const SiS300_ExtStruct SiS300_EModeIDTable[] =
87 {0x6a,0x2212,0x0407,0x0102,SIS_RI_800x600, 0x00,0x00,0x00,0x00}, /* 800x600x? */
88 {0x2e,0x0a1b,0x0306,0x0101,SIS_RI_640x480, 0x00,0x00,0x00,0x08},
89 {0x2f,0x021b,0x0305,0x0100,SIS_RI_640x400, 0x00,0x00,0x00,0x10}, /* 640x400x8 */
90 {0x30,0x2a1b,0x0407,0x0103,SIS_RI_800x600, 0x00,0x00,0x00,0x00},
91 {0x31,0x0a1b,0x0a0d,0x0000,SIS_RI_720x480, 0x00,0x00,0x00,0x11}, /* 720x480x8 */
92 {0x32,0x2a1b,0x0a0e,0x0000,SIS_RI_720x576, 0x00,0x00,0x00,0x12}, /* 720x576x8 */
93 {0x33,0x0a1d,0x0a0d,0x0000,SIS_RI_720x480, 0x00,0x00,0x00,0x11}, /* 720x480x16 */
94 {0x34,0x2a1d,0x0a0e,0x0000,SIS_RI_720x576, 0x00,0x00,0x00,0x12}, /* 720x576x16 */
95 {0x35,0x0a1f,0x0a0d,0x0000,SIS_RI_720x480, 0x00,0x00,0x00,0x11}, /* 720x480x32 */
96 {0x36,0x2a1f,0x0a0e,0x0000,SIS_RI_720x576, 0x00,0x00,0x00,0x12}, /* 720x576x32 */
97 {0x37,0x0212,0x0508,0x0104,SIS_RI_1024x768, 0x00,0x00,0x00,0x13}, /* 1024x768x? */
98 {0x38,0x0a1b,0x0508,0x0105,SIS_RI_1024x768, 0x00,0x00,0x00,0x13}, /* 1024x768x8 */
99 {0x3a,0x0e3b,0x0609,0x0107,SIS_RI_1280x1024,0x00,0x00,0x00,0x1a}, /* 1280x1024x8 */
100 {0x3c,0x063b,0x070a,0x0130,SIS_RI_1600x1200,0x00,0x00,0x00,0x1e},
101 {0x3d,0x067d,0x070a,0x0131,SIS_RI_1600x1200,0x00,0x00,0x00,0x1e},
102 {0x40,0x921c,0x0000,0x010d,SIS_RI_320x200, 0x00,0x00,0x00,0x23}, /* 320x200x15 */
103 {0x41,0x921d,0x0000,0x010e,SIS_RI_320x200, 0x00,0x00,0x00,0x23}, /* 320x200x16 */
104 {0x43,0x0a1c,0x0306,0x0110,SIS_RI_640x480, 0x00,0x00,0x00,0x08},
105 {0x44,0x0a1d,0x0306,0x0111,SIS_RI_640x480, 0x00,0x00,0x00,0x08},
106 {0x46,0x2a1c,0x0407,0x0113,SIS_RI_800x600, 0x00,0x00,0x00,0x00}, /* 800x600x15 */
107 {0x47,0x2a1d,0x0407,0x0114,SIS_RI_800x600, 0x00,0x00,0x00,0x00}, /* 800x600x16 */
108 {0x49,0x0a3c,0x0508,0x0116,SIS_RI_1024x768, 0x00,0x00,0x00,0x13},
109 {0x4a,0x0a3d,0x0508,0x0117,SIS_RI_1024x768, 0x00,0x00,0x00,0x13},
110 {0x4c,0x0e7c,0x0609,0x0119,SIS_RI_1280x1024,0x00,0x00,0x00,0x1a},
111 {0x4d,0x0e7d,0x0609,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x1a},
112 {0x50,0x921b,0x0001,0x0132,SIS_RI_320x240, 0x00,0x00,0x00,0x24}, /* 320x240x8 */
113 {0x51,0xb21b,0x0103,0x0133,SIS_RI_400x300, 0x00,0x00,0x00,0x25}, /* 400x300x8 */
114 {0x52,0x921b,0x0204,0x0134,SIS_RI_512x384, 0x00,0x00,0x00,0x26}, /* 512x384x8 */
115 {0x56,0x921d,0x0001,0x0135,SIS_RI_320x240, 0x00,0x00,0x00,0x24}, /* 320x240x16 */
116 {0x57,0xb21d,0x0103,0x0136,SIS_RI_400x300, 0x00,0x00,0x00,0x25}, /* 400x300x16 */
117 {0x58,0x921d,0x0204,0x0137,SIS_RI_512x384, 0x00,0x00,0x00,0x26}, /* 512x384x16 */
118 {0x59,0x921b,0x0000,0x0138,SIS_RI_320x200, 0x00,0x00,0x00,0x23}, /* 320x200x8 */
119 {0x5c,0x921f,0x0204,0x0000,SIS_RI_512x384, 0x00,0x00,0x00,0x26}, /* 512x384x32 */
120 {0x5d,0x021d,0x0305,0x0139,SIS_RI_640x400, 0x00,0x00,0x00,0x10}, /* 640x400x16 */
121 {0x5e,0x021f,0x0305,0x0000,SIS_RI_640x400, 0x00,0x00,0x00,0x10}, /* 640x400x32 */
122 {0x62,0x0a3f,0x0306,0x013a,SIS_RI_640x480, 0x00,0x00,0x00,0x08},
123 {0x63,0x2a3f,0x0407,0x013b,SIS_RI_800x600, 0x00,0x00,0x00,0x00}, /* 800x600x32 */
124 {0x64,0x0a7f,0x0508,0x013c,SIS_RI_1024x768, 0x00,0x00,0x00,0x13},
125 {0x65,0x0eff,0x0609,0x013d,SIS_RI_1280x1024,0x00,0x00,0x00,0x1a},
126 {0x66,0x06ff,0x070a,0x013e,SIS_RI_1600x1200,0x00,0x00,0x00,0x1e},
127 {0x68,0x067b,0x080b,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x27},
128 {0x69,0x06fd,0x080b,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x27},
129 {0x6b,0x07ff,0x080b,0x0000,SIS_RI_1920x1440,0x00,0x00,0x00,0x27},
130 {0x6c,0x067b,0x090c,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x28}, /* 2048x1536x8 - not in BIOS! */
131 {0x6d,0x06fd,0x090c,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x28}, /* 2048x1536x16 - not in BIOS! */
132 {0x70,0x2a1b,0x0400,0x0000,SIS_RI_800x480, 0x00,0x00,0x07,0x2d}, /* 800x480x8 */
133 {0x71,0x0a1b,0x0501,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x30}, /* 1024x576x8 */
134 {0x74,0x0a1d,0x0501,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x30}, /* 1024x576x16 */
135 {0x75,0x0e3d,0x0602,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x33}, /* 1280x720x16 */
136 {0x76,0x2a1f,0x0400,0x0000,SIS_RI_800x480, 0x00,0x00,0x07,0x2d}, /* 800x480x32 */
137 {0x77,0x0a3f,0x0501,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x30}, /* 1024x576x32 */
138 {0x78,0x0eff,0x0602,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x33}, /* 1280x720x32 */
139 {0x79,0x0e3b,0x0602,0x0000,SIS_RI_1280x720, 0x00,0x00,0x00,0x33}, /* 1280x720x8 */
140 {0x7a,0x2a1d,0x0400,0x0000,SIS_RI_800x480, 0x00,0x00,0x07,0x2d}, /* 800x480x16 */
141 {0x7c,0x0a3b,0x060f,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x29}, /* 1280x960x8 */
142 {0x7d,0x0a7d,0x060f,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x29}, /* 1280x960x16 */
143 {0x7e,0x0aff,0x060f,0x0000,SIS_RI_1280x960, 0x00,0x00,0x00,0x29}, /* 1280x960x32 */
144 {0x20,0x0a1b,0x0504,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x2b}, /* 1024x600 */
145 {0x21,0x0a3d,0x0504,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x2b},
146 {0x22,0x0a7f,0x0504,0x0000,SIS_RI_1024x600, 0x00,0x00,0x00,0x2b},
147 {0x23,0x0a1b,0x0c05,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x2c}, /* 1152x768 */
148 {0x24,0x0a3d,0x0c05,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x2c},
149 {0x25,0x0a7f,0x0c05,0x0000,SIS_RI_1152x768, 0x00,0x00,0x00,0x2c},
150 {0x29,0x0e1b,0x0c05,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x36}, /* 1152x864 */
151 {0x2a,0x0e3d,0x0c05,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x36},
152 {0x2b,0x0e7f,0x0c05,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x36},
153 {0x39,0x2a1b,0x0d06,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x38}, /* 848x480 */
154 {0x3b,0x2a3d,0x0d06,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x38},
155 {0x3e,0x2a7f,0x0d06,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x38},
156 {0x3f,0x2a1b,0x0d07,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x3a}, /* 856x480 */
157 {0x42,0x2a3d,0x0d07,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x3a},
158 {0x45,0x2a7f,0x0d07,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x3a},
159 {0x48,0x223b,0x0e08,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x3c}, /* 1360x768 */
160 {0x4b,0x227d,0x0e08,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x3c},
161 {0x4e,0x22ff,0x0e08,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x3c},
162 {0x4f,0x921f,0x0000,0x0000,SIS_RI_320x200, 0x00,0x00,0x00,0x23}, /* 320x200x32 */
163 {0x53,0x921f,0x0001,0x0000,SIS_RI_320x240, 0x00,0x00,0x00,0x24}, /* 320x240x32 */
164 {0x54,0xb21f,0x0103,0x0000,SIS_RI_400x300, 0x00,0x00,0x00,0x25}, /* 400x300x32 */
165 {0x55,0x2e3b,0x0609,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x3d}, /* 1280x768 */
166 {0x5a,0x2e7d,0x0609,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x3d},
167 {0x5b,0x2eff,0x0609,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x3d},
168 {0x5f,0x2a1b,0x0f0e,0x0000,SIS_RI_768x576, 0x00,0x00,0x00,0x3e}, /* 768x576x8 */
169 {0x60,0x2a1d,0x0f0e,0x0000,SIS_RI_768x576, 0x00,0x00,0x00,0x3e}, /* 768x576x16 */
170 {0x61,0x2a1f,0x0f0e,0x0000,SIS_RI_768x576, 0x00,0x00,0x00,0x3e}, /* 768x576x32 */
171 {0x67,0x2e3b,0x0e08,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x3f}, /* 1360x1024x8 (BARCO) */
172 {0x6f,0x2e7d,0x0e08,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x3f}, /* 1360x1024x16 (BARCO) */
173 {0x72,0x2eff,0x0e08,0x0000,SIS_RI_1360x1024,0x00,0x00,0x00,0x3f}, /* 1360x1024x32 (BARCO) */
174 {0xff,0x0000,0x0000,0xffff,0x00, 0x00,0x00,0x00,0x00}
177 typedef struct _SiS300_Ext2Struct
179 USHORT Ext_InfoFlag;
180 UCHAR Ext_CRT1CRTC; /* TW: Index in SiS300_CRT1Table */
181 UCHAR Ext_CRTVCLK; /* TW: Index in VCLK array */
182 UCHAR Ext_CRT2CRTC; /* TW: Index in LCD Paneltype arrays (&3f) */
183 UCHAR ModeID;
184 USHORT XRes;
185 USHORT YRes;
186 } SiS300_Ext2Struct;
188 static const SiS300_Ext2Struct SiS300_RefIndex[] =
189 { /* TW: Don't ever insert anything here, table is indexed */
190 {0x085f,0x0d,0x03,0x05,0x6a, 800, 600}, /* 00 */
191 {0x0467,0x0e,0x44,0x05,0x6a, 800, 600}, /* 01 */
192 {0x0067,0x0f,0x07,0x48,0x6a, 800, 600}, /* 02 - CRT1CRTC was 0x4f */
193 {0x0067,0x10,0x06,0x8b,0x6a, 800, 600}, /* 03 */
194 {0x0147,0x11,0x08,0x00,0x6a, 800, 600}, /* 04 */
195 {0x0147,0x12,0x0c,0x00,0x6a, 800, 600}, /* 05 */
196 {0x0047,0x11,0x4e,0x00,0x6a, 800, 600}, /* 06 - CRT1CRTC was 0x51 */
197 {0x0047,0x11,0x13,0x00,0x6a, 800, 600}, /* 07 */
198 {0xc85f,0x05,0x00,0x04,0x2e, 640, 480}, /* 08 */
199 {0xc067,0x06,0x02,0x04,0x2e, 640, 480}, /* 09 */
200 {0xc067,0x07,0x02,0x47,0x2e, 640, 480}, /* 0a */
201 {0xc067,0x08,0x03,0x8a,0x2e, 640, 480}, /* 0b */
202 {0xc047,0x09,0x05,0x00,0x2e, 640, 480}, /* 0c */
203 {0xc047,0x0a,0x08,0x00,0x2e, 640, 480}, /* 0d */
204 {0xc047,0x0b,0x0a,0x00,0x2e, 640, 480}, /* 0e */
205 {0xc047,0x0c,0x10,0x00,0x2e, 640, 480}, /* 0f */
206 {0x487f,0x04,0x00,0x00,0x2f, 640, 400}, /* 10 */
207 {0xc00f,0x31,0x01,0x06,0x31, 720, 480}, /* 11 */
208 {0x000f,0x32,0x03,0x06,0x32, 720, 576}, /* 12 */
209 {0x0187,0x15,0x05,0x00,0x37,1024, 768}, /* 13 */
210 {0xc877,0x16,0x09,0x06,0x37,1024, 768}, /* 14 */
211 {0xc067,0x17,0x0b,0x49,0x37,1024, 768}, /* 15 - CRT1CRTC was 0x97 */
212 {0x0267,0x18,0x0d,0x00,0x37,1024, 768}, /* 16 */
213 {0x0047,0x19,0x11,0x8c,0x37,1024, 768}, /* 17 - CRT1CRTC was 0x59 */
214 {0x0047,0x1a,0x52,0x00,0x37,1024, 768}, /* 18 */
215 {0x0007,0x1b,0x16,0x00,0x37,1024, 768}, /* 19 - CRT1CRTC was 0x5b */
216 {0x0387,0x1c,0x4d,0x00,0x3a,1280,1024}, /* 1a - CRT1CRTC was 0x5c */
217 {0x0077,0x1d,0x14,0x07,0x3a,1280,1024}, /* 1b */
218 {0x0047,0x1e,0x17,0x00,0x3a,1280,1024}, /* 1c */
219 {0x0007,0x1f,0x98,0x00,0x3a,1280,1024}, /* 1d */
220 {0x0007,0x20,0x59,0x00,0x3c,1600,1200}, /* 1e - CRT1CRTC was 0x60 */
221 {0x0007,0x21,0x5a,0x00,0x3c,1600,1200}, /* 1f */
222 {0x0007,0x22,0x1b,0x00,0x3c,1600,1200}, /* 20 */
223 {0x0007,0x23,0x1d,0x00,0x3c,1600,1200}, /* 21 - CRT1CRTC was 0x63 */
224 {0x0007,0x24,0x1e,0x00,0x3c,1600,1200}, /* 22 */
225 {0x407f,0x00,0x00,0x00,0x40, 320, 200}, /* 23 */
226 {0xc07f,0x01,0x00,0x04,0x50, 320, 240}, /* 24 */
227 {0x0077,0x02,0x04,0x05,0x51, 400, 300}, /* 25 */
228 {0xc877,0x03,0x09,0x06,0x52, 512, 384}, /* 26 */ /* was c077 */
229 {0x8207,0x25,0x1f,0x00,0x68,1920,1440}, /* 27 */
230 {0x0007,0x26,0x20,0x00,0x6c,2048,1536}, /* 28 */
231 {0x0067,0x27,0x14,0x08,0x6e,1280, 960}, /* 29 - TW: 1280x960-60 */
232 {0x0027,0x45,0x3c,0x08,0x6e,1280, 960}, /* 2a - TW: 1280x960-85 */
233 {0xc077,0x33,0x09,0x06,0x20,1024, 600}, /* 2b */
234 {0xc077,0x34,0x0b,0x06,0x23,1152, 768}, /* 2c */ /* VCLK 0x09 */
235 {0x0057,0x35,0x27,0x08,0x70, 800, 480}, /* 2d */
236 {0x0047,0x36,0x37,0x08,0x70, 800, 480}, /* 2e */
237 {0x0047,0x37,0x08,0x08,0x70, 800, 480}, /* 2f */
238 {0x0057,0x38,0x09,0x09,0x71,1024, 576}, /* 30 */
239 {0x0047,0x39,0x38,0x09,0x71,1024, 576}, /* 31 */
240 {0x0047,0x3a,0x11,0x09,0x71,1024, 576}, /* 32 */
241 {0x0057,0x3b,0x39,0x0a,0x75,1280, 720}, /* 33 */
242 {0x0047,0x3c,0x3a,0x0a,0x75,1280, 720}, /* 34 */
243 {0x0007,0x3d,0x3b,0x0a,0x75,1280, 720}, /* 35 */
244 {0x0047,0x3e,0x34,0x06,0x29,1152, 864}, /* 36 1152x864-75Hz */
245 {0x0047,0x44,0x3a,0x06,0x29,1152, 864}, /* 37 1152x864-85Hz */
246 {0x00c7,0x3f,0x28,0x00,0x39, 848, 480}, /* 38 848x480-38Hzi */
247 {0xc067,0x40,0x3d,0x0b,0x39, 848, 480}, /* 39 848x480-60Hz */
248 {0x00c7,0x41,0x28,0x00,0x3f, 856, 480}, /* 3a 856x480-38Hzi */
249 {0xc047,0x42,0x28,0x00,0x3f, 856, 480}, /* 3b 856x480-60Hz */
250 {0x0067,0x43,0x3e,0x0c,0x48,1360, 768}, /* 3c 1360x768-60Hz */
251 {0x0077,0x46,0x3f,0x08,0x55,1280, 768}, /* 3d 1280x768-60Hz */
252 {0x000f,0x47,0x03,0x06,0x5f, 768, 576}, /* 3e 768x576 */
253 {0x0027,0x48,0x13,0x08,0x67,1360,1024}, /* 3f 1360x1024-59Hz (BARCO1366 only) */
254 {0xffff, 0, 0, 0, 0, 0, 0}
257 typedef struct _SiS_VBModeIDTableStruct
259 UCHAR ModeID;
260 UCHAR VB_TVDelayIndex;
261 UCHAR VB_TVFlickerIndex;
262 UCHAR VB_TVPhaseIndex;
263 UCHAR VB_TVYFilterIndex;
264 UCHAR VB_LCDDelayIndex;
265 UCHAR _VB_LCDHIndex;
266 UCHAR _VB_LCDVIndex;
267 }SiS_VBModeIDTableStruct;
269 static const SiS_VBModeIDTableStruct SiS300_VBModeIDTable[] =
271 {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
272 {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01},
273 {0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x02},
274 {0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00},
275 {0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x01},
276 {0x03,0x00,0x00,0x00,0x03,0x00,0x03,0x02},
277 {0x05,0x00,0x00,0x01,0x04,0x00,0x00,0x00},
278 {0x06,0x00,0x00,0x01,0x05,0x00,0x02,0x00},
279 {0x07,0x00,0x00,0x00,0x03,0x00,0x03,0x01},
280 {0x07,0x00,0x00,0x00,0x03,0x00,0x03,0x02},
281 {0x0d,0x00,0x00,0x01,0x04,0x00,0x00,0x00},
282 {0x0e,0x00,0x00,0x01,0x05,0x00,0x02,0x00},
283 {0x0f,0x00,0x00,0x01,0x05,0x00,0x02,0x01},
284 {0x10,0x00,0x00,0x01,0x05,0x00,0x02,0x01},
285 {0x11,0x00,0x00,0x01,0x05,0x00,0x02,0x03},
286 {0x12,0x00,0x00,0x01,0x05,0x00,0x02,0x03},
287 {0x13,0x00,0x00,0x01,0x04,0x00,0x04,0x00},
288 {0x6a,0x00,0x00,0x01,0x07,0x00,0x08,0x0a},
289 {0x2e,0x00,0x00,0x01,0x05,0x00,0x06,0x08},
290 {0x2f,0x00,0x00,0x01,0x05,0x00,0x06,0x06},
291 {0x30,0x00,0x00,0x01,0x07,0x00,0x08,0x0a},
292 {0x31,0x00,0x00,0x01,0x06,0x00,0x00,0x00},
293 {0x32,0x00,0x00,0x01,0x06,0x00,0x00,0x00},
294 {0x37,0x00,0x00,0x01,0x00,0x00,0x0a,0x0c},
295 {0x38,0x00,0x00,0x01,0x00,0x00,0x0a,0x0c},
296 {0x3a,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
297 {0x40,0x00,0x00,0x01,0x04,0x00,0x05,0x05},
298 {0x41,0x00,0x00,0x01,0x04,0x00,0x05,0x05},
299 {0x43,0x00,0x00,0x01,0x05,0x00,0x06,0x08},
300 {0x44,0x00,0x00,0x01,0x05,0x00,0x06,0x08},
301 {0x46,0x00,0x00,0x01,0x07,0x00,0x08,0x0a},
302 {0x47,0x00,0x00,0x01,0x07,0x00,0x08,0x0a},
303 {0x49,0x00,0x00,0x01,0x00,0x00,0x0a,0x0c},
304 {0x4a,0x00,0x00,0x01,0x00,0x00,0x0a,0x0c},
305 {0x4c,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
306 {0x4d,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
307 {0x50,0x00,0x00,0x01,0x04,0x00,0x05,0x07},
308 {0x51,0x00,0x00,0x01,0x07,0x00,0x07,0x09},
309 {0x52,0x00,0x00,0x01,0x00,0x00,0x09,0x0b},
310 {0x56,0x00,0x00,0x01,0x04,0x00,0x05,0x07},
311 {0x57,0x00,0x00,0x01,0x07,0x00,0x07,0x09},
312 {0x58,0x00,0x00,0x01,0x00,0x00,0x09,0x0b},
313 {0x59,0x00,0x00,0x01,0x04,0x00,0x05,0x05},
314 {0x5d,0x00,0x00,0x01,0x07,0x00,0x06,0x06},
315 {0x62,0x00,0x00,0x01,0x05,0x00,0x06,0x08},
316 {0x63,0x00,0x00,0x01,0x07,0x00,0x08,0x0a},
317 {0x64,0x00,0x00,0x01,0x00,0x00,0x0a,0x0c},
318 {0x65,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
319 {0x6e,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
320 {0x6f,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
321 {0x7b,0x00,0x00,0x01,0x00,0x00,0x0b,0x0d},
322 {0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
325 typedef struct _SiS300_CRT1TableStruct
327 UCHAR CR[17];
328 } SiS300_CRT1TableStruct;
330 static const SiS300_CRT1TableStruct SiS300_CRT1Table[] =
332 #if 1
333 {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x00 - 320x200 */
334 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00, /* HRE [4],[15] is invalid - but correcting it does not work */
335 0x00}},
336 #endif
337 #if 0
338 {{0x2d,0x27,0x27,0x91,0x2c,0x92,0xbf,0x1f, /* 0x00 - corrected 320x200-72 - does not work */
339 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x04,
340 0x00}},
341 #endif
342 {{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e, /* 0x01 */
343 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00, /* HRE [4],[15] is invalid - but correcting it does not work */
344 0x00}},
345 #if 0
346 {{0x2d,0x27,0x27,0x91,0x2c,0x92,0x0b,0x3e, /* 0x01 - corrected 320x240-60 - does not work */
347 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x04,
348 0x00}},
349 #endif
350 {{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0, /* 0x02 */
351 0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05,
352 0x01}},
353 #if 0
354 {{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0, /* 0x02 - corrected 400x300-60 */
355 0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05,
356 0x01}},
357 #endif
358 {{0x4f,0x3f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
359 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x01,
360 0x01}},
361 {{0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
362 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x05,
363 0x00}},
364 #if 0
365 {{0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, /* 0x05 */
366 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
367 0x00}},
368 #endif
369 {{0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e, /* 0x05 - corrected 640x480-60 */
370 0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05,
371 0x00}},
372 #if 0
373 {{0x63,0x4f,0x50,0x86,0x56,0x9b,0x06,0x3e, /* 0x06 */
374 0xe8,0x8b,0xdf,0xe7,0xff,0x10,0x00,0x01,
375 0x00}},
376 #endif
377 {{0x63,0x4f,0x4f,0x87,0x56,0x9b,0x06,0x3e, /* 0x06 - corrected 640x480-72 */
378 0xe8,0x8a,0xdf,0xe7,0x07,0x00,0x00,0x01,
379 0x00}},
380 {{0x64,0x4f,0x4f,0x88,0x55,0x9d,0xf2,0x1f,
381 0xe0,0x83,0xdf,0xdf,0xf3,0x10,0x00,0x01,
382 0x00}},
383 {{0x63,0x4f,0x4f,0x87,0x5a,0x81,0xfb,0x1f,
384 0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05,
385 0x00}},
386 #if 0
387 {{0x66,0x4f,0x4f,0x86,0x56,0x9e,0x03,0x3e, /* 0x09 */
388 0xe4,0x87,0xdf,0xdf,0x04,0x00,0x00,0x01,
389 0x00}},
390 #endif
391 {{0x67,0x4f,0x4f,0x8b,0x57,0x83,0x10,0x3e, /* 0x09 - corrected 640x480-100 */
392 0xe7,0x8d,0xdf,0xe6,0x11,0x00,0x00,0x05,
393 0x00}},
394 #if 0
395 {{0x6c,0x4f,0x4f,0x83,0x59,0x9e,0x00,0x3e, /* 0x0a */
396 0xe5,0x8d,0xdf,0xdf,0x01,0x00,0x00,0x01,
397 0x00}},
398 #endif
399 {{0x67,0x4f,0x4f,0x8b,0x57,0x83,0x10,0x3e, /* 0x0a - corrected 640x480-120 */
400 0xe7,0x8d,0xdf,0xe6,0x11,0x00,0x00,0x05,
401 0x00}},
402 {{0x63,0x4f,0x4f,0x87,0x56,0x9d,0xfb,0x1f,
403 0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x01,
404 0x00}},
405 {{0x65,0x4f,0x4f,0x89,0x57,0x9f,0xfb,0x1f,
406 0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01, /* TW: Corrected VDE, VBE */
407 0x00}},
408 {{0x7b,0x63,0x63,0x9f,0x6a,0x93,0x6f,0xf0,
409 0x58,0x8a,0x57,0x57,0x70,0x20,0x00,0x05,
410 0x01}},
411 {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xf0,
412 0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x06,
413 0x01}},
414 {{0x7d,0x63,0x63,0x81,0x6e,0x1d,0x98,0xf0,
415 0x7c,0x82,0x57,0x57,0x99,0x00,0x00,0x06,
416 0x01}},
417 {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xf0,
418 0x58,0x8b,0x57,0x57,0x70,0x20,0x00,0x06,
419 0x01}},
420 {{0x7e,0x63,0x63,0x82,0x6b,0x13,0x75,0xf0,
421 0x58,0x8b,0x57,0x57,0x76,0x20,0x00,0x06,
422 0x01}},
423 {{0x8c,0x63,0x63,0x87,0x72,0x16,0x7e,0xf0,
424 0x59,0x8d,0x57,0x57,0x7f,0x00,0x00,0x06,
425 0x01}},
426 {{0x7e,0x63,0x63,0x82,0x6c,0x14,0x75,0xe0,
427 0x58,0x0b,0x57,0x57,0x76,0x20,0x00,0x06,
428 0x01}},
429 {{0x7e,0x63,0x63,0x82,0x6c,0x14,0x75,0xe0, /* 0x14 */
430 0x58,0x0b,0x57,0x57,0x76,0x20,0x00,0x06,
431 0x01}},
432 {{0x99,0x7f,0x7f,0x9d,0x84,0x1a,0x96,0x1f,
433 0x7f,0x83,0x7f,0x7f,0x97,0x10,0x00,0x02,
434 0x00}},
435 {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
436 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
437 0x01}},
438 {{0xa1,0x7f,0x7f,0x85,0x86,0x97,0x24,0xf5,
439 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
440 0x01}},
441 {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf5,
442 0x00,0x83,0xff,0xff,0x1f,0x10,0x00,0x02,
443 0x01}},
444 {{0xa7,0x7f,0x7f,0x8b,0x89,0x95,0x26,0xf5,
445 0x00,0x83,0xff,0xff,0x27,0x10,0x00,0x02,
446 0x01}},
447 {{0x9f,0x7f,0x7f,0x83,0x83,0x93,0x1e,0xf5, /* 0x1a */
448 0x00,0x84,0xff,0xff,0x1f,0x10,0x00,0x02,
449 0x01}},
450 {{0xa2,0x7f,0x7f,0x86,0x84,0x94,0x37,0xf5,
451 0x0b,0x82,0xff,0xff,0x38,0x10,0x00,0x02,
452 0x01}},
453 {{0xcf,0x9f,0x9f,0x93,0xb2,0x01,0x14,0xba,
454 0x00,0x83,0xff,0xff,0x15,0x00,0x00,0x03,
455 0x00}},
456 {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0x5a,
457 0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07,
458 0x01}},
459 {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0x5a, /* 0x1e */
460 0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07,
461 0x01}},
462 {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0x5a,
463 0x00,0x83,0xff,0xff,0x2f,0x09,0x00,0x07,
464 0x01}},
465 {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
466 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
467 0x00}},
468 {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
469 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
470 0x00}},
471 {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
472 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
473 0x00}},
474 {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
475 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
476 0x00}},
477 {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10, /* 36: 1600x1200x85Hz */
478 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
479 0x00}},
480 {{0x3f,0xef,0xef,0x83,0xfd,0x1a,0xda,0x1f, /* 37: 1920x1440x60Hz */
481 0xa0,0x84,0x9f,0x9f,0xdb,0x1f,0x01,0x01,
482 0x00}},
483 {{0x55,0xff,0xff,0x99,0x0d,0x0c,0x3e,0xba,
484 0x00,0x84,0xff,0xff,0x3f,0x0f,0x41,0x05,
485 0x00}},
486 #if 0
487 {{0xdc,0x9f,0x9f,0x00,0xab,0x19,0xe6,0xef, /* 0x27: 1280x960-70 - invalid! */
488 0xc0,0xc3,0xbf,0xbf,0xe7,0x10,0x00,0x07,
489 0x01}},
490 #endif
491 {{0xdc,0x9f,0x9f,0x80,0xaf,0x9d,0xe6,0xff, /* 0x27: 1280x960-60 - correct */
492 0xc0,0x83,0xbf,0xbf,0xe7,0x10,0x00,0x07,
493 0x01}},
494 {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xba, /* 0x28 */
495 0x27,0x8b,0xdf,0xdf,0x73,0x00,0x00,0x06,
496 0x01}},
497 {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xba,
498 0x26,0x89,0xdf,0xdf,0x6f,0x00,0x00,0x06,
499 0x01}},
500 {{0x7f,0x63,0x63,0x82,0x6b,0x13,0x75,0xba,
501 0x29,0x8c,0xdf,0xdf,0x75,0x00,0x00,0x06,
502 0x01}},
503 {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf1,
504 0xaf,0x85,0x3f,0x3f,0x25,0x30,0x00,0x02,
505 0x01}},
506 {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf1,
507 0xad,0x81,0x3f,0x3f,0x1f,0x30,0x00,0x02,
508 0x01}},
509 {{0xa7,0x7f,0x7f,0x88,0x89,0x15,0x26,0xf1,
510 0xb1,0x85,0x3f,0x3f,0x27,0x30,0x00,0x02,
511 0x01}},
512 {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xc4,
513 0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
514 0x01}},
515 {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xd4,
516 0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
517 0x01}},
518 {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xd4,
519 0x7d,0x81,0xcf,0xcf,0x2f,0x21,0x00,0x07,
520 0x01}},
521 {{0x6b,0x59,0x59,0x8f,0x5e,0x8c,0x0b,0x3e,
522 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
523 0x00}},
524 {{0x7b,0x59,0x63,0x9f,0x6a,0x93,0x6f,0xf0, /* 0x32 */
525 0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05,
526 0x01}},
527 {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1, /* 0x33 - 1024x600 */
528 0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02,
529 0x01}},
530 {{0xa3,0x8f,0x8f,0x97,0x96,0x97,0x24,0xf5, /* 0x34 - 1152x768 - corrected */
531 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
532 0x01}},
533 {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xba, /* 0x35 */
534 0x27,0x8b,0xdf,0xdf,0x73,0x00,0x00,0x06,
535 0x01}}, /* 0x35 */
536 {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xba,
537 0x26,0x89,0xdf,0xdf,0x6f,0x00,0x00,0x06,
538 0x01}}, /* 0x36 */
539 {{0x7f,0x63,0x63,0x82,0x6b,0x13,0x75,0xba,
540 0x29,0x8c,0xdf,0xdf,0x75,0x00,0x00,0x06,
541 0x01}}, /* 0x37 */
542 {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf1,
543 0xaf,0x85,0x3f,0x3f,0x25,0x30,0x00,0x02,
544 0x01}}, /* 0x38 */
545 {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf1,
546 0xad,0x81,0x3f,0x3f,0x1f,0x30,0x00,0x02,
547 0x01}}, /* 0x39 */
548 {{0xa7,0x7f,0x7f,0x88,0x89,0x95,0x26,0xf1, /* 95 was 15 - illegal HBE! */
549 0xb1,0x85,0x3f,0x3f,0x27,0x30,0x00,0x02,
550 0x01}}, /* 0x3a */
551 {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xc4,
552 0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
553 0x01}}, /* 0x3b */
554 {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xd4,
555 0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
556 0x01}}, /* 0x3c */
557 {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xd4,
558 0x7d,0x81,0xcf,0xcf,0x2f,0x21,0x00,0x07,
559 0x01}}, /* 0x3d */
560 {{0xc3,0x8f,0x8f,0x87,0x9b,0x0b,0x82,0xef, /* 1152x864-75 */
561 0x60,0x83,0x5f,0x5f,0x83,0x10,0x00,0x07,
562 0x01}}, /* 0x3e */
563 {{0x86,0x69,0x69,0x8A,0x74,0x06,0x8C,0x15, /* 848x480-38i */
564 0x4F,0x83,0xEF,0xEF,0x8D,0x30,0x00,0x02,
565 0x00}}, /* 0x3f */
566 {{0x83,0x69,0x69,0x87,0x6f,0x1d,0x03,0x3E, /* 848x480-60 */
567 0xE5,0x8d,0xDF,0xe4,0x04,0x00,0x00,0x06,
568 0x00}}, /* 0x40 */
569 {{0x86,0x6A,0x6A,0x8A,0x74,0x06,0x8C,0x15, /* 856x480-38i */
570 0x4F,0x83,0xEF,0xEF,0x8D,0x30,0x00,0x02,
571 0x00}}, /* 0x41 */
572 {{0x81,0x6A,0x6A,0x85,0x70,0x00,0x0F,0x3E, /* 856x480-60 */
573 0xEB,0x8E,0xDF,0xDF,0x10,0x00,0x00,0x02,
574 0x00}}, /* 0x42 */
575 {{0xdd,0xa9,0xa9,0x81,0xb4,0x97,0x26,0xfd, /* 1360x768-60 */
576 0x01,0x8d,0xff,0x00,0x27,0x10,0x00,0x03,
577 0x01}}, /* 0x43 */
578 {{0xd9,0x8f,0x8f,0x9d,0xba,0x0a,0x8a,0xff, /* 1152x864-84 */
579 0x60,0x8b,0x5f,0x5f,0x8b,0x10,0x00,0x03,
580 0x01}}, /* 0x44 */
581 {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0xf1,0xff, /* 1280x960-85 */
582 0xc0,0x83,0xbf,0xbf,0xf2,0x10,0x00,0x07,
583 0x01}}, /* 0x45 */
584 {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x20,0xf5, /* 1280x768-60 */
585 0x03,0x88,0xff,0xff,0x21,0x10,0x00,0x07,
586 0x01}}, /* 0x46 */
587 {{0x7b,0x5f,0x63,0x9f,0x6a,0x93,0x6f,0xf0, /* 768x576 */
588 0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05,
589 0x01}}, /* 0x47 */
590 {{0xce,0xa9,0xa9,0x92,0xb1,0x07,0x28,0x52, /* 1360x1024 (Barco iQ Pro R300) */
591 0x02,0x8e,0xff,0x00,0x29,0x0d,0x00,0x03,
592 0x00}} /* 0x48 */
595 typedef struct _SiS300_MCLKDataStruct
597 UCHAR SR28,SR29,SR2A;
598 USHORT CLOCK;
599 } SiS300_MCLKDataStruct;
601 static const SiS300_MCLKDataStruct SiS300_MCLKData_630[] =
603 { 0x5a,0x64,0x80, 66},
604 { 0xb3,0x45,0x80, 83},
605 { 0x37,0x61,0x80,100},
606 { 0x37,0x22,0x80,133},
607 { 0x37,0x61,0x80,100},
608 { 0x37,0x61,0x80,100},
609 { 0x37,0x61,0x80,100},
610 { 0x37,0x61,0x80,100}
613 static const SiS300_MCLKDataStruct SiS300_MCLKData_300[] =
615 { 0x68,0x43,0x80,125},
616 { 0x68,0x43,0x80,125},
617 { 0x68,0x43,0x80,125},
618 { 0x37,0x61,0x80,100},
619 { 0x37,0x61,0x80,100},
620 { 0x37,0x61,0x80,100},
621 { 0x37,0x61,0x80,100},
622 { 0x37,0x61,0x80,100}
625 #ifdef LINUXBIOS
626 typedef struct _SiS300_ECLKDataStruct
628 UCHAR SR2E,SR2F,SR30;
629 USHORT CLOCK;
630 } SiS300_ECLKDataStruct;
632 static const SiS300_ECLKDataStruct SiS300_ECLKData[] =
634 { 0x54,0x43,0x80,100},
635 { 0x53,0x43,0x80,100},
636 { 0x55,0x43,0x80,100},
637 { 0x52,0x43,0x80,100},
638 { 0x3f,0x42,0x80,100},
639 { 0x54,0x43,0x80,100},
640 { 0x54,0x43,0x80,100},
641 { 0x54,0x43,0x80,100}
643 #endif
645 typedef struct _SiS300_VCLKDataStruct
647 UCHAR SR2B,SR2C;
648 USHORT CLOCK;
649 } SiS300_VCLKDataStruct;
651 static const SiS300_VCLKDataStruct SiS300_VCLKData[] =
653 { 0x1b,0xe1, 25}, /* 0x00 */
654 { 0x4e,0xe4, 28}, /* 0x01 */
655 { 0x57,0xe4, 32}, /* 0x02 */
656 { 0xc3,0xc8, 36}, /* 0x03 */
657 { 0x42,0xc3, 40}, /* 0x04 */
658 { 0x5d,0xc4, 45}, /* 0x05 */
659 { 0x52,0x65, 50}, /* 0x06 */
660 { 0x53,0x65, 50}, /* 0x07 */
661 { 0x6d,0x66, 56}, /* 0x08 */
662 { 0x5a,0x64, 65}, /* 0x09 */
663 { 0x46,0x44, 68}, /* 0x0a */
664 { 0x3e,0x43, 75}, /* 0x0b */
665 { 0x6d,0x46, 76}, /* 0x0c */ /* 800x600 | LVDS_2(CH), MITAC(CH); - 730, A901(301B): 0xb1,0x46, 76 */
666 { 0x41,0x43, 79}, /* 0x0d */
667 { 0x31,0x42, 79}, /* 0x0e */
668 { 0x46,0x25, 85}, /* 0x0f */
669 { 0x78,0x29, 87}, /* 0x10 */
670 { 0x62,0x44, 95}, /* 0x11 */
671 { 0x2b,0x22,105}, /* 0x12 */
672 { 0x49,0x24,106}, /* 0x13 */
673 { 0xc3,0x28,108}, /* 0x14 */
674 { 0x3c,0x23,109}, /* 0x15 */
675 { 0xf7,0x2c,132}, /* 0x16 */
676 { 0xd4,0x28,136}, /* 0x17 */
677 { 0x41,0x05,158}, /* 0x18 */
678 { 0x43,0x05,162}, /* 0x19 */
679 { 0xe1,0x0f,175}, /* 0x1a */
680 { 0xfc,0x12,189}, /* 0x1b */
681 { 0xde,0x26,194}, /* 0x1c */
682 { 0x54,0x05,203}, /* 0x1d */
683 { 0x3f,0x03,230}, /* 0x1e */
684 { 0x30,0x02,234}, /* 0x1f */
685 { 0x24,0x01,266}, /* 0x20 */
686 { 0x52,0x2a, 54}, /* 0x21 */ /* 301 TV */
687 { 0x52,0x6a, 27}, /* 0x22 */ /* 301 TV */
688 { 0x62,0x24, 70}, /* 0x23 */ /* 301 TV */
689 { 0x62,0x64, 70}, /* 0x24 */ /* 301 TV */
690 { 0xa8,0x4c, 30}, /* 0x25 */ /* 301 TV */
691 { 0x20,0x26, 33}, /* 0x26 */ /* 301 TV */
692 { 0x31,0xc2, 39}, /* 0x27 */
693 { 0xbf,0xc8, 35}, /* 0x28 */ /* 856x480 */
694 { 0x60,0x36, 30}, /* 0x29 */ /* CH/UNTSC TEXT | LVDS_2(CH) - 730, A901(301B), Mitac(CH): 0xe0, 0xb6, 30 */
695 { 0x40,0x4a, 28}, /* 0x2a */ /* CH-TV */
696 { 0x9f,0x46, 44}, /* 0x2b */ /* CH-TV */
697 { 0x97,0x2c, 26}, /* 0x2c */ /* CH-TV */
698 { 0x44,0xe4, 25}, /* 0x2d */ /* CH-TV */
699 { 0x7e,0x32, 47}, /* 0x2e */ /* CH-TV */
700 { 0x8a,0x24, 31}, /* 0x2f */ /* CH/PAL TEXT | LVDS_2(CH), Mitac(CH) - 730, A901(301B): 0x57, 0xe4, 31 */
701 { 0x97,0x2c, 26}, /* 0x30 */ /* CH-TV */
702 { 0xce,0x3c, 39}, /* 0x31 */ /* CH-TV */
703 { 0x52,0x4a, 36}, /* 0x32 */ /* CH/PAL 800x600 5/6 */
704 { 0x34,0x61, 95}, /* 0x33 */
705 { 0x78,0x27,108}, /* 0x34 */ /* Replacement for index 0x14 for 630 (?) */
706 { 0xce,0x25,189}, /* 0x35 */ /* Replacement for index 0x1b for 730 (and 540?) */
707 { 0x45,0x6b, 21}, /* 0x36 */ /* Chrontel SuperOverscan */
708 { 0x52,0xe2, 49}, /* 0x37 */ /* 16:9 modes */
709 { 0x2b,0x61, 78}, /* 0x38 */ /* 16:9 modes */
710 { 0x70,0x44,108}, /* 0x39 */ /* 16:9 modes */
711 { 0x54,0x42,135}, /* 0x3a */ /* 16:9 modes */
712 { 0x41,0x22,157}, /* 0x3b */ /* 16:9 modes */
713 { 0x52,0x07,149}, /* 0x3c */ /* 1280x960-85 */
714 { 0x62,0xc6, 34}, /* 0x3d */ /* 848x480-60 */
715 { 0x30,0x23, 88}, /* 0x3e */ /* 1360x768-60 */
716 #if 0
717 { 0x3f,0x64, 46}, /* 0x3f */ /* 640x480-100 */
718 #endif
719 { 0x70,0x29, 81}, /* 0x3f */ /* 1280x768-60 */
720 { 0x72,0x2a, 76}, /* 0x40 */ /* test for SiS730 */
721 { 0x15,0x21, 79}, /* 0x41 */ /* test for SiS730 */
722 { 0xa1,0x42,108}, /* 0x42 */ /* 1280x960 LCD */
723 { 0x37,0x61,100}, /* 0x43 */ /* 1280x960 LCD */
724 { 0xe3,0x9a,106}, /* 0x44 */ /* 1360x1024 - special for Barco iQ R300 */
725 { 0xff,0x00, 0}
728 #if 0 /* TW: This table is in all BIOSes, but not used */
729 static const SiS300_VCLKDataStruct SiS300_VBVCLKData[] =
731 { 0x1b,0xe1, 25},
732 { 0x4e,0xe4, 28},
733 { 0x57,0xe4, 31},
734 { 0xc3,0xc8, 36},
735 { 0x42,0x47, 40},
736 { 0x5d,0xc4, 44},
737 { 0x52,0x47, 49},
738 { 0x53,0x47, 50},
739 { 0x6d,0x66, 56},
740 { 0x5a,0x64, 65},
741 { 0x46,0x44, 67},
742 { 0x29,0x61, 75},
743 { 0x6d,0x46, 75},
744 { 0x41,0x43, 78},
745 { 0x31,0x42, 79},
746 { 0x46,0x25, 84},
747 { 0x78,0x29, 86}, /* 0x10 */
748 { 0x62,0x44, 94},
749 { 0x2b,0x22,104},
750 { 0x49,0x24,105},
751 { 0x43,0x42,108},
752 { 0x3c,0x23,109},
753 { 0xe0,0x46,132},
754 { 0x70,0x25,135},
755 { 0x41,0x22,157},
756 { 0x43,0x22,162},
757 { 0x30,0x21,175},
758 { 0xc1,0x24,189},
759 { 0xde,0x26,194},
760 { 0x70,0x07,202},
761 { 0x3f,0x03,229},
762 { 0x30,0x02,234}, /* 0x1f */
763 { 0x24,0x01,265}, /* 0x20 */
764 { 0x52,0x2a, 54},
765 { 0x52,0x6a, 27},
766 { 0x62,0x24, 70},
767 { 0x62,0x64, 70},
768 { 0xa8,0x4c, 30},
769 { 0x20,0x26, 33},
770 { 0x31,0xc2, 39},
771 { 0x2e,0x48, 25}, /* 0x28 */
772 { 0x24,0x46, 25}, /* 0x29 */
773 { 0x26,0x64, 28},
774 { 0x37,0x64, 40},
775 { 0xa1,0x42,108},
776 { 0x37,0x61,100},
777 { 0x78,0x27,108},
778 { 0xff,0x00, 0}
780 #endif
782 static const UCHAR SiS300_ScreenOffset[] =
784 0x14,0x19,0x20,0x28,0x32,0x40,0x50,
785 0x64,0x78,0x80,0x2d,0x35,0x48,0x35,
786 0x55,0x30,0xff
789 #ifndef LINUX_XF86
790 static UCHAR SiS300_SR07 = 0x10;
791 #endif
793 static const UCHAR SiS300_SR15[8][4] =
795 {0x01,0x09,0xa3,0x00},
796 {0x43,0x43,0x43,0x00},
797 {0x1e,0x1e,0x1e,0x00},
798 {0x2a,0x2a,0x2a,0x00},
799 {0x06,0x06,0x06,0x00},
800 {0x00,0x00,0x00,0x00},
801 {0x00,0x00,0x00,0x00},
802 {0x00,0x00,0x00,0x00}
805 #ifndef LINUX_XF86
806 static UCHAR SiS300_SR1F = 0x00;
807 static UCHAR SiS300_SR21 = 0x16;
808 static UCHAR SiS300_SR22 = 0xb2;
809 static UCHAR SiS300_SR23 = 0xf6;
810 static UCHAR SiS300_SR24 = 0x0d;
811 static UCHAR SiS300_SR25[] = {0x0,0x0};
812 static UCHAR SiS300_SR31 = 0x00;
813 static UCHAR SiS300_SR32 = 0x11;
814 static UCHAR SiS300_SR33 = 0x00;
815 static UCHAR SiS300_CRT2Data_1_2 = 0x40;
816 static UCHAR SiS300_CRT2Data_4_D = 0x00;
817 static UCHAR SiS300_CRT2Data_4_E = 0x00;
818 static UCHAR SiS300_CRT2Data_4_10 = 0x80;
820 static const USHORT SiS300_RGBSenseData = 0xd1;
821 static const USHORT SiS300_VideoSenseData = 0xb3;
822 static const USHORT SiS300_YCSenseData = 0xb9;
823 static const USHORT SiS300_RGBSenseData2 = 0x0190;
824 static const USHORT SiS300_VideoSenseData2 = 0x0174;
825 static const USHORT SiS300_YCSenseData2 = 0x016b;
827 static const UCHAR SiS300_CR40[5][4];
829 static UCHAR SiS300_CR49[2];
830 #endif
832 typedef struct _SiS300_PanelDelayTblStruct
834 UCHAR timer[2];
835 } SiS300_PanelDelayTblStruct;
837 static const SiS300_PanelDelayTblStruct SiS300_PanelDelayTbl[] =
839 {{0x05,0xaa}},
840 {{0x05,0x14}},
841 {{0x05,0x36}},
842 {{0x05,0x14}},
843 {{0x05,0x14}},
844 {{0x05,0x14}},
845 {{0x05,0x90}},
846 {{0x05,0x90}},
847 {{0x05,0x14}},
848 {{0x05,0x14}},
849 {{0x05,0x14}},
850 {{0x05,0x14}},
851 {{0x20,0x80}},
852 {{0x05,0x14}},
853 {{0x05,0x40}},
854 {{0x05,0x60}}
857 static const SiS300_PanelDelayTblStruct SiS300_PanelDelayTblLVDS[] =
859 {{0x05,0xaa}},
860 {{0x05,0x14}},
861 {{0x05,0x36}},
862 {{0x05,0x14}},
863 {{0x05,0x14}},
864 {{0x05,0x14}},
865 {{0x05,0x90}},
866 {{0x05,0x90}},
867 {{0x05,0x14}},
868 {{0x05,0x14}},
869 {{0x05,0x14}},
870 {{0x05,0x14}}, /* 2.07a (JVC): 14,96 */
871 {{0x05,0x28}}, /* 2.04.5c: 20, 80 - Clevo (2.04.2c): 05, 28 */
872 {{0x05,0x14}},
873 {{0x05,0x14}}, /* Some BIOSes: 05, 40 */
874 {{0x05,0x60}}
877 typedef struct _SiS300_LCDDataStruct
879 USHORT RVBHCMAX;
880 USHORT RVBHCFACT;
881 USHORT VGAHT;
882 USHORT VGAVT;
883 USHORT LCDHT;
884 USHORT LCDVT;
885 } SiS300_LCDDataStruct;
887 static const SiS300_LCDDataStruct SiS300_StLCD1024x768Data[] =
889 { 66, 31, 992, 510,1320, 816},
890 { 66, 31, 992, 510,1320, 816},
891 { 176, 75, 900, 510,1320, 816},
892 { 176, 75, 900, 510,1320, 816},
893 { 66, 31, 992, 510,1320, 816},
894 { 27, 16,1024, 650,1350, 832},
895 { 1, 1,1344, 806,1344, 806}
898 static const SiS300_LCDDataStruct SiS300_ExtLCD1024x768Data[] =
900 { 12, 5, 896, 512,1344, 806},
901 { 12, 5, 896, 510,1344, 806},
902 { 32, 15,1008, 505,1344, 806},
903 { 32, 15,1008, 514,1344, 806},
904 { 12, 5, 896, 500,1344, 806},
905 { 42, 25,1024, 625,1344, 806},
906 { 1, 1,1344, 806,1344, 806},
907 { 12, 5, 896, 500,1344, 806},
908 { 42, 25,1024, 625,1344, 806},
909 { 1, 1,1344, 806,1344, 806},
910 { 12, 5, 896, 500,1344, 806},
911 { 42, 25,1024, 625,1344, 806},
912 { 1, 1,1344, 806,1344, 806}
915 static const SiS300_LCDDataStruct SiS300_St2LCD1024x768Data[] =
917 { 62, 25, 800, 546,1344, 806},
918 { 32, 15, 930, 546,1344, 806},
919 { 32, 15, 930, 546,1344, 806},
920 { 104, 45, 945, 496,1344, 806},
921 { 62, 25, 800, 546,1344, 806},
922 { 31, 18,1008, 624,1344, 806},
923 { 1, 1,1344, 806,1344, 806}
926 static const SiS300_LCDDataStruct SiS300_StLCD1280x1024Data[] =
928 { 4, 1, 880, 510,1650,1088},
929 { 4, 1, 880, 510,1650,1088},
930 { 176, 45, 900, 510,1650,1088},
931 { 176, 45, 900, 510,1650,1088},
932 { 4, 1, 880, 510,1650,1088},
933 { 13, 5,1024, 675,1560,1152},
934 { 16, 9,1266, 804,1688,1072},
935 { 1, 1,1688,1066,1688,1066}
938 static const SiS300_LCDDataStruct SiS300_ExtLCD1280x1024Data[] =
940 { 211, 60,1024, 501,1688,1066},
941 { 211, 60,1024, 508,1688,1066},
942 { 211, 60,1024, 501,1688,1066},
943 { 211, 60,1024, 508,1688,1066},
944 { 211, 60,1024, 500,1688,1066},
945 { 211, 75,1024, 625,1688,1066},
946 { 211, 120,1280, 798,1688,1066},
947 { 1, 1,1688,1066,1688,1066}
950 static const SiS300_LCDDataStruct SiS300_St2LCD1280x1024Data[] =
952 { 22, 5, 800, 510,1650,1088},
953 { 22, 5, 800, 510,1650,1088},
954 { 176, 45, 900, 510,1650,1088},
955 { 176, 45, 900, 510,1650,1088},
956 { 22, 5, 800, 510,1650,1088},
957 { 13, 5,1024, 675,1560,1152},
958 { 16, 9,1266, 804,1688,1072},
959 { 1, 1,1688,1066,1688,1066}
962 static const SiS300_LCDDataStruct SiS300_NoScaleData1024x768[] =
964 { 1, 1, 800, 449, 800, 449},
965 { 1, 1, 800, 449, 800, 449},
966 { 1, 1, 900, 449, 900, 449},
967 { 1, 1, 900, 449, 900, 449},
968 { 1, 1, 800, 525, 800, 525},
969 { 1, 1,1056, 628,1056, 628},
970 { 1, 1,1344, 806,1344, 806},
971 { 1, 1,1688,1066,1688,1066}
974 static const SiS300_LCDDataStruct SiS300_NoScaleData1280x1024[] = /* TW: Fake */
976 { 1, 1, 800, 449, 800, 449},
977 { 1, 1, 800, 449, 800, 449},
978 { 1, 1, 900, 449, 900, 449},
979 { 1, 1, 900, 449, 900, 449},
980 { 1, 1, 800, 525, 800, 525},
981 { 1, 1,1056, 628,1056, 628},
982 { 1, 1,1344, 806,1344, 806},
983 { 1, 1,1688,1066,1688,1066}
986 typedef struct _SiS300_LVDSDataStruct
988 USHORT VGAHT;
989 USHORT VGAVT;
990 USHORT LCDHT;
991 USHORT LCDVT;
992 } SiS300_LVDSDataStruct;
994 static const SiS300_LVDSDataStruct SiS300_CHTVUPALData[] =
996 {1008, 625,1008, 625},
997 {1008, 625,1008, 625},
998 {1008, 625,1008, 625},
999 {1008, 625,1008, 625},
1000 { 840, 750, 840, 750},
1001 { 936, 836, 936, 836}
1004 static const SiS300_LVDSDataStruct SiS300_CHTVOPALData[] =
1006 {1008, 625,1008, 625},
1007 {1008, 625,1008, 625},
1008 {1008, 625,1008, 625},
1009 {1008, 625,1008, 625},
1010 { 840, 625, 840, 625},
1011 { 960, 750, 960, 750}
1014 static const SiS300_LVDSDataStruct SiS300_CHTVSOPALData[] =
1016 {1008, 625,1008, 625},
1017 {1008, 625,1008, 625},
1018 {1008, 625,1008, 625},
1019 {1008, 625,1008, 625},
1020 { 840, 500, 840, 500},
1021 { 944, 625, 944, 625}
1024 typedef struct _SiS300_LVDSDesStruct
1026 USHORT LCDHDES;
1027 USHORT LCDVDES;
1028 } SiS300_LVDSDesStruct;
1030 static const SiS300_LVDSDesStruct SiS300_PanelType00_1[] =
1032 { 1059, 626 }, /* 2.08 */
1033 { 1059, 624 },
1034 { 1059, 626 },
1035 { 1059, 624 },
1036 { 1059, 624 },
1037 { 0, 627 },
1038 { 0, 627 },
1039 { 0, 0 },
1040 { 0, 0 }
1041 #if 0
1042 {0, 626},
1043 {0, 624},
1044 {0, 626},
1045 {0, 624},
1046 {0, 624},
1047 {0, 627},
1048 {0, 627},
1049 {0, 0},
1050 {0, 0}
1051 #endif
1054 static const SiS300_LVDSDesStruct SiS300_PanelType01_1[] =
1056 { 0, 0 }, /* 2.08 */
1057 { 0, 0 },
1058 { 0, 0 },
1059 { 0, 0 },
1060 { 0, 0 },
1061 { 0, 0 },
1062 { 0, 0 },
1063 { 0, 0 },
1064 { 0, 0 }
1065 #if 0
1066 {1343, 798},
1067 {1343, 794},
1068 {1343, 798},
1069 {1343, 794},
1070 {1343, 0},
1071 {1343, 0},
1072 { 0, 805},
1073 { 0, 794},
1074 { 0, 0}
1075 #endif
1078 static const SiS300_LVDSDesStruct SiS300_PanelType02_1[] =
1080 { 1059, 626 }, /* 2.08 */
1081 { 1059, 624 },
1082 { 1059, 626 },
1083 { 1059, 624 },
1084 { 1059, 624 },
1085 { 0, 627 },
1086 { 0, 627 },
1087 { 0, 0 },
1088 { 0, 0 }
1089 #if 0
1090 {0, 626},
1091 {0, 624},
1092 {0, 626},
1093 {0, 624},
1094 {0, 624},
1095 {0, 627},
1096 {0, 627},
1097 {0, 0},
1098 {0, 0}
1099 #endif
1102 static const SiS300_LVDSDesStruct SiS300_PanelType03_1[] =
1104 { 8, 436},
1105 { 8, 440},
1106 { 8, 436},
1107 { 8, 440},
1108 { 8, 512},
1109 {1343, 798},
1110 {1343, 794},
1111 {1343, 798},
1112 {1343, 794}
1115 static const SiS300_LVDSDesStruct SiS300_PanelType04_1[] = /* 1280x1024 */
1117 {1343, 798},
1118 {1343, 794},
1119 {1343, 798},
1120 {1343, 794},
1121 {1343, 0},
1122 {1343, 0},
1123 { 0, 805},
1124 { 0, 794},
1125 { 0, 0}
1128 static const SiS300_LVDSDesStruct SiS300_PanelType05_1[] =
1130 {1343, 798},
1131 {1343, 794},
1132 {1343, 798},
1133 {1343, 794},
1134 {1343, 0},
1135 {1343, 0},
1136 { 0, 805},
1137 { 0, 794},
1138 { 0, 0}
1141 static const SiS300_LVDSDesStruct SiS300_PanelType06_1[] =
1143 {1343, 798},
1144 {1343, 794},
1145 {1343, 798},
1146 {1343, 794},
1147 {1343, 0},
1148 {1343, 0},
1149 { 0, 805},
1150 { 0, 794},
1151 { 0, 0}
1154 static const SiS300_LVDSDesStruct SiS300_PanelType07_1[] =
1156 {1343, 798},
1157 {1343, 794},
1158 {1343, 798},
1159 {1343, 794},
1160 {1343, 0},
1161 {1343, 0},
1162 { 0, 805},
1163 { 0, 794},
1164 { 0, 0}
1167 static const SiS300_LVDSDesStruct SiS300_PanelType08_1[] =
1169 {1059, 626},
1170 {1059, 624},
1171 {1059, 626},
1172 {1059, 624},
1173 {1059, 624},
1174 { 0, 627},
1175 { 0, 627},
1176 { 0, 0},
1177 { 0, 0}
1180 static const SiS300_LVDSDesStruct SiS300_PanelType09_1[] =
1182 {1343, 798},
1183 {1343, 794},
1184 {1343, 798},
1185 {1343, 794},
1186 {1343, 0},
1187 {1343, 0},
1188 { 0, 805},
1189 { 0, 794},
1190 { 0, 0}
1193 static const SiS300_LVDSDesStruct SiS300_PanelType0a_1[] =
1195 {1059, 626},
1196 {1059, 624},
1197 {1059, 626},
1198 {1059, 624},
1199 {1059, 624},
1200 { 0, 627},
1201 { 0, 627},
1202 { 0, 0},
1203 { 0, 0}
1206 static const SiS300_LVDSDesStruct SiS300_PanelType0b_1[] =
1208 {1343, 0},
1209 {1343, 0},
1210 {1343, 0},
1211 {1343, 0},
1212 {1343, 0},
1213 {1343, 0},
1214 { 0, 799},
1215 { 0, 0},
1216 { 0, 0}
1219 static const SiS300_LVDSDesStruct SiS300_PanelType0c_1[] =
1221 {1343, 798},
1222 {1343, 794},
1223 {1343, 798},
1224 {1343, 794},
1225 {1343, 0},
1226 {1343, 0},
1227 { 0, 805},
1228 { 0, 794},
1229 { 0, 0}
1232 static const SiS300_LVDSDesStruct SiS300_PanelType0d_1[] =
1234 {1343, 798},
1235 {1343, 794},
1236 {1343, 798},
1237 {1343, 794},
1238 {1343, 0},
1239 {1343, 0},
1240 { 0, 805},
1241 { 0, 794},
1242 { 0, 0}
1245 static const SiS300_LVDSDesStruct SiS300_PanelType0e_1[] =
1247 {1343, 798},
1248 {1343, 794},
1249 {1343, 798},
1250 {1343, 794},
1251 {1343, 0}, /* 640x480 */
1252 {1343, 0}, /* 800x600 */
1253 { 0, 805}, /* 1024x768 */
1254 { 0, 794}, /* 1280x1024 */
1255 { 0, 0} /* 1280x960 - not applicable */
1258 static const SiS300_LVDSDesStruct SiS300_PanelType0f_1[] =
1260 {1343, 798},
1261 {1343, 794},
1262 {1343, 798},
1263 {1343, 794},
1264 {1343, 0},
1265 {1343, 0},
1266 { 0, 805},
1267 { 0, 794},
1268 { 0, 0}
1271 static const SiS300_LVDSDesStruct SiS300_PanelType00_2[] =
1273 {976, 527},
1274 {976, 502},
1275 {976, 527},
1276 {976, 502},
1277 {976, 567},
1278 { 0, 627},
1279 { 0, 627},
1280 { 0, 0},
1281 { 0, 0}
1284 static const SiS300_LVDSDesStruct SiS300_PanelType01_2[] =
1286 {1152, 622},
1287 {1152, 597},
1288 {1152, 622},
1289 {1152, 597},
1290 {1152, 662},
1291 {1232, 722},
1292 { 0, 805},
1293 { 0, 794},
1294 { 0, 0}
1297 static const SiS300_LVDSDesStruct SiS300_PanelType02_2[] =
1299 {976, 527},
1300 {976, 502},
1301 {976, 527},
1302 {976, 502},
1303 {976, 567},
1304 { 0, 627},
1305 { 0, 627},
1306 { 0, 0},
1307 { 0, 0}
1310 static const SiS300_LVDSDesStruct SiS300_PanelType03_2[] =
1312 {1152, 622},
1313 {1152, 597},
1314 {1152, 622},
1315 {1152, 597},
1316 {1152, 662},
1317 {1232, 722},
1318 { 0, 805},
1319 {1152, 622},
1320 {1152, 597}
1323 static const SiS300_LVDSDesStruct SiS300_PanelType04_2[] =
1325 {1152, 622},
1326 {1152, 597},
1327 {1152, 622},
1328 {1152, 597},
1329 {1152, 662},
1330 {1232, 722},
1331 { 0, 805},
1332 { 0, 794},
1333 { 0, 0}
1336 static const SiS300_LVDSDesStruct SiS300_PanelType05_2[] =
1338 {1152, 622},
1339 {1152, 597},
1340 {1152, 622},
1341 {1152, 597},
1342 {1152, 662},
1343 {1232, 722},
1344 { 0, 805},
1345 { 0, 794},
1346 { 0, 0}
1349 static const SiS300_LVDSDesStruct SiS300_PanelType06_2[] =
1351 {1152, 622},
1352 {1152, 597},
1353 {1152, 622},
1354 {1152, 597},
1355 {1152, 662},
1356 {1232, 722},
1357 { 0, 805},
1358 { 0, 794},
1359 { 0, 0}
1362 static const SiS300_LVDSDesStruct SiS300_PanelType07_2[] =
1364 {1152, 622},
1365 {1152, 597},
1366 {1152, 622},
1367 {1152, 597},
1368 {1152, 662},
1369 {1232, 722},
1370 { 0, 805},
1371 { 0, 794},
1372 { 0, 0}
1375 static const SiS300_LVDSDesStruct SiS300_PanelType08_2[] =
1377 {976, 527},
1378 {976, 502},
1379 {976, 527},
1380 {976, 502},
1381 {976, 567},
1382 { 0, 627},
1383 { 0, 627},
1384 { 0, 0},
1385 { 0, 0}
1388 static const SiS300_LVDSDesStruct SiS300_PanelType09_2[] =
1390 {1152, 622},
1391 {1152, 597},
1392 {1152, 622},
1393 {1152, 597},
1394 {1152, 662},
1395 {1232, 722},
1396 { 0, 805},
1397 { 0, 794},
1398 { 0, 0}
1401 static const SiS300_LVDSDesStruct SiS300_PanelType0a_2[] =
1403 {976, 527},
1404 {976, 502},
1405 {976, 527},
1406 {976, 502},
1407 {976, 567},
1408 { 0, 627},
1409 { 0, 627},
1410 { 0, 0},
1411 { 0, 0}
1414 static const SiS300_LVDSDesStruct SiS300_PanelType0b_2[] =
1416 { 1152, 700},
1417 { 1152, 675},
1418 { 1152, 700},
1419 { 1152, 675},
1420 { 1152, 740},
1421 { 1232, 799},
1422 { 0, 799},
1423 { 0, 0},
1424 { 0, 0}
1427 static const SiS300_LVDSDesStruct SiS300_PanelType0c_2[] =
1429 {1152, 622},
1430 {1152, 597},
1431 {1152, 622},
1432 {1152, 597},
1433 {1152, 662},
1434 {1232, 722},
1435 { 0, 805},
1436 { 0, 794},
1437 { 0, 0}
1440 static const SiS300_LVDSDesStruct SiS300_PanelType0d_2[] =
1442 {1152, 622},
1443 {1152, 597},
1444 {1152, 622},
1445 {1152, 597},
1446 {1152, 662},
1447 {1232, 722},
1448 { 0, 805},
1449 { 0, 794},
1450 { 0, 0}
1453 static const SiS300_LVDSDesStruct SiS300_PanelType0e_2[] =
1455 {1152, 622},
1456 {1152, 597},
1457 {1152, 622},
1458 {1152, 597},
1459 {1152, 662},
1460 {1232, 722},
1461 { 0, 805},
1462 { 0, 794},
1463 { 0, 0}
1466 static const SiS300_LVDSDesStruct SiS300_PanelType0f_2[] =
1468 {1152, 622},
1469 {1152, 597},
1470 {1152, 622},
1471 {1152, 597},
1472 {1152, 662},
1473 {1232, 722},
1474 { 0, 805},
1475 { 0, 794},
1476 { 0, 0}
1479 /* Custom data for Barco iQ R200/300/400 (BIOS 2.00.07) */
1480 static const SiS300_LVDSDesStruct SiS300_PanelType04_1a[] = /* 1280x1024 (1366x1024) */
1482 {1330, 798}, /* 320x200 */
1483 {1330, 794},
1484 {1330, 798},
1485 {1330, 794},
1486 {1330, 0}, /* 640x480 / 320x240 */
1487 {1343, 0}, /* 800x600 / 400x300 */
1488 { 0, 805}, /* 1024x768 / 512x384 */
1489 {1688,1066}, /* 1280x1024 */
1490 { 0, 0} /* 1360x1024 */
1493 static const SiS300_LVDSDesStruct SiS300_PanelType04_2a[] =
1495 {1152, 622},
1496 {1152, 597},
1497 {1152, 622},
1498 {1152, 597},
1499 {1152, 662},
1500 {1232, 722},
1501 { 0, 805},
1502 {1688,1066},
1503 { 0, 0}
1506 /* Custom data for Barco iQ G200/300/400 (BIOS 2.00.07) */
1507 static const SiS300_LVDSDesStruct SiS300_PanelType04_1b[] = /* 1024x768 */
1509 {1330, 798}, /* 320x200 */
1510 {1330, 794},
1511 {1330, 798},
1512 {1330, 794},
1513 {1330, 0}, /* 640x480 / 320x240 */
1514 {1343, 0}, /* 800x600 / 400x300 */
1515 { 0, 805} /* 1024x768 / 512x384 */
1518 static const SiS300_LVDSDesStruct SiS300_PanelType04_2b[] =
1520 {1152, 622},
1521 {1152, 597},
1522 {1152, 622},
1523 {1152, 597},
1524 {1152, 662},
1525 {1232, 722},
1526 { 0, 805}
1530 typedef struct _SiS300_Part2PortTblStruct
1532 UCHAR CR[12];
1533 } SiS300_Part2PortTblStruct;
1535 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1024x768_1[] =
1536 { /* VESA Timing */
1537 {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
1538 {{0x2c,0x12,0x9a,0xae,0x88,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
1539 {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
1540 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
1541 {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
1542 {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
1543 {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}}
1546 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_1[] =
1547 { /* TW: Temporary data, invalid */
1548 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1551 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1400x1050_1[] =
1552 { /* TW: Temporary data, invalid */
1553 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1556 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1600x1200_1[] =
1557 { /* TW: Temporary data, invalid */
1558 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1561 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1024x768_2[] =
1562 { /* Non-VESA */
1563 {{0x28,0x12,0xa3,0xd0,0xaa,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
1564 {{0x2c,0x12,0x9a,0xae,0x88,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
1565 {{0x28,0x12,0xa3,0xd0,0xaa,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
1566 {{0x2c,0x12,0x9a,0xae,0x88,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
1567 {{0x28,0x13,0xe7,0x0b,0xe8,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
1568 {{0x38,0x18,0x16,0x00,0x00,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
1569 {{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}
1572 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_2[] =
1574 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1577 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1400x1050_2[] =
1579 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1582 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1600x1200_2[] =
1583 { /* TW: Temporary data, invalid */
1584 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1587 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1024x768_3[] =
1588 { /* TW: Temporary data, invalid */
1589 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1592 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_3[] =
1593 { /* TW: Temporary data, invalid */
1594 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1597 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1400x1050_3[] =
1598 { /* TW: Temporary data, invalid */
1599 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1602 static const SiS300_Part2PortTblStruct SiS300_CRT2Part2_1600x1200_3[] =
1603 { /* TW: Temporary data, invalid */
1604 {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
1607 typedef struct _SiS300_LVDSCRT1DataStruct
1609 UCHAR CR[15];
1610 } SiS300_LVDSCRT1DataStruct;
1612 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_1[] =
1614 {{0x65,0x4f,0x89,0x56,0x83,0xaf,0x1f,
1615 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
1616 0x00 }},
1617 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1618 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1619 0x00 }},
1620 {{0x65,0x4f,0x89,0x56,0x83,0xaf,0x1f,
1621 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
1622 0x00 }},
1623 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1624 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1625 0x00 }},
1626 {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
1627 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
1628 0x00 }},
1629 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1630 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1631 0x01 }}
1634 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_1_H[] =
1636 {{0x30,0x27,0x94,0x2c,0x92,0xaf,0x1f,
1637 0x90,0x85,0x8f,0xab,0x30,0x00,0x04,
1638 0x00 }},
1639 {{0x30,0x27,0x94,0x2c,0x92,0x83,0x1f,
1640 0x5e,0x83,0x5d,0x79,0x10,0x00,0x04,
1641 0x00 }},
1642 {{0x30,0x27,0x94,0x2c,0x92,0xaf,0x1f,
1643 0x90,0x85,0x8f,0xab,0x30,0x00,0x04,
1644 0x00 }},
1645 {{0x30,0x27,0x94,0x2c,0x92,0x83,0x1f,
1646 0x5e,0x83,0x5d,0x79,0x10,0x00,0x04,
1647 0x00 }},
1648 {{0x30,0x27,0x94,0x2c,0x92,0x04,0x3e,
1649 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x04,
1650 0x00 }},
1651 {{0x3d,0x31,0x81,0x37,0x1f,0x72,0xf0,
1652 0x58,0x8c,0x57,0x73,0x20,0x00,0x05,
1653 0x01 }}
1656 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_1[] =
1658 {{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
1659 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1660 0x00}},
1661 {{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
1662 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1663 0x00}},
1664 {{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
1665 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1666 0x00}},
1667 {{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
1668 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1669 0x00}},
1670 {{0x64,0x4f,0x88,0x54,0x9f,0x04,0x3e,
1671 0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
1672 0x00}},
1673 {{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
1674 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
1675 0x01}},
1676 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1677 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1678 0x01}}
1681 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_1_H[] =
1683 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1684 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1685 0x00 }},
1686 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1687 0x60,0x87,0x5D,0x83,0x10,0x00,0x44,
1688 0x00}},
1689 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1690 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1691 0x00}},
1692 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1693 0x60,0x87,0x5D,0x83,0x10,0x00,0x44,
1694 0x00}},
1695 {{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
1696 0xE2,0x89,0xdf,0x05,0x00,0x00,0x44,
1697 0x00}},
1698 {{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
1699 0x5A,0x8F,0x57,0x7D,0x20,0x00,0x55,
1700 0x01}},
1701 {{0x4f,0x3F,0x93,0x45,0x0D,0x24,0xf5,
1702 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1703 0x01 }}
1705 #if 0
1706 {{0x37,0x27,0x9B,0x2b,0x94,0xc4,0x1f,
1707 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1708 0x00 }},
1709 {{0x37,0x27,0x9B,0x2b,0x94,0x97,0x1f,
1710 0x60,0x87,0x5D,0x83,0x01,0x00,0x44,
1711 0x00}},
1712 {{0x37,0x27,0x9B,0x2b,0x94,0xc4,0x1f,
1713 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1714 0x00}},
1715 {{0x37,0x27,0x9B,0x2b,0x94,0x97,0x1f,
1716 0x60,0x87,0x5D,0x83,0x01,0x00,0x44,
1717 0x00}},
1718 {{0x37,0x27,0x9B,0x2b,0x94,0x04,0x3e,
1719 0xE2,0x89,0xDf,0x05,0x00,0x00,0x44,
1720 0x00}},
1721 {{0x41,0x31,0x85,0x35,0x1d,0x7c,0xf0,
1722 0x5A,0x8F,0x57,0x7D,0x20,0x00,0x55,
1723 0x01}},
1724 {{0x4f,0x3F,0x93,0x45,0x0D,0x24,0xf5,
1725 0x02,0x88,0xFf,0x25,0x10,0x00,0x01,
1726 0x01 }}
1727 #endif
1730 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_1[] =
1732 {{0x63,0x4f,0x87,0x54,0x9f,0xb4,0x1f,
1733 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1734 0x00 }},
1735 {{0x63,0x4f,0x87,0x54,0x9f,0x82,0x1f,
1736 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1737 0x00 }},
1738 {{0x63,0x4f,0x87,0x54,0x9f,0xb4,0x1f,
1739 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1740 0x00 }},
1741 {{0x63,0x4f,0x87,0x54,0x9f,0x82,0x1f,
1742 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1743 0x00 }},
1744 {{0x63,0x4f,0x87,0x54,0x9f,0x04,0x3e,
1745 0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
1746 0x00 }},
1747 {{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
1748 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
1749 0x01 }},
1750 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1751 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1752 0x01 }}
1755 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_1_H[] =
1757 {{0x2f,0x27,0x93,0x2b,0x90,0xb4,0x1f,
1758 0x92,0x89,0x8f,0xb5,0x30,0x00,0x04,
1759 0x00 }},
1760 {{0x2f,0x27,0x93,0x2b,0x90,0x82,0x1f,
1761 0x60,0x87,0x5d,0x83,0x10,0x00,0x04,
1762 0x00 }},
1763 {{0x2f,0x27,0x93,0x2b,0x90,0xb4,0x1f,
1764 0x92,0x89,0x8f,0xb5,0x30,0x00,0x04,
1765 0x00 }},
1766 {{0x2f,0x27,0x93,0x2b,0x90,0x82,0x1f,
1767 0x60,0x87,0x5d,0x83,0x10,0x00,0x04,
1768 0x00 }},
1769 {{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
1770 0xe2,0x89,0xdf,0x05,0x00,0x00,0x04,
1771 0x00 }},
1772 {{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
1773 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
1774 0x01 }},
1775 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1776 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1777 0x01 }}
1780 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_2[] =
1782 {{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
1783 0xf4,0x88,0x8f,0x73,0x20,0x00,0x06,
1784 0x00 }},
1785 {{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
1786 0xdb,0x8f,0x5d,0x73,0x20,0x00,0x06,
1787 0x00 }},
1788 {{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
1789 0xf4,0x88,0x8f,0x73,0x20,0x00,0x06,
1790 0x00 }},
1791 {{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
1792 0xdb,0x8f,0x5d,0x73,0x20,0x00,0x06,
1793 0x00 }},
1794 {{0x7f,0x4f,0x83,0x62,0x12,0x72,0xba,
1795 0x1c,0x80,0xdf,0x73,0x00,0x00,0x06,
1796 0x00 }},
1797 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1798 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1799 0x01 }}
1802 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_2_H[] =
1804 {{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
1805 0xf4,0x88,0x8f,0x73,0x20,0x00,0x05,
1806 0x00 }},
1807 {{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
1808 0xdb,0x8f,0x5d,0x73,0x20,0x00,0x05,
1809 0x00 }},
1810 {{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
1811 0xf4,0x88,0x8f,0x73,0x20,0x00,0x05,
1812 0x00 }},
1813 {{0x3d,0x27,0x81,0x3a,0x1a,0x72,0x3e,
1814 0xdb,0x8f,0x5d,0x73,0x20,0x00,0x05,
1815 0x00 }},
1816 {{0x3d,0x27,0x81,0x32,0x1a,0x72,0xba,
1817 0x1c,0x80,0xdf,0x73,0x00,0x00,0x05,
1818 0x00 }},
1819 {{0x3d,0x31,0x81,0x37,0x1f,0x72,0xf0,
1820 0x58,0x8c,0x57,0x73,0x20,0x00,0x05,
1821 0x01 }}
1824 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_2[] =
1826 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1827 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1828 0x00 }},
1829 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1830 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1831 0x00 }},
1832 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1833 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1834 0x00 }},
1835 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1836 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1837 0x00 }},
1838 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1839 0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
1840 0x00 }},
1841 {{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
1842 0xae,0x84,0x57,0x25,0x30,0x00,0x02,
1843 0x01 }},
1844 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1845 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1846 0x01 }}
1849 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_2_H[] =
1851 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1852 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1853 0x00 }},
1854 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1855 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1856 0x00 }},
1857 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1858 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1859 0x00 }},
1860 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1861 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1862 0x00 }},
1863 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1864 0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
1865 0x00 }},
1866 {{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
1867 0xae,0x84,0x57,0x25,0x30,0x00,0x01,
1868 0x01 }},
1869 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1870 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1871 0x01 }}
1874 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_2[] =
1876 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1877 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1878 0x00 }},
1879 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1880 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1881 0x00 }},
1882 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1883 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1884 0x00 }},
1885 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1886 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1887 0x00 }},
1888 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1889 0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
1890 0x00 }},
1891 {{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
1892 0xae,0x84,0x57,0x25,0x30,0x00,0x02,
1893 0x01 }},
1894 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1895 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1896 0x01 }}
1899 static const SiS300_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_2_H[] =
1901 {{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
1902 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1903 0x00 }},
1904 {{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
1905 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1906 0x00 }},
1907 {{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
1908 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1909 0x00 }},
1910 {{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
1911 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1912 0x00 }},
1913 {{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
1914 0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
1915 0x00 }},
1916 {{0x4f,0x31,0x93,0x3e,0x86,0x24,0xf1,
1917 0xae,0x84,0x57,0x25,0x30,0x00,0x01,
1918 0x01 }},
1919 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1920 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1921 0x01}}
1924 static const SiS300_LVDSCRT1DataStruct SiS300_CHTVCRT1UNTSC[] =
1926 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
1927 0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,
1928 0x00 }},
1929 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
1930 0xd0,0x82,0x5d,0x57,0x00,0x00,0x01,
1931 0x00 }},
1932 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
1933 0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,
1934 0x00 }},
1935 {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
1936 0xd0,0x82,0x5d,0x57,0x00,0x00,0x01,
1937 0x00 }},
1938 {{0x5d,0x4f,0x81,0x53,0x9c,0x56,0xba,
1939 0x18,0x84,0xdf,0x57,0x00,0x00,0x01,
1940 0x00 }},
1941 {{0x80,0x63,0x84,0x6c,0x17,0xec,0xf0,
1942 0x90,0x8c,0x57,0xed,0x20,0x00,0x06,
1943 0x01 }}
1946 static const SiS300_LVDSCRT1DataStruct SiS300_CHTVCRT1ONTSC[] =
1948 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
1949 0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,
1950 0x00 }},
1951 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
1952 0xb0,0x8d,0x5d,0x0c,0x00,0x00,0x01,
1953 0x00 }},
1954 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
1955 0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,
1956 0x00 }},
1957 {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
1958 0xb0,0x8d,0x5d,0x0c,0x00,0x00,0x01,
1959 0x00 }},
1960 {{0x5d,0x4f,0x81,0x56,0x9c,0x0b,0x3e,
1961 0xe8,0x84,0xdf,0x0c,0x00,0x00,0x01,
1962 0x00 }},
1963 {{0x7d,0x63,0x81,0x6a,0x16,0xba,0xf0,
1964 0x7f,0x86,0x57,0xbb,0x00,0x00,0x06,
1965 0x01 }}
1968 static const SiS300_LVDSCRT1DataStruct SiS300_CHTVCRT1UPAL[] =
1970 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1971 0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,
1972 0x00 }},
1973 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1974 0xde,0x81,0x5d,0x70,0x00,0x00,0x05,
1975 0x00 }},
1976 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1977 0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,
1978 0x00 }},
1979 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1980 0xde,0x81,0x5d,0x70,0x00,0x00,0x05,
1981 0x00 }},
1982 {{0x64,0x4f,0x88,0x55,0x80,0xec,0xba,
1983 0x50,0x84,0xdf,0xed,0x00,0x00,0x05,
1984 0x00 }},
1985 {{0x70,0x63,0x94,0x68,0x8d,0x42,0xf1,
1986 0xc8,0x8c,0x57,0xe9,0x20,0x00,0x05,
1987 0x01 }}
1990 static const SiS300_LVDSCRT1DataStruct SiS300_CHTVCRT1OPAL[] =
1992 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1993 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
1994 0x00 }},
1995 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1996 0xde,0x81,0x5d,0x70,0x00,0x00,0x05,
1997 0x00 }},
1998 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
1999 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
2000 0x00 }},
2001 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2002 0xde,0x81,0x5d,0x70,0x00,0x00,0x05,
2003 0x00 }},
2004 {{0x64,0x4f,0x88,0x55,0x80,0x6f,0xba,
2005 0x20,0x83,0xdf,0x70,0x00,0x00,0x05,
2006 0x00 }},
2007 {{0x73,0x63,0x97,0x69,0x8e,0xec,0xf0,
2008 0x90,0x8c,0x57,0xed,0x20,0x00,0x05,
2009 0x01 }}
2012 static const SiS300_LVDSCRT1DataStruct SiS300_CHTVCRT1SOPAL[] =
2014 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2015 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
2016 0x00 }},
2017 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2018 0xde,0x81,0x5d,0x70,0x00,0x00,0x05,
2019 0x00 }},
2020 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2021 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
2022 0x00 }},
2023 {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
2024 0xde,0x81,0x5d,0x70,0x00,0x00,0x05,
2025 0x00 }},
2026 {{0x64,0x4f,0x88,0x55,0x80,0x6f,0xba, /* TODO */
2027 0x20,0x83,0xdf,0x70,0x00,0x00,0x05,
2028 0x00 }},
2029 {{0x73,0x63,0x97,0x69,0x8e,0xec,0xf0, /* TODO */
2030 0x90,0x8c,0x57,0xed,0x20,0x00,0x05,
2031 0x01 }}
2034 typedef struct _SiS300_CHTVRegDataStruct
2036 UCHAR Reg[16];
2037 } SiS300_CHTVRegDataStruct;
2039 static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_UNTSC[] =
2041 {{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2042 {{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2043 {{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2044 {{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2045 {{0x6a,0x6a,0x00,0x2d,0xfa,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 17: 640x480 NTSC 7/8 */
2046 {{0x8d,0xc4,0x00,0x3b,0xfb,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 24: 800x600 NTSC 7/10 */
2049 static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_ONTSC[] =
2051 {{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2052 {{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2053 {{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2054 {{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
2055 {{0x69,0x6a,0x00,0x1e,0xfd,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 16: 640x480 NTSC 1/1 */
2056 {{0x8c,0xb4,0x00,0x32,0xf9,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 23: 800x600 NTSC 3/4 */
2059 static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_UPAL[] =
2061 {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
2062 {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
2063 {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
2064 {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
2065 {{0x63,0x94,0x01,0x50,0x30,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 15: 640x480 PAL 5/6 */
2066 {{0x84,0x64,0x01,0x4e,0x2f,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 21: 800x600 PAL 3/4 */
2070 static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_OPAL[] =
2072 {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */
2073 {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
2074 {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
2075 {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
2076 {{0x61,0x94,0x01,0x36,0x30,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 14: 640x480 PAL 1/1 */
2077 {{0x83,0x76,0x01,0x40,0x31,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 20: 800x600 PAL 5/6 */
2081 static const SiS300_CHTVRegDataStruct SiS300_CHTVReg_SOPAL[] =
2083 {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */
2084 {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
2085 {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
2086 {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
2087 {{0x60,0x30,0x00,0x10,0x00,0,0,0,0,0,0,0,0,0,0,0}}, /* TW: Mode 13: 640x480 PAL 5/4 */
2088 {{0x81,0x50,0x00,0x1b,0x00,0,0,0,0,0,0,0,0,0,0,0}} /* TW: Mode 19: 800x600 PAL 1/1 */
2091 static const UCHAR SiS300_CHTVVCLKUNTSC[] = {0x29,0x29,0x29,0x29,0x2a,0x2e};
2093 static const UCHAR SiS300_CHTVVCLKONTSC[] = {0x2c,0x2c,0x2c,0x2c,0x2d,0x2b};
2095 static const UCHAR SiS300_CHTVVCLKSONTSC[] = {0x2c,0x2c,0x2c,0x2c,0x2d,0x2b};
2097 static const UCHAR SiS300_CHTVVCLKUPAL[] = {0x2f,0x2f,0x2f,0x2f,0x2f,0x31};
2099 static const UCHAR SiS300_CHTVVCLKOPAL[] = {0x2f,0x2f,0x2f,0x2f,0x30,0x32};
2101 static const UCHAR SiS300_CHTVVCLKSOPAL[] = {0x2f,0x2f,0x2f,0x2f,0x36,0x29};