aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis/init.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/sis/init.h')
-rw-r--r--drivers/video/sis/init.h1732
1 files changed, 463 insertions, 1269 deletions
diff --git a/drivers/video/sis/init.h b/drivers/video/sis/init.h
index 7e36b7ac1470..634c0a9d219b 100644
--- a/drivers/video/sis/init.h
+++ b/drivers/video/sis/init.h
@@ -3,7 +3,7 @@
3/* 3/*
4 * Data and prototypes for init.c 4 * Data and prototypes for init.c
5 * 5 *
6 * Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria 6 * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
7 * 7 *
8 * If distributed as part of the Linux kernel, the following license terms 8 * If distributed as part of the Linux kernel, the following license terms
9 * apply: 9 * apply:
@@ -50,18 +50,24 @@
50 * 50 *
51 */ 51 */
52 52
53#ifndef _INIT_ 53#ifndef _INIT_H_
54#define _INIT_ 54#define _INIT_H_
55 55
56#include "osdef.h" 56#include "osdef.h"
57#include "initdef.h" 57#include "initdef.h"
58 58
59#ifdef LINUX_XF86 59#ifdef SIS_XORG_XF86
60#include "sis.h" 60#include "sis.h"
61#define SIS_NEED_inSISREG
62#define SIS_NEED_inSISREGW
63#define SIS_NEED_inSISREGL
64#define SIS_NEED_outSISREG
65#define SIS_NEED_outSISREGW
66#define SIS_NEED_outSISREGL
61#include "sis_regs.h" 67#include "sis_regs.h"
62#endif 68#endif
63 69
64#ifdef LINUX_KERNEL 70#ifdef SIS_LINUX_KERNEL
65#include "vgatypes.h" 71#include "vgatypes.h"
66#include "vstruct.h" 72#include "vstruct.h"
67#ifdef SIS_CP 73#ifdef SIS_CP
@@ -73,6 +79,10 @@
73#include <asm/io.h> 79#include <asm/io.h>
74#include <linux/fb.h> 80#include <linux/fb.h>
75#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 81#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
82#include <video/fbcon.h>
83#endif
84#include "sis.h"
85#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
76#include <linux/sisfb.h> 86#include <linux/sisfb.h>
77#else 87#else
78#include <video/sisfb.h> 88#include <video/sisfb.h>
@@ -80,44 +90,45 @@
80#endif 90#endif
81 91
82/* Mode numbers */ 92/* Mode numbers */
83static const USHORT ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f}; 93static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f};
84static const USHORT ModeIndex_320x240[] = {0x50, 0x56, 0x00, 0x53}; 94static const unsigned short ModeIndex_320x240[] = {0x50, 0x56, 0x00, 0x53};
85static const USHORT ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00}; /* FSTN */ 95static const unsigned short ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00}; /* FSTN */
86static const USHORT ModeIndex_400x300[] = {0x51, 0x57, 0x00, 0x54}; 96static const unsigned short ModeIndex_400x300[] = {0x51, 0x57, 0x00, 0x54};
87static const USHORT ModeIndex_512x384[] = {0x52, 0x58, 0x00, 0x5c}; 97static const unsigned short ModeIndex_512x384[] = {0x52, 0x58, 0x00, 0x5c};
88static const USHORT ModeIndex_640x400[] = {0x2f, 0x5d, 0x00, 0x5e}; 98static const unsigned short ModeIndex_640x400[] = {0x2f, 0x5d, 0x00, 0x5e};
89static const USHORT ModeIndex_640x480[] = {0x2e, 0x44, 0x00, 0x62}; 99static const unsigned short ModeIndex_640x480[] = {0x2e, 0x44, 0x00, 0x62};
90static const USHORT ModeIndex_720x480[] = {0x31, 0x33, 0x00, 0x35}; 100static const unsigned short ModeIndex_720x480[] = {0x31, 0x33, 0x00, 0x35};
91static const USHORT ModeIndex_720x576[] = {0x32, 0x34, 0x00, 0x36}; 101static const unsigned short ModeIndex_720x576[] = {0x32, 0x34, 0x00, 0x36};
92static const USHORT ModeIndex_768x576[] = {0x5f, 0x60, 0x00, 0x61}; 102static const unsigned short ModeIndex_768x576[] = {0x5f, 0x60, 0x00, 0x61};
93static const USHORT ModeIndex_800x480[] = {0x70, 0x7a, 0x00, 0x76}; 103static const unsigned short ModeIndex_800x480[] = {0x70, 0x7a, 0x00, 0x76};
94static const USHORT ModeIndex_800x600[] = {0x30, 0x47, 0x00, 0x63}; 104static const unsigned short ModeIndex_800x600[] = {0x30, 0x47, 0x00, 0x63};
95static const USHORT ModeIndex_848x480[] = {0x39, 0x3b, 0x00, 0x3e}; 105static const unsigned short ModeIndex_848x480[] = {0x39, 0x3b, 0x00, 0x3e};
96static const USHORT ModeIndex_856x480[] = {0x3f, 0x42, 0x00, 0x45}; 106static const unsigned short ModeIndex_856x480[] = {0x3f, 0x42, 0x00, 0x45};
97static const USHORT ModeIndex_960x540[] = {0x1d, 0x1e, 0x00, 0x1f}; /* 315 series only */ 107static const unsigned short ModeIndex_960x540[] = {0x1d, 0x1e, 0x00, 0x1f}; /* 315 series only */
98static const USHORT ModeIndex_960x600[] = {0x20, 0x21, 0x00, 0x22}; /* 315 series only */ 108static const unsigned short ModeIndex_960x600[] = {0x20, 0x21, 0x00, 0x22}; /* 315 series only */
99static const USHORT ModeIndex_1024x768[] = {0x38, 0x4a, 0x00, 0x64}; 109static const unsigned short ModeIndex_1024x768[] = {0x38, 0x4a, 0x00, 0x64};
100static const USHORT ModeIndex_1024x576[] = {0x71, 0x74, 0x00, 0x77}; 110static const unsigned short ModeIndex_1024x576[] = {0x71, 0x74, 0x00, 0x77};
101static const USHORT ModeIndex_1024x600[] = {0x20, 0x21, 0x00, 0x22}; /* 300 series only */ 111static const unsigned short ModeIndex_1024x600[] = {0x20, 0x21, 0x00, 0x22}; /* 300 series only */
102static const USHORT ModeIndex_1280x1024[] = {0x3a, 0x4d, 0x00, 0x65}; 112static const unsigned short ModeIndex_1280x1024[] = {0x3a, 0x4d, 0x00, 0x65};
103static const USHORT ModeIndex_1280x960[] = {0x7c, 0x7d, 0x00, 0x7e}; 113static const unsigned short ModeIndex_1280x960[] = {0x7c, 0x7d, 0x00, 0x7e};
104static const USHORT ModeIndex_1152x768[] = {0x23, 0x24, 0x00, 0x25}; /* 300 series only */ 114static const unsigned short ModeIndex_1152x768[] = {0x23, 0x24, 0x00, 0x25}; /* 300 series only */
105static const USHORT ModeIndex_1152x864[] = {0x29, 0x2a, 0x00, 0x2b}; 115static const unsigned short ModeIndex_1152x864[] = {0x29, 0x2a, 0x00, 0x2b};
106static const USHORT ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b}; 116static const unsigned short ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b};
107static const USHORT ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25}; 117static const unsigned short ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25};
108static const USHORT ModeIndex_1280x720[] = {0x79, 0x75, 0x00, 0x78}; 118static const unsigned short ModeIndex_1280x720[] = {0x79, 0x75, 0x00, 0x78};
109static const USHORT ModeIndex_1280x800[] = {0x14, 0x15, 0x00, 0x16}; 119static const unsigned short ModeIndex_1280x800[] = {0x14, 0x15, 0x00, 0x16};
110static const USHORT ModeIndex_1360x768[] = {0x48, 0x4b, 0x00, 0x4e}; 120static const unsigned short ModeIndex_1280x854[] = {0x1a, 0x1b, 0x00, 0x1c};
111static const USHORT ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72}; /* 300 series, BARCO only */ 121static const unsigned short ModeIndex_1360x768[] = {0x48, 0x4b, 0x00, 0x4e};
112static const USHORT ModeIndex_1400x1050[] = {0x26, 0x27, 0x00, 0x28}; /* 315 series only */ 122static const unsigned short ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72}; /* 300 series, BARCO only */
113static const USHORT ModeIndex_1680x1050[] = {0x17, 0x18, 0x00, 0x19}; /* 315 series only */ 123static const unsigned short ModeIndex_1400x1050[] = {0x26, 0x27, 0x00, 0x28}; /* 315 series only */
114static const USHORT ModeIndex_1600x1200[] = {0x3c, 0x3d, 0x00, 0x66}; 124static const unsigned short ModeIndex_1680x1050[] = {0x17, 0x18, 0x00, 0x19}; /* 315 series only */
115static const USHORT ModeIndex_1920x1080[] = {0x2c, 0x2d, 0x00, 0x73}; /* 315 series only */ 125static const unsigned short ModeIndex_1600x1200[] = {0x3c, 0x3d, 0x00, 0x66};
116static const USHORT ModeIndex_1920x1440[] = {0x68, 0x69, 0x00, 0x6b}; 126static const unsigned short ModeIndex_1920x1080[] = {0x2c, 0x2d, 0x00, 0x73}; /* 315 series only */
117static const USHORT ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00}; 127static const unsigned short ModeIndex_1920x1440[] = {0x68, 0x69, 0x00, 0x6b};
118static const USHORT ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e}; 128static const unsigned short ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00};
119 129static const unsigned short ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
120static const USHORT SiS_DRAMType[17][5]={ 130
131static const unsigned short SiS_DRAMType[17][5]={
121 {0x0C,0x0A,0x02,0x40,0x39}, 132 {0x0C,0x0A,0x02,0x40,0x39},
122 {0x0D,0x0A,0x01,0x40,0x48}, 133 {0x0D,0x0A,0x01,0x40,0x48},
123 {0x0C,0x09,0x02,0x20,0x35}, 134 {0x0C,0x09,0x02,0x20,0x35},
@@ -137,7 +148,7 @@ static const USHORT SiS_DRAMType[17][5]={
137 {0x09,0x08,0x01,0x01,0x00} 148 {0x09,0x08,0x01,0x01,0x00}
138}; 149};
139 150
140static const USHORT SiS_SDRDRAM_TYPE[13][5] = 151static const unsigned short SiS_SDRDRAM_TYPE[13][5] =
141{ 152{
142 { 2,12, 9,64,0x35}, 153 { 2,12, 9,64,0x35},
143 { 1,13, 9,64,0x44}, 154 { 1,13, 9,64,0x44},
@@ -154,7 +165,7 @@ static const USHORT SiS_SDRDRAM_TYPE[13][5] =
154 { 1, 9, 8, 2,0x00} 165 { 1, 9, 8, 2,0x00}
155}; 166};
156 167
157static const USHORT SiS_DDRDRAM_TYPE[4][5] = 168static const unsigned short SiS_DDRDRAM_TYPE[4][5] =
158{ 169{
159 { 2,12, 9,64,0x35}, 170 { 2,12, 9,64,0x35},
160 { 2,12, 8,32,0x31}, 171 { 2,12, 8,32,0x31},
@@ -162,7 +173,7 @@ static const USHORT SiS_DDRDRAM_TYPE[4][5] =
162 { 2, 9, 8, 4,0x01} 173 { 2, 9, 8, 4,0x01}
163}; 174};
164 175
165static const USHORT SiS_MDA_DAC[] = 176static const unsigned char SiS_MDA_DAC[] =
166{ 177{
167 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 178 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
168 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, 179 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
@@ -174,7 +185,7 @@ static const USHORT SiS_MDA_DAC[] =
174 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F 185 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
175}; 186};
176 187
177static const USHORT SiS_CGA_DAC[] = 188static const unsigned char SiS_CGA_DAC[] =
178{ 189{
179 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 190 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
180 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 191 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
@@ -186,7 +197,7 @@ static const USHORT SiS_CGA_DAC[] =
186 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F 197 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
187}; 198};
188 199
189static const USHORT SiS_EGA_DAC[] = 200static const unsigned char SiS_EGA_DAC[] =
190{ 201{
191 0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15, 202 0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
192 0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35, 203 0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
@@ -198,7 +209,7 @@ static const USHORT SiS_EGA_DAC[] =
198 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F 209 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
199}; 210};
200 211
201static const USHORT SiS_VGA_DAC[] = 212static const unsigned char SiS_VGA_DAC[] =
202{ 213{
203 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 214 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
204 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F, 215 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
@@ -212,7 +223,31 @@ static const USHORT SiS_VGA_DAC[] =
212 0x0B,0x0C,0x0D,0x0F,0x10 223 0x0B,0x0C,0x0D,0x0F,0x10
213}; 224};
214 225
215static const SiS_StResInfoStruct SiS_StResInfo[]= 226static const struct SiS_St SiS_SModeIDTable[] =
227{
228 {0x01,0x9208,0x01,0x00,0x00,0x00,0x01,0x00,0x40},
229 {0x01,0x1210,0x14,0x01,0x01,0x00,0x01,0x00,0x40},
230 {0x01,0x1010,0x17,0x02,0x02,0x00,0x01,0x01,0x40},
231 {0x03,0x8208,0x03,0x00,0x00,0x00,0x01,0x02,0x40},
232 {0x03,0x0210,0x16,0x01,0x01,0x00,0x01,0x02,0x40},
233 {0x03,0x0010,0x18,0x02,0x02,0x00,0x01,0x03,0x40},
234 {0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x04,0x40},
235 {0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x05,0x40},
236 {0x07,0x0000,0x07,0x03,0x03,0x00,0x01,0x03,0x40},
237 {0x07,0x0000,0x19,0x02,0x02,0x00,0x01,0x03,0x40},
238 {0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x04,0x40},
239 {0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x05,0x40},
240 {0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x05,0x40},
241 {0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x05,0x40},
242 {0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x05,0x40},
243 {0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x05,0x40},
244 {0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x04,0x40},
245 {0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x05,0x40},
246 {0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x05,0x40},
247 {0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
248};
249
250static const struct SiS_StResInfo_S SiS_StResInfo[]=
216{ 251{
217 { 640,400}, 252 { 640,400},
218 { 640,350}, 253 { 640,350},
@@ -221,7 +256,7 @@ static const SiS_StResInfoStruct SiS_StResInfo[]=
221 { 640,480} 256 { 640,480}
222}; 257};
223 258
224static const SiS_ModeResInfoStruct SiS_ModeResInfo[] = 259static const struct SiS_ModeResInfo_S SiS_ModeResInfo[] =
225{ 260{
226 { 320, 200, 8, 8}, /* 0x00 */ 261 { 320, 200, 8, 8}, /* 0x00 */
227 { 320, 240, 8, 8}, /* 0x01 */ 262 { 320, 240, 8, 8}, /* 0x01 */
@@ -256,11 +291,12 @@ static const SiS_ModeResInfoStruct SiS_ModeResInfo[] =
256 { 1280, 800, 8,16}, /* 0x1e */ 291 { 1280, 800, 8,16}, /* 0x1e */
257 { 1920,1080, 8,16}, /* 0x1f */ 292 { 1920,1080, 8,16}, /* 0x1f */
258 { 960, 540, 8,16}, /* 0x20 */ 293 { 960, 540, 8,16}, /* 0x20 */
259 { 960, 600, 8,16} /* 0x21 */ 294 { 960, 600, 8,16}, /* 0x21 */
295 { 1280, 854, 8,16} /* 0x22 */
260}; 296};
261 297
262#if defined(SIS300) || defined(SIS315H) 298#if defined(SIS300) || defined(SIS315H)
263static const SiS_StandTableStruct SiS_StandTable[]= 299static const struct SiS_StandTable_S SiS_StandTable[]=
264{ 300{
265/* 0x00: MD_0_200 */ 301/* 0x00: MD_0_200 */
266 { 302 {
@@ -704,11 +740,11 @@ static const SiS_StandTableStruct SiS_StandTable[]=
704/* SIS VIDEO BRIDGE ----------------------------------------- */ 740/* SIS VIDEO BRIDGE ----------------------------------------- */
705/**************************************************************/ 741/**************************************************************/
706 742
707static const UCHAR SiS_SoftSetting = 0x30; /* RAM setting */ 743static const unsigned char SiS_SoftSetting = 0x30; /* RAM setting */
708 744
709static const UCHAR SiS_OutputSelect = 0x40; 745static const unsigned char SiS_OutputSelect = 0x40;
710 746
711static const UCHAR SiS_NTSCTiming[] = { 747static const unsigned char SiS_NTSCTiming[] = {
712 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, 748 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
713 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, 749 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
714 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b, 750 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
@@ -719,7 +755,7 @@ static const UCHAR SiS_NTSCTiming[] = {
719 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00 755 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
720}; 756};
721 757
722static const UCHAR SiS_PALTiming[] = { 758static const unsigned char SiS_PALTiming[] = {
723 0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70, 759 0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70,
724 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d, 760 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d,
725 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b, 761 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b,
@@ -730,8 +766,8 @@ static const UCHAR SiS_PALTiming[] = {
730 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00 766 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00
731}; 767};
732 768
733static const UCHAR SiS_HiTVExtTiming[] = { 769static const unsigned char SiS_HiTVExtTiming[] = {
734 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64, 770 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
735 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 771 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
736 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 772 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
737 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13, 773 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
@@ -741,8 +777,8 @@ static const UCHAR SiS_HiTVExtTiming[] = {
741 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00 777 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
742}; 778};
743 779
744static const UCHAR SiS_HiTVSt1Timing[] = { 780static const unsigned char SiS_HiTVSt1Timing[] = {
745 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65, 781 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
746 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 782 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
747 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 783 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
748 0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03, 784 0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03,
@@ -752,8 +788,8 @@ static const UCHAR SiS_HiTVSt1Timing[] = {
752 0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00 788 0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00
753}; 789};
754 790
755static const UCHAR SiS_HiTVSt2Timing[] = { 791static const unsigned char SiS_HiTVSt2Timing[] = {
756 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64, 792 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
757 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 793 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
758 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 794 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
759 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13, 795 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
@@ -764,8 +800,8 @@ static const UCHAR SiS_HiTVSt2Timing[] = {
764}; 800};
765 801
766#if 0 802#if 0
767static const UCHAR SiS_HiTVTextTiming[] = { 803static const unsigned char SiS_HiTVTextTiming[] = {
768 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65, 804 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
769 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 805 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
770 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 806 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
771 0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03, 807 0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03,
@@ -776,8 +812,8 @@ static const UCHAR SiS_HiTVTextTiming[] = {
776}; 812};
777#endif 813#endif
778 814
779static const UCHAR SiS_HiTVGroup3Data[] = { 815static const unsigned char SiS_HiTVGroup3Data[] = {
780 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f, 816 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f,
781 0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6, 817 0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6,
782 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20, 818 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
783 0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44, 819 0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44,
@@ -787,8 +823,8 @@ static const UCHAR SiS_HiTVGroup3Data[] = {
787 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01 823 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
788}; 824};
789 825
790static const UCHAR SiS_HiTVGroup3Simu[] = { 826static const unsigned char SiS_HiTVGroup3Simu[] = {
791 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95, 827 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95,
792 0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6, 828 0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6,
793 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20, 829 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
794 0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11, 830 0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11,
@@ -799,8 +835,8 @@ static const UCHAR SiS_HiTVGroup3Simu[] = {
799}; 835};
800 836
801#if 0 837#if 0
802static const UCHAR SiS_HiTVGroup3Text[] = { 838static const unsigned char SiS_HiTVGroup3Text[] = {
803 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7, 839 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7,
804 0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6, 840 0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6,
805 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20, 841 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
806 0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22, 842 0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22,
@@ -811,136 +847,141 @@ static const UCHAR SiS_HiTVGroup3Text[] = {
811}; 847};
812#endif 848#endif
813 849
814static const UCHAR SiS_NTSCPhase[] = {0x21,0xed,0xba,0x08}; 850static const struct SiS_TVData SiS_StPALData[] =
815static const UCHAR SiS_PALPhase[] = {0x2a,0x05,0xe3,0x00};
816static const UCHAR SiS_PALMPhase[] = {0x21,0xE4,0x2E,0x9B};
817static const UCHAR SiS_PALNPhase[] = {0x21,0xF4,0x3E,0xBA};
818static const UCHAR SiS_NTSCPhase2[] = {0x21,0xF0,0x7B,0xD6};
819static const UCHAR SiS_PALPhase2[] = {0x2a,0x09,0x86,0xe9};
820static const UCHAR SiS_PALMPhase2[] = {0x21,0xE6,0xEF,0xA4};
821static const UCHAR SiS_PALNPhase2[] = {0x21,0xF6,0x94,0x46};
822static const UCHAR SiS_SpecialPhase[] = {0x1e,0x8c,0x5c,0x7a};
823static const UCHAR SiS_SpecialPhaseM[]= {0x1e,0x83,0x0a,0xe0};
824static const UCHAR SiS_SpecialPhaseJ[]= {0x25,0xd4,0xfd,0x5e};
825
826static const SiS_TVDataStruct SiS_StPALData[] =
827{ 851{
828 { 1, 1, 864, 525,1270, 400, 100, 0, 760,0xf4,0xff,0x1c,0x22}, 852 { 1, 1, 864, 525,1270, 400, 100, 0, 760, 0,0xf4,0xff,0x1c,0x22},
829 { 1, 1, 864, 525,1270, 350, 100, 0, 760,0xf4,0xff,0x1c,0x22}, 853 { 1, 1, 864, 525,1270, 350, 100, 0, 760, 0,0xf4,0xff,0x1c,0x22},
830 { 1, 1, 864, 525,1270, 400, 0, 0, 720,0xf1,0x04,0x1f,0x18}, 854 { 1, 1, 864, 525,1270, 400, 0, 0, 720, 0,0xf1,0x04,0x1f,0x18},
831 { 1, 1, 864, 525,1270, 350, 0, 0, 720,0xf4,0x0b,0x1c,0x0a}, 855 { 1, 1, 864, 525,1270, 350, 0, 0, 720, 0,0xf4,0x0b,0x1c,0x0a},
832 { 1, 1, 864, 525,1270, 480, 50, 0, 760,0xf4,0xff,0x1c,0x22}, 856 { 1, 1, 864, 525,1270, 480, 50, 0, 760, 0,0xf4,0xff,0x1c,0x22},
833 { 1, 1, 864, 525,1270, 600, 50, 0, 0,0xf4,0xff,0x1c,0x22} 857 { 1, 1, 864, 525,1270, 600, 50, 0, 0,0x300,0xf4,0xff,0x1c,0x22}
834}; 858};
835 859
836static const SiS_TVDataStruct SiS_ExtPALData[] = 860static const struct SiS_TVData SiS_ExtPALData[] =
837{ 861{
838 { 27, 10, 848, 448,1270, 530, 50, 0, 50,0xf4,0xff,0x1c,0x22}, /* 640x400, 320x200 */ 862 { 27, 10, 848, 448,1270, 530, 50, 0, 50, 0,0xf4,0xff,0x1c,0x22}, /* 640x400, 320x200 */
839 { 108, 35, 848, 398,1270, 530, 50, 0, 50,0xf4,0xff,0x1c,0x22}, 863 { 108, 35, 848, 398,1270, 530, 50, 0, 50, 0,0xf4,0xff,0x1c,0x22},
840 { 12, 5, 954, 448,1270, 530, 50, 0, 50,0xf1,0x04,0x1f,0x18}, 864 { 12, 5, 954, 448,1270, 530, 50, 0, 50, 0,0xf1,0x04,0x1f,0x18},
841 { 9, 4, 960, 463,1644, 438, 50, 0, 50,0xf4,0x0b,0x1c,0x0a}, 865 { 9, 4, 960, 463,1644, 438, 50, 0, 50, 0,0xf4,0x0b,0x1c,0x0a},
842 { 9, 4, 848, 528,1270, 530, 0, 0, 50,0xf5,0xfb,0x1b,0x2a}, /* 640x480, 320x240 */ 866 { 9, 4, 848, 528,1270, 530, 0, 0, 50, 0,0xf5,0xfb,0x1b,0x2a}, /* 640x480, 320x240 */
843/*{ 36, 25,1060, 648,1316, 530, 438, 0, 438,0xeb,0x05,0x25,0x16},*//* 800x600, 400x300 */ 867 { 36, 25,1060, 648,1270, 530, 438, 0, 438, 0,0xeb,0x05,0x25,0x16}, /* 800x600, 400x300 */
844 { 36, 25,1060, 648,1270, 530, 438, 0, 438,0xeb,0x05,0x25,0x16}, /* 800x600, 400x300 - better */ 868 { 3, 2,1080, 619,1270, 540, 438, 0, 438, 0,0xf3,0x00,0x1d,0x20}, /* 720x576 */
845 { 3, 2,1080, 619,1270, 540, 438, 0, 438,0xf3,0x00,0x1d,0x20}, /* 720x576 */ 869 { 1, 1,1170, 821,1270, 520, 686, 0, 686, 0,0xF3,0x00,0x1D,0x20}, /* 1024x768 */
846 { 1, 1,1170, 821,1270, 520, 686, 0, 686,0xF3,0x00,0x1D,0x20}, /* 1024x768 */ 870 { 1, 1,1170, 821,1270, 520, 686, 0, 686, 0,0xF3,0x00,0x1D,0x20}, /* 1024x768 (for NTSC equ) */
847 { 1, 1,1170, 821,1270, 520, 686, 0, 686,0xF3,0x00,0x1D,0x20}, /* 1024x768 (for NTSC equ) */ 871 { 9, 4, 848, 528,1270, 530, 0, 0, 50, 0,0xf5,0xfb,0x1b,0x2a} /* 720x480 */
848 { 9, 4, 848, 528,1270, 530, 0, 0, 50,0xf5,0xfb,0x1b,0x2a} /* 720x480 test */
849}; 872};
850 873
851static const SiS_TVDataStruct SiS_StNTSCData[] = 874static const struct SiS_TVData SiS_StNTSCData[] =
852{ 875{
853 { 1, 1, 858, 525,1270, 400, 50, 0, 760,0xf1,0x04,0x1f,0x18}, 876 { 1, 1, 858, 525,1270, 400, 50, 0, 760, 0,0xf1,0x04,0x1f,0x18},
854 { 1, 1, 858, 525,1270, 350, 50, 0, 640,0xf1,0x04,0x1f,0x18}, 877 { 1, 1, 858, 525,1270, 350, 50, 0, 640, 0,0xf1,0x04,0x1f,0x18},
855 { 1, 1, 858, 525,1270, 400, 0, 0, 720,0xf1,0x04,0x1f,0x18}, 878 { 1, 1, 858, 525,1270, 400, 0, 0, 720, 0,0xf1,0x04,0x1f,0x18},
856 { 1, 1, 858, 525,1270, 350, 0, 0, 720,0xf4,0x0b,0x1c,0x0a}, 879 { 1, 1, 858, 525,1270, 350, 0, 0, 720, 0,0xf4,0x0b,0x1c,0x0a},
857 { 1, 1, 858, 525,1270, 480, 0, 0, 760,0xf1,0x04,0x1f,0x18} 880 { 1, 1, 858, 525,1270, 480, 0, 0, 760, 0,0xf1,0x04,0x1f,0x18}
858}; 881};
859 882
860static const SiS_TVDataStruct SiS_ExtNTSCData[] = 883static const struct SiS_TVData SiS_ExtNTSCData[] =
861{ 884{
862 { 143, 65, 858, 443,1270, 440, 171, 0, 171,0xf1,0x04,0x1f,0x18}, /* 640x400, 320x200 */ 885 { 143, 65, 858, 443,1270, 440, 171, 0, 171, 0,0xf1,0x04,0x1f,0x18}, /* 640x400, 320x200 */
863 { 88, 35, 858, 393,1270, 440, 171, 0, 171,0xf1,0x04,0x1f,0x18}, 886 { 88, 35, 858, 393,1270, 440, 171, 0, 171, 0,0xf1,0x04,0x1f,0x18},
864 { 143, 70, 924, 443,1270, 440, 92, 0, 92,0xf1,0x04,0x1f,0x18}, 887 { 143, 70, 924, 443,1270, 440, 92, 0, 92, 0,0xf1,0x04,0x1f,0x18},
865 { 143, 70, 924, 393,1270, 440, 92, 0, 92,0xf4,0x0b,0x1c,0x0a}, 888 { 143, 70, 924, 393,1270, 440, 92, 0, 92, 0,0xf4,0x0b,0x1c,0x0a},
866 { 143, 76, 836, 523,1270, 440, 224, 0, 0,0xf1,0x05,0x1f,0x16}, /* 640x480, 320x240 */ 889 { 143, 76, 836, 523,1270, 440, 224, 0, 0, 0,0xf1,0x05,0x1f,0x16}, /* 640x480, 320x240 */
867 { 143, 120,1056, 643,1270, 440, 0, 128, 0,0xf4,0x10,0x1c,0x00}, /* 800x600, 400x300 */ 890 { 143, 120,1056, 643,1270, 440, 0, 1, 0, 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) */ 891 { 143, 76, 836, 523,1270, 440, 0, 1, 0, 0,0xee,0x0c,0x22,0x08}, /* 720x480 - BETTER (from 300 series) */
869 { 143, 76, 836, 523,1270, 440, 0, 128, 0,0xee,0x0c,0x22,0x08}, /* 720x480 - BETTER (from 300 series) */ 892 { 1, 1,1100, 811,1412, 440, 0, 1, 0, 0,0xee,0x0c,0x22,0x08}, /* 1024x768 (525i) CORRECTED */
870/*{ 65, 64,1056, 791,1270, 480, 638, 0, 0,0xEE,0x0C,0x22,0x08} */ /* 1024x768 (525i) */ 893#if 0 /* flimmert und ist unten abgeschnitten (NTSCHT, NTSC clock) */
871 { 1, 1,1100, 811,1412, 440, 0, 128, 0,0xee,0x0c,0x22,0x08}, /* 1024x768 (525i) CORRECTED */ 894 { 65, 64,1056, 791,1270, 480, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
872 { 65, 64,1056, 791,1270, 480, 455, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */ 895#endif
896#if 0
897 { 1, 1,1100, 811,1412, 440, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
898#endif
899#if 0
900 { 1, 1,1120, 821,1516, 420, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
901#endif
902#if 0
903 { 1, 1, 938, 821,1516, 420, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
904#endif
905#if 0 /* zoom hin, unten abgeschnitten (NTSC2HT, NTSC1024 clock) */
906 { 1, 1,1072, 791,1270, 480, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
907#endif
908#if 1 /* zu weit links (squeezed) (NTSC2HT, NTSC1024 clock) */
909 { 1, 1,1100, 846,1270, 440, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
910#endif
911#if 0 /* zu weit links, rechts abgeschnitten (NTSC2HT, NTSC1024 clock) */
912 { 1, 1,1100, 846,1412, 440, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
913#endif
873}; 914};
874 915
875static const SiS_TVDataStruct SiS_StHiTVData[] = /* Slave + TVSimu */ 916static const struct SiS_TVData SiS_StHiTVData[] = /* Slave + TVSimu */
876{ 917{
877 { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0x00,0x00,0x00,0x00}, 918 { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0, 0, 0, 0, 0},
878 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, 919 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
879 { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0x00,0x00,0x00,0x00}, 920 { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0, 0, 0, 0, 0},
880 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, 921 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
881 { 1, 1, 0x37c,0x233,0x2b2,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, 922 { 1, 1, 0x37c,0x233,0x2b2,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
882 { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x150,128, 0, 0x00,0x00,0x00,0x00} 923 { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x150, 1, 0, 0, 0, 0, 0, 0}
883}; 924};
884 925
885static const SiS_TVDataStruct SiS_St2HiTVData[] = /* Slave */ 926static const struct SiS_TVData SiS_St2HiTVData[] = /* Slave */
886{ 927{
887 { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, 928 { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0},
888 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, 929 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
889 { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, 930 { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0},
890 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, 931 { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
891 { 5, 2, 0x348,0x233,0x670,0x3c0,0x08d,128, 0, 0x00,0x00,0x00,0x00}, 932 { 5, 2, 0x348,0x233,0x670,0x3c0,0x08d, 1, 0, 0, 0, 0, 0, 0},
892 { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x17c,128, 0, 0x00,0x00,0x00,0x00} 933 { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x17c, 1, 0, 0, 0, 0, 0, 0}
893}; 934};
894 935
895static const SiS_TVDataStruct SiS_ExtHiTVData[] = 936static const struct SiS_TVData SiS_ExtHiTVData[] =
896{ 937{ /* all ok */
897 { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, 938 { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
898 { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, 939 { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
899 { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, 940 { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
900 { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, 941 { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
901 { 5, 1, 0x348,0x233,0x670,0x3c0,0x166,128, 0, 0x00,0x00,0x00,0x00}, /* 640x480 */ 942 { 5, 1, 0x348,0x233,0x670,0x3c0,0x166, 1, 0, 0, 0, 0, 0, 0}, /* 640x480 */
902 { 16, 5, 0x41a,0x2ab,0x670,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00}, /* 800x600 */ 943 { 16, 5, 0x41a,0x2ab,0x670,0x3c0,0x143, 1, 0, 0, 0, 0, 0, 0}, /* 800x600 */
903 { 25, 12, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x768 */ 944 { 25, 12, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 1024x768 */
904 { 5, 4, 0x627,0x464,0x670,0x3c0,0x128, 0, 0, 0x00,0x00,0x00,0x00}, /* 1280x1024 */ 945 { 5, 4, 0x627,0x464,0x670,0x3c0,0x128, 0, 0, 0, 0, 0, 0, 0}, /* 1280x1024 */
905 { 4, 1, 0x41a,0x233,0x60c,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00}, /* 800x480 */ 946 { 4, 1, 0x41a,0x233,0x60c,0x3c0,0x143, 1, 0, 0, 0, 0, 0, 0}, /* 800x480 */
906 { 5, 2, 0x578,0x293,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x576 */ 947 { 5, 2, 0x578,0x293,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 1024x576 */
907 { 8, 5, 0x6d6,0x323,0x670,0x3c0,0x128, 0, 0, 0x00,0x00,0x00,0x00}, /* 1280x720 */ 948 { 8, 5, 0x6d6,0x323,0x670,0x3c0,0x128, 0, 0, 0, 0, 0, 0, 0}, /* 1280x720 */
908 { 137, 32, 0x3d4,0x233,0x663,0x3bf,0x143, 0, 0, 0x00,0x00,0x00,0x00} /* 960x600 */ 949 { 8, 3, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 960x600 */
909}; 950};
910 951
911static const SiS_TVDataStruct SiS_St525pData[] = 952static const struct SiS_TVData SiS_St525pData[] =
912{ 953{
913 { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00}, 954 { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
914 { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00}, 955 { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
915 { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00}, 956 { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
916 { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00}, 957 { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
917 { 1, 1, 0x6b4,0x20d,0x4f6,0x1e0, 0, 0, 0x2f8, 0x00,0x00,0x00,0x00} 958 { 1, 1, 0x6b4,0x20d,0x4f6,0x1e0, 0, 0, 0x2f8, 0, 0, 0, 0, 0}
918}; 959};
919 960
920static const SiS_TVDataStruct SiS_St750pData[] = 961static const struct SiS_TVData SiS_St750pData[] =
921{ 962{
922 { 1, 1, 0x672,0x2ee,0x500,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00}, 963 { 1, 1, 0x672,0x2ee,0x500,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
923 { 1, 1, 0x672,0x2ee,0x500,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00}, 964 { 1, 1, 0x672,0x2ee,0x500,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
924 { 1, 1, 0x672,0x2ee,0x500,0x190, 0, 0, 0x2d0, 0x00,0x00,0x00,0x00}, 965 { 1, 1, 0x672,0x2ee,0x500,0x190, 0, 0, 0x2d0, 0, 0, 0, 0, 0},
925 { 1, 1, 0x672,0x2ee,0x500,0x15e, 0, 0, 0x2d0, 0x00,0x00,0x00,0x00}, 966 { 1, 1, 0x672,0x2ee,0x500,0x15e, 0, 0, 0x2d0, 0, 0, 0, 0, 0},
926 { 1, 1, 0x672,0x2ee,0x500,0x1e0, 0, 0, 0x2f8, 0x00,0x00,0x00,0x00} 967 { 1, 1, 0x672,0x2ee,0x500,0x1e0, 0, 0, 0x2f8, 0, 0, 0, 0, 0}
927}; 968};
928 969
929static const SiS_TVDataStruct SiS_Ext750pData[] = 970static const struct SiS_TVData SiS_Ext750pData[] =
930{ 971{ /* all ok */
931 { 143, 65, 0x35a,0x1bb,0x4f6,0x1b8,0x0ab, 0, 0x0ab, 0x00,0x00,0x00,0x00}, 972 { 3, 1, 935, 470, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0}, /* 320x200/640x400 */
932 { 88, 35, 0x35a,0x189,0x4f6,0x1b8,0x0ab, 0, 0x0ab, 0x00,0x00,0x00,0x00}, 973 { 24, 7, 935, 420, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
933 { 18, 5, 0x339,0x1ae,0x500,0x2d0,0x05c, 0, 0x05c, 0x00,0x00,0x00,0x00}, 974 { 3, 1, 935, 470, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
934 { 143, 70, 0x39c,0x189,0x4f6,0x1b8,0x05c, 0, 0x05c, 0x00,0x00,0x00,0x00}, 975 { 24, 7, 935, 420, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
935 { 99, 32, 0x320,0x1fe,0x500,0x2d0, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 640x480 */ 976 { 2, 1, 1100, 590, 1130, 640, 50, 0, 0, 0, 0, 0, 0, 0}, /* 640x480 */
936 { 5, 4, 0x5d8,0x29e,0x500,0x2a8, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 800x600 */ 977 { 3, 2, 1210, 690, 1130, 660, 50, 0, 0, 0, 0, 0, 0, 0}, /* 800x600 OK */
937 { 99, 32, 0x320,0x1fe,0x500,0x2d0, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 720x480 test WORKS */ 978 { 2, 1, 1100, 562, 1130, 640, 0, 1, 0, 0, 0, 0, 0, 0}, /* 720x480 OK */
938 { 68, 64, 0x55f,0x346,0x500,0x2a8,0x27e, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x768 */ 979 { 1, 1, 1375, 878, 1130, 640, 638, 0, 0, 0, 0, 0, 0, 0}, /* 1024x768 OK */
939 { 5, 2, 0x3a7,0x226,0x500,0x2a8, 0,128, 0, 0x00,0x00,0x00,0x00}, /* 720x576 */ 980 { 5, 3, 1100, 675, 1130, 640, 0, 1, 0, 0, 0, 0, 0, 0}, /* 720/768x576 OK */
940 { 25, 24, 0x5d8,0x2f3,0x460,0x2a8, 50, 0, 0, 0x00,0x00,0x00,0x00} /* 1280x720 WORKS */ 981 { 25, 24, 1496, 755, 1120, 680, 50, 0, 0, 0, 0, 0, 0, 0} /* 1280x720 OK */
941}; 982};
942 983
943static const SiS_LCDDataStruct SiS_LCD1280x720Data[] = /* 2.03.00 */ 984static const struct SiS_LCDData SiS_LCD1280x720Data[] = /* 2.03.00 */
944{ 985{
945 { 44, 15, 864, 430, 1408, 806 }, /* 640x400 */ 986 { 44, 15, 864, 430, 1408, 806 }, /* 640x400 */
946 { 128, 35, 792, 385, 1408, 806 }, 987 { 128, 35, 792, 385, 1408, 806 },
@@ -962,7 +1003,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x720Data[] = /* 2.03.00 */
962 * (Note: 1280x768_3 is now special for SiS301/NetVista 1003 * (Note: 1280x768_3 is now special for SiS301/NetVista
963 */ 1004 */
964 1005
965static const SiS_LCDDataStruct SiS_StLCD1280x768_2Data[] = /* 2.03.00 */ 1006static const struct SiS_LCDData SiS_StLCD1280x768_2Data[] = /* 2.03.00 */
966{ 1007{
967 { 64, 21, 858, 434, 1408, 806 }, /* 640x400 */ 1008 { 64, 21, 858, 434, 1408, 806 }, /* 640x400 */
968 { 32, 9, 858, 372, 1408, 806 }, 1009 { 32, 9, 858, 372, 1408, 806 },
@@ -977,7 +1018,7 @@ static const SiS_LCDDataStruct SiS_StLCD1280x768_2Data[] = /* 2.03.00 */
977 { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 - from Ext */ 1018 { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 - from Ext */
978}; 1019};
979 1020
980static const SiS_LCDDataStruct SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */ 1021static const struct SiS_LCDData SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */
981{ 1022{
982 { 16, 5, 960, 410, 1600, 806 }, /* 640x400 */ 1023 { 16, 5, 960, 410, 1600, 806 }, /* 640x400 */
983 { 64, 21, 1152, 364, 1600, 806 }, 1024 { 64, 21, 1152, 364, 1600, 806 },
@@ -993,7 +1034,7 @@ static const SiS_LCDDataStruct SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */
993}; 1034};
994 1035
995#if 0 /* Not used; _3 now reserved for NetVista (SiS301) */ 1036#if 0 /* Not used; _3 now reserved for NetVista (SiS301) */
996static const SiS_LCDDataStruct SiS_LCD1280x768_3Data[] = 1037static const struct SiS_LCDData SiS_LCD1280x768_3Data[] =
997{ 1038{
998 { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */ 1039 { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */
999 { 128, 39, 884, 396, 1408, 806 }, /* ,640 */ 1040 { 128, 39, 884, 396, 1408, 806 }, /* ,640 */
@@ -1009,7 +1050,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x768_3Data[] =
1009}; 1050};
1010#endif 1051#endif
1011 1052
1012static const SiS_LCDDataStruct SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */ 1053static const struct SiS_LCDData SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */
1013{ 1054{
1014 { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */ 1055 { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
1015 { 128, 49, 1232, 361, 1408, 816 }, 1056 { 128, 49, 1232, 361, 1408, 816 },
@@ -1024,7 +1065,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */
1024 { 0, 0, 0, 0, 0, 0 } /* 1280x720 */ 1065 { 0, 0, 0, 0, 0, 0 } /* 1280x720 */
1025}; 1066};
1026 1067
1027static const SiS_LCDDataStruct SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */ 1068static const struct SiS_LCDData SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */
1028{ 1069{
1029 { 97, 42, 1344, 409, 1552, 812 }, /* 640x400 */ 1070 { 97, 42, 1344, 409, 1552, 812 }, /* 640x400 */
1030 { 97, 35, 1280, 358, 1552, 812 }, 1071 { 97, 35, 1280, 358, 1552, 812 },
@@ -1039,7 +1080,42 @@ static const SiS_LCDDataStruct SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */
1039 { 97, 90, 1600, 730, 1552, 812 } /* 1280x720 */ 1080 { 97, 90, 1600, 730, 1552, 812 } /* 1280x720 */
1040}; 1081};
1041 1082
1042static const SiS_LCDDataStruct SiS_LCD1280x960Data[] = 1083#if 0
1084static const struct SiS_LCDData SiS_LCD1280x800_3Data[] = /* 2.02.05a (LVDS); m250 */
1085{
1086 { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
1087 { 128, 49, 1232, 361, 1408, 816 },
1088 { 128, 51, 1122, 412, 1408, 816 },
1089 { 128, 49, 1232, 361, 1408, 816 },
1090 { 8, 3, 880, 491, 1408, 816 }, /* 640x480 */
1091 { 11, 6, 1024, 612, 1408, 816 }, /* 800x600 */
1092 { 22, 21, 1400, 784, 1408, 816 }, /* 1024x768 */
1093 { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
1094 { 1, 1, 1408, 816, 1408, 816 }, /* 1280x800 */
1095 { 0, 0, 0, 0, 0, 0 }, /* 1280x768 - patch index */
1096 { 0, 0, 0, 0, 0, 0 } /* 1280x720 */
1097};
1098#endif
1099
1100static const struct SiS_LCDData SiS_LCD1280x854Data[] = /* 2.21.00CS (LVDS) */
1101{
1102 { 56, 15, 936, 410, 1664, 861 }, /* 640x400 */
1103 { 64, 25, 1586, 355, 1664, 861 },
1104 { 56, 15, 936, 410, 1664, 861 },
1105 { 64, 25, 1586, 355, 1664, 861 },
1106 { 91, 45, 1464, 485, 1664, 861 }, /* 640x480 */
1107 { 182, 75, 976, 605, 1664, 861 }, /* 800x600 */
1108 { 91, 66, 1342, 774, 1664, 861 }, /* 1024x768 */
1109 { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
1110 { 26, 25, 1708, 807, 1664, 861 }, /* 1280x800 */
1111 { 13, 12, 1708, 774, 1664, 861 }, /* 1280x768 - patch index */
1112 { 52, 45, 1708, 725, 1664, 861 }, /* 1280x720 */
1113 { 0, 0, 0, 0, 0, 0 },
1114 { 0, 0, 0, 0, 0, 0 },
1115 { 1, 1, 1664, 861, 1664, 861 } /* 1280x854 */
1116};
1117
1118static const struct SiS_LCDData SiS_LCD1280x960Data[] =
1043{ 1119{
1044 { 9, 2, 800, 500, 1800, 1000 }, 1120 { 9, 2, 800, 500, 1800, 1000 },
1045 { 9, 2, 800, 500, 1800, 1000 }, 1121 { 9, 2, 800, 500, 1800, 1000 },
@@ -1049,10 +1125,15 @@ static const SiS_LCDDataStruct SiS_LCD1280x960Data[] =
1049 { 30, 11, 1056, 625, 1800, 1000 }, 1125 { 30, 11, 1056, 625, 1800, 1000 },
1050 { 5, 3, 1350, 800, 1800, 1000 }, 1126 { 5, 3, 1350, 800, 1800, 1000 },
1051 { 1, 1, 1576, 1050, 1576, 1050 }, 1127 { 1, 1, 1576, 1050, 1576, 1050 },
1052 { 1, 1, 1800, 1000, 1800, 1000 } 1128 { 1, 1, 1800, 1000, 1800, 1000 },
1129 { 0, 0, 0, 0, 0, 0 },
1130 { 0, 0, 0, 0, 0, 0 },
1131 { 0, 0, 0, 0, 0, 0 },
1132 { 0, 0, 0, 0, 0, 0 },
1133 { 0, 0, 0, 0, 0, 0 }
1053}; 1134};
1054 1135
1055static const SiS_LCDDataStruct SiS_StLCD1400x1050Data[] = 1136static const struct SiS_LCDData SiS_StLCD1400x1050Data[] =
1056{ 1137{
1057 { 211, 100, 2100, 408, 1688, 1066 }, 1138 { 211, 100, 2100, 408, 1688, 1066 },
1058 { 211, 64, 1536, 358, 1688, 1066 }, 1139 { 211, 64, 1536, 358, 1688, 1066 },
@@ -1062,10 +1143,15 @@ static const SiS_LCDDataStruct SiS_StLCD1400x1050Data[] =
1062 { 211, 72, 1008, 609, 1688, 1066 }, 1143 { 211, 72, 1008, 609, 1688, 1066 },
1063 { 211, 128, 1400, 776, 1688, 1066 }, 1144 { 211, 128, 1400, 776, 1688, 1066 },
1064 { 211, 205, 1680, 1041, 1688, 1066 }, 1145 { 211, 205, 1680, 1041, 1688, 1066 },
1065 { 1, 1, 1688, 1066, 1688, 1066 } 1146 { 1, 1, 1688, 1066, 1688, 1066 },
1147 { 0, 0, 0, 0, 0, 0 },
1148 { 0, 0, 0, 0, 0, 0 },
1149 { 0, 0, 0, 0, 0, 0 },
1150 { 0, 0, 0, 0, 0, 0 },
1151 { 0, 0, 0, 0, 0, 0 }
1066}; 1152};
1067 1153
1068static const SiS_LCDDataStruct SiS_ExtLCD1400x1050Data[] = 1154static const struct SiS_LCDData SiS_ExtLCD1400x1050Data[] =
1069{ 1155{
1070/* { 211, 60, 1260, 410, 1688, 1066 }, 640x400 (6330) */ 1156/* { 211, 60, 1260, 410, 1688, 1066 }, 640x400 (6330) */
1071 { 211, 100, 2100, 408, 1688, 1066 }, /* 640x400 (6325) WORKS */ 1157 { 211, 100, 2100, 408, 1688, 1066 }, /* 640x400 (6325) WORKS */
@@ -1080,10 +1166,13 @@ static const SiS_LCDDataStruct SiS_ExtLCD1400x1050Data[] =
1080 { 211, 205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */ 1166 { 211, 205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */
1081 { 1, 1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */ 1167 { 1, 1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */
1082 { 0, 0, 0, 0, 0, 0 }, /* kludge */ 1168 { 0, 0, 0, 0, 0, 0 }, /* kludge */
1083 { 211, 120, 1400, 730, 1688, 1066 } /* 1280x720 */ 1169 { 211, 120, 1400, 730, 1688, 1066 }, /* 1280x720 */
1170 { 0, 0, 0, 0, 0, 0 },
1171 { 0, 0, 0, 0, 0, 0 },
1172 { 0, 0, 0, 0, 0, 0 }
1084}; 1173};
1085 1174
1086static const SiS_LCDDataStruct SiS_LCD1680x1050Data[] = 1175static const struct SiS_LCDData SiS_LCD1680x1050Data[] =
1087{ 1176{
1088 { 95, 24, 1260, 410, 1900, 1066 }, /* 0 640x400 */ 1177 { 95, 24, 1260, 410, 1900, 1066 }, /* 0 640x400 */
1089 { 10, 3, 1710, 362, 1900, 1066 }, 1178 { 10, 3, 1710, 362, 1900, 1066 },
@@ -1097,10 +1186,11 @@ static const SiS_LCDDataStruct SiS_LCD1680x1050Data[] =
1097 { 95, 69, 1800, 817, 1900, 1066 }, /* 9 1280x800 patch index */ 1186 { 95, 69, 1800, 817, 1900, 1066 }, /* 9 1280x800 patch index */
1098 { 13, 9, 1900, 739, 1900, 1066 }, /* 10 1280x720 */ 1187 { 13, 9, 1900, 739, 1900, 1066 }, /* 10 1280x720 */
1099 { 95, 94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */ 1188 { 95, 94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */
1100 { 1, 1, 1900, 1066, 1900, 1066 } /* 12 1680x1050 */ 1189 { 1, 1, 1900, 1066, 1900, 1066 }, /* 12 1680x1050 */
1190 { 0, 0, 0, 0, 0, 0 }
1101}; 1191};
1102 1192
1103static const SiS_LCDDataStruct SiS_StLCD1600x1200Data[] = 1193static const struct SiS_LCDData SiS_StLCD1600x1200Data[] =
1104{ 1194{
1105 {27, 4, 800, 500, 2160, 1250 }, 1195 {27, 4, 800, 500, 2160, 1250 },
1106 {27, 4, 800, 500, 2160, 1250 }, 1196 {27, 4, 800, 500, 2160, 1250 },
@@ -1111,10 +1201,14 @@ static const SiS_LCDDataStruct SiS_StLCD1600x1200Data[] =
1111 { 5, 2,1350, 800, 2160, 1250 }, 1201 { 5, 2,1350, 800, 2160, 1250 },
1112 {135,88,1600,1100, 2160, 1250 }, 1202 {135,88,1600,1100, 2160, 1250 },
1113 {72, 49,1680,1092, 2160, 1250 }, 1203 {72, 49,1680,1092, 2160, 1250 },
1114 { 1, 1,2160,1250, 2160, 1250 } 1204 { 1, 1,2160,1250, 2160, 1250 },
1205 { 0, 0, 0, 0, 0, 0 },
1206 { 0, 0, 0, 0, 0, 0 },
1207 { 0, 0, 0, 0, 0, 0 },
1208 { 0, 0, 0, 0, 0, 0 }
1115}; 1209};
1116 1210
1117static const SiS_LCDDataStruct SiS_ExtLCD1600x1200Data[] = 1211static const struct SiS_LCDData SiS_ExtLCD1600x1200Data[] =
1118{ 1212{
1119 {72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */ 1213 {72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */
1120/* {27, 4, 800, 500, 2160, 1250 }, 640x400 (6235) */ 1214/* {27, 4, 800, 500, 2160, 1250 }, 640x400 (6235) */
@@ -1127,10 +1221,14 @@ static const SiS_LCDDataStruct SiS_ExtLCD1600x1200Data[] =
1127 { 5, 2,1350, 800, 2160, 1250 }, 1221 { 5, 2,1350, 800, 2160, 1250 },
1128 {27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */ 1222 {27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */
1129 {72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */ 1223 {72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */
1130 { 1, 1,2160,1250, 2160, 1250 } 1224 { 1, 1,2160,1250, 2160, 1250 },
1225 { 0, 0, 0, 0, 0, 0 },
1226 { 0, 0, 0, 0, 0, 0 },
1227 { 0, 0, 0, 0, 0, 0 },
1228 { 0, 0, 0, 0, 0, 0 }
1131}; 1229};
1132 1230
1133static const SiS_LCDDataStruct SiS_NoScaleData[] = 1231static const struct SiS_LCDData SiS_NoScaleData[] =
1134{ 1232{
1135 { 1, 1, 800, 449, 800, 449 }, /* 0x00: 320x200, 640x400 */ 1233 { 1, 1, 800, 449, 800, 449 }, /* 0x00: 320x200, 640x400 */
1136 { 1, 1, 800, 449, 800, 449 }, 1234 { 1, 1, 800, 449, 800, 449 },
@@ -1162,14 +1260,18 @@ static const SiS_LCDDataStruct SiS_NoScaleData[] =
1162 { 1, 1,1808, 808,1808, 808 }, /* 0x1b: 1360x768 */ 1260 { 1, 1,1808, 808,1808, 808 }, /* 0x1b: 1360x768 */
1163 { 1, 1,1104, 563,1104, 563 }, /* 0x1c: 960x540 */ 1261 { 1, 1,1104, 563,1104, 563 }, /* 0x1c: 960x540 */
1164 { 1, 1,1120, 618,1120, 618 }, /* 0x1d: 960x600 */ 1262 { 1, 1,1120, 618,1120, 618 }, /* 0x1d: 960x600 */
1165 { 1, 1,1408, 816,1408, 816 } /* 0x1f: 1280x800 (TMDS special) */ 1263 { 1, 1,1408, 816,1408, 816 }, /* 0x1f: 1280x800 (TMDS special) */
1264 { 1, 1,1760,1235,1760,1235 }, /* 0x20: 1600x1200 for LCDA */
1265 { 1, 1,2048,1320,2048,1320 }, /* 0x21: 1600x1200 for non-SiS LVDS */
1266 { 1, 1,1664, 861,1664, 861 } /* 0x22: 1280x854 */
1166}; 1267};
1167 1268
1168/**************************************************************/ 1269/**************************************************************/
1169/* LVDS ----------------------------------------------------- */ 1270/* LVDS ----------------------------------------------------- */
1170/**************************************************************/ 1271/**************************************************************/
1171 1272
1172static const SiS_LVDSDataStruct SiS_LVDS320x480Data_1[]= 1273/* FSTN/DSTN 320x240, 2 variants */
1274static const struct SiS_LVDSData SiS_LVDS320x240Data_1[]=
1173{ 1275{
1174 { 848, 433, 400, 525}, 1276 { 848, 433, 400, 525},
1175 { 848, 389, 400, 525}, 1277 { 848, 389, 400, 525},
@@ -1177,157 +1279,40 @@ static const SiS_LVDSDataStruct SiS_LVDS320x480Data_1[]=
1177 { 848, 389, 400, 525}, 1279 { 848, 389, 400, 525},
1178 { 848, 518, 400, 525}, 1280 { 848, 518, 400, 525},
1179 {1056, 628, 400, 525}, 1281 {1056, 628, 400, 525},
1180 { 400, 525, 400, 525}, 1282 { 400, 525, 400, 525} /* xSTN */
1181 { 800, 449,1000, 644},
1182 { 800, 525,1000, 635}
1183}; 1283};
1184 1284
1185static const SiS_LVDSDataStruct SiS_LVDS640x480Data_1[]= 1285static const struct SiS_LVDSData SiS_LVDS320x240Data_2[]=
1186{ 1286{
1187 { 800, 445, 800, 525}, /* 800, 449, 800, 449 */ 1287 { 800, 445, 800, 525},
1188 { 800, 395, 800, 525}, 1288 { 800, 395, 800, 525},
1189 { 800, 445, 800, 525}, 1289 { 800, 445, 800, 525},
1190 { 800, 395, 800, 525}, 1290 { 800, 395, 800, 525},
1191 { 800, 525, 800, 525}, 1291 { 800, 525, 800, 525},
1192 { 800, 525, 800, 525}, /* pseudo */ 1292 {1056, 628,1056, 628},
1193 { 800, 525, 800, 525} /* pseudo */ 1293 { 480, 525, 480, 525} /* xSTN */
1194}; 1294};
1195 1295
1196/* FSTN 320x240 */ 1296static const struct SiS_LVDSData SiS_LVDS640x480Data_1[]=
1197static const SiS_LVDSDataStruct SiS_LVDS640x480Data_2[]=
1198{ 1297{
1199 { 800, 445, 800, 525}, 1298 { 800, 445, 800, 525}, /* 800, 449, 800, 449 */
1200 { 800, 395, 800, 525}, 1299 { 800, 395, 800, 525},
1201 { 800, 445, 800, 525}, 1300 { 800, 445, 800, 525},
1202 { 800, 395, 800, 525}, 1301 { 800, 395, 800, 525},
1203 { 800, 525, 800, 525}, 1302 { 800, 525, 800, 525}
1204 { 800, 525, 800, 525}, /* pseudo */
1205 { 800, 525, 800, 525} /* pseudo */
1206}; 1303};
1207 1304
1208static const SiS_LVDSDataStruct SiS_LVDS800x600Data_1[]= 1305static const struct SiS_LVDSData SiS_LVDS800x600Data_1[]=
1209{ 1306{
1210 { 848, 433,1060, 629}, 1307 { 848, 433,1060, 629},
1211 { 848, 389,1060, 629}, 1308 { 848, 389,1060, 629},
1212 { 848, 433,1060, 629}, 1309 { 848, 433,1060, 629},
1213 { 848, 389,1060, 629}, 1310 { 848, 389,1060, 629},
1214 { 848, 518,1060, 629}, 1311 { 848, 518,1060, 629},
1215 {1056, 628,1056, 628},
1216 {1056, 628,1056, 628} 1312 {1056, 628,1056, 628}
1217}; 1313};
1218 1314
1219static const SiS_LVDSDataStruct SiS_LVDS800x600Data_2[]= 1315static const struct SiS_LVDSData SiS_LVDS1024x600Data_1[] =
1220{
1221 {1056, 628,1056, 628}
1222};
1223
1224static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_1[]=
1225{
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 */
1233};
1234
1235static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_2[]=
1236{
1237 {1344, 806,1344, 806}
1238};
1239
1240static const SiS_LVDSDataStruct SiS_LVDS1280x1024Data_1[]=
1241{
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}
1250};
1251
1252static const SiS_LVDSDataStruct SiS_LVDS1280x1024Data_2[]=
1253{
1254 {1688,1066,1688,1066}
1255};
1256
1257static const SiS_LVDSDataStruct SiS_LVDS1400x1050Data_1[]=
1258{
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}
1268};
1269
1270static const SiS_LVDSDataStruct SiS_LVDS1400x1050Data_2[]=
1271{
1272 {1688,1066, 1688,1066}
1273};
1274
1275static const SiS_LVDSDataStruct SiS_LVDS1600x1200Data_1[]=
1276{
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}
1287};
1288
1289static const SiS_LVDSDataStruct SiS_LVDS1600x1200Data_2[]=
1290{
1291 {2048,1320, 2048,1320}
1292};
1293
1294static const SiS_LVDSDataStruct SiS_LVDS1280x960Data_1[]=
1295{
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}
1305};
1306
1307static const SiS_LVDSDataStruct SiS_LVDS1280x960Data_2[]=
1308{
1309 {1344, 806,1344, 806}
1310};
1311
1312static const SiS_LVDSDataStruct SiS_LVDS1280x768Data_1[]=
1313{
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}
1323};
1324
1325static const SiS_LVDSDataStruct SiS_LVDS1280x768Data_2[]=
1326{
1327 {1408, 806, 1408, 806}
1328};
1329
1330static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_1[] =
1331{ 1316{
1332 { 840, 604,1344, 800}, 1317 { 840, 604,1344, 800},
1333 { 840, 560,1344, 800}, 1318 { 840, 560,1344, 800},
@@ -1338,124 +1323,18 @@ static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_1[] =
1338 {1344, 800,1344, 800} 1323 {1344, 800,1344, 800}
1339}; 1324};
1340 1325
1341static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_2[] = 1326static const struct SiS_LVDSData SiS_LVDS1024x768Data_1[]=
1342{
1343 {1344, 800,1344, 800}
1344};
1345
1346static const SiS_LVDSDataStruct SiS_LVDS1152x768Data_1[] =
1347{ 1327{
1348 { 840, 438,1344, 806}, 1328 { 840, 438,1344, 806},
1349 { 840, 409,1344, 806}, 1329 { 840, 409,1344, 806},
1350 { 840, 438,1344, 806}, 1330 { 840, 438,1344, 806},
1351 { 840, 409,1344, 806}, 1331 { 840, 409,1344, 806},
1352 { 840, 518,1344, 806}, 1332 { 840, 518,1344, 806}, /* 640x480 */
1353 {1050, 638,1344, 806},
1354 {1344, 806,1344, 806}
1355};
1356
1357static const SiS_LVDSDataStruct SiS_LVDS1152x768Data_2[] =
1358{
1359 {1344, 806,1344, 806}
1360};
1361
1362/* Pass 1:1 data */
1363static const SiS_LVDSDataStruct SiS_LVDSXXXxXXXData_1[]=
1364{
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 */
1374};
1375
1376/* Custom data for Barco iQ R series */
1377static const SiS_LVDSDataStruct SiS_LVDSBARCO1366Data_1[]=
1378{
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 */
1388};
1389
1390/* Custom data for Barco iQ R series */
1391static const SiS_LVDSDataStruct SiS_LVDSBARCO1366Data_2[]=
1392{
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 */
1402};
1403
1404/* Custom data for Barco iQ G series */
1405static const SiS_LVDSDataStruct SiS_LVDSBARCO1024Data_1[]=
1406{
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 */ 1333 {1050, 638,1344, 806}, /* 800x600 */
1413 {1344, 806,1344, 806}, /* 1024x768 */ 1334 {1344, 806,1344, 806}, /* 1024x768 */
1414}; 1335};
1415 1336
1416/* Custom data for Barco iQ G series */ 1337static const struct SiS_LVDSData SiS_CHTVUNTSCData[]=
1417static const SiS_LVDSDataStruct SiS_LVDSBARCO1024Data_2[]=
1418{
1419 {1344, 806,1344, 806}
1420};
1421
1422/* Custom data for 848x480 parallel panel */
1423static const SiS_LVDSDataStruct SiS_LVDS848x480Data_1[]=
1424{
1425 { 0, 0, 0, 0},
1426 { 0, 0, 0, 0},
1427 { 0, 0, 0, 0},
1428 { 0, 0, 0, 0},
1429 {1088, 525,1088, 525}, /* 640x480 TODO */
1430 {1088, 525,1088, 525}, /* 800x600 TODO */
1431 {1088, 525,1088, 525}, /* 1024x768 TODO */
1432 { 0, 0, 0, 0},
1433 { 0, 0, 0, 0},
1434 { 0, 0, 0, 0},
1435 { 0, 0, 0, 0},
1436 {1088, 525,1088, 525}, /* 848x480 */
1437 {1088, 525,1088, 525} /* 1360x768 TODO */
1438};
1439
1440/* Custom data for 848x480 parallel panel */
1441static const SiS_LVDSDataStruct SiS_LVDS848x480Data_2[]=
1442{
1443 { 0, 0, 0, 0},
1444 { 0, 0, 0, 0},
1445 { 0, 0, 0, 0},
1446 { 0, 0, 0, 0},
1447 {1088, 525,1088, 525}, /* 640x480 */
1448 {1088, 525,1088, 525}, /* 800x600 */
1449 {1088, 525,1088, 525}, /* 1024x768 */
1450 { 0, 0, 0, 0},
1451 { 0, 0, 0, 0},
1452 { 0, 0, 0, 0},
1453 { 0, 0, 0, 0},
1454 {1088, 525,1088, 525}, /* 848x480 */
1455 {1088, 525,1088, 525} /* 1360x768 TODO */
1456};
1457
1458static const SiS_LVDSDataStruct SiS_CHTVUNTSCData[]=
1459{ 1338{
1460 { 840, 600, 840, 600}, 1339 { 840, 600, 840, 600},
1461 { 840, 600, 840, 600}, 1340 { 840, 600, 840, 600},
@@ -1466,7 +1345,7 @@ static const SiS_LVDSDataStruct SiS_CHTVUNTSCData[]=
1466 {1160, 945,1160, 945} 1345 {1160, 945,1160, 945}
1467}; 1346};
1468 1347
1469static const SiS_LVDSDataStruct SiS_CHTVONTSCData[]= 1348static const struct SiS_LVDSData SiS_CHTVONTSCData[]=
1470{ 1349{
1471 { 840, 525, 840, 525}, 1350 { 840, 525, 840, 525},
1472 { 840, 525, 840, 525}, 1351 { 840, 525, 840, 525},
@@ -1477,55 +1356,9 @@ static const SiS_LVDSDataStruct SiS_CHTVONTSCData[]=
1477 {1160, 840,1160, 840} 1356 {1160, 840,1160, 840}
1478}; 1357};
1479 1358
1480/* Chrontel TV Skew */
1481
1482static const SiS_LVDSDesStruct SiS_CHTVUNTSCDesData[]=
1483{
1484 { 0, 0},
1485 { 0, 0},
1486 { 0, 0},
1487 { 0, 0},
1488 { 0, 0},
1489 { 0, 0},
1490 { 0, 0}
1491};
1492
1493static const SiS_LVDSDesStruct SiS_CHTVONTSCDesData[]=
1494{
1495 { 0, 0},
1496 { 0, 0},
1497 { 0, 0},
1498 { 0, 0},
1499 { 0, 0},
1500 { 0, 0},
1501 { 0, 0}
1502};
1503
1504static const SiS_LVDSDesStruct SiS_CHTVUPALDesData[]=
1505{
1506 {256, 0},
1507 {256, 0},
1508 {256, 0},
1509 {256, 0},
1510 { 0, 0},
1511 { 0, 0},
1512 { 0, 0}
1513};
1514
1515static const SiS_LVDSDesStruct SiS_CHTVOPALDesData[]=
1516{
1517 {256, 0},
1518 {256, 0},
1519 {256, 0},
1520 {256, 0},
1521 { 0, 0},
1522 { 0, 0},
1523 { 0, 0}
1524};
1525
1526/* CRT1 CRTC data for slave modes */ 1359/* CRT1 CRTC data for slave modes */
1527 1360
1528static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1320x480_1[] = 1361static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_1[] =
1529{ 1362{
1530 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f, 1363 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
1531 0x90,0x85,0x8f,0xab,0x30,0x00,0x05, 1364 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
@@ -1550,48 +1383,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1320x480_1[] =
1550 0x00 }} 1383 0x00 }}
1551}; 1384};
1552 1385
1553static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_1[] = 1386static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2[] =
1554{
1555 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1556 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1557 0x00}},
1558 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1559 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1560 0x00}},
1561 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1562 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1563 0x00}},
1564 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1565 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1566 0x00}},
1567 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1568 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1569 0x00}},
1570 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1571 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1572 0x01}}
1573};
1574
1575static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_1_H[] =
1576{
1577 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1578 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
1579 0x00}},
1580 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1581 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
1582 0x00}},
1583 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1584 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
1585 0x00}},
1586 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1587 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
1588 0x00}},
1589 {{0x2d,0x28,0x90,0x2c,0x80,0x0b,0x3e,
1590 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1591 0x00}}
1592};
1593
1594static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2[] =
1595{ 1387{
1596 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e, 1388 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1597 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05, 1389 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
@@ -1611,12 +1403,17 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2[] =
1611 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0, 1403 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1612 0x58,0x8c,0x57,0x73,0x20,0x00,0x06, 1404 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1613 0x01}}, 1405 0x01}},
1406#if 0
1614 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e, 1407 {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
1615 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00, 1408 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
1616 0x00}} 1409 0x00}}
1410#endif
1411 {{0x5f,0x4f,0x83,0x55,0x81,0x0b,0x3e,
1412 0xe9,0x8b,0xe8,0x0c,0x00,0x00,0x05,
1413 0x00}},
1617}; 1414};
1618 1415
1619static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2_H[] = 1416static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2_H[] =
1620{ 1417{
1621 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f, 1418 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
1622 0x90,0x85,0x8f,0xab,0x30,0x00,0x05, 1419 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
@@ -1641,7 +1438,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2_H[] =
1641 0x00}} 1438 0x00}}
1642}; 1439};
1643 1440
1644static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3[] = 1441static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3[] =
1645{ 1442{
1646 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e, 1443 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1647 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05, 1444 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
@@ -1666,7 +1463,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3[] =
1666 0x00}} 1463 0x00}}
1667}; 1464};
1668 1465
1669static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3_H[] = 1466static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3_H[] =
1670{ 1467{
1671 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f, 1468 {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
1672 0x90,0x85,0x8f,0xab,0x30,0x00,0x05, 1469 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
@@ -1691,778 +1488,175 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3_H[] =
1691 0x00}} 1488 0x00}}
1692}; 1489};
1693 1490
1694static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_1[] = 1491static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1[] =
1695{
1696 {{0x64,0x4f,0x88,0x54,0x9f,0x5a,0x3e,
1697 0xe8,0x8f,0x8f,0x5b,0x00,0x00,0x01,
1698 0x00}},
1699 {{0x64,0x4f,0x88,0x54,0x9f,0x2e,0x3e,
1700 0xb9,0x80,0x5d,0x2f,0x00,0x00,0x01,
1701 0x00}},
1702 {{0x64,0x4f,0x88,0x54,0x9f,0x5a,0x3e,
1703 0xe8,0x8f,0x8f,0x5b,0x00,0x00,0x01,
1704 0x00}},
1705 {{0x64,0x4f,0x88,0x54,0x9f,0x2e,0x3e,
1706 0xb9,0x80,0x5d,0x2f,0x00,0x00,0x01,
1707 0x00}},
1708 {{0x64,0x4f,0x88,0x54,0x9f,0xaf,0xba,
1709 0x3b,0x82,0xdf,0xb0,0x00,0x00,0x01,
1710 0x00}},
1711 {{0x7e,0x63,0x82,0x68,0x15,0x1e,0xf1,
1712 0xae,0x85,0x57,0x1f,0x30,0x00,0x26,
1713 0x01}},
1714 {{0xa3,0x7f,0x87,0x86,0x97,0x1e,0xf1,
1715 0xae,0x85,0x57,0x1f,0x30,0x00,0x02,
1716 0x01}}
1717};
1718
1719static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_1_H[] =
1720{
1721 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1722 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1723 0x00}},
1724 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1725 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1726 0x00}},
1727 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1728 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1729 0x00}},
1730 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1731 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1732 0x00}},
1733 {{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
1734 0xe2,0x89,0xdf,0x05,0x00,0x00,0x44,
1735 0x00}},
1736 {{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
1737 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
1738 0x01}},
1739 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1740 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1741 0x01}}
1742};
1743
1744static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_2[] =
1745{
1746 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1747 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1748 0x00}},
1749 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1750 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1751 0x00}},
1752 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1753 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1754 0x00}},
1755 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1756 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1757 0x00}},
1758 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1759 0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
1760 0x00}},
1761 {{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
1762 0xae,0x84,0x57,0x25,0x30,0x00,0x02,
1763 0x01}},
1764 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1765 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1766 0x01}}
1767};
1768
1769static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_2_H[] =
1770{
1771 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1772 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1773 0x00}},
1774 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1775 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1776 0x00}},
1777 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1778 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1779 0x00}},
1780 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1781 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1782 0x00}},
1783 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1784 0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
1785 0x00}},
1786 {{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
1787 0xae,0x84,0x57,0x25,0x30,0x00,0x01,
1788 0x01}},
1789 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1790 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1791 0x01}}
1792};
1793
1794static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_1[] =
1795{
1796 {{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
1797 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1798 0x00}},
1799 {{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
1800 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1801 0x00}},
1802 {{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
1803 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
1804 0x00}},
1805 {{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
1806 0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
1807 0x00}},
1808 {{0x64,0x4f,0x88,0x54,0x9f,0x04,0x3e,
1809 0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
1810 0x00}},
1811 {{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
1812 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
1813 0x01}},
1814 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1815 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1816 0x01}}
1817};
1818
1819static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_1_H[] =
1820{
1821 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1822 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1823 0x00}},
1824 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1825 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1826 0x00}},
1827 {{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
1828 0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
1829 0x00}},
1830 {{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
1831 0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
1832 0x00}},
1833 {{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
1834 0xe2,0x89,0xdf,0x05,0x00,0x00,0x44,
1835 0x00}},
1836 {{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
1837 0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
1838 0x01}},
1839 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1840 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1841 0x01}}
1842};
1843
1844static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_2[] =
1845{
1846 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1847 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1848 0x00}},
1849 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1850 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1851 0x00}},
1852 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1853 0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
1854 0x00}},
1855 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1856 0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
1857 0x00}},
1858 {{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
1859 0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
1860 0x00}},
1861 {{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
1862 0xae,0x84,0x57,0x25,0x30,0x00,0x02,
1863 0x01}},
1864 {{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
1865 0x02,0x88,0xff,0x25,0x10,0x00,0x02,
1866 0x01}}
1867};
1868
1869static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_2_H[] =
1870{
1871 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1872 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1873 0x00}},
1874 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1875 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1876 0x00}},
1877 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1878 0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
1879 0x00}},
1880 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1881 0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
1882 0x00}},
1883 {{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
1884 0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
1885 0x00}},
1886 {{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
1887 0xae,0x84,0x57,0x25,0x30,0x00,0x01,
1888 0x01}},
1889 {{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
1890 0x02,0x88,0xff,0x25,0x10,0x00,0x01,
1891 0x01}}
1892};
1893
1894static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_1[] =
1895{
1896 {{0x5b,0x4f,0x9f,0x55,0x19,0xb4,0x1f,
1897 0x9c,0x8e,0x8f,0xb5,0x10,0x00,0x01,
1898 0x00}},
1899 {{0x5b,0x4f,0x9f,0x55,0x19,0x82,0x1f,
1900 0x6a,0x8c,0x5d,0x83,0x30,0x00,0x01,
1901 0x00}},
1902 {{0x5b,0x4f,0x9f,0x55,0x19,0xb4,0x1f,
1903 0x9c,0x8e,0x8f,0xb5,0x10,0x00,0x01,
1904 0x00}},
1905 {{0x5b,0x4f,0x9f,0x55,0x19,0x82,0x1f,
1906 0x6a,0x8c,0x5d,0x83,0x30,0x00,0x01,
1907 0x00}},
1908 {{0x5b,0x4f,0x9f,0x55,0x19,0x04,0x3e,
1909 0xec,0x8e,0xdf,0x05,0x20,0x00,0x01,
1910 0x00}},
1911 {{0x6f,0x63,0x93,0x69,0x8d,0x7c,0xf0,
1912 0x64,0x86,0x57,0x7d,0x20,0x00,0x05,
1913 0x01}},
1914 {{0x8b,0x7f,0x8f,0x85,0x09,0x24,0xf5,
1915 0x0c,0x8e,0xff,0x25,0x30,0x00,0x02,
1916 0x01}},
1917 {{0xab,0x9f,0x8f,0xa5,0x89,0x24,0xf5,
1918 0x0c,0x8e,0xff,0x25,0x30,0x00,0x06,
1919 0x01}},
1920 {{0xab,0x9f,0x8f,0xa5,0x89,0x24,0xf5,
1921 0x0c,0x8e,0xff,0x25,0x30,0x00,0x06,
1922 0x01}}
1923};
1924
1925static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_1_H[] =
1926{ 1492{
1927 {{0x47,0x27,0x8b,0x2c,0x1a,0x9e,0x1f, 1493 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1928 0x93,0x86,0x8f,0x9f,0x30,0x00,0x05, 1494 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1929 0x00}},
1930 {{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
1931 0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
1932 0x00}},
1933 {{0x47,0x27,0x8b,0x30,0x1e,0x9e,0x1f,
1934 0x92,0x86,0x8f,0x9f,0x30,0x00,0x05,
1935 0x00}},
1936 {{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
1937 0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
1938 0x00}},
1939 {{0x47,0x27,0x8b,0x2c,0x1a,0xee,0x1f,
1940 0xe2,0x86,0xdf,0xef,0x10,0x00,0x05,
1941 0x00}}, 1495 0x00}},
1942 {{0x51,0x31,0x95,0x36,0x04,0x66,0xf0, 1496 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1943 0x5a,0x8e,0x57,0x67,0x20,0x00,0x01, 1497 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1944 0x01}},
1945 {{0x5f,0x3f,0x83,0x44,0x92,0x0e,0xf5,
1946 0x02,0x86,0xff,0x0f,0x10,0x00,0x01,
1947 0x01}},
1948 {{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
1949 0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
1950 0x01}},
1951 {{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
1952 0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
1953 0x01}}
1954};
1955
1956static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_2[] =
1957{
1958 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb,
1959 0x54,0x86,0xdb,0xda,0x00,0x00,0x02,
1960 0x00}}, 1498 0x00}},
1961 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb, 1499 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1962 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x02, 1500 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1963 0x00}}, 1501 0x00}},
1964 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb, 1502 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1965 0x54,0x86,0xdb,0xda,0x00,0x00,0x02, 1503 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1966 0x00}}, 1504 0x00}},
1967 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb, 1505 {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
1968 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x02, 1506 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
1969 0x00}}, 1507 0x00}},
1970 {{0xab,0x60,0x9f,0x80,0x04,0x24,0xb3, 1508 {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
1971 0x7c,0x8e,0x03,0x02,0x10,0x00,0x02, 1509 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
1972 0x01}},
1973 {{0xab,0x63,0x8f,0x8a,0x8e,0x24,0xf1,
1974 0xb6,0x88,0x57,0x25,0x10,0x00,0x02,
1975 0x01}},
1976 {{0xab,0x7f,0x8f,0x98,0x9c,0x24,0xf5,
1977 0x0a,0x8c,0xff,0x25,0x30,0x00,0x02,
1978 0x01}},
1979 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
1980 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
1981 0x01}},
1982 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
1983 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
1984 0x01}} 1510 0x01}}
1985}; 1511};
1986 1512
1987static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_2_H[] = 1513static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] =
1988{ 1514{
1989 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, 1515 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1990 0x54,0x86,0xdb,0xda,0x00,0x00,0x01, 1516 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
1991 0x00}}, 1517 0x00}},
1992 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, 1518 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1993 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x01, 1519 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
1994 0x00}}, 1520 0x00}},
1995 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, 1521 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1996 0x54,0x86,0xdb,0xda,0x00,0x00,0x01, 1522 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
1997 0x00}}, 1523 0x00}},
1998 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, 1524 {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
1999 0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x01, 1525 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
2000 0x00}}, 1526 0x00}},
2001 {{0x83,0x38,0x97,0x58,0x9c,0x24,0xb3, 1527 {{0x2d,0x28,0x90,0x2c,0x80,0x0b,0x3e,
2002 0x7c,0x8e,0x03,0x02,0x10,0x00,0x01, 1528 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
2003 0x01}}, 1529 0x00}}
2004 {{0x79,0x31,0x9d,0x58,0x9c,0x24,0xf1,
2005 0xb6,0x88,0x57,0x25,0x10,0x00,0x01,
2006 0x01}},
2007 {{0x6b,0x3f,0x8f,0x58,0x9c,0x24,0xf5,
2008 0x0a,0x8c,0xff,0x25,0x30,0x00,0x01,
2009 0x01}},
2010 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
2011 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
2012 0x01}},
2013 {{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
2014 0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
2015 0x01}}
2016};
2017
2018/**************************************************************/
2019/* COMMON --------------------------------------------------- */
2020/**************************************************************/
2021
2022#ifdef LINUX_XF86
2023
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
2029
2030typedef struct _SiS_PlasmaModes
2031{
2032 const char *name;
2033 ULONG clock;
2034 USHORT HDisplay, HTotal, HFrontPorch, HSyncWidth;
2035 USHORT VDisplay, VTotal, VFrontPorch, VSyncWidth;
2036 UCHAR SyncFlags;
2037} SiS_PlasmaModes;
2038
2039typedef struct _SiS_PlasmaTables
2040{
2041 USHORT vendor;
2042 UCHAR productnum;
2043 USHORT product[5];
2044 const char *DDCnames[5];
2045 const char *plasmaname;
2046 USHORT maxx,maxy;
2047 USHORT prefx, prefy;
2048 UCHAR modenum;
2049 UCHAR plasmamodes[20]; /* | 0x80 = DVI-capable, | 0x40 = analog */
2050} SiS_PlasmaTables;
2051
2052static const SiS_PlasmaModes SiS_PlasmaMode[] = {
2053 { "640x400", /* 00: IBM 400@70 */
2054 25175,
2055 640, 800, 17, 64,
2056 400, 449, 13, 2,
2057 SIS_PL_HSYNCN | SIS_PL_VSYNCN },
2058 { "640x480", /* 01: VESA 480@72 */
2059 31500,
2060 640, 832, 24, 40,
2061 480, 520, 9, 3,
2062 SIS_PL_HSYNCN | SIS_PL_VSYNCN },
2063 { "800x600", /* 02: VESA 600@72 */
2064 50000,
2065 800, 1040, 56, 120,
2066 600, 666, 37, 6,
2067 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2068 { "864x480", /* 03: Cereb wide 1 */
2069 42526,
2070 864, 1134, 22, 86,
2071 480, 500, 1, 3,
2072 SIS_PL_HSYNCP | SIS_PL_VSYNCN },
2073 { "848x480", /* 04: VESA wide (NEC1) */
2074 33750,
2075 848, 1088, 16, 112,
2076 480, 517, 6, 8,
2077 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2078 { "1024x576", /* 05: VESA wide (NEC2) */
2079 47250,
2080 1024, 1320, 16, 144,
2081 576, 596, 2, 4,
2082 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2083 { "1280x720", /* 06: VESA wide (NEC3) */
2084 76500,
2085 1280, 1696, 48, 176,
2086 720, 750, 4, 8,
2087 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2088 { "1360x765", /* 07: VESA wide (NEC4) */
2089 85500,
2090 1360, 1792, 64, 176,
2091 765, 795, 4, 8,
2092 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2093 { "1024x600", /* 08: CEREB wide 2 */
2094 51200,
2095 1024, 1352, 51, 164,
2096 600, 628, 1, 4,
2097 SIS_PL_HSYNCN | SIS_PL_VSYNCP },
2098 { "1024x768", /* 09: VESA 768@75 */
2099 78750,
2100 1024, 1312, 16, 96,
2101 768, 800, 1, 3,
2102 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2103 { "1152x864", /* 10: VESA 1152x864@75 */
2104 108000,
2105 1152, 1600, 64, 128,
2106 864, 900, 1, 3,
2107 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2108 { "1280x1024", /* 11: VESA 1024@60 */
2109 108000,
2110 1280, 1688, 48, 112,
2111 1024, 1066, 1, 3,
2112 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2113 { "1280x768", /* 12: W_XGA */
2114 81000,
2115 1280, 1688, 48, 112,
2116 768, 802, 3, 6,
2117 SIS_PL_HSYNCP | SIS_PL_VSYNCN },
2118 { "1280x768", /* 13: I/O Data W_XGA@56Hz */
2119 76064,
2120 1280, 1688, 48, 112,
2121 768, 802, 2, 3,
2122 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2123 { "1376x768", /* 14: I/O Wide XGA */
2124 87340,
2125 1376, 1808, 32, 128,
2126 768, 806, 3, 6,
2127 SIS_PL_HSYNCN | SIS_PL_VSYNCP },
2128 { "1280x960", /* 15: VESA 960@60 */
2129 108000,
2130 1280, 1800, 96, 112,
2131 960, 1000, 1, 3,
2132 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2133 { "1400x1050", /* 16: VESA 1050@60Hz */
2134 108000,
2135 1400, 1688, 48, 112,
2136 1050, 1066, 1, 3,
2137 SIS_PL_HSYNCN | SIS_PL_VSYNCN },
2138 { "1360x768", /* 17: VESA wide (NEC4/2) */
2139 85500,
2140 1360, 1792, 64, 112,
2141 765, 795, 3, 6,
2142 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2143 { "800x600", /* 18: VESA 600@56 */
2144 36000,
2145 800, 1024, 24, 2,
2146 600, 625, 1, 2,
2147 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2148 { "1072x600", /* 19: Panasonic 1072x600 (sync?) */
2149 54100,
2150 1072, 1424, 48, 176,
2151 600, 628, 16, 1,
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) */
2159 74300,
2160 1280, 1650,110, 40,
2161 720, 750, 5, 5,
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) */
2165 1280, 1680, 16, 24,
2166 768, 802, 2, 5,
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) */
2170 1280, 1980,400, 80,
2171 720, 750, 1, 2,
2172 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2173 { "720x480", /* 24: 720x480 (aka "525p" and "480p") (Panasonic) */
2174 27000,
2175 720, 856, 40, 32,
2176 480, 525, 1, 3,
2177 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2178 { "720x576", /* 25: 720x576 (aka "625p"and "576p") (Panasonic) */
2179 27500,
2180 720, 864, 16, 64,
2181 576, 625, 5, 6,
2182 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2183 { "1280x720@50", /* 26: WIDE720(50) (aka "750p") (Generic) */
2184 74300,
2185 1280, 1980,400, 80,
2186 720, 750, 5, 5,
2187 SIS_PL_HSYNCP | SIS_PL_VSYNCP },
2188}; 1530};
2189 1531
2190/* 1532BOOLEAN SiSInitPtr(struct SiS_Private *SiS_Pr);
219127.00 720 755 791 858 480 480 484 525 1533#ifdef SIS_XORG_XF86
219227.50 720 732 795 864 576 581 587 625 1534unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
2193*/ 1535 int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight);
2194
2195static const SiS_PlasmaTables SiS_PlasmaTable[] = {
2196#if 0 /* Product IDs missing */
2197 { 0x38a3, 4,
2198 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2199 { "", "", "", "", "" },
2200 "NEC PlasmaSync 42VP4/42VP4D/42VP4G/42VP4DG",
2201 0, 0,
2202 0, 0,
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 }
2206 },
2207#endif 1536#endif
2208#if 0 /* Product IDs missing */ 1537unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
2209 { 0x38a3, 3, 1538 int VDisplay, int Depth, BOOLEAN FSTN,
2210 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, 1539 unsigned short CustomT, int LCDwith, int LCDheight,
2211 { "", "", "", "", "" }, 1540 unsigned int VBFlags2);
2212 "NEC PlasmaSync 42PD1/50PD1/50PD2", 1541unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
2213 0, 0, 1542 int VDisplay, int Depth, unsigned int VBFlags2);
2214 0, 0, 1543unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,
2215 5, /* DVI entirely unknown */ 1544 int VDisplay, int Depth, unsigned int VBFlags2);
2216 { 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0, 0 , 0 , 0 , 0 , 0 , 1545
2217 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } 1546void SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data);
2218 }, 1547void SiS_SetRegByte(SISIOADDRESS port, unsigned short data);
2219 { 0x38a3, 1, 1548void SiS_SetRegShort(SISIOADDRESS port, unsigned short data);
2220 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, 1549void SiS_SetRegLong(SISIOADDRESS port, unsigned int data);
2221 { "", "", "", "", "" }, 1550unsigned char SiS_GetReg(SISIOADDRESS port, unsigned short index);
2222 "NEC PlasmaSync 42PD3", 1551unsigned char SiS_GetRegByte(SISIOADDRESS port);
2223 0, 0, 1552unsigned short SiS_GetRegShort(SISIOADDRESS port);
2224 0, 0, 1553unsigned int SiS_GetRegLong(SISIOADDRESS port);
2225 10, /* DVI entirely unknown */ 1554void SiS_SetRegANDOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND,
2226 { 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 7|0x40, 8|0xc0, 9|0xc0, 1555 unsigned short DataOR);
2227 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } 1556void SiS_SetRegAND(SISIOADDRESS Port,unsigned short Index, unsigned short DataAND);
2228 }, 1557void SiS_SetRegOR(SISIOADDRESS Port,unsigned short Index, unsigned short DataOR);
2229 { 0x38a3, 2, 1558
2230 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, 1559void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
2231 { "", "", "", "", "" }, 1560void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
2232 "NEC PlasmaSync 42VM3/61XM1", 1561void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
2233 0, 0, 1562#ifndef SIS_LINUX_KERNEL
2234 0, 0, 1563void SiSSetLVDSetc(struct SiS_Private *SiS_Pr);
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 }
2238 },
2239 { 0x38a3, 2,
2240 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2241 { "", "", "", "", "" },
2242 "NEC PlasmaSync 42MP1/42MP2",
2243 0, 0,
2244 0, 0,
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 }
2248 },
2249 { 0x38a3, 1,
2250 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2251 { "", "", "", "", "" },
2252 "NEC PlasmaSync 50MP1",
2253 0, 0,
2254 0, 0,
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 }
2258 },
2259#endif 1564#endif
2260 { 0x38a3, 4, 1565void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
2261 { 0xa482, 0xa483, 0x0000, 0x0000, 0x0000 }, 1566void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
2262 { "PX-42VM", "", "", "", "" }, 1567unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
2263 "NEC PlasmaSync 42MP3/42MP4/50MP2/61MP1", 1568 unsigned short ModeIdIndex);
2264 0, 0, 1569BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
2265 0, 0, 1570#ifndef SIS_LINUX_KERNEL
2266 11, /* All DVI except 0, 7, 13, 17 */ 1571void SiS_GetVBType(struct SiS_Private *SiS_Pr);
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 }
2269 },
2270#if 0 /* Product IDs missing */
2271 { 0x38a3, 1,
2272 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2273 { "", "", "", "", "" },
2274 "NEC PlasmaSync 3300W",
2275 0, 0,
2276 0, 0,
2277 3,
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 }
2280 },
2281 { 0x38a3, 1,
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 }
2288 },
2289 { 0x38a3, 1,
2290 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2291 { "", "", "", "", "" },
2292 "NEC PlasmaSync 4210W",
2293 0, 0,
2294 0, 0,
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 }
2298 },
2299 { 0x38a3, 1,
2300 { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
2301 { "", "", "", "", "" },
2302 "NEC PlasmaSync 5000W",
2303 0, 0,
2304 0, 0,
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 }
2308 },
2309#endif
2310 { 0x412f, 2,
2311 { 0x000c, 0x000b, 0x0000, 0x0000, 0x0000 },
2312 { "", "", "", "", "" },
2313 "Pioneer 503CMX/PDA-5002",
2314 0, 0,
2315 0, 0,
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 }
2319 },
2320 { 0x34a9, 1,
2321 { 0xa00e, 0x0000, 0x0000, 0x0000, 0x0000 },
2322 { "", "", "", "", "" },
2323 "Panasonic TH-42",
2324 0, 0,
2325 0, 0,
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 }
2329 },
2330 { 0x34a9, 1,
2331 { 0xa005, 0x0000, 0x0000, 0x0000, 0x0000 },
2332 { "TH-42PW*4", "", "", "", "" },
2333 "Panasonic TH-42PW5",
2334 0, 0,
2335 0, 0,
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 }
2339 },
2340 { 0x4c2e, 1,
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 */
2345 1280, 720,
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 }
2349 },
2350 { 0x34a9, 1,
2351 { 0xd034, 0x0000, 0x0000, 0x0000, 0x0000 },
2352 { "AE500U (DVI-D)", "", "", "", "" },
2353 "Panasonic AE500U",
2354 1280, 768,
2355 1280, 720,
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 }
2359 },
2360 { 0x34a9, 1,
2361 { 0xd043, 0x0000, 0x0000, 0x0000, 0x0000 },
2362 { "AE700U (HDMI)", "", "", "", "" },
2363 "Panasonic AE700U",
2364 1360, 768,
2365 1280, 720,
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 }
2369 },
2370 { 0x0000 }
2371};
2372#endif 1572#endif
2373 1573
2374#ifdef LINUX_XF86 1574BOOLEAN SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
2375USHORT SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, 1575 unsigned short *ModeIdIndex);
2376 int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight); 1576unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1577 unsigned short ModeIdIndex);
1578unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
1579unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
1580unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1581 unsigned short ModeIdIndex);
1582unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo,
1583 unsigned short ModeIdIndex, unsigned short RRTI);
1584#ifdef SIS300
1585void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1,
1586 unsigned short *idx2);
1587unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2);
1588unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
2377#endif 1589#endif
2378USHORT SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN, 1590void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
2379 USHORT CustomT, int LCDwith, int LCDheight); 1591#ifdef SIS_XORG_XF86
2380USHORT SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth); 1592BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo,
2381USHORT SiS_GetModeID_VGA2(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth); 1593 BOOLEAN dosetpitch);
2382 1594BOOLEAN SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
2383void SiS_SetReg(SISIOADDRESS port, USHORT index, USHORT data); 1595 DisplayModePtr mode, BOOLEAN IsCustom);
2384void SiS_SetRegByte(SISIOADDRESS port, USHORT data); 1596BOOLEAN SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
2385void SiS_SetRegShort(SISIOADDRESS port, USHORT data); 1597 DisplayModePtr mode, BOOLEAN IsCustom);
2386void SiS_SetRegLong(SISIOADDRESS port, ULONG data); 1598BOOLEAN SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
2387UCHAR SiS_GetReg(SISIOADDRESS port, USHORT index); 1599 DisplayModePtr mode, BOOLEAN IsCustom);
2388UCHAR SiS_GetRegByte(SISIOADDRESS port); 1600#endif
2389USHORT SiS_GetRegShort(SISIOADDRESS port); 1601#ifdef SIS_LINUX_KERNEL
2390ULONG SiS_GetRegLong(SISIOADDRESS port); 1602BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
2391void SiS_SetRegANDOR(SISIOADDRESS Port, USHORT Index, USHORT DataAND, USHORT DataOR); 1603#endif
2392void SiS_SetRegAND(SISIOADDRESS Port,USHORT Index, USHORT DataAND); 1604void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
2393void SiS_SetRegOR(SISIOADDRESS Port,USHORT Index, USHORT DataOR); 1605void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
2394void SiS_DisplayOn(SiS_Private *SiS_Pr); 1606 unsigned short ModeIdIndex);
2395void SiS_DisplayOff(SiS_Private *SiS_Pr); 1607#ifdef SIS_XORG_XF86
2396void SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); 1608void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
2397BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 1609 int yres, DisplayModePtr current);
2398void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable); 1610#endif
2399void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable); 1611#ifdef SIS_LINUX_KERNEL
2400BOOLEAN SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex); 1612void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
2401UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex); 1613 int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);
2402USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
2403USHORT SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo, USHORT ModeIdIndex,
2404 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
2405void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo, USHORT ModeIdIndex);
2406void SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
2407
2408#ifdef LINUX_XF86
2409BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,ScrnInfoPtr pScrn,USHORT ModeNo, BOOLEAN dosetpitch);
2410BOOLEAN SiSBIOSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
2411 DisplayModePtr mode, BOOLEAN IsCustom);
2412BOOLEAN SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
2413 DisplayModePtr mode, BOOLEAN IsCustom);
2414BOOLEAN SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
2415 DisplayModePtr mode, BOOLEAN IsCustom);
2416int SiSTranslateToVESA(ScrnInfoPtr pScrn, int modenumber);
2417int SiSTranslateToOldMode(int modenumber);
2418BOOLEAN SiS_GetPanelID(SiS_Private *SiS_Pr, PSIS_HW_INFO);
2419USHORT SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags);
2420DisplayModePtr SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfordvi);
2421int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct, int *maxx, int *maxy, int *prefx, int *prefy);
2422void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
2423#else
2424BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo);
2425#endif 1614#endif
2426 1615
2427#ifdef LINUX_KERNEL 1616/* From init301.c: */
2428int sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 1617extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
2429 UCHAR modeno, UCHAR rateindex); 1618 unsigned short ModeIdIndex, int chkcrt2mode);
2430int sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 1619extern void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
2431 UCHAR modeno, UCHAR rateindex, 1620 unsigned short ModeIdIndex);
2432 struct fb_var_screeninfo *var); 1621extern void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
2433BOOLEAN sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, 1622extern void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
2434 UCHAR modeno, int *htotal, int *vtotal, UCHAR rateindex); 1623 unsigned short ModeIdIndex);
1624extern void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
1625extern void SiS_DisableBridge(struct SiS_Private *);
1626extern BOOLEAN SiS_SetCRT2Group(struct SiS_Private *, unsigned short);
1627extern unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1628 unsigned short ModeIdIndex);
1629extern void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
1630extern unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1631 unsigned short ModeIdIndex);
1632extern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
1633extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
1634 unsigned short ModeIdIndex, unsigned short RRTI);
1635extern BOOLEAN SiS_IsVAMode(struct SiS_Private *);
1636extern BOOLEAN SiS_IsDualEdge(struct SiS_Private *);
1637
1638#ifdef SIS_XORG_XF86
1639/* From other modules: */
1640extern unsigned short SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode,
1641 unsigned int VBFlags);
1642extern unsigned char SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, unsigned short offset,
1643 unsigned char value);
1644extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id);
1645extern unsigned short SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode,
1646 unsigned int VBFlags);
2435#endif 1647#endif
2436 1648
2437/* init301.c: */ 1649#ifdef SIS_LINUX_KERNEL
2438extern void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, 1650#ifdef SIS300
2439 PSIS_HW_INFO HwInfo, int chkcrt2mode); 1651extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
2440extern void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, 1652extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg,
2441 PSIS_HW_INFO HwInfo); 1653 unsigned int val);
2442extern void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 1654#endif
2443extern void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); 1655#ifdef SIS315H
2444extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); 1656extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg,
2445extern void SiS_DisableBridge(SiS_Private *, PSIS_HW_INFO); 1657 unsigned char val);
2446extern BOOLEAN SiS_SetCRT2Group(SiS_Private *, PSIS_HW_INFO, USHORT); 1658extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
2447extern USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, 1659#endif
2448 PSIS_HW_INFO HwInfo);
2449extern void SiS_WaitRetrace1(SiS_Private *SiS_Pr);
2450extern USHORT SiS_GetResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
2451extern USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
2452extern USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
2453 USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
2454extern BOOLEAN SiS_IsVAMode(SiS_Private *, PSIS_HW_INFO);
2455extern BOOLEAN SiS_IsDualEdge(SiS_Private *, PSIS_HW_INFO);
2456
2457#ifdef LINUX_XF86
2458/* From other sis driver modules: */
2459extern int SiS_compute_vclk(int Clock, int *out_n, int *out_dn, int *out_div,
2460 int *out_sbit, int *out_scale);
2461extern void SiSCalcClock(ScrnInfoPtr pScrn, int clock, int max_VLD, unsigned int *vclk);
2462
2463extern UCHAR SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, USHORT offset, UCHAR value);
2464extern UCHAR SiS_GetSetModeID(ScrnInfoPtr pScrn, UCHAR id);
2465extern USHORT SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, ULONG VBFlags);
2466#endif 1660#endif
2467 1661
2468#endif 1662#endif