60 #define MODE_INDEX_NONE 0
63 static int sisfb_off = 0;
64 static int sisfb_parm_mem = 0;
65 static int sisfb_accel = -1;
66 static int sisfb_ypan = -1;
67 static int sisfb_max = -1;
68 static int sisfb_userom = 1;
69 static int sisfb_useoem = -1;
70 static int sisfb_mode_idx = -1;
71 static int sisfb_parm_rate = -1;
72 static int sisfb_crt1off = 0;
73 static int sisfb_forcecrt1 = -1;
74 static int sisfb_crt2type = -1;
75 static int sisfb_crt2flags = 0;
76 static int sisfb_pdc = 0xff;
77 static int sisfb_pdca = 0xff;
78 static int sisfb_scalelcd = -1;
79 static int sisfb_specialtiming =
CUT_NONE;
80 static int sisfb_lvdshl = -1;
81 static int sisfb_dstn = 0;
82 static int sisfb_fstn = 0;
83 static int sisfb_tvplug = -1;
84 static int sisfb_tvstd = -1;
85 static int sisfb_tvxposoffset = 0;
86 static int sisfb_tvyposoffset = 0;
87 static int sisfb_nocrt2rate = 0;
88 #if !defined(__i386__) && !defined(__x86_64__)
89 static int sisfb_resetcard = 0;
90 static int sisfb_videoram = 0;
94 static struct sisfb_chip_info {
99 int CRT2_write_enable;
100 const char *chip_name;
116 static struct pci_device_id __devinitdata sisfb_pci_table[] = {
117 #ifdef CONFIG_FB_SIS_300
122 #ifdef CONFIG_FB_SIS_315
151 static const struct _sisbios_mode {
164 {
"none", {0xff,0xff}, 0x0000, 0x0000, 0, 0, 0, 0, 0, 0,
MD_SIS300|
MD_SIS315},
165 {
"320x200x8", {0x59,0x59}, 0x0138, 0x0000, 320, 200, 8, 1, 40, 12,
MD_SIS300|
MD_SIS315},
166 {
"320x200x16", {0x41,0x41}, 0x010e, 0x0000, 320, 200, 16, 1, 40, 12,
MD_SIS300|
MD_SIS315},
167 {
"320x200x24", {0x4f,0x4f}, 0x0000, 0x0000, 320, 200, 32, 1, 40, 12,
MD_SIS300|
MD_SIS315},
168 {
"320x200x32", {0x4f,0x4f}, 0x0000, 0x0000, 320, 200, 32, 1, 40, 12,
MD_SIS300|
MD_SIS315},
169 {
"320x240x8", {0x50,0x50}, 0x0132, 0x0000, 320, 240, 8, 1, 40, 15,
MD_SIS300|
MD_SIS315},
170 {
"320x240x16", {0x56,0x56}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15,
MD_SIS300|
MD_SIS315},
171 {
"320x240x24", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15,
MD_SIS300|
MD_SIS315},
172 {
"320x240x32", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15,
MD_SIS300|
MD_SIS315},
173 #define MODE_FSTN_8 9
174 #define MODE_FSTN_16 10
175 {
"320x240x8", {0x5a,0x5a}, 0x0132, 0x0000, 320, 240, 8, 1, 40, 15,
MD_SIS315},
176 {
"320x240x16", {0x5b,0x5b}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15,
MD_SIS315},
177 {
"400x300x8", {0x51,0x51}, 0x0133, 0x0000, 400, 300, 8, 1, 50, 18,
MD_SIS300|
MD_SIS315},
178 {
"400x300x16", {0x57,0x57}, 0x0136, 0x0000, 400, 300, 16, 1, 50, 18,
MD_SIS300|
MD_SIS315},
179 {
"400x300x24", {0x54,0x54}, 0x0000, 0x0000, 400, 300, 32, 1, 50, 18,
MD_SIS300|
MD_SIS315},
180 {
"400x300x32", {0x54,0x54}, 0x0000, 0x0000, 400, 300, 32, 1, 50, 18,
MD_SIS300|
MD_SIS315},
181 {
"512x384x8", {0x52,0x52}, 0x0000, 0x0000, 512, 384, 8, 1, 64, 24,
MD_SIS300|
MD_SIS315},
182 {
"512x384x16", {0x58,0x58}, 0x0000, 0x0000, 512, 384, 16, 1, 64, 24,
MD_SIS300|
MD_SIS315},
183 {
"512x384x24", {0x5c,0x5c}, 0x0000, 0x0000, 512, 384, 32, 1, 64, 24,
MD_SIS300|
MD_SIS315},
184 {
"512x384x32", {0x5c,0x5c}, 0x0000, 0x0000, 512, 384, 32, 1, 64, 24,
MD_SIS300|
MD_SIS315},
185 {
"640x400x8", {0x2f,0x2f}, 0x0000, 0x0000, 640, 400, 8, 1, 80, 25,
MD_SIS300|
MD_SIS315},
186 {
"640x400x16", {0x5d,0x5d}, 0x0000, 0x0000, 640, 400, 16, 1, 80, 25,
MD_SIS300|
MD_SIS315},
187 {
"640x400x24", {0x5e,0x5e}, 0x0000, 0x0000, 640, 400, 32, 1, 80, 25,
MD_SIS300|
MD_SIS315},
188 {
"640x400x32", {0x5e,0x5e}, 0x0000, 0x0000, 640, 400, 32, 1, 80, 25,
MD_SIS300|
MD_SIS315},
189 {
"640x480x8", {0x2e,0x2e}, 0x0101, 0x0101, 640, 480, 8, 1, 80, 30,
MD_SIS300|
MD_SIS315},
190 {
"640x480x16", {0x44,0x44}, 0x0111, 0x0111, 640, 480, 16, 1, 80, 30,
MD_SIS300|
MD_SIS315},
191 {
"640x480x24", {0x62,0x62}, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30,
MD_SIS300|
MD_SIS315},
192 {
"640x480x32", {0x62,0x62}, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30,
MD_SIS300|
MD_SIS315},
193 {
"720x480x8", {0x31,0x31}, 0x0000, 0x0000, 720, 480, 8, 1, 90, 30,
MD_SIS300|
MD_SIS315},
194 {
"720x480x16", {0x33,0x33}, 0x0000, 0x0000, 720, 480, 16, 1, 90, 30,
MD_SIS300|
MD_SIS315},
195 {
"720x480x24", {0x35,0x35}, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30,
MD_SIS300|
MD_SIS315},
196 {
"720x480x32", {0x35,0x35}, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30,
MD_SIS300|
MD_SIS315},
197 {
"720x576x8", {0x32,0x32}, 0x0000, 0x0000, 720, 576, 8, 1, 90, 36,
MD_SIS300|
MD_SIS315},
198 {
"720x576x16", {0x34,0x34}, 0x0000, 0x0000, 720, 576, 16, 1, 90, 36,
MD_SIS300|
MD_SIS315},
199 {
"720x576x24", {0x36,0x36}, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36,
MD_SIS300|
MD_SIS315},
200 {
"720x576x32", {0x36,0x36}, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36,
MD_SIS300|
MD_SIS315},
201 {
"768x576x8", {0x5f,0x5f}, 0x0000, 0x0000, 768, 576, 8, 1, 96, 36,
MD_SIS300|
MD_SIS315},
202 {
"768x576x16", {0x60,0x60}, 0x0000, 0x0000, 768, 576, 16, 1, 96, 36,
MD_SIS300|
MD_SIS315},
203 {
"768x576x24", {0x61,0x61}, 0x0000, 0x0000, 768, 576, 32, 1, 96, 36,
MD_SIS300|
MD_SIS315},
204 {
"768x576x32", {0x61,0x61}, 0x0000, 0x0000, 768, 576, 32, 1, 96, 36,
MD_SIS300|
MD_SIS315},
205 {
"800x480x8", {0x70,0x70}, 0x0000, 0x0000, 800, 480, 8, 1, 100, 30,
MD_SIS300|
MD_SIS315},
206 {
"800x480x16", {0x7a,0x7a}, 0x0000, 0x0000, 800, 480, 16, 1, 100, 30,
MD_SIS300|
MD_SIS315},
207 {
"800x480x24", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30,
MD_SIS300|
MD_SIS315},
208 {
"800x480x32", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30,
MD_SIS300|
MD_SIS315},
209 #define DEFAULT_MODE 43
210 #define DEFAULT_LCDMODE 43
211 #define DEFAULT_TVMODE 43
212 {
"800x600x8", {0x30,0x30}, 0x0103, 0x0103, 800, 600, 8, 2, 100, 37,
MD_SIS300|
MD_SIS315},
213 {
"800x600x16", {0x47,0x47}, 0x0114, 0x0114, 800, 600, 16, 2, 100, 37,
MD_SIS300|
MD_SIS315},
214 {
"800x600x24", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37,
MD_SIS300|
MD_SIS315},
215 {
"800x600x32", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37,
MD_SIS300|
MD_SIS315},
216 {
"848x480x8", {0x39,0x39}, 0x0000, 0x0000, 848, 480, 8, 2, 106, 30,
MD_SIS300|
MD_SIS315},
217 #define DEFAULT_MODE_848 48
218 {
"848x480x16", {0x3b,0x3b}, 0x0000, 0x0000, 848, 480, 16, 2, 106, 30,
MD_SIS300|
MD_SIS315},
219 {
"848x480x24", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30,
MD_SIS300|
MD_SIS315},
220 {
"848x480x32", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30,
MD_SIS300|
MD_SIS315},
221 {
"856x480x8", {0x3f,0x3f}, 0x0000, 0x0000, 856, 480, 8, 2, 107, 30,
MD_SIS300|
MD_SIS315},
222 #define DEFAULT_MODE_856 52
223 {
"856x480x16", {0x42,0x42}, 0x0000, 0x0000, 856, 480, 16, 2, 107, 30,
MD_SIS300|
MD_SIS315},
224 {
"856x480x24", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30,
MD_SIS300|
MD_SIS315},
225 {
"856x480x32", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30,
MD_SIS300|
MD_SIS315},
226 {
"960x540x8", {0x1d,0x1d}, 0x0000, 0x0000, 960, 540, 8, 1, 120, 33,
MD_SIS315},
227 {
"960x540x16", {0x1e,0x1e}, 0x0000, 0x0000, 960, 540, 16, 1, 120, 33,
MD_SIS315},
228 {
"960x540x24", {0x1f,0x1f}, 0x0000, 0x0000, 960, 540, 32, 1, 120, 33,
MD_SIS315},
229 {
"960x540x32", {0x1f,0x1f}, 0x0000, 0x0000, 960, 540, 32, 1, 120, 33,
MD_SIS315},
230 {
"960x600x8", {0x20,0x20}, 0x0000, 0x0000, 960, 600, 8, 1, 120, 37,
MD_SIS315},
231 {
"960x600x16", {0x21,0x21}, 0x0000, 0x0000, 960, 600, 16, 1, 120, 37,
MD_SIS315},
232 {
"960x600x24", {0x22,0x22}, 0x0000, 0x0000, 960, 600, 32, 1, 120, 37,
MD_SIS315},
233 {
"960x600x32", {0x22,0x22}, 0x0000, 0x0000, 960, 600, 32, 1, 120, 37,
MD_SIS315},
234 {
"1024x576x8", {0x71,0x71}, 0x0000, 0x0000, 1024, 576, 8, 1, 128, 36,
MD_SIS300|
MD_SIS315},
235 {
"1024x576x16", {0x74,0x74}, 0x0000, 0x0000, 1024, 576, 16, 1, 128, 36,
MD_SIS300|
MD_SIS315},
236 {
"1024x576x24", {0x77,0x77}, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36,
MD_SIS300|
MD_SIS315},
237 {
"1024x576x32", {0x77,0x77}, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36,
MD_SIS300|
MD_SIS315},
238 {
"1024x600x8", {0x20,0x20}, 0x0000, 0x0000, 1024, 600, 8, 1, 128, 37,
MD_SIS300 },
239 {
"1024x600x16", {0x21,0x21}, 0x0000, 0x0000, 1024, 600, 16, 1, 128, 37,
MD_SIS300 },
240 {
"1024x600x24", {0x22,0x22}, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37,
MD_SIS300 },
241 {
"1024x600x32", {0x22,0x22}, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37,
MD_SIS300 },
242 {
"1024x768x8", {0x38,0x38}, 0x0105, 0x0105, 1024, 768, 8, 2, 128, 48,
MD_SIS300|
MD_SIS315},
243 {
"1024x768x16", {0x4a,0x4a}, 0x0117, 0x0117, 1024, 768, 16, 2, 128, 48,
MD_SIS300|
MD_SIS315},
244 {
"1024x768x24", {0x64,0x64}, 0x013c, 0x0118, 1024, 768, 32, 2, 128, 48,
MD_SIS300|
MD_SIS315},
245 {
"1024x768x32", {0x64,0x64}, 0x013c, 0x0118, 1024, 768, 32, 2, 128, 48,
MD_SIS300|
MD_SIS315},
246 {
"1152x768x8", {0x23,0x23}, 0x0000, 0x0000, 1152, 768, 8, 1, 144, 48,
MD_SIS300 },
247 {
"1152x768x16", {0x24,0x24}, 0x0000, 0x0000, 1152, 768, 16, 1, 144, 48,
MD_SIS300 },
248 {
"1152x768x24", {0x25,0x25}, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48,
MD_SIS300 },
249 {
"1152x768x32", {0x25,0x25}, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48,
MD_SIS300 },
250 {
"1152x864x8", {0x29,0x29}, 0x0000, 0x0000, 1152, 864, 8, 1, 144, 54,
MD_SIS300|
MD_SIS315},
251 {
"1152x864x16", {0x2a,0x2a}, 0x0000, 0x0000, 1152, 864, 16, 1, 144, 54,
MD_SIS300|
MD_SIS315},
252 {
"1152x864x24", {0x2b,0x2b}, 0x0000, 0x0000, 1152, 864, 32, 1, 144, 54,
MD_SIS300|
MD_SIS315},
253 {
"1152x864x32", {0x2b,0x2b}, 0x0000, 0x0000, 1152, 864, 32, 1, 144, 54,
MD_SIS300|
MD_SIS315},
254 {
"1280x720x8", {0x79,0x79}, 0x0000, 0x0000, 1280, 720, 8, 1, 160, 45,
MD_SIS300|
MD_SIS315},
255 {
"1280x720x16", {0x75,0x75}, 0x0000, 0x0000, 1280, 720, 16, 1, 160, 45,
MD_SIS300|
MD_SIS315},
256 {
"1280x720x24", {0x78,0x78}, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45,
MD_SIS300|
MD_SIS315},
257 {
"1280x720x32", {0x78,0x78}, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45,
MD_SIS300|
MD_SIS315},
258 {
"1280x768x8", {0x55,0x23}, 0x0000, 0x0000, 1280, 768, 8, 1, 160, 48,
MD_SIS300|
MD_SIS315},
259 {
"1280x768x16", {0x5a,0x24}, 0x0000, 0x0000, 1280, 768, 16, 1, 160, 48,
MD_SIS300|
MD_SIS315},
260 {
"1280x768x24", {0x5b,0x25}, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48,
MD_SIS300|
MD_SIS315},
261 {
"1280x768x32", {0x5b,0x25}, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48,
MD_SIS300|
MD_SIS315},
262 {
"1280x800x8", {0x14,0x14}, 0x0000, 0x0000, 1280, 800, 8, 1, 160, 50,
MD_SIS315},
263 {
"1280x800x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 800, 16, 1, 160, 50,
MD_SIS315},
264 {
"1280x800x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50,
MD_SIS315},
265 {
"1280x800x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50,
MD_SIS315},
266 {
"1280x854x8", {0x14,0x14}, 0x0000, 0x0000, 1280, 854, 8, 1, 160, 53,
MD_SIS315},
267 {
"1280x854x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 854, 16, 1, 160, 53,
MD_SIS315},
268 {
"1280x854x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 854, 32, 1, 160, 53,
MD_SIS315},
269 {
"1280x854x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 854, 32, 1, 160, 53,
MD_SIS315},
270 {
"1280x960x8", {0x7c,0x7c}, 0x0000, 0x0000, 1280, 960, 8, 1, 160, 60,
MD_SIS300|
MD_SIS315},
271 {
"1280x960x16", {0x7d,0x7d}, 0x0000, 0x0000, 1280, 960, 16, 1, 160, 60,
MD_SIS300|
MD_SIS315},
272 {
"1280x960x24", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60,
MD_SIS300|
MD_SIS315},
273 {
"1280x960x32", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60,
MD_SIS300|
MD_SIS315},
274 {
"1280x1024x8", {0x3a,0x3a}, 0x0107, 0x0107, 1280, 1024, 8, 2, 160, 64,
MD_SIS300|
MD_SIS315},
275 {
"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64,
MD_SIS300|
MD_SIS315},
276 {
"1280x1024x24", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64,
MD_SIS300|
MD_SIS315},
277 {
"1280x1024x32", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64,
MD_SIS300|
MD_SIS315},
278 {
"1360x768x8", {0x48,0x48}, 0x0000, 0x0000, 1360, 768, 8, 1, 170, 48,
MD_SIS300|
MD_SIS315},
279 {
"1360x768x16", {0x4b,0x4b}, 0x0000, 0x0000, 1360, 768, 16, 1, 170, 48,
MD_SIS300|
MD_SIS315},
280 {
"1360x768x24", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48,
MD_SIS300|
MD_SIS315},
281 {
"1360x768x32", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48,
MD_SIS300|
MD_SIS315},
282 {
"1360x1024x8", {0x67,0x67}, 0x0000, 0x0000, 1360, 1024, 8, 1, 170, 64,
MD_SIS300 },
283 #define DEFAULT_MODE_1360 112
284 {
"1360x1024x16", {0x6f,0x6f}, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64,
MD_SIS300 },
285 {
"1360x1024x24", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64,
MD_SIS300 },
286 {
"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64,
MD_SIS300 },
287 {
"1400x1050x8", {0x26,0x26}, 0x0000, 0x0000, 1400, 1050, 8, 1, 175, 65,
MD_SIS315},
288 {
"1400x1050x16", {0x27,0x27}, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65,
MD_SIS315},
289 {
"1400x1050x24", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,
MD_SIS315},
290 {
"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,
MD_SIS315},
291 {
"1600x1200x8", {0x3c,0x3c}, 0x0130, 0x011c, 1600, 1200, 8, 1, 200, 75,
MD_SIS300|
MD_SIS315},
292 {
"1600x1200x16", {0x3d,0x3d}, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75,
MD_SIS300|
MD_SIS315},
293 {
"1600x1200x24", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75,
MD_SIS300|
MD_SIS315},
294 {
"1600x1200x32", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75,
MD_SIS300|
MD_SIS315},
295 {
"1680x1050x8", {0x17,0x17}, 0x0000, 0x0000, 1680, 1050, 8, 1, 210, 65,
MD_SIS315},
296 {
"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65,
MD_SIS315},
297 {
"1680x1050x24", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65,
MD_SIS315},
298 {
"1680x1050x32", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65,
MD_SIS315},
299 {
"1920x1080x8", {0x2c,0x2c}, 0x0000, 0x0000, 1920, 1080, 8, 1, 240, 67,
MD_SIS315},
300 {
"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67,
MD_SIS315},
301 {
"1920x1080x24", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67,
MD_SIS315},
302 {
"1920x1080x32", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67,
MD_SIS315},
303 {
"1920x1440x8", {0x68,0x68}, 0x013f, 0x0000, 1920, 1440, 8, 1, 240, 75,
MD_SIS300|
MD_SIS315},
304 {
"1920x1440x16", {0x69,0x69}, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75,
MD_SIS300|
MD_SIS315},
305 {
"1920x1440x24", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75,
MD_SIS300|
MD_SIS315},
306 {
"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75,
MD_SIS300|
MD_SIS315},
307 {
"2048x1536x8", {0x6c,0x6c}, 0x0000, 0x0000, 2048, 1536, 8, 1, 256, 96,
MD_SIS315},
308 {
"2048x1536x16", {0x6d,0x6d}, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96,
MD_SIS315},
309 {
"2048x1536x24", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,
MD_SIS315},
310 {
"2048x1536x32", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,
MD_SIS315},
311 {
"\0", {0x00,0x00}, 0, 0, 0, 0, 0, 0, 0}
314 #define SIS_LCD_NUMBER 18
315 static struct _sis_lcd_data {
320 } sis_lcd_data[] __devinitdata = {
342 static unsigned short sis300paneltype[] __devinitdata = {
349 static unsigned short sis310paneltype[] __devinitdata = {
356 static unsigned short sis661paneltype[] __devinitdata = {
363 #define FL_550_DSTN 0x01
364 #define FL_550_FSTN 0x02
368 static struct _sis_crt2type {
397 static struct _sis_tvtype {
409 static const struct _sis_vrate {
414 bool SiS730valid32bpp;
416 {1, 320, 200, 70,
true},
417 {1, 320, 240, 60,
true},
418 {1, 400, 300, 60,
true},
419 {1, 512, 384, 60,
true},
420 {1, 640, 400, 72,
true},
421 {1, 640, 480, 60,
true}, {2, 640, 480, 72,
true}, {3, 640, 480, 75,
true},
422 {4, 640, 480, 85,
true}, {5, 640, 480, 100,
true}, {6, 640, 480, 120,
true},
423 {7, 640, 480, 160,
true}, {8, 640, 480, 200,
true},
424 {1, 720, 480, 60,
true},
425 {1, 720, 576, 58,
true},
426 {1, 768, 576, 58,
true},
427 {1, 800, 480, 60,
true}, {2, 800, 480, 75,
true}, {3, 800, 480, 85,
true},
428 {1, 800, 600, 56,
true}, {2, 800, 600, 60,
true}, {3, 800, 600, 72,
true},
429 {4, 800, 600, 75,
true}, {5, 800, 600, 85,
true}, {6, 800, 600, 105,
true},
430 {7, 800, 600, 120,
true}, {8, 800, 600, 160,
true},
431 {1, 848, 480, 39,
true}, {2, 848, 480, 60,
true},
432 {1, 856, 480, 39,
true}, {2, 856, 480, 60,
true},
433 {1, 960, 540, 60,
true},
434 {1, 960, 600, 60,
true},
435 {1, 1024, 576, 60,
true}, {2, 1024, 576, 75,
true}, {3, 1024, 576, 85,
true},
436 {1, 1024, 600, 60,
true},
437 {1, 1024, 768, 43,
true}, {2, 1024, 768, 60,
true}, {3, 1024, 768, 70,
false},
438 {4, 1024, 768, 75,
false}, {5, 1024, 768, 85,
true}, {6, 1024, 768, 100,
true},
439 {7, 1024, 768, 120,
true},
440 {1, 1152, 768, 60,
true},
441 {1, 1152, 864, 60,
true}, {2, 1152, 864, 75,
true}, {3, 1152, 864, 84,
true},
442 {1, 1280, 720, 60,
true}, {2, 1280, 720, 75,
true}, {3, 1280, 720, 85,
true},
443 {1, 1280, 768, 60,
true},
444 {1, 1280, 800, 60,
true},
445 {1, 1280, 854, 60,
true},
446 {1, 1280, 960, 60,
true}, {2, 1280, 960, 85,
true},
447 {1, 1280, 1024, 43,
true}, {2, 1280, 1024, 60,
true}, {3, 1280, 1024, 75,
true},
448 {4, 1280, 1024, 85,
true},
449 {1, 1360, 768, 60,
true},
450 {1, 1360, 1024, 59,
true},
451 {1, 1400, 1050, 60,
true}, {2, 1400, 1050, 75,
true},
452 {1, 1600, 1200, 60,
true}, {2, 1600, 1200, 65,
true}, {3, 1600, 1200, 70,
true},
453 {4, 1600, 1200, 75,
true}, {5, 1600, 1200, 85,
true}, {6, 1600, 1200, 100,
true},
454 {7, 1600, 1200, 120,
true},
455 {1, 1680, 1050, 60,
true},
456 {1, 1920, 1080, 30,
true},
457 {1, 1920, 1440, 60,
true}, {2, 1920, 1440, 65,
true}, {3, 1920, 1440, 70,
true},
458 {4, 1920, 1440, 75,
true}, {5, 1920, 1440, 85,
true}, {6, 1920, 1440, 100,
true},
459 {1, 2048, 1536, 60,
true}, {2, 2048, 1536, 65,
true}, {3, 2048, 1536, 70,
true},
460 {4, 2048, 1536, 75,
true}, {5, 2048, 1536, 85,
true},
464 static struct _sisfbddcsmodes {
469 } sisfb_ddcsmodes[] __devinitdata = {
470 { 0x10000, 67, 75, 108000},
471 { 0x08000, 48, 72, 50000},
472 { 0x04000, 46, 75, 49500},
473 { 0x01000, 35, 43, 44900},
474 { 0x00800, 48, 60, 65000},
475 { 0x00400, 56, 70, 75000},
476 { 0x00200, 60, 75, 78800},
477 { 0x00100, 80, 75, 135000},
478 { 0x00020, 31, 60, 25200},
479 { 0x00008, 38, 72, 31500},
480 { 0x00004, 37, 75, 31500},
481 { 0x00002, 35, 56, 36000},
482 { 0x00001, 38, 60, 40000}
485 static struct _sisfbddcfmodes {
491 } sisfb_ddcfmodes[] __devinitdata = {
492 { 1280, 1024, 85, 92, 157500},
493 { 1600, 1200, 60, 75, 162000},
494 { 1600, 1200, 65, 82, 175500},
495 { 1600, 1200, 70, 88, 189000},
496 { 1600, 1200, 75, 94, 202500},
497 { 1600, 1200, 85, 107,229500},
498 { 1920, 1440, 60, 90, 234000},
499 { 1920, 1440, 75, 113,297000}
502 #ifdef CONFIG_FB_SIS_300
503 static struct _chswtable {
508 } mychswtable[] __devinitdata = {
509 { 0x1631, 0x1002,
"Mitachi",
"0x1002" },
510 { 0x1071, 0x7521,
"Mitac" ,
"7521P" },
515 static struct _customttable {
520 u16 biosFootprintAddr[5];
521 u8 biosFootprintData[5];
528 } mycustomttable[] __devinitdata = {
529 {
SIS_630,
"2.00.07",
"09/27/2002-13:38:25",
531 { 0x220, 0x227, 0x228, 0x229, 0x0ee },
532 { 0x01, 0xe3, 0x9a, 0x6a, 0xef },
536 {
SIS_630,
"2.00.07",
"09/27/2002-13:38:25",
538 { 0x220, 0x227, 0x228, 0x229, 0x0ee },
539 { 0x00, 0x5a, 0x64, 0x41, 0xef },
552 { 0x00c, 0, 0, 0, 0 },
553 {
'e' , 0, 0, 0, 0 },
555 "Clevo",
"L285/L287 (Version 1)",
CUT_CLEVO1024,
"CLEVO_L28X_1"
559 { 0x00c, 0, 0, 0, 0 },
560 {
'y' , 0, 0, 0, 0 },
569 "Clevo",
"D400S/D410S/D400H/D410H",
CUT_CLEVO1400,
"CLEVO_D4X0"
646 "Generic",
"LVDS/Parallel 848x480",
CUT_PANEL848,
"PANEL848x480"
653 "Generic",
"LVDS/Parallel 856x480",
CUT_PANEL856,
"PANEL856x480"
668 static int sisfb_setup(
char *
options);
672 static int sisfb_init(
void);
681 static int sisfb_blank(
int blank,
694 static void sisfb_search_mode(
char *
name,
bool quiet);
698 static int sisfb_setcolreg(
unsigned regno,
unsigned red,
unsigned green,
706 static bool sisfbcheckvretracecrt2(
struct sis_video_info *ivideo);
707 static bool sisfbcheckvretracecrt1(
struct sis_video_info *ivideo);
709 static void sisfb_detect_VB_connect(
struct sis_video_info *ivideo);
713 #ifdef CONFIG_FB_SIS_300
714 unsigned int sisfb_read_nbridge_pci_dword(
struct SiS_Private *SiS_Pr,
int reg);
715 void sisfb_write_nbridge_pci_dword(
struct SiS_Private *SiS_Pr,
int reg,
unsigned int val);
716 unsigned int sisfb_read_lpc_pci_dword(
struct SiS_Private *SiS_Pr,
int reg);
718 #ifdef CONFIG_FB_SIS_315
719 void sisfb_write_nbridge_pci_byte(
struct SiS_Private *SiS_Pr,
int reg,
unsigned char val);
720 unsigned int sisfb_read_mio_pci_word(
struct SiS_Private *SiS_Pr,
int reg);
731 static struct SIS_OH * sisfb_poh_new_node(
struct SIS_HEAP *memheap);
733 static void sisfb_delete_node(
struct SIS_OH *poh);
734 static void sisfb_insert_node(
struct SIS_OH *pohList,
struct SIS_OH *poh);
736 static void sisfb_free_node(
struct SIS_HEAP *memheap,
struct SIS_OH *poh);
739 extern unsigned short SiS_GetModeID_LCD(
int VGAEngine,
unsigned int VBFlags,
int HDisplay,
740 int VDisplay,
int Depth,
bool FSTN,
unsigned short CustomT,
741 int LCDwith,
int LCDheight,
unsigned int VBFlags2);
742 extern unsigned short SiS_GetModeID_TV(
int VGAEngine,
unsigned int VBFlags,
int HDisplay,
743 int VDisplay,
int Depth,
unsigned int VBFlags2);
744 extern unsigned short SiS_GetModeID_VGA2(
int VGAEngine,
unsigned int VBFlags,
int HDisplay,
745 int VDisplay,
int Depth,
unsigned int VBFlags2);
754 int *htotal,
int *vtotal,
unsigned char rateindex);
756 unsigned char modeno,
unsigned char rateindex);
766 unsigned char myor,
unsigned char myand);
770 unsigned short adaptnum,
unsigned short DDCdatatype,
unsigned char *
buffer,
771 unsigned int VBFlags2);
773 #ifdef CONFIG_FB_SIS_315
774 extern void SiS_Chrontel701xBLOn(
struct SiS_Private *SiS_Pr);
775 extern void SiS_Chrontel701xBLOff(
struct SiS_Private *SiS_Pr);