4 * Data and prototypes for init.c
6 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria
8 * If distributed as part of the Linux kernel, the following license terms
11 * * This program is free software; you can redistribute it and/or modify
12 * * it under the terms of the GNU General Public License as published by
13 * * the Free Software Foundation; either version 2 of the named License,
14 * * or any later version.
16 * * This program is distributed in the hope that it will be useful,
17 * * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * * GNU General Public License for more details.
21 * * You should have received a copy of the GNU General Public License
22 * * along with this program; if not, write to the Free Software
23 * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
25 * Otherwise, the following license terms apply:
27 * * Redistribution and use in source and binary forms, with or without
28 * * modification, are permitted provided that the following conditions
30 * * 1) Redistributions of source code must retain the above copyright
31 * * notice, this list of conditions and the following disclaimer.
32 * * 2) Redistributions in binary form must reproduce the above copyright
33 * * notice, this list of conditions and the following disclaimer in the
34 * * documentation and/or other materials provided with the distribution.
35 * * 3) The name of the author may not be used to endorse or promote products
36 * * derived from this software without specific prior written permission.
38 * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
39 * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
40 * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
41 * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
42 * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
43 * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45 * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46 * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
47 * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 * Author: Thomas Winischhofer <thomas@winischhofer.net>
70 #include <linux/config.h>
71 #include <linux/version.h>
72 #include <linux/types.h>
75 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
76 #include <linux/sisfb.h>
78 #include <video/sisfb.h>
83 static const USHORT ModeIndex_320x200
[] = {0x59, 0x41, 0x00, 0x4f};
84 static const USHORT ModeIndex_320x240
[] = {0x50, 0x56, 0x00, 0x53};
85 static const USHORT ModeIndex_320x240_FSTN
[] = {0x5a, 0x5b, 0x00, 0x00}; /* FSTN */
86 static const USHORT ModeIndex_400x300
[] = {0x51, 0x57, 0x00, 0x54};
87 static const USHORT ModeIndex_512x384
[] = {0x52, 0x58, 0x00, 0x5c};
88 static const USHORT ModeIndex_640x400
[] = {0x2f, 0x5d, 0x00, 0x5e};
89 static const USHORT ModeIndex_640x480
[] = {0x2e, 0x44, 0x00, 0x62};
90 static const USHORT ModeIndex_720x480
[] = {0x31, 0x33, 0x00, 0x35};
91 static const USHORT ModeIndex_720x576
[] = {0x32, 0x34, 0x00, 0x36};
92 static const USHORT ModeIndex_768x576
[] = {0x5f, 0x60, 0x00, 0x61};
93 static const USHORT ModeIndex_800x480
[] = {0x70, 0x7a, 0x00, 0x76};
94 static const USHORT ModeIndex_800x600
[] = {0x30, 0x47, 0x00, 0x63};
95 static const USHORT ModeIndex_848x480
[] = {0x39, 0x3b, 0x00, 0x3e};
96 static const USHORT ModeIndex_856x480
[] = {0x3f, 0x42, 0x00, 0x45};
97 static const USHORT ModeIndex_960x540
[] = {0x1d, 0x1e, 0x00, 0x1f}; /* 315 series only */
98 static const USHORT ModeIndex_960x600
[] = {0x20, 0x21, 0x00, 0x22}; /* 315 series only */
99 static const USHORT ModeIndex_1024x768
[] = {0x38, 0x4a, 0x00, 0x64};
100 static const USHORT ModeIndex_1024x576
[] = {0x71, 0x74, 0x00, 0x77};
101 static const USHORT ModeIndex_1024x600
[] = {0x20, 0x21, 0x00, 0x22}; /* 300 series only */
102 static const USHORT ModeIndex_1280x1024
[] = {0x3a, 0x4d, 0x00, 0x65};
103 static const USHORT ModeIndex_1280x960
[] = {0x7c, 0x7d, 0x00, 0x7e};
104 static const USHORT ModeIndex_1152x768
[] = {0x23, 0x24, 0x00, 0x25}; /* 300 series only */
105 static const USHORT ModeIndex_1152x864
[] = {0x29, 0x2a, 0x00, 0x2b};
106 static const USHORT ModeIndex_300_1280x768
[] = {0x55, 0x5a, 0x00, 0x5b};
107 static const USHORT ModeIndex_310_1280x768
[] = {0x23, 0x24, 0x00, 0x25};
108 static const USHORT ModeIndex_1280x720
[] = {0x79, 0x75, 0x00, 0x78};
109 static const USHORT ModeIndex_1280x800
[] = {0x14, 0x15, 0x00, 0x16};
110 static const USHORT ModeIndex_1360x768
[] = {0x48, 0x4b, 0x00, 0x4e};
111 static const USHORT ModeIndex_300_1360x1024
[]= {0x67, 0x6f, 0x00, 0x72}; /* 300 series, BARCO only */
112 static const USHORT ModeIndex_1400x1050
[] = {0x26, 0x27, 0x00, 0x28}; /* 315 series only */
113 static const USHORT ModeIndex_1680x1050
[] = {0x17, 0x18, 0x00, 0x19}; /* 315 series only */
114 static const USHORT ModeIndex_1600x1200
[] = {0x3c, 0x3d, 0x00, 0x66};
115 static const USHORT ModeIndex_1920x1080
[] = {0x2c, 0x2d, 0x00, 0x73}; /* 315 series only */
116 static const USHORT ModeIndex_1920x1440
[] = {0x68, 0x69, 0x00, 0x6b};
117 static const USHORT ModeIndex_300_2048x1536
[]= {0x6c, 0x6d, 0x00, 0x00};
118 static const USHORT ModeIndex_310_2048x1536
[]= {0x6c, 0x6d, 0x00, 0x6e};
120 static const USHORT SiS_DRAMType
[17][5]={
121 {0x0C,0x0A,0x02,0x40,0x39},
122 {0x0D,0x0A,0x01,0x40,0x48},
123 {0x0C,0x09,0x02,0x20,0x35},
124 {0x0D,0x09,0x01,0x20,0x44},
125 {0x0C,0x08,0x02,0x10,0x31},
126 {0x0D,0x08,0x01,0x10,0x40},
127 {0x0C,0x0A,0x01,0x20,0x34},
128 {0x0C,0x09,0x01,0x08,0x32},
129 {0x0B,0x08,0x02,0x08,0x21},
130 {0x0C,0x08,0x01,0x08,0x30},
131 {0x0A,0x08,0x02,0x04,0x11},
132 {0x0B,0x0A,0x01,0x10,0x28},
133 {0x09,0x08,0x02,0x02,0x01},
134 {0x0B,0x09,0x01,0x08,0x24},
135 {0x0B,0x08,0x01,0x04,0x20},
136 {0x0A,0x08,0x01,0x02,0x10},
137 {0x09,0x08,0x01,0x01,0x00}
140 static const USHORT SiS_SDRDRAM_TYPE
[13][5] =
157 static const USHORT SiS_DDRDRAM_TYPE
[4][5] =
165 static const USHORT SiS_MDA_DAC
[] =
167 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
168 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
169 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
170 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
171 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
172 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
173 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
174 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
177 static const USHORT SiS_CGA_DAC
[] =
179 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
180 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
181 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
182 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
183 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
184 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
185 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
186 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
189 static const USHORT SiS_EGA_DAC
[] =
191 0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
192 0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
193 0x08,0x18,0x0C,0x1C,0x09,0x19,0x0D,0x1D,
194 0x28,0x38,0x2C,0x3C,0x29,0x39,0x2D,0x3D,
195 0x02,0x12,0x06,0x16,0x03,0x13,0x07,0x17,
196 0x22,0x32,0x26,0x36,0x23,0x33,0x27,0x37,
197 0x0A,0x1A,0x0E,0x1E,0x0B,0x1B,0x0F,0x1F,
198 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
201 static const USHORT SiS_VGA_DAC
[] =
203 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
204 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
205 0x00,0x05,0x08,0x0B,0x0E,0x11,0x14,0x18,
206 0x1C,0x20,0x24,0x28,0x2D,0x32,0x38,0x3F,
207 0x00,0x10,0x1F,0x2F,0x3F,0x1F,0x27,0x2F,
208 0x37,0x3F,0x2D,0x31,0x36,0x3A,0x3F,0x00,
209 0x07,0x0E,0x15,0x1C,0x0E,0x11,0x15,0x18,
210 0x1C,0x14,0x16,0x18,0x1A,0x1C,0x00,0x04,
211 0x08,0x0C,0x10,0x08,0x0A,0x0C,0x0E,0x10,
212 0x0B,0x0C,0x0D,0x0F,0x10
215 static const SiS_StResInfoStruct SiS_StResInfo
[]=
224 static const SiS_ModeResInfoStruct SiS_ModeResInfo
[] =
226 { 320, 200, 8, 8}, /* 0x00 */
227 { 320, 240, 8, 8}, /* 0x01 */
228 { 320, 400, 8, 8}, /* 0x02 */
229 { 400, 300, 8, 8}, /* 0x03 */
230 { 512, 384, 8, 8}, /* 0x04 */
231 { 640, 400, 8,16}, /* 0x05 */
232 { 640, 480, 8,16}, /* 0x06 */
233 { 800, 600, 8,16}, /* 0x07 */
234 { 1024, 768, 8,16}, /* 0x08 */
235 { 1280,1024, 8,16}, /* 0x09 */
236 { 1600,1200, 8,16}, /* 0x0a */
237 { 1920,1440, 8,16}, /* 0x0b */
238 { 2048,1536, 8,16}, /* 0x0c */
239 { 720, 480, 8,16}, /* 0x0d */
240 { 720, 576, 8,16}, /* 0x0e */
241 { 1280, 960, 8,16}, /* 0x0f */
242 { 800, 480, 8,16}, /* 0x10 */
243 { 1024, 576, 8,16}, /* 0x11 */
244 { 1280, 720, 8,16}, /* 0x12 */
245 { 856, 480, 8,16}, /* 0x13 */
246 { 1280, 768, 8,16}, /* 0x14 */
247 { 1400,1050, 8,16}, /* 0x15 */
248 { 1152, 864, 8,16}, /* 0x16 */
249 { 848, 480, 8,16}, /* 0x17 */
250 { 1360, 768, 8,16}, /* 0x18 */
251 { 1024, 600, 8,16}, /* 0x19 */
252 { 1152, 768, 8,16}, /* 0x1a */
253 { 768, 576, 8,16}, /* 0x1b */
254 { 1360,1024, 8,16}, /* 0x1c */
255 { 1680,1050, 8,16}, /* 0x1d */
256 { 1280, 800, 8,16}, /* 0x1e */
257 { 1920,1080, 8,16}, /* 0x1f */
258 { 960, 540, 8,16}, /* 0x20 */
259 { 960, 600, 8,16} /* 0x21 */
262 #if defined(SIS300) || defined(SIS315H)
263 static const SiS_StandTableStruct SiS_StandTable
[]=
267 0x28,0x18,0x08,0x0800,
268 {0x09,0x03,0x00,0x02},
270 {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
271 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
272 0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
274 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
275 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
276 0x08,0x00,0x0f,0x00},
277 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
282 0x28,0x18,0x08,0x0800,
283 {0x09,0x03,0x00,0x02},
285 {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
286 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
287 0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
289 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
290 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
291 0x08,0x00,0x0f,0x00},
292 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
297 0x50,0x18,0x08,0x1000,
298 {0x01,0x03,0x00,0x02},
300 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
301 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
302 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
304 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
305 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
306 0x08,0x00,0x0f,0x00},
307 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
310 /* 0x03: MD_3_200 - mode 0x03 - 0 */
312 0x50,0x18,0x08,0x1000,
313 {0x01,0x03,0x00,0x02},
315 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
316 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
317 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
319 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
320 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
321 0x08,0x00,0x0f,0x00},
322 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
327 0x28,0x18,0x08,0x4000,
328 {0x09,0x03,0x00,0x02},
330 {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x2c is 2b for 300 */
331 0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
332 0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
334 {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
335 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
336 0x01,0x00,0x03,0x00},
337 {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
342 0x28,0x18,0x08,0x4000,
343 {0x09,0x03,0x00,0x02},
345 {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x2c is 2b for 300 */
346 0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
347 0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
349 {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
350 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
351 0x01,0x00,0x03,0x00},
352 {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
357 0x50,0x18,0x08,0x4000,
358 {0x01,0x01,0x00,0x06},
360 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 for 300 */
361 0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
362 0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xc2,
364 {0x00,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
365 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
366 0x01,0x00,0x01,0x00},
367 {0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,
372 0x50,0x18,0x0e,0x1000,
373 {0x00,0x03,0x00,0x03},
375 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
376 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
377 0x83,0x85,0x5d,0x28,0x0d,0x63,0xba,0xa3,
379 {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
380 0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
381 0x0e,0x00,0x0f,0x08},
382 {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
387 0x00,0x00,0x00,0x0000,
388 {0x00,0x00,0x00,0x15},
390 {0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
391 0x15,0x15,0x15,0x15,0x15,0x15,0x3f,0x3f,
392 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x00,0x00,
394 {0x00,0x00,0x00,0x00,0x00,0x15,0x15,0x15,
395 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
396 0x15,0x15,0x15,0x15},
397 {0x15,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
402 0x00,0x10,0x04,0x0114,
403 {0x11,0x09,0x15,0x00},
405 {0x04,0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,
406 0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x2a,0x3a,
407 0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x10,
409 {0x14,0x01,0x11,0x09,0x15,0x00,0x10,0x04,
410 0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,0x2e,
411 0x3e,0x2b,0x3b,0x2f},
412 {0x3f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
417 0x00,0x10,0x04,0x0114,
418 {0x11,0x05,0x15,0x20},
420 {0x24,0x34,0x21,0x31,0x25,0x35,0x08,0x18,
421 0x0c,0x1c,0x09,0x19,0x0d,0x1d,0x28,0x38,
422 0x2c,0x3c,0x29,0x39,0x2d,0x3d,0x02,0x12,
424 {0x16,0x03,0x13,0x07,0x17,0x22,0x32,0x26,
425 0x36,0x23,0x33,0x27,0x37,0x0a,0x1a,0x0e,
426 0x1e,0x0b,0x1b,0x0f},
427 {0x1f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
432 0x00,0x10,0x04,0x0114,
433 {0x11,0x09,0x15,0x2a},
435 {0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x05,
436 0x08,0x0b,0x0e,0x11,0x14,0x18,0x1c,0x20,
437 0x24,0x28,0x2d,0x32,0x38,0x3f,0x00,0x10,
439 {0x2f,0x3f,0x1f,0x27,0x2f,0x37,0x3f,0x2d,
440 0x31,0x36,0x3a,0x3f,0x00,0x07,0x0e,0x15,
441 0x1c,0x0e,0x11,0x15},
442 {0x18,0x1c,0x14,0x16,0x18,0x1a,0x1c,0x00,
447 0x08,0x0c,0x10,0x0a08,
448 {0x0c,0x0e,0x10,0x0b},
450 {0x0d,0x0f,0x10,0x10,0x01,0x08,0x00,0x00,
451 0x00,0x00,0x01,0x00,0x02,0x02,0x01,0x00,
452 0x04,0x04,0x01,0x00,0x05,0x02,0x05,0x00,
454 {0x01,0x06,0x05,0x06,0x00,0x08,0x01,0x08,
455 0x00,0x07,0x02,0x07,0x06,0x07,0x00,0x00,
456 0x00,0x00,0x00,0x00},
457 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
462 0x28,0x18,0x08,0x2000,
463 {0x09,0x0f,0x00,0x06},
465 {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 2c is 2b for 300 */
466 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
467 0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xe3,
469 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
470 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
471 0x01,0x00,0x0f,0x00},
472 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
477 0x50,0x18,0x08,0x4000,
478 {0x01,0x0f,0x00,0x06},
480 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 for 300 */
481 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
482 0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xe3,
484 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
485 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
486 0x01,0x00,0x0f,0x00},
487 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
490 /* 0x0f: ExtVGATable - modes > 0x13 */
492 0x00,0x00,0x00,0x0000,
493 {0x01,0x0f,0x00,0x0e},
495 {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
496 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
497 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
499 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
500 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
501 0x01,0x00,0x00,0x00},
502 {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
505 /* 0x10: ROM_SAVEPTR - totally different for 300 */
507 0x9f,0x3b,0x00,0x00c0,
508 {0x00,0x00,0x00,0x00},
510 {0x00,0x00,0x00,0x00,0x00,0x00,0xbb,0x3f,
511 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
512 0x00,0x00,0x1a,0x00,0xac,0x3e,0x00,0xc0,
514 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
515 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
516 0x00,0x00,0x00,0x00},
517 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
522 0x50,0x18,0x0e,0x8000,
523 {0x01,0x0f,0x00,0x06},
525 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 on 300 */
526 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
527 0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3, /* 82,84 is 83,85 on 300 */
529 {0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,
530 0x00,0x08,0x00,0x00,0x00,0x18,0x00,0x00,
531 0x0b,0x00,0x05,0x00},
532 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,
537 0x50,0x18,0x0e,0x8000,
538 {0x01,0x0f,0x00,0x06},
540 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 on 300 */
541 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
542 0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3, /* 82,84 is 83,85 on 300 */
544 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
545 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
546 0x01,0x00,0x0f,0x00},
547 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
552 0x28,0x18,0x0e,0x0800,
553 {0x09,0x03,0x00,0x02},
555 {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f, /* b1 is a0 on 300 */
556 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
557 0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
559 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
560 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
561 0x08,0x00,0x0f,0x00},
562 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
567 0x28,0x18,0x0e,0x0800,
568 {0x09,0x03,0x00,0x02},
570 {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
571 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
572 0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
574 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
575 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
576 0x08,0x00,0x0f,0x00},
577 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
582 0x50,0x18,0x0e,0x1000,
583 {0x01,0x03,0x00,0x02},
585 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
586 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
587 0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
589 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
590 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
591 0x08,0x00,0x0f,0x00},
592 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
595 /* 0x16: MD_3_350 - mode 0x03 - 1 */
597 0x50,0x18,0x0e,0x1000,
598 {0x01,0x03,0x00,0x02},
600 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
601 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
602 0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
604 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
605 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
606 0x08,0x00,0x0f,0x00},
607 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
610 /* 0x17: MD_0_1_400 */
612 0x28,0x18,0x10,0x0800,
613 {0x08,0x03,0x00,0x02},
615 {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f, /* b1 is a0 on 300 */
616 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
617 0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
619 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
620 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
621 0x0c,0x00,0x0f,0x08},
622 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
625 /* 0x18: MD_2_3_400 - mode 0x03 - 2 */
627 0x50,0x18,0x10,0x1000,
628 {0x00,0x03,0x00,0x02},
630 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
631 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
632 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
634 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
635 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
636 0x0c,0x00,0x0f,0x08},
637 {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
642 0x50,0x18,0x10,0x1000,
643 {0x00,0x03,0x00,0x02},
645 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
646 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
647 0x9c,0x8e,0x8f,0x28,0x0f,0x96,0xb9,0xa3,
649 {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
650 0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
651 0x0e,0x00,0x0f,0x08},
652 {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
657 0x50,0x1d,0x10,0xa000,
658 {0x01,0x0f,0x00,0x06},
660 {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, /* 55,81 is 54,80 on 300 */
661 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
662 0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xc3, /* e9,8b is ea,8c on 300 */
664 {0x00,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
665 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
666 0x01,0x00,0x0f,0x00},
667 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,
670 /* 0x1b: ExtEGATable - Modes <= 0x02 */
672 0x50,0x1d,0x10,0xa000,
673 {0x01,0x0f,0x00,0x06},
675 {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, /* 55,81 is 54,80 on 300 */
676 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
677 0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xe3, /* e9,8b is ea,8c on 300 */
679 {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
680 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
681 0x01,0x00,0x0f,0x00},
682 {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
687 0x28,0x18,0x08,0x2000,
688 {0x01,0x0f,0x00,0x0e},
690 {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 on 300 */
691 0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,
692 0x9c,0x8e,0x8f,0x28,0x40,0x96,0xb9,0xa3,
694 {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
695 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
696 0x41,0x00,0x0f,0x00},
697 {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
703 /**************************************************************/
704 /* SIS VIDEO BRIDGE ----------------------------------------- */
705 /**************************************************************/
707 static const UCHAR SiS_SoftSetting
= 0x30; /* RAM setting */
709 static const UCHAR SiS_OutputSelect
= 0x40;
711 static const UCHAR SiS_NTSCTiming
[] = {
712 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
713 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
714 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
715 0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17,
716 0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02,
717 0x03,0x0a,0x65,0x9d,0x08,0x92,0x8f,0x40,
718 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x50,
719 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
722 static const UCHAR SiS_PALTiming
[] = {
723 0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70,
724 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d,
725 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b,
726 0x70,0x50,0x00,0x9b,0x00,0xd9,0x5d,0x17,
727 0x7d,0x05,0x45,0x00,0x00,0xe8,0x00,0x02,
728 0x0d,0x00,0x68,0xb0,0x0b,0x92,0x8f,0x40,
729 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x63,
730 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00
733 static const UCHAR SiS_HiTVExtTiming
[] = {
734 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
735 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
736 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
737 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
738 0x2a,0xde,0x2a,0x44,0x40,0x2a,0x44,0x40,
739 0x8e,0x8e,0x82,0x07,0x0b,0x92,0x0f,0x40,
740 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x3d,
741 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
744 static const UCHAR SiS_HiTVSt1Timing
[] = {
745 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
746 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
747 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
748 0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03,
749 0x11,0x15,0x11,0xcf,0x10,0x11,0xcf,0x10,
750 0x35,0x35,0x3b,0x69,0x1d,0x92,0x0f,0x40,
751 0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x86,
752 0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00
755 static const UCHAR SiS_HiTVSt2Timing
[] = {
756 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
757 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
758 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
759 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
760 0x2a,0xde,0x2a,0x44,0x40,0x2a,0x44,0x40,
761 0x8e,0x8e,0x82,0x07,0x0b,0x92,0x0f,0x40,
762 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x3d,
763 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
767 static const UCHAR SiS_HiTVTextTiming
[] = {
768 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
769 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
770 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
771 0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03,
772 0x14,0x78,0x14,0x08,0x20,0x14,0x08,0x20,
773 0xc8,0xc8,0x3b,0xd2,0x26,0x92,0x0f,0x40,
774 0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x96,
775 0x72,0x5c,0x11,0x00,0xfc,0xff,0x32,0x00
779 static const UCHAR SiS_HiTVGroup3Data
[] = {
780 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f,
781 0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6,
782 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
783 0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44,
784 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
785 0x4f,0x7f,0x03,0xa8,0x7d,0x20,0x1a,0xa9,
786 0x14,0x05,0x03,0x7e,0x64,0x31,0x14,0x75,
787 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
790 static const UCHAR SiS_HiTVGroup3Simu
[] = {
791 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95,
792 0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6,
793 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
794 0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11,
795 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
796 0x67,0x36,0x01,0x47,0x0e,0x10,0xbe,0xb4,
797 0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
798 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
802 static const UCHAR SiS_HiTVGroup3Text
[] = {
803 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7,
804 0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6,
805 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
806 0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22,
807 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
808 0x93,0x3c,0x01,0x50,0x2f,0x10,0xf4,0xca,
809 0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
810 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
814 static const UCHAR SiS_NTSCPhase
[] = {0x21,0xed,0xba,0x08};
815 static const UCHAR SiS_PALPhase
[] = {0x2a,0x05,0xe3,0x00};
816 static const UCHAR SiS_PALMPhase
[] = {0x21,0xE4,0x2E,0x9B};
817 static const UCHAR SiS_PALNPhase
[] = {0x21,0xF4,0x3E,0xBA};
818 static const UCHAR SiS_NTSCPhase2
[] = {0x21,0xF0,0x7B,0xD6};
819 static const UCHAR SiS_PALPhase2
[] = {0x2a,0x09,0x86,0xe9};
820 static const UCHAR SiS_PALMPhase2
[] = {0x21,0xE6,0xEF,0xA4};
821 static const UCHAR SiS_PALNPhase2
[] = {0x21,0xF6,0x94,0x46};
822 static const UCHAR SiS_SpecialPhase
[] = {0x1e,0x8c,0x5c,0x7a};
823 static const UCHAR SiS_SpecialPhaseM
[]= {0x1e,0x83,0x0a,0xe0};
824 static const UCHAR SiS_SpecialPhaseJ
[]= {0x25,0xd4,0xfd,0x5e};
826 static const SiS_TVDataStruct SiS_StPALData
[] =
828 { 1, 1, 864, 525,1270, 400, 100, 0, 760,0xf4,0xff,0x1c,0x22},
829 { 1, 1, 864, 525,1270, 350, 100, 0, 760,0xf4,0xff,0x1c,0x22},
830 { 1, 1, 864, 525,1270, 400, 0, 0, 720,0xf1,0x04,0x1f,0x18},
831 { 1, 1, 864, 525,1270, 350, 0, 0, 720,0xf4,0x0b,0x1c,0x0a},
832 { 1, 1, 864, 525,1270, 480, 50, 0, 760,0xf4,0xff,0x1c,0x22},
833 { 1, 1, 864, 525,1270, 600, 50, 0, 0,0xf4,0xff,0x1c,0x22}
836 static const SiS_TVDataStruct SiS_ExtPALData
[] =
838 { 27, 10, 848, 448,1270, 530, 50, 0, 50,0xf4,0xff,0x1c,0x22}, /* 640x400, 320x200 */
839 { 108, 35, 848, 398,1270, 530, 50, 0, 50,0xf4,0xff,0x1c,0x22},
840 { 12, 5, 954, 448,1270, 530, 50, 0, 50,0xf1,0x04,0x1f,0x18},
841 { 9, 4, 960, 463,1644, 438, 50, 0, 50,0xf4,0x0b,0x1c,0x0a},
842 { 9, 4, 848, 528,1270, 530, 0, 0, 50,0xf5,0xfb,0x1b,0x2a}, /* 640x480, 320x240 */
843 /*{ 36, 25,1060, 648,1316, 530, 438, 0, 438,0xeb,0x05,0x25,0x16},*//* 800x600, 400x300 */
844 { 36, 25,1060, 648,1270, 530, 438, 0, 438,0xeb,0x05,0x25,0x16}, /* 800x600, 400x300 - better */
845 { 3, 2,1080, 619,1270, 540, 438, 0, 438,0xf3,0x00,0x1d,0x20}, /* 720x576 */
846 { 1, 1,1170, 821,1270, 520, 686, 0, 686,0xF3,0x00,0x1D,0x20}, /* 1024x768 */
847 { 1, 1,1170, 821,1270, 520, 686, 0, 686,0xF3,0x00,0x1D,0x20}, /* 1024x768 (for NTSC equ) */
848 { 9, 4, 848, 528,1270, 530, 0, 0, 50,0xf5,0xfb,0x1b,0x2a} /* 720x480 test */
851 static const SiS_TVDataStruct SiS_StNTSCData
[] =
853 { 1, 1, 858, 525,1270, 400, 50, 0, 760,0xf1,0x04,0x1f,0x18},
854 { 1, 1, 858, 525,1270, 350, 50, 0, 640,0xf1,0x04,0x1f,0x18},
855 { 1, 1, 858, 525,1270, 400, 0, 0, 720,0xf1,0x04,0x1f,0x18},
856 { 1, 1, 858, 525,1270, 350, 0, 0, 720,0xf4,0x0b,0x1c,0x0a},
857 { 1, 1, 858, 525,1270, 480, 0, 0, 760,0xf1,0x04,0x1f,0x18}
860 static const SiS_TVDataStruct SiS_ExtNTSCData
[] =
862 { 143, 65, 858, 443,1270, 440, 171, 0, 171,0xf1,0x04,0x1f,0x18}, /* 640x400, 320x200 */
863 { 88, 35, 858, 393,1270, 440, 171, 0, 171,0xf1,0x04,0x1f,0x18},
864 { 143, 70, 924, 443,1270, 440, 92, 0, 92,0xf1,0x04,0x1f,0x18},
865 { 143, 70, 924, 393,1270, 440, 92, 0, 92,0xf4,0x0b,0x1c,0x0a},
866 { 143, 76, 836, 523,1270, 440, 224, 0, 0,0xf1,0x05,0x1f,0x16}, /* 640x480, 320x240 */
867 { 143, 120,1056, 643,1270, 440, 0, 128, 0,0xf4,0x10,0x1c,0x00}, /* 800x600, 400x300 */
868 /*{ 2, 1, 858, 503,1270, 480, 0, 128, 0,0xee,0x0c,0x22,0x08},*/ /* 720x480 (old, from 650) */
869 { 143, 76, 836, 523,1270, 440, 0, 128, 0,0xee,0x0c,0x22,0x08}, /* 720x480 - BETTER (from 300 series) */
870 /*{ 65, 64,1056, 791,1270, 480, 638, 0, 0,0xEE,0x0C,0x22,0x08} */ /* 1024x768 (525i) */
871 { 1, 1,1100, 811,1412, 440, 0, 128, 0,0xee,0x0c,0x22,0x08}, /* 1024x768 (525i) CORRECTED */
872 { 65, 64,1056, 791,1270, 480, 455, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
875 static const SiS_TVDataStruct SiS_StHiTVData
[] = /* Slave + TVSimu */
877 { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0x00,0x00,0x00,0x00},
878 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00},
879 { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0x00,0x00,0x00,0x00},
880 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00},
881 { 1, 1, 0x37c,0x233,0x2b2,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00},
882 { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x150,128, 0, 0x00,0x00,0x00,0x00}
885 static const SiS_TVDataStruct SiS_St2HiTVData
[] = /* Slave */
887 { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00},
888 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00},
889 { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00},
890 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00},
891 { 5, 2, 0x348,0x233,0x670,0x3c0,0x08d,128, 0, 0x00,0x00,0x00,0x00},
892 { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x17c,128, 0, 0x00,0x00,0x00,0x00}
895 static const SiS_TVDataStruct SiS_ExtHiTVData
[] =
897 { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00},
898 { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00},
899 { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00},
900 { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00},
901 { 5, 1, 0x348,0x233,0x670,0x3c0,0x166,128, 0, 0x00,0x00,0x00,0x00}, /* 640x480 */
902 { 16, 5, 0x41a,0x2ab,0x670,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00}, /* 800x600 */
903 { 25, 12, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x768 */
904 { 5, 4, 0x627,0x464,0x670,0x3c0,0x128, 0, 0, 0x00,0x00,0x00,0x00}, /* 1280x1024 */
905 { 4, 1, 0x41a,0x233,0x60c,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00}, /* 800x480 */
906 { 5, 2, 0x578,0x293,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x576 */
907 { 8, 5, 0x6d6,0x323,0x670,0x3c0,0x128, 0, 0, 0x00,0x00,0x00,0x00}, /* 1280x720 */
908 { 137, 32, 0x3d4,0x233,0x663,0x3bf,0x143, 0, 0, 0x00,0x00,0x00,0x00} /* 960x600 */
911 static const SiS_TVDataStruct SiS_St525pData
[] =
913 { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00},
914 { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00},
915 { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00},
916 { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00},
917 { 1, 1, 0x6b4,0x20d,0x4f6,0x1e0, 0, 0, 0x2f8, 0x00,0x00,0x00,0x00}
920 static const SiS_TVDataStruct SiS_St750pData
[] =
922 { 1, 1, 0x672,0x2ee,0x500,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00},
923 { 1, 1, 0x672,0x2ee,0x500,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00},
924 { 1, 1, 0x672,0x2ee,0x500,0x190, 0, 0, 0x2d0, 0x00,0x00,0x00,0x00},
925 { 1, 1, 0x672,0x2ee,0x500,0x15e, 0, 0, 0x2d0, 0x00,0x00,0x00,0x00},
926 { 1, 1, 0x672,0x2ee,0x500,0x1e0, 0, 0, 0x2f8, 0x00,0x00,0x00,0x00}
929 static const SiS_TVDataStruct SiS_Ext750pData
[] =
931 { 143, 65, 0x35a,0x1bb,0x4f6,0x1b8,0x0ab, 0, 0x0ab, 0x00,0x00,0x00,0x00},
932 { 88, 35, 0x35a,0x189,0x4f6,0x1b8,0x0ab, 0, 0x0ab, 0x00,0x00,0x00,0x00},
933 { 18, 5, 0x339,0x1ae,0x500,0x2d0,0x05c, 0, 0x05c, 0x00,0x00,0x00,0x00},
934 { 143, 70, 0x39c,0x189,0x4f6,0x1b8,0x05c, 0, 0x05c, 0x00,0x00,0x00,0x00},
935 { 99, 32, 0x320,0x1fe,0x500,0x2d0, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 640x480 */
936 { 5, 4, 0x5d8,0x29e,0x500,0x2a8, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 800x600 */
937 { 99, 32, 0x320,0x1fe,0x500,0x2d0, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 720x480 test WORKS */
938 { 68, 64, 0x55f,0x346,0x500,0x2a8,0x27e, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x768 */
939 { 5, 2, 0x3a7,0x226,0x500,0x2a8, 0,128, 0, 0x00,0x00,0x00,0x00}, /* 720x576 */
940 { 25, 24, 0x5d8,0x2f3,0x460,0x2a8, 50, 0, 0, 0x00,0x00,0x00,0x00} /* 1280x720 WORKS */
943 static const SiS_LCDDataStruct SiS_LCD1280x720Data
[] = /* 2.03.00 */
945 { 44, 15, 864, 430, 1408, 806 }, /* 640x400 */
946 { 128, 35, 792, 385, 1408, 806 },
947 { 44, 15, 864, 430, 1408, 806 },
948 { 128, 35, 792, 385, 1408, 806 },
949 { 22, 9, 864, 516, 1408, 806 }, /* 640x480 */
950 { 8, 5, 1056, 655, 1408, 806 }, /* 800x600 */
951 { 0, 0, 0, 0, 0, 0 }, /* 1024x768 */
952 { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
953 { 0, 0, 0, 0, 0, 0 },
954 { 0, 0, 0, 0, 0, 0 },
955 { 1, 1, 1408, 806, 1408, 806 } /* 1280x720 */
958 /* About 1280x768: For TMDS, Panel_1280x768 will only be set if
959 * the panel is a Fujitsu 7911 (VL-17WDX8) (with clock 81, 1688x802)
960 * Other TMDS panels of this resolution will be treated as custom.
961 * For LVDS, we know another type (_2).
962 * (Note: 1280x768_3 is now special for SiS301/NetVista
965 static const SiS_LCDDataStruct SiS_StLCD1280x768_2Data
[] = /* 2.03.00 */
967 { 64, 21, 858, 434, 1408, 806 }, /* 640x400 */
968 { 32, 9, 858, 372, 1408, 806 },
969 { 64, 21, 858, 434, 1408, 806 },
970 { 32, 9, 858, 372, 1408, 806 },
971 { 143, 68, 1024, 527, 1408, 806 }, /* 640x480 */
972 { 64, 51, 1364, 663, 1408, 806 }, /* 800x600 */
973 { 88, 81, 1296, 806, 1408, 806 }, /* 1024x768 */
974 { 0, 0, 0, 0, 0, 0 },
975 { 1, 1, 1408, 806, 1408, 806 }, /* 1280x768 */
976 { 0, 0, 0, 0, 0, 0 },
977 { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 - from Ext */
980 static const SiS_LCDDataStruct SiS_ExtLCD1280x768_2Data
[] = /* 2.03.00 */
982 { 16, 5, 960, 410, 1600, 806 }, /* 640x400 */
983 { 64, 21, 1152, 364, 1600, 806 },
984 { 16, 5, 960, 410, 1600, 806 },
985 { 64, 21, 1152, 364, 1600, 806 },
986 { 32, 13, 1040, 493, 1600, 806 }, /* 640x480 */
987 { 16, 9, 1152, 618, 1600, 806 }, /* 800x600 */
988 { 25, 21, 1344, 796, 1600, 806 }, /* 1024x768 */
989 { 0, 0, 0, 0, 0, 0 },
990 { 1, 1, 1600, 806, 1600, 806 }, /* 1280x768 */
991 { 0, 0, 0, 0, 0, 0 },
992 { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 */
995 #if 0 /* Not used; _3 now reserved for NetVista (SiS301) */
996 static const SiS_LCDDataStruct SiS_LCD1280x768_3Data
[] =
998 { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */
999 { 128, 39, 884, 396, 1408, 806 }, /* ,640 */
1000 { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */
1001 { 128, 39, 884, 396, 1408, 806 }, /* ,640 */
1002 { 32, 15, 1056, 513, 1408, 806 }, /* ,664 */ /* 640x480 */
1003 { 176, 125, 1280, 640, 1408, 806 }, /* ,768 */ /* 800x600 */
1004 { 64, 61, 1342, 806, 1408, 806 }, /* 1024x768 */
1005 { 0, 0, 0, 0, 0, 0 },
1006 { 1, 1, 1408, 806, 1408, 806 }, /* 1280x768 */
1007 { 0, 0, 0, 0, 0, 0 },
1008 { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 from above */
1012 static const SiS_LCDDataStruct SiS_LCD1280x800Data
[] = /* 0.93.12a (TMDS) */
1014 { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
1015 { 128, 49, 1232, 361, 1408, 816 },
1016 { 128, 51, 1122, 412, 1408, 816 },
1017 { 128, 49, 1232, 361, 1408, 816 },
1018 { 8, 3, 880, 491, 1408, 816 }, /* 640x480 */
1019 { 11, 6, 1024, 612, 1408, 816 }, /* 800x600 */
1020 { 22, 21, 1400, 784, 1408, 816 }, /* 1024x768 */
1021 { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
1022 { 1, 1, 1408, 816, 1408, 816 }, /* 1280x800 */
1023 { 0, 0, 0, 0, 0, 0 }, /* 1280x768 (patch index) */
1024 { 0, 0, 0, 0, 0, 0 } /* 1280x720 */
1027 static const SiS_LCDDataStruct SiS_LCD1280x800_2Data
[] = /* 2.03.00 (LVDS) */
1029 { 97, 42, 1344, 409, 1552, 812 }, /* 640x400 */
1030 { 97, 35, 1280, 358, 1552, 812 },
1031 { 97, 42, 1344, 409, 1552, 812 },
1032 { 97, 35, 1280, 358, 1552, 812 },
1033 { 97, 39, 1040, 488, 1552, 812 }, /* 640x480 */
1034 { 194, 105, 1120, 608, 1552, 812 }, /* 800x600 */
1035 { 97, 84, 1400, 780, 1552, 812 }, /* 1024x768 */
1036 { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
1037 { 1, 1, 1552, 812, 1552, 812 }, /* 1280x800 */
1038 { 97, 96, 1600, 780, 1552, 812 }, /* 1280x768 - patch index */
1039 { 97, 90, 1600, 730, 1552, 812 } /* 1280x720 */
1042 static const SiS_LCDDataStruct SiS_LCD1280x960Data
[] =
1044 { 9, 2, 800, 500, 1800, 1000 },
1045 { 9, 2, 800, 500, 1800, 1000 },
1046 { 4, 1, 900, 500, 1800, 1000 },
1047 { 4, 1, 900, 500, 1800, 1000 },
1048 { 9, 2, 800, 500, 1800, 1000 },
1049 { 30, 11, 1056, 625, 1800, 1000 },
1050 { 5, 3, 1350, 800, 1800, 1000 },
1051 { 1, 1, 1576, 1050, 1576, 1050 },
1052 { 1, 1, 1800, 1000, 1800, 1000 }
1055 static const SiS_LCDDataStruct SiS_StLCD1400x1050Data
[] =
1057 { 211, 100, 2100, 408, 1688, 1066 },
1058 { 211, 64, 1536, 358, 1688, 1066 },
1059 { 211, 100, 2100, 408, 1688, 1066 },
1060 { 211, 64, 1536, 358, 1688, 1066 },
1061 { 211, 48, 840, 488, 1688, 1066 },
1062 { 211, 72, 1008, 609, 1688, 1066 },
1063 { 211, 128, 1400, 776, 1688, 1066 },
1064 { 211, 205, 1680, 1041, 1688, 1066 },
1065 { 1, 1, 1688, 1066, 1688, 1066 }
1068 static const SiS_LCDDataStruct SiS_ExtLCD1400x1050Data
[] =
1070 /* { 211, 60, 1260, 410, 1688, 1066 }, 640x400 (6330) */
1071 { 211, 100, 2100, 408, 1688, 1066 }, /* 640x400 (6325) WORKS */
1072 { 211, 64, 1536, 358, 1688, 1066 },
1073 { 211, 100, 2100, 408, 1688, 1066 },
1074 { 211, 64, 1536, 358, 1688, 1066 },
1075 /* { 211, 80, 1400, 490, 1688, 1066 }, 640x480 (6330) */
1076 { 211, 48, 840, 488, 1688, 1066 }, /* 640x480 (6325) WORKS */
1077 /* { 211, 117, 1638, 613, 1688, 1066 }, 800x600 (6330) */
1078 { 211, 72, 1008, 609, 1688, 1066 }, /* 800x600 (6325) WORKS */
1079 { 211, 128, 1400, 776, 1688, 1066 }, /* 1024x768 */
1080 { 211, 205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */
1081 { 1, 1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */
1082 { 0, 0, 0, 0, 0, 0 }, /* kludge */
1083 { 211, 120, 1400, 730, 1688, 1066 } /* 1280x720 */
1086 static const SiS_LCDDataStruct SiS_LCD1680x1050Data
[] =
1088 { 95, 24, 1260, 410, 1900, 1066 }, /* 0 640x400 */
1089 { 10, 3, 1710, 362, 1900, 1066 },
1090 { 95, 24, 1260, 410, 1900, 1066 },
1091 { 10, 3, 1710, 362, 1900, 1066 },
1092 { 95, 32, 1400, 490, 1900, 1066 }, /* 4 640x480 */
1093 { 95, 42, 1470, 610, 1900, 1066 }, /* 5 800x600 */
1094 { 95, 64, 1750, 784, 1900, 1066 }, /* 6 1024x768 */
1095 { 95, 94, 1900, 1055, 1900, 1066 }, /* 7 1280x1024 */
1096 { 41, 31, 1900, 806, 1900, 1066 }, /* 8 1280x768 */
1097 { 95, 69, 1800, 817, 1900, 1066 }, /* 9 1280x800 patch index */
1098 { 13, 9, 1900, 739, 1900, 1066 }, /* 10 1280x720 */
1099 { 95, 94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */
1100 { 1, 1, 1900, 1066, 1900, 1066 } /* 12 1680x1050 */
1103 static const SiS_LCDDataStruct SiS_StLCD1600x1200Data
[] =
1105 {27, 4, 800, 500, 2160, 1250 },
1106 {27, 4, 800, 500, 2160, 1250 },
1107 { 6, 1, 900, 500, 2160, 1250 },
1108 { 6, 1, 900, 500, 2160, 1250 },
1109 {27, 1, 800, 500, 2160, 1250 },
1110 { 4, 1,1080, 625, 2160, 1250 },
1111 { 5, 2,1350, 800, 2160, 1250 },
1112 {135,88,1600,1100, 2160, 1250 },
1113 {72, 49,1680,1092, 2160, 1250 },
1114 { 1, 1,2160,1250, 2160, 1250 }
1117 static const SiS_LCDDataStruct SiS_ExtLCD1600x1200Data
[] =
1119 {72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */
1120 /* {27, 4, 800, 500, 2160, 1250 }, 640x400 (6235) */
1121 {27, 4, 800, 500, 2160, 1250 },
1122 { 6, 1, 900, 500, 2160, 1250 },
1123 { 6, 1, 900, 500, 2160, 1250 },
1124 {45, 8, 960, 505, 2160, 1250 }, /* 640x480 (6330) WORKS */
1125 /* {27, 1, 800, 500, 2160, 1250 }, 640x480 (6325) */
1126 { 4, 1,1080, 625, 2160, 1250 },
1127 { 5, 2,1350, 800, 2160, 1250 },
1128 {27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */
1129 {72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */
1130 { 1, 1,2160,1250, 2160, 1250 }
1133 static const SiS_LCDDataStruct SiS_NoScaleData
[] =
1135 { 1, 1, 800, 449, 800, 449 }, /* 0x00: 320x200, 640x400 */
1136 { 1, 1, 800, 449, 800, 449 },
1137 { 1, 1, 900, 449, 900, 449 },
1138 { 1, 1, 900, 449, 900, 449 },
1139 { 1, 1, 800, 525, 800, 525 }, /* 0x04: 320x240, 640x480 */
1140 { 1, 1,1056, 628,1056, 628 }, /* 0x05: 400x300, 800x600 */
1141 { 1, 1,1344, 806,1344, 806 }, /* 0x06: 512x384, 1024x768 */
1142 { 1, 1,1688,1066,1688,1066 }, /* 0x07: 1280x1024 */
1143 { 1, 1,1688, 802,1688, 802 }, /* 0x08: 1280x768: Fujitsu, TMDS only */
1144 { 1, 1,2160,1250,2160,1250 }, /* 0x09: 1600x1200 */
1145 { 1, 1,1800,1000,1800,1000 }, /* 0x0a: 1280x960 */
1146 { 1, 1,1688,1066,1688,1066 }, /* 0x0b: 1400x1050 */
1147 { 1, 1,1650, 750,1650, 750 }, /* 0x0c: 1280x720 (TMDS, projector) */
1148 { 1, 1,1552, 812,1552, 812 }, /* 0x0d: 1280x800_2 (LVDS) (was: 1408,816/ 1656,841) */
1149 { 1, 1,1900,1066,1900,1066 }, /* 0x0e: 1680x1050 (LVDS) */
1150 { 1, 1,1660, 806,1660, 806 }, /* 0x0f: 1280x768_2 (LVDS) */
1151 { 1, 1,1664, 798,1664, 798 }, /* 0x10: 1280x768_3 (NetVista SiS 301) - TODO */
1152 { 1, 1,1688, 802,1688, 802 }, /* 0x11: 1280x768 (TMDS Fujitsu) */
1153 { 1, 1,1408, 806,1408, 806 }, /* 0x12: 1280x720 (LVDS) */
1154 { 1, 1, 896, 497, 896, 497 }, /* 0x13: 720x480 */
1155 { 1, 1, 912, 597, 912, 597 }, /* 0x14: 720x576 */
1156 { 1, 1, 912, 597, 912, 597 }, /* 0x15: 768x576 */
1157 { 1, 1,1056, 497,1056, 497 }, /* 0x16: 848x480 */
1158 { 1, 1,1064, 497,1064, 497 }, /* 0x17: 856x480 */
1159 { 1, 1,1056, 497,1056, 497 }, /* 0x18: 800x480 */
1160 { 1, 1,1328, 739,1328, 739 }, /* 0x19: 1024x576 */
1161 { 1, 1,1680, 892,1680, 892 }, /* 0x1a: 1152x864 */
1162 { 1, 1,1808, 808,1808, 808 }, /* 0x1b: 1360x768 */
1163 { 1, 1,1104, 563,1104, 563 }, /* 0x1c: 960x540 */
1164 { 1, 1,1120, 618,1120, 618 }, /* 0x1d: 960x600 */
1165 { 1, 1,1408, 816,1408, 816 } /* 0x1f: 1280x800 (TMDS special) */
1168 /**************************************************************/
1169 /* LVDS ----------------------------------------------------- */
1170 /**************************************************************/
1172 static const SiS_LVDSDataStruct SiS_LVDS320x480Data_1
[]=
1174 { 848, 433, 400, 525},
1175 { 848, 389, 400, 525},
1176 { 848, 433, 400, 525},
1177 { 848, 389, 400, 525},
1178 { 848, 518, 400, 525},
1179 {1056, 628, 400, 525},
1180 { 400, 525, 400, 525},
1181 { 800, 449,1000, 644},
1182 { 800, 525,1000, 635}
1185 static const SiS_LVDSDataStruct SiS_LVDS640x480Data_1
[]=
1187 { 800, 445, 800, 525}, /* 800, 449, 800, 449 */
1188 { 800, 395, 800, 525},
1189 { 800, 445, 800, 525},
1190 { 800, 395, 800, 525},
1191 { 800, 525, 800, 525},
1192 { 800, 525, 800, 525}, /* pseudo */
1193 { 800, 525, 800, 525} /* pseudo */
1197 static const SiS_LVDSDataStruct SiS_LVDS640x480Data_2
[]=
1199 { 800, 445, 800, 525},
1200 { 800, 395, 800, 525},
1201 { 800, 445, 800, 525},
1202 { 800, 395, 800, 525},
1203 { 800, 525, 800, 525},
1204 { 800, 525, 800, 525}, /* pseudo */
1205 { 800, 525, 800, 525} /* pseudo */
1208 static const SiS_LVDSDataStruct SiS_LVDS800x600Data_1
[]=
1210 { 848, 433,1060, 629},
1211 { 848, 389,1060, 629},
1212 { 848, 433,1060, 629},
1213 { 848, 389,1060, 629},
1214 { 848, 518,1060, 629},
1215 {1056, 628,1056, 628},
1216 {1056, 628,1056, 628}
1219 static const SiS_LVDSDataStruct SiS_LVDS800x600Data_2
[]=
1221 {1056, 628,1056, 628}
1224 static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_1
[]=
1226 { 840, 438,1344, 806},
1227 { 840, 409,1344, 806},
1228 { 840, 438,1344, 806},
1229 { 840, 409,1344, 806},
1230 { 840, 518,1344, 806}, /* 640x480 */
1231 {1050, 638,1344, 806}, /* 800x600 */
1232 {1344, 806,1344, 806}, /* 1024x768 */
1235 static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_2
[]=
1237 {1344, 806,1344, 806}
1240 static const SiS_LVDSDataStruct SiS_LVDS1280x1024Data_1
[]=
1242 {1048, 442,1688,1066},
1243 {1048, 392,1688,1066},
1244 {1048, 442,1688,1066},
1245 {1048, 392,1688,1066},
1246 {1048, 522,1688,1066},
1247 {1208, 642,1688,1066},
1248 {1432, 810,1688,1066},
1249 {1688,1066,1688,1066}
1252 static const SiS_LVDSDataStruct SiS_LVDS1280x1024Data_2
[]=
1254 {1688,1066,1688,1066}
1257 static const SiS_LVDSDataStruct SiS_LVDS1400x1050Data_1
[]=
1259 { 928, 416, 1688,1066},
1260 { 928, 366, 1688,1066},
1261 { 928, 416, 1688,1066},
1262 { 928, 366, 1688,1066},
1263 { 928, 496, 1688,1066},
1264 {1088, 616, 1688,1066},
1265 {1312, 784, 1688,1066},
1266 {1568,1040, 1688,1066},
1267 {1688,1066, 1688,1066}
1270 static const SiS_LVDSDataStruct SiS_LVDS1400x1050Data_2
[]=
1272 {1688,1066, 1688,1066}
1275 static const SiS_LVDSDataStruct SiS_LVDS1600x1200Data_1
[]=
1277 {1088, 520, 2048,1320},
1278 {1088, 470, 2048,1320},
1279 {1088, 520, 2048,1320},
1280 {1088, 470, 2048,1320},
1281 {1088, 600, 2048,1320},
1282 {1248, 720, 2048,1320},
1283 {1472, 888, 2048,1320},
1284 {1728,1144, 2048,1320},
1285 {1848,1170, 2048,1320},
1286 {2048,1320, 2048,1320}
1289 static const SiS_LVDSDataStruct SiS_LVDS1600x1200Data_2
[]=
1291 {2048,1320, 2048,1320}
1294 static const SiS_LVDSDataStruct SiS_LVDS1280x960Data_1
[]=
1296 { 840, 438,1344, 806},
1297 { 840, 409,1344, 806},
1298 { 840, 438,1344, 806},
1299 { 840, 409,1344, 806},
1300 { 840, 518,1344, 806},
1301 {1050, 638,1344, 806},
1302 {1344, 806,1344, 806},
1303 { 800, 449,1280, 801},
1304 { 800, 525,1280, 813}
1307 static const SiS_LVDSDataStruct SiS_LVDS1280x960Data_2
[]=
1309 {1344, 806,1344, 806}
1312 static const SiS_LVDSDataStruct SiS_LVDS1280x768Data_1
[]=
1314 { 768, 438, 1408, 806},
1315 { 768, 388, 1408, 806},
1316 { 768, 438, 1408, 806},
1317 { 768, 388, 1408, 806},
1318 { 768, 518, 1408, 806},
1319 { 928, 638, 1408, 806},
1320 {1152, 806, 1408, 806},
1321 {1408, 806, 1408, 806},
1322 {1408, 806, 1408, 806}
1325 static const SiS_LVDSDataStruct SiS_LVDS1280x768Data_2
[]=
1327 {1408, 806, 1408, 806}
1330 static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_1
[] =
1332 { 840, 604,1344, 800},
1333 { 840, 560,1344, 800},
1334 { 840, 604,1344, 800},
1335 { 840, 560,1344, 800},
1336 { 840, 689,1344, 800},
1337 {1050, 800,1344, 800},
1338 {1344, 800,1344, 800}
1341 static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_2
[] =
1343 {1344, 800,1344, 800}
1346 static const SiS_LVDSDataStruct SiS_LVDS1152x768Data_1
[] =
1348 { 840, 438,1344, 806},
1349 { 840, 409,1344, 806},
1350 { 840, 438,1344, 806},
1351 { 840, 409,1344, 806},
1352 { 840, 518,1344, 806},
1353 {1050, 638,1344, 806},
1354 {1344, 806,1344, 806}
1357 static const SiS_LVDSDataStruct SiS_LVDS1152x768Data_2
[] =
1359 {1344, 806,1344, 806}
1363 static const SiS_LVDSDataStruct SiS_LVDSXXXxXXXData_1
[]=
1365 { 800, 449, 800, 449},
1366 { 800, 449, 800, 449},
1367 { 900, 449, 900, 449},
1368 { 900, 449, 900, 449},
1369 { 800, 525, 800, 525}, /* 640x480 */
1370 {1056, 628, 1056, 628}, /* 800x600 */
1371 {1344, 806, 1344, 806}, /* 1024x768 */
1372 {1688,1066, 1688,1066}, /* 1280x1024 */ /* INSERTED */
1373 {1688, 806, 1688, 806}, /* 1280x768 */
1376 /* Custom data for Barco iQ R series */
1377 static const SiS_LVDSDataStruct SiS_LVDSBARCO1366Data_1
[]=
1379 { 832, 438,1331, 806},
1380 { 832, 388,1331, 806},
1381 { 832, 438,1331, 806},
1382 { 832, 388,1331, 806},
1383 { 832, 518,1331, 806},
1384 {1050, 638,1344, 806},
1385 {1344, 806,1344, 806},
1386 {1688,1066,1688,1066},
1387 {1688,1066,1688,1066} /* 1360x1024 */
1390 /* Custom data for Barco iQ R series */
1391 static const SiS_LVDSDataStruct SiS_LVDSBARCO1366Data_2
[]=
1393 {1344, 806,1344, 806},
1394 {1344, 806,1344, 806},
1395 {1344, 806,1344, 806},
1396 {1344, 806,1344, 806},
1397 {1344, 806,1344, 806},
1398 {1344, 806,1344, 806},
1399 {1344, 806,1344, 806},
1400 {1688,1066,1688,1066},
1401 {1688,1066,1688,1066} /* 1360x1024 */
1404 /* Custom data for Barco iQ G series */
1405 static const SiS_LVDSDataStruct SiS_LVDSBARCO1024Data_1
[]=
1407 { 832, 438,1331, 806},
1408 { 832, 409,1331, 806},
1409 { 832, 438,1331, 806},
1410 { 832, 409,1331, 806},
1411 { 832, 518,1331, 806}, /* 640x480 */
1412 {1050, 638,1344, 806}, /* 800x600 */
1413 {1344, 806,1344, 806}, /* 1024x768 */
1416 /* Custom data for Barco iQ G series */
1417 static const SiS_LVDSDataStruct SiS_LVDSBARCO1024Data_2
[]=
1419 {1344, 806,1344, 806}
1422 /* Custom data for 848x480 parallel panel */
1423 static const SiS_LVDSDataStruct SiS_LVDS848x480Data_1
[]=
1429 {1088, 525,1088, 525}, /* 640x480 TODO */
1430 {1088, 525,1088, 525}, /* 800x600 TODO */
1431 {1088, 525,1088, 525}, /* 1024x768 TODO */
1436 {1088, 525,1088, 525}, /* 848x480 */
1437 {1088, 525,1088, 525} /* 1360x768 TODO */
1440 /* Custom data for 848x480 parallel panel */
1441 static const SiS_LVDSDataStruct SiS_LVDS848x480Data_2
[]=
1447 {1088, 525,1088, 525}, /* 640x480 */
1448 {1088, 525,1088, 525}, /* 800x600 */
1449 {1088, 525,1088, 525}, /* 1024x768 */
1454 {1088, 525,1088, 525}, /* 848x480 */
1455 {1088, 525,1088, 525} /* 1360x768 TODO */
1458 static const SiS_LVDSDataStruct SiS_CHTVUNTSCData
[]=
1460 { 840, 600, 840, 600},
1461 { 840, 600, 840, 600},
1462 { 840, 600, 840, 600},
1463 { 840, 600, 840, 600},
1464 { 784, 600, 784, 600},
1465 {1064, 750,1064, 750},
1466 {1160, 945,1160, 945}
1469 static const SiS_LVDSDataStruct SiS_CHTVONTSCData
[]=
1471 { 840, 525, 840, 525},
1472 { 840, 525, 840, 525},
1473 { 840, 525, 840, 525},
1474 { 840, 525, 840, 525},
1475 { 784, 525, 784, 525},
1476 {1040, 700,1040, 700},
1477 {1160, 840,1160, 840}
1480 /* Chrontel TV Skew */
1482 static const SiS_LVDSDesStruct SiS_CHTVUNTSCDesData
[]=
1493 static const SiS_LVDSDesStruct SiS_CHTVONTSCDesData
[]=
1504 static const SiS_LVDSDesStruct SiS_CHTVUPALDesData
[]=
1515 static const SiS_LVDSDesStruct SiS_CHTVOPALDesData
[]=
1526 /* CRT1 CRTC data for slave modes */
1528 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1320x480_1
[] =
1530 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
1531 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
1533 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1534 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1536 {{0x65,0x4f,0x89,0x54,0x9f,0xc4,0x1f,
1537 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1539 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1540 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1542 {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
1543 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
1545 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1546 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1548 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
1549 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1553 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_1
[] =
1555 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1556 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1558 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1559 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1561 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1562 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1564 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1565 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1567 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1568 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1570 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1571 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1575 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_1_H
[] =
1577 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1578 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
1580 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1581 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
1583 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1584 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
1586 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1587 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
1589 {{0x2d,0x28,0x90,0x2c,0x80,0x0b,0x3e,
1590 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1594 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2
[] =
1596 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1597 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1599 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1600 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1602 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1603 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1605 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1606 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1608 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1609 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1611 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1612 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1614 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
1615 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1619 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2_H
[] =
1621 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
1622 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
1624 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1625 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1627 {{0x65,0x4f,0x89,0x54,0x9f,0xc4,0x1f,
1628 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1630 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1631 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1633 {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
1634 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
1636 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1637 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1639 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
1640 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1644 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3
[] =
1646 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1647 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
1649 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1650 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
1652 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1653 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
1655 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1656 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
1658 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1659 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
1661 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1662 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1664 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
1665 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1669 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3_H
[] =
1671 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
1672 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
1674 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1675 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1677 {{0x65,0x4f,0x89,0x54,0x9f,0xc4,0x1f,
1678 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1680 {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
1681 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
1683 {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
1684 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
1686 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1687 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1689 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
1690 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1694 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_1
[] =
1696 {{0x64,0x4f,0x88,0x54,0x9f,0x5a,0x3e,
1697 0xe8,0x8f,0x8f,0x5b,0x00,0x00,0x01,
1699 {{0x64,0x4f,0x88,0x54,0x9f,0x2e,0x3e,
1700 0xb9,0x80,0x5d,0x2f,0x00,0x00,0x01,
1702 {{0x64,0x4f,0x88,0x54,0x9f,0x5a,0x3e,
1703 0xe8,0x8f,0x8f,0x5b,0x00,0x00,0x01,
1705 {{0x64,0x4f,0x88,0x54,0x9f,0x2e,0x3e,
1706 0xb9,0x80,0x5d,0x2f,0x00,0x00,0x01,
1708 {{0x64,0x4f,0x88,0x54,0x9f,0xaf,0xba,
1709 0x3b,0x82,0xdf,0xb0,0x00,0x00,0x01,
1711 {{0x7e,0x63,0x82,0x68,0x15,0x1e,0xf1,
1712 0xae,0x85,0x57,0x1f,0x30,0x00,0x26,
1714 {{0xa3,0x7f,0x87,0x86,0x97,0x1e,0xf1,
1715 0xae,0x85,0x57,0x1f,0x30,0x00,0x02,
1719 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_1_H
[] =
1721 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1722 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1724 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1725 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1727 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1728 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1730 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1731 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1733 {{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
1734 0xe2,0x89,0xdf,0x05,0x00,0x00,0x44,
1736 {{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
1737 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
1739 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1740 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1744 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_2
[] =
1746 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1747 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1749 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1750 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1752 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1753 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1755 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1756 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1758 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1759 0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
1761 {{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
1762 0xae,0x84,0x57,0x25,0x30,0x00,0x02,
1764 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1765 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1769 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_2_H
[] =
1771 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1772 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1774 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1775 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1777 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1778 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1780 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1781 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1783 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1784 0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
1786 {{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
1787 0xae,0x84,0x57,0x25,0x30,0x00,0x01,
1789 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1790 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1794 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_1
[] =
1796 {{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
1797 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1799 {{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
1800 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1802 {{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
1803 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1805 {{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
1806 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1808 {{0x64,0x4f,0x88,0x54,0x9f,0x04,0x3e,
1809 0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
1811 {{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
1812 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
1814 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1815 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1819 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_1_H
[] =
1821 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1822 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1824 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1825 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1827 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1828 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1830 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1831 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1833 {{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
1834 0xe2,0x89,0xdf,0x05,0x00,0x00,0x44,
1836 {{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
1837 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
1839 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1840 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1844 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_2
[] =
1846 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1847 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1849 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1850 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1852 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1853 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1855 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1856 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1858 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1859 0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
1861 {{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
1862 0xae,0x84,0x57,0x25,0x30,0x00,0x02,
1864 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1865 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1869 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_2_H
[] =
1871 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1872 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1874 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1875 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1877 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1878 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1880 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1881 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1883 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1884 0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
1886 {{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
1887 0xae,0x84,0x57,0x25,0x30,0x00,0x01,
1889 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1890 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1894 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_1
[] =
1896 {{0x5b,0x4f,0x9f,0x55,0x19,0xb4,0x1f,
1897 0x9c,0x8e,0x8f,0xb5,0x10,0x00,0x01,
1899 {{0x5b,0x4f,0x9f,0x55,0x19,0x82,0x1f,
1900 0x6a,0x8c,0x5d,0x83,0x30,0x00,0x01,
1902 {{0x5b,0x4f,0x9f,0x55,0x19,0xb4,0x1f,
1903 0x9c,0x8e,0x8f,0xb5,0x10,0x00,0x01,
1905 {{0x5b,0x4f,0x9f,0x55,0x19,0x82,0x1f,
1906 0x6a,0x8c,0x5d,0x83,0x30,0x00,0x01,
1908 {{0x5b,0x4f,0x9f,0x55,0x19,0x04,0x3e,
1909 0xec,0x8e,0xdf,0x05,0x20,0x00,0x01,
1911 {{0x6f,0x63,0x93,0x69,0x8d,0x7c,0xf0,
1912 0x64,0x86,0x57,0x7d,0x20,0x00,0x05,
1914 {{0x8b,0x7f,0x8f,0x85,0x09,0x24,0xf5,
1915 0x0c,0x8e,0xff,0x25,0x30,0x00,0x02,
1917 {{0xab,0x9f,0x8f,0xa5,0x89,0x24,0xf5,
1918 0x0c,0x8e,0xff,0x25,0x30,0x00,0x06,
1920 {{0xab,0x9f,0x8f,0xa5,0x89,0x24,0xf5,
1921 0x0c,0x8e,0xff,0x25,0x30,0x00,0x06,
1925 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_1_H
[] =
1927 {{0x47,0x27,0x8b,0x2c,0x1a,0x9e,0x1f,
1928 0x93,0x86,0x8f,0x9f,0x30,0x00,0x05,
1930 {{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
1931 0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
1933 {{0x47,0x27,0x8b,0x30,0x1e,0x9e,0x1f,
1934 0x92,0x86,0x8f,0x9f,0x30,0x00,0x05,
1936 {{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
1937 0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
1939 {{0x47,0x27,0x8b,0x2c,0x1a,0xee,0x1f,
1940 0xe2,0x86,0xdf,0xef,0x10,0x00,0x05,
1942 {{0x51,0x31,0x95,0x36,0x04,0x66,0xf0,
1943 0x5a,0x8e,0x57,0x67,0x20,0x00,0x01,
1945 {{0x5f,0x3f,0x83,0x44,0x92,0x0e,0xf5,
1946 0x02,0x86,0xff,0x0f,0x10,0x00,0x01,
1948 {{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
1949 0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
1951 {{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
1952 0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
1956 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_2
[] =
1958 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb,
1959 0x54,0x86,0xdb,0xda,0x00,0x00,0x02,
1961 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb,
1962 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x02,
1964 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb,
1965 0x54,0x86,0xdb,0xda,0x00,0x00,0x02,
1967 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb,
1968 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x02,
1970 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xb3,
1971 0x7c,0x8e,0x03,0x02,0x10,0x00,0x02,
1973 {{0xab,0x63,0x8f,0x8a,0x8e,0x24,0xf1,
1974 0xb6,0x88,0x57,0x25,0x10,0x00,0x02,
1976 {{0xab,0x7f,0x8f,0x98,0x9c,0x24,0xf5,
1977 0x0a,0x8c,0xff,0x25,0x30,0x00,0x02,
1979 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
1980 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
1982 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
1983 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
1987 static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_2_H
[] =
1989 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb,
1990 0x54,0x86,0xdb,0xda,0x00,0x00,0x01,
1992 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb,
1993 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x01,
1995 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb,
1996 0x54,0x86,0xdb,0xda,0x00,0x00,0x01,
1998 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb,
1999 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x01,
2001 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xb3,
2002 0x7c,0x8e,0x03,0x02,0x10,0x00,0x01,
2004 {{0x79,0x31,0x9d,0x58,0x9c,0x24,0xf1,
2005 0xb6,0x88,0x57,0x25,0x10,0x00,0x01,
2007 {{0x6b,0x3f,0x8f,0x58,0x9c,0x24,0xf5,
2008 0x0a,0x8c,0xff,0x25,0x30,0x00,0x01,
2010 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
2011 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
2013 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
2014 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
2018 /**************************************************************/
2019 /* COMMON --------------------------------------------------- */
2020 /**************************************************************/
2024 #define SIS_PL_HSYNCP 0x01
2025 #define SIS_PL_HSYNCN 0x02
2026 #define SIS_PL_VSYNCP 0x04
2027 #define SIS_PL_VSYNCN 0x08
2028 #define SIS_PL_DVI 0x80
2030 typedef struct _SiS_PlasmaModes
2034 USHORT HDisplay
, HTotal
, HFrontPorch
, HSyncWidth
;
2035 USHORT VDisplay
, VTotal
, VFrontPorch
, VSyncWidth
;
2039 typedef struct _SiS_PlasmaTables
2044 const char *DDCnames
[5];
2045 const char *plasmaname
;
2047 USHORT prefx
, prefy
;
2049 UCHAR plasmamodes
[20]; /* | 0x80 = DVI-capable, | 0x40 = analog */
2052 static const SiS_PlasmaModes SiS_PlasmaMode
[] = {
2053 { "640x400", /* 00: IBM 400@70 */
2057 SIS_PL_HSYNCN
| SIS_PL_VSYNCN
},
2058 { "640x480", /* 01: VESA 480@72 */
2062 SIS_PL_HSYNCN
| SIS_PL_VSYNCN
},
2063 { "800x600", /* 02: VESA 600@72 */
2067 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2068 { "864x480", /* 03: Cereb wide 1 */
2072 SIS_PL_HSYNCP
| SIS_PL_VSYNCN
},
2073 { "848x480", /* 04: VESA wide (NEC1) */
2077 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2078 { "1024x576", /* 05: VESA wide (NEC2) */
2080 1024, 1320, 16, 144,
2082 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2083 { "1280x720", /* 06: VESA wide (NEC3) */
2085 1280, 1696, 48, 176,
2087 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2088 { "1360x765", /* 07: VESA wide (NEC4) */
2090 1360, 1792, 64, 176,
2092 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2093 { "1024x600", /* 08: CEREB wide 2 */
2095 1024, 1352, 51, 164,
2097 SIS_PL_HSYNCN
| SIS_PL_VSYNCP
},
2098 { "1024x768", /* 09: VESA 768@75 */
2102 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2103 { "1152x864", /* 10: VESA 1152x864@75 */
2105 1152, 1600, 64, 128,
2107 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2108 { "1280x1024", /* 11: VESA 1024@60 */
2110 1280, 1688, 48, 112,
2112 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2113 { "1280x768", /* 12: W_XGA */
2115 1280, 1688, 48, 112,
2117 SIS_PL_HSYNCP
| SIS_PL_VSYNCN
},
2118 { "1280x768", /* 13: I/O Data W_XGA@56Hz */
2120 1280, 1688, 48, 112,
2122 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2123 { "1376x768", /* 14: I/O Wide XGA */
2125 1376, 1808, 32, 128,
2127 SIS_PL_HSYNCN
| SIS_PL_VSYNCP
},
2128 { "1280x960", /* 15: VESA 960@60 */
2130 1280, 1800, 96, 112,
2132 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2133 { "1400x1050", /* 16: VESA 1050@60Hz */
2135 1400, 1688, 48, 112,
2137 SIS_PL_HSYNCN
| SIS_PL_VSYNCN
},
2138 { "1360x768", /* 17: VESA wide (NEC4/2) */
2140 1360, 1792, 64, 112,
2142 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2143 { "800x600", /* 18: VESA 600@56 */
2147 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2148 { "1072x600", /* 19: Panasonic 1072x600 (sync?) */
2150 1072, 1424, 48, 176,
2152 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2153 { "848x480", /* 20: Panasonic 848x480 (sync?) */
2154 33070, /* is 852x480, but we can't use 852 */
2155 848, 1068, 20, 40, /* differs from DDC data, better centered */
2156 480, 516, 3, 5, /* won't work assumingly, because data is % 8 */
2157 SIS_PL_HSYNCN
| SIS_PL_VSYNCN
},
2158 { "1280x720", /* 21: WIDE720(60) (aka "750p") (Panasonic) */
2162 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2163 { "1280x768", /* 22: 1280x768@56.5 (Panasonic) */
2164 76200, /* (According to manual not supported for HDMI; but works) */
2167 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2168 { "1280x720@50", /* 23: WIDE720(50) (aka "750p") (Panasonic) */
2169 74300, /* Panasonic states 45.0kHz. Not possible. This one works (with some overscan) */
2172 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2173 { "720x480", /* 24: 720x480 (aka "525p" and "480p") (Panasonic) */
2177 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2178 { "720x576", /* 25: 720x576 (aka "625p"and "576p") (Panasonic) */
2182 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2183 { "1280x720@50", /* 26: WIDE720(50) (aka "750p") (Generic) */
2187 SIS_PL_HSYNCP
| SIS_PL_VSYNCP
},
2191 27.00 720 755 791 858 480 480 484 525
2192 27.50 720 732 795 864 576 581 587 625
2195 static const SiS_PlasmaTables SiS_PlasmaTable
[] = {
2196 #if 0 /* Product IDs missing */
2198 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2199 { "", "", "", "", "" },
2200 "NEC PlasmaSync 42VP4/42VP4D/42VP4G/42VP4DG",
2203 11, /* All DVI, except 0, 7, 13 */
2204 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
2205 17|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2208 #if 0 /* Product IDs missing */
2210 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2211 { "", "", "", "", "" },
2212 "NEC PlasmaSync 42PD1/50PD1/50PD2",
2215 5, /* DVI entirely unknown */
2216 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0, 0 , 0 , 0 , 0 , 0 ,
2217 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2220 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2221 { "", "", "", "", "" },
2222 "NEC PlasmaSync 42PD3",
2225 10, /* DVI entirely unknown */
2226 { 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 7|0x40, 8|0xc0, 9|0xc0,
2227 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2230 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2231 { "", "", "", "", "" },
2232 "NEC PlasmaSync 42VM3/61XM1",
2235 11, /* DVI entirely unknown */
2236 { 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 8|0xc0, 9|0xc0,11|0xc0,
2237 17|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2240 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2241 { "", "", "", "", "" },
2242 "NEC PlasmaSync 42MP1/42MP2",
2245 6, /* DVI entirely unknown */
2246 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0,11|0xc0, 0 , 0 , 0 , 0 ,
2247 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2250 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2251 { "", "", "", "", "" },
2252 "NEC PlasmaSync 50MP1",
2255 10, /* DVI entirely unknown */
2256 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
2257 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2261 { 0xa482, 0xa483, 0x0000, 0x0000, 0x0000 },
2262 { "PX-42VM", "", "", "", "" },
2263 "NEC PlasmaSync 42MP3/42MP4/50MP2/61MP1",
2266 11, /* All DVI except 0, 7, 13, 17 */
2267 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
2268 17|0x40, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2270 #if 0 /* Product IDs missing */
2272 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2273 { "", "", "", "", "" },
2274 "NEC PlasmaSync 3300W",
2278 { 0|0x40, 1|0xc0,18|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
2279 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2282 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2283 { "", "", "", "", "" },
2284 "NEC PlasmaSync 4200W",
2285 4, /* DVI entirely unknown */
2286 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 0 , 0 , 0 , 0 , 0 , 0 ,
2287 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2290 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2291 { "", "", "", "", "" },
2292 "NEC PlasmaSync 4210W",
2295 6, /* DVI entirely unknown */
2296 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0,11|0xc0, 0 , 0 , 0 , 0 ,
2297 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2300 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2301 { "", "", "", "", "" },
2302 "NEC PlasmaSync 5000W",
2305 7, /* DVI entirely unknown */
2306 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,11|0xc0, 0 , 0 , 0 ,
2307 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2311 { 0x000c, 0x000b, 0x0000, 0x0000, 0x0000 },
2312 { "", "", "", "", "" },
2313 "Pioneer 503CMX/PDA-5002",
2316 6, /* DVI unknown */
2317 { 1|0xc0, 2|0xc0, 9|0xc0,11|0xc0,12|0xc0,15|0xc0, 0 , 0 , 0 , 0 ,
2318 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2321 { 0xa00e, 0x0000, 0x0000, 0x0000, 0x0000 },
2322 { "", "", "", "", "" },
2326 5, /* No DVI output */
2327 { 1|0x40, 2|0x40, 4|0x40, 9|0x40,15|0x40, 0 , 0 , 0 , 0 , 0 ,
2328 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2331 { 0xa005, 0x0000, 0x0000, 0x0000, 0x0000 },
2332 { "TH-42PW*4", "", "", "", "" },
2333 "Panasonic TH-42PW5",
2336 1, /* No special modes otherwise; no DVI. */
2337 {20|0x40,19|0x40, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
2338 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2341 { 0x9b05, 0x0000, 0x0000, 0x0000, 0x0000 },
2342 { "PLV-Z2", "", "", "", "" },
2343 "Sanyo PLV-Z2 (non HDCP-mode)", /* HDCP mode would be id 9b06, but not needed */
2344 1280, 768, /* as it then advertises correct size */
2346 1, /* 1280x720, no special modes otherwise */
2347 {21|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
2348 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2351 { 0xd034, 0x0000, 0x0000, 0x0000, 0x0000 },
2352 { "AE500U (DVI-D)", "", "", "", "" },
2356 1, /* 1280x720, no special modes otherwise */
2357 {21|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
2358 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2361 { 0xd043, 0x0000, 0x0000, 0x0000, 0x0000 },
2362 { "AE700U (HDMI)", "", "", "", "" },
2366 6, /* 1280x720/60, 1280x720/50, 1280x768@56(digital/analog), 720x480, 720x576 */
2367 {21|0xc0,23|0xc0,22|0x80,13|0x40,24|0x80,25|0x80, 0 , 0 , 0 , 0 ,
2368 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
2375 USHORT
SiS_GetModeID(int VGAEngine
, ULONG VBFlags
, int HDisplay
, int VDisplay
,
2376 int Depth
, BOOLEAN FSTN
, int LCDwith
, int LCDheight
);
2378 USHORT
SiS_GetModeID_LCD(int VGAEngine
, ULONG VBFlags
, int HDisplay
, int VDisplay
, int Depth
, BOOLEAN FSTN
,
2379 USHORT CustomT
, int LCDwith
, int LCDheight
);
2380 USHORT
SiS_GetModeID_TV(int VGAEngine
, ULONG VBFlags
, int HDisplay
, int VDisplay
, int Depth
);
2381 USHORT
SiS_GetModeID_VGA2(int VGAEngine
, ULONG VBFlags
, int HDisplay
, int VDisplay
, int Depth
);
2383 void SiS_SetReg(SISIOADDRESS port
, USHORT index
, USHORT data
);
2384 void SiS_SetRegByte(SISIOADDRESS port
, USHORT data
);
2385 void SiS_SetRegShort(SISIOADDRESS port
, USHORT data
);
2386 void SiS_SetRegLong(SISIOADDRESS port
, ULONG data
);
2387 UCHAR
SiS_GetReg(SISIOADDRESS port
, USHORT index
);
2388 UCHAR
SiS_GetRegByte(SISIOADDRESS port
);
2389 USHORT
SiS_GetRegShort(SISIOADDRESS port
);
2390 ULONG
SiS_GetRegLong(SISIOADDRESS port
);
2391 void SiS_SetRegANDOR(SISIOADDRESS Port
, USHORT Index
, USHORT DataAND
, USHORT DataOR
);
2392 void SiS_SetRegAND(SISIOADDRESS Port
,USHORT Index
, USHORT DataAND
);
2393 void SiS_SetRegOR(SISIOADDRESS Port
,USHORT Index
, USHORT DataOR
);
2394 void SiS_DisplayOn(SiS_Private
*SiS_Pr
);
2395 void SiS_DisplayOff(SiS_Private
*SiS_Pr
);
2396 void SiSRegInit(SiS_Private
*SiS_Pr
, SISIOADDRESS BaseAddr
);
2397 BOOLEAN
SiSDetermineROMLayout661(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
);
2398 void SiS_SetEnableDstn(SiS_Private
*SiS_Pr
, int enable
);
2399 void SiS_SetEnableFstn(SiS_Private
*SiS_Pr
, int enable
);
2400 BOOLEAN
SiS_SearchModeID(SiS_Private
*SiS_Pr
, USHORT
*ModeNo
, USHORT
*ModeIdIndex
);
2401 UCHAR
SiS_GetModePtr(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
);
2402 USHORT
SiS_GetColorDepth(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
);
2403 USHORT
SiS_GetOffset(SiS_Private
*SiS_Pr
,USHORT ModeNo
, USHORT ModeIdIndex
,
2404 USHORT RefreshRateTableIndex
, PSIS_HW_INFO HwInfo
);
2405 void SiS_LoadDAC(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
, USHORT ModeNo
, USHORT ModeIdIndex
);
2406 void SiS_CalcLCDACRT1Timing(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
);
2409 BOOLEAN
SiSSetMode(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
,ScrnInfoPtr pScrn
,USHORT ModeNo
, BOOLEAN dosetpitch
);
2410 BOOLEAN
SiSBIOSSetMode(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
, ScrnInfoPtr pScrn
,
2411 DisplayModePtr mode
, BOOLEAN IsCustom
);
2412 BOOLEAN
SiSBIOSSetModeCRT2(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
, ScrnInfoPtr pScrn
,
2413 DisplayModePtr mode
, BOOLEAN IsCustom
);
2414 BOOLEAN
SiSBIOSSetModeCRT1(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
, ScrnInfoPtr pScrn
,
2415 DisplayModePtr mode
, BOOLEAN IsCustom
);
2416 int SiSTranslateToVESA(ScrnInfoPtr pScrn
, int modenumber
);
2417 int SiSTranslateToOldMode(int modenumber
);
2418 BOOLEAN
SiS_GetPanelID(SiS_Private
*SiS_Pr
, PSIS_HW_INFO
);
2419 USHORT
SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn
, DisplayModePtr mode
, int VBFlags
);
2420 DisplayModePtr
SiSBuildBuiltInModeList(ScrnInfoPtr pScrn
, BOOLEAN includelcdmodes
, BOOLEAN isfordvi
);
2421 int SiS_FindPanelFromDB(SISPtr pSiS
, USHORT panelvendor
, USHORT panelproduct
, int *maxx
, int *maxy
, int *prefx
, int *prefy
);
2422 void SiS_MakeClockRegs(ScrnInfoPtr pScrn
, int clock
, UCHAR
*p2b
, UCHAR
*p2c
);
2424 BOOLEAN
SiSSetMode(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
,USHORT ModeNo
);
2428 int sisfb_mode_rate_to_dclock(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
,
2429 UCHAR modeno
, UCHAR rateindex
);
2430 int sisfb_mode_rate_to_ddata(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
,
2431 UCHAR modeno
, UCHAR rateindex
,
2432 struct fb_var_screeninfo
*var
);
2433 BOOLEAN
sisfb_gettotalfrommode(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
,
2434 UCHAR modeno
, int *htotal
, int *vtotal
, UCHAR rateindex
);
2438 extern void SiS_GetVBInfo(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
,
2439 PSIS_HW_INFO HwInfo
, int chkcrt2mode
);
2440 extern void SiS_GetLCDResInfo(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
,
2441 PSIS_HW_INFO HwInfo
);
2442 extern void SiS_SetYPbPr(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
);
2443 extern void SiS_SetTVMode(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
, PSIS_HW_INFO HwInfo
);
2444 extern void SiS_UnLockCRT2(SiS_Private
*SiS_Pr
, PSIS_HW_INFO HwInfo
);
2445 extern void SiS_DisableBridge(SiS_Private
*, PSIS_HW_INFO
);
2446 extern BOOLEAN
SiS_SetCRT2Group(SiS_Private
*, PSIS_HW_INFO
, USHORT
);
2447 extern USHORT
SiS_GetRatePtr(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
,
2448 PSIS_HW_INFO HwInfo
);
2449 extern void SiS_WaitRetrace1(SiS_Private
*SiS_Pr
);
2450 extern USHORT
SiS_GetResInfo(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
);
2451 extern USHORT
SiS_GetCH700x(SiS_Private
*SiS_Pr
, USHORT tempax
);
2452 extern USHORT
SiS_GetVCLK2Ptr(SiS_Private
*SiS_Pr
, USHORT ModeNo
, USHORT ModeIdIndex
,
2453 USHORT RefreshRateTableIndex
, PSIS_HW_INFO HwInfo
);
2454 extern BOOLEAN
SiS_IsVAMode(SiS_Private
*, PSIS_HW_INFO
);
2455 extern BOOLEAN
SiS_IsDualEdge(SiS_Private
*, PSIS_HW_INFO
);
2458 /* From other sis driver modules: */
2459 extern int SiS_compute_vclk(int Clock
, int *out_n
, int *out_dn
, int *out_div
,
2460 int *out_sbit
, int *out_scale
);
2461 extern void SiSCalcClock(ScrnInfoPtr pScrn
, int clock
, int max_VLD
, unsigned int *vclk
);
2463 extern UCHAR
SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn
, USHORT offset
, UCHAR value
);
2464 extern UCHAR
SiS_GetSetModeID(ScrnInfoPtr pScrn
, UCHAR id
);
2465 extern USHORT
SiS_GetModeNumber(ScrnInfoPtr pScrn
, DisplayModePtr mode
, ULONG VBFlags
);