11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 2544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer * SiS 300/305/540/630(S)/730(S), 3544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer * SiS 315[E|PRO]/550/[M]65x/[M]66x[F|M|G]X/[M]74x[GX]/330/[M]76x[GX], 4544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer * XGI V3XT/V5/V8, Z7 51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 7544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer * Copyright (C) 2001-2005 Thomas Winischhofer, Vienna, Austria. 81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This program is free software; you can redistribute it and/or modify 101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * it under the terms of the GNU General Public License as published by 111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * the Free Software Foundation; either version 2 of the named License, 121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * or any later version. 131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This program is distributed in the hope that it will be useful, 151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * but WITHOUT ANY WARRANTY; without even the implied warranty of 161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * GNU General Public License for more details. 181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * You should have received a copy of the GNU General Public License 201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * along with this program; if not, write to the Free Software 211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef _SISFB_MAIN 251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define _SISFB_MAIN 261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include "vstruct.h" 281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include "sis.h" 291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Fbcon stuff */ 311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct fb_var_screeninfo my_default_var = { 321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .xres = 0, 331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .yres = 0, 341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .xres_virtual = 0, 351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .yres_virtual = 0, 361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .xoffset = 0, 371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .yoffset = 0, 381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .bits_per_pixel = 0, 391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .grayscale = 0, 401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .red = {0, 8, 0}, 411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .green = {0, 8, 0}, 421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .blue = {0, 8, 0}, 431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .transp = {0, 0, 0}, 441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .nonstd = 0, 451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .activate = FB_ACTIVATE_NOW, 461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .height = -1, 471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .width = -1, 481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .accel_flags = 0, 491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .pixclock = 0, 501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .left_margin = 0, 511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .right_margin = 0, 521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .upper_margin = 0, 531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .lower_margin = 0, 541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .hsync_len = 0, 551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .vsync_len = 0, 561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .sync = 0, 571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds .vmode = FB_VMODE_NONINTERLACED, 581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 60544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define MODE_INDEX_NONE 0 /* index for mode=none */ 61544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Boot-time parameters */ 631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_off = 0; 641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_parm_mem = 0; 651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_accel = -1; 661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_ypan = -1; 671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_max = -1; 681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_userom = 1; 691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_useoem = -1; 701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_mode_idx = -1; /* Use a default mode if we are inside the kernel */ 711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_parm_rate = -1; 721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_crt1off = 0; 731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_forcecrt1 = -1; 741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_crt2type = -1; /* CRT2 type (for overriding autodetection) */ 751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_crt2flags = 0; 761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_pdc = 0xff; 771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_pdca = 0xff; 781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_scalelcd = -1; 791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_specialtiming = CUT_NONE; 801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_lvdshl = -1; 811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_dstn = 0; 821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_fstn = 0; 831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_tvplug = -1; /* Tv plug type (for overriding autodetection) */ 841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_tvstd = -1; 851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_tvxposoffset = 0; 861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_tvyposoffset = 0; 871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_nocrt2rate = 0; 881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#if !defined(__i386__) && !defined(__x86_64__) 891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_resetcard = 0; 901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic int sisfb_videoram = 0; 911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* List of supported chips */ 941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct sisfb_chip_info { 95544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int chip; 96544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int vgaengine; 971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int mni; 98544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int hwcursor_size; 991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int CRT2_write_enable; 100544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer const char *chip_name; 10148c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartman} sisfb_chip_info[] = { 1021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" }, 1031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" }, 1041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_630, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 630" }, 1051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_315H, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 315H" }, 1061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_315, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 315" }, 1071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_315PRO, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 315PRO" }, 1081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_550, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 55x" }, 1091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 650" }, 1101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_330, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 330" }, 1111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_660, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 660" }, 112544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { XGI_20, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI Z7" }, 113544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { XGI_40, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI V3XT/V5/V8" }, 1141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 1151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 11648c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartmanstatic struct pci_device_id sisfb_pci_table[] = { 1171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifdef CONFIG_FB_SIS_300 1181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 1191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 1201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 1211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 1221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifdef CONFIG_FB_SIS_315 1231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315H, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 1241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 1251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_315PRO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, 1261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_550_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, 1271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7}, 1281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8}, 1291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9}, 130544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_20, PCI_ANY_ID, PCI_ANY_ID, 0, 0,10}, 131544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_40, PCI_ANY_ID, PCI_ANY_ID, 0, 0,11}, 1321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 1331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0 } 1341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 1351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus TorvaldsMODULE_DEVICE_TABLE(pci, sisfb_pci_table); 1371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct sis_video_info *card_list = NULL; 1391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 140544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer/* The memory heap is now handled card-wise, by using 141544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer sis_malloc_new/sis_free_new. However, the DRM does 142544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer not do this yet. Until it does, we keep a "global" 143544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer heap which is actually the first card's one. 1441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 145544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct SIS_HEAP *sisfb_heap; 1461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MD_SIS300 1 1481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MD_SIS315 2 1491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 1501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Mode table */ 1511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic const struct _sisbios_mode { 1521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds char name[15]; 1531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u8 mode_no[2]; 1541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 vesa_mode_no_1; /* "SiS defined" VESA mode number */ 1551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 vesa_mode_no_2; /* Real VESA mode numbers */ 1561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 xres; 1571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 yres; 1581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 bpp; 1591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 rate_idx; 1601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 cols; 1611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 rows; 1621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u8 chipset; 1631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds} sisbios_mode[] = { 1641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*0*/ {"none", {0xff,0xff}, 0x0000, 0x0000, 0, 0, 0, 0, 0, 0, MD_SIS300|MD_SIS315}, 1651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x200x8", {0x59,0x59}, 0x0138, 0x0000, 320, 200, 8, 1, 40, 12, MD_SIS300|MD_SIS315}, 1661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x200x16", {0x41,0x41}, 0x010e, 0x0000, 320, 200, 16, 1, 40, 12, MD_SIS300|MD_SIS315}, 1671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x200x24", {0x4f,0x4f}, 0x0000, 0x0000, 320, 200, 32, 1, 40, 12, MD_SIS300|MD_SIS315}, /* That's for people who mix up color- and fb depth */ 1681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x200x32", {0x4f,0x4f}, 0x0000, 0x0000, 320, 200, 32, 1, 40, 12, MD_SIS300|MD_SIS315}, 1691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x240x8", {0x50,0x50}, 0x0132, 0x0000, 320, 240, 8, 1, 40, 15, MD_SIS300|MD_SIS315}, 1701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x240x16", {0x56,0x56}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15, MD_SIS300|MD_SIS315}, 1711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x240x24", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15, MD_SIS300|MD_SIS315}, 1721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"320x240x32", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15, MD_SIS300|MD_SIS315}, 173544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define MODE_FSTN_8 9 174544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define MODE_FSTN_16 10 175544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"320x240x8", {0x5a,0x5a}, 0x0132, 0x0000, 320, 240, 8, 1, 40, 15, MD_SIS315}, /* FSTN */ 176544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer/*10*/ {"320x240x16", {0x5b,0x5b}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15, MD_SIS315}, /* FSTN */ 1771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"400x300x8", {0x51,0x51}, 0x0133, 0x0000, 400, 300, 8, 1, 50, 18, MD_SIS300|MD_SIS315}, 1781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"400x300x16", {0x57,0x57}, 0x0136, 0x0000, 400, 300, 16, 1, 50, 18, MD_SIS300|MD_SIS315}, 1791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"400x300x24", {0x54,0x54}, 0x0000, 0x0000, 400, 300, 32, 1, 50, 18, MD_SIS300|MD_SIS315}, 1801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"400x300x32", {0x54,0x54}, 0x0000, 0x0000, 400, 300, 32, 1, 50, 18, MD_SIS300|MD_SIS315}, 1811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"512x384x8", {0x52,0x52}, 0x0000, 0x0000, 512, 384, 8, 1, 64, 24, MD_SIS300|MD_SIS315}, 1821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"512x384x16", {0x58,0x58}, 0x0000, 0x0000, 512, 384, 16, 1, 64, 24, MD_SIS300|MD_SIS315}, 1831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"512x384x24", {0x5c,0x5c}, 0x0000, 0x0000, 512, 384, 32, 1, 64, 24, MD_SIS300|MD_SIS315}, 1841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"512x384x32", {0x5c,0x5c}, 0x0000, 0x0000, 512, 384, 32, 1, 64, 24, MD_SIS300|MD_SIS315}, 1851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x400x8", {0x2f,0x2f}, 0x0000, 0x0000, 640, 400, 8, 1, 80, 25, MD_SIS300|MD_SIS315}, 1861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*20*/ {"640x400x16", {0x5d,0x5d}, 0x0000, 0x0000, 640, 400, 16, 1, 80, 25, MD_SIS300|MD_SIS315}, 1871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x400x24", {0x5e,0x5e}, 0x0000, 0x0000, 640, 400, 32, 1, 80, 25, MD_SIS300|MD_SIS315}, 1881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x400x32", {0x5e,0x5e}, 0x0000, 0x0000, 640, 400, 32, 1, 80, 25, MD_SIS300|MD_SIS315}, 1891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x480x8", {0x2e,0x2e}, 0x0101, 0x0101, 640, 480, 8, 1, 80, 30, MD_SIS300|MD_SIS315}, 1901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x480x16", {0x44,0x44}, 0x0111, 0x0111, 640, 480, 16, 1, 80, 30, MD_SIS300|MD_SIS315}, 1911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x480x24", {0x62,0x62}, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30, MD_SIS300|MD_SIS315}, 1921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"640x480x32", {0x62,0x62}, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30, MD_SIS300|MD_SIS315}, 1931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x480x8", {0x31,0x31}, 0x0000, 0x0000, 720, 480, 8, 1, 90, 30, MD_SIS300|MD_SIS315}, 1941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x480x16", {0x33,0x33}, 0x0000, 0x0000, 720, 480, 16, 1, 90, 30, MD_SIS300|MD_SIS315}, 1951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x480x24", {0x35,0x35}, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30, MD_SIS300|MD_SIS315}, 1961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*30*/ {"720x480x32", {0x35,0x35}, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30, MD_SIS300|MD_SIS315}, 1971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x576x8", {0x32,0x32}, 0x0000, 0x0000, 720, 576, 8, 1, 90, 36, MD_SIS300|MD_SIS315}, 1981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x576x16", {0x34,0x34}, 0x0000, 0x0000, 720, 576, 16, 1, 90, 36, MD_SIS300|MD_SIS315}, 1991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x576x24", {0x36,0x36}, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36, MD_SIS300|MD_SIS315}, 2001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"720x576x32", {0x36,0x36}, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36, MD_SIS300|MD_SIS315}, 2011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"768x576x8", {0x5f,0x5f}, 0x0000, 0x0000, 768, 576, 8, 1, 96, 36, MD_SIS300|MD_SIS315}, 2021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"768x576x16", {0x60,0x60}, 0x0000, 0x0000, 768, 576, 16, 1, 96, 36, MD_SIS300|MD_SIS315}, 2031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"768x576x24", {0x61,0x61}, 0x0000, 0x0000, 768, 576, 32, 1, 96, 36, MD_SIS300|MD_SIS315}, 2041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"768x576x32", {0x61,0x61}, 0x0000, 0x0000, 768, 576, 32, 1, 96, 36, MD_SIS300|MD_SIS315}, 2051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x480x8", {0x70,0x70}, 0x0000, 0x0000, 800, 480, 8, 1, 100, 30, MD_SIS300|MD_SIS315}, 2061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*40*/ {"800x480x16", {0x7a,0x7a}, 0x0000, 0x0000, 800, 480, 16, 1, 100, 30, MD_SIS300|MD_SIS315}, 2071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x480x24", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30, MD_SIS300|MD_SIS315}, 2081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x480x32", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30, MD_SIS300|MD_SIS315}, 209544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define DEFAULT_MODE 43 /* index for 800x600x8 */ 210544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define DEFAULT_LCDMODE 43 /* index for 800x600x8 */ 211544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define DEFAULT_TVMODE 43 /* index for 800x600x8 */ 2121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x600x8", {0x30,0x30}, 0x0103, 0x0103, 800, 600, 8, 2, 100, 37, MD_SIS300|MD_SIS315}, 2131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x600x16", {0x47,0x47}, 0x0114, 0x0114, 800, 600, 16, 2, 100, 37, MD_SIS300|MD_SIS315}, 2141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x600x24", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37, MD_SIS300|MD_SIS315}, 2151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"800x600x32", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37, MD_SIS300|MD_SIS315}, 2161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"848x480x8", {0x39,0x39}, 0x0000, 0x0000, 848, 480, 8, 2, 106, 30, MD_SIS300|MD_SIS315}, 217544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define DEFAULT_MODE_848 48 2181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"848x480x16", {0x3b,0x3b}, 0x0000, 0x0000, 848, 480, 16, 2, 106, 30, MD_SIS300|MD_SIS315}, 2191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"848x480x24", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30, MD_SIS300|MD_SIS315}, 2201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*50*/ {"848x480x32", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30, MD_SIS300|MD_SIS315}, 2211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"856x480x8", {0x3f,0x3f}, 0x0000, 0x0000, 856, 480, 8, 2, 107, 30, MD_SIS300|MD_SIS315}, 222544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define DEFAULT_MODE_856 52 2231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"856x480x16", {0x42,0x42}, 0x0000, 0x0000, 856, 480, 16, 2, 107, 30, MD_SIS300|MD_SIS315}, 2241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"856x480x24", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30, MD_SIS300|MD_SIS315}, 2251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"856x480x32", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30, MD_SIS300|MD_SIS315}, 2261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x540x8", {0x1d,0x1d}, 0x0000, 0x0000, 960, 540, 8, 1, 120, 33, MD_SIS315}, 2271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x540x16", {0x1e,0x1e}, 0x0000, 0x0000, 960, 540, 16, 1, 120, 33, MD_SIS315}, 2281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x540x24", {0x1f,0x1f}, 0x0000, 0x0000, 960, 540, 32, 1, 120, 33, MD_SIS315}, 2291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x540x32", {0x1f,0x1f}, 0x0000, 0x0000, 960, 540, 32, 1, 120, 33, MD_SIS315}, 2301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x600x8", {0x20,0x20}, 0x0000, 0x0000, 960, 600, 8, 1, 120, 37, MD_SIS315}, 2311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*60*/ {"960x600x16", {0x21,0x21}, 0x0000, 0x0000, 960, 600, 16, 1, 120, 37, MD_SIS315}, 2321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x600x24", {0x22,0x22}, 0x0000, 0x0000, 960, 600, 32, 1, 120, 37, MD_SIS315}, 2331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"960x600x32", {0x22,0x22}, 0x0000, 0x0000, 960, 600, 32, 1, 120, 37, MD_SIS315}, 2341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x576x8", {0x71,0x71}, 0x0000, 0x0000, 1024, 576, 8, 1, 128, 36, MD_SIS300|MD_SIS315}, 2351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x576x16", {0x74,0x74}, 0x0000, 0x0000, 1024, 576, 16, 1, 128, 36, MD_SIS300|MD_SIS315}, 2361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x576x24", {0x77,0x77}, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36, MD_SIS300|MD_SIS315}, 2371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x576x32", {0x77,0x77}, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36, MD_SIS300|MD_SIS315}, 2381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x600x8", {0x20,0x20}, 0x0000, 0x0000, 1024, 600, 8, 1, 128, 37, MD_SIS300 }, 2391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x600x16", {0x21,0x21}, 0x0000, 0x0000, 1024, 600, 16, 1, 128, 37, MD_SIS300 }, 2401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x600x24", {0x22,0x22}, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37, MD_SIS300 }, 2411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*70*/ {"1024x600x32", {0x22,0x22}, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37, MD_SIS300 }, 2421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x768x8", {0x38,0x38}, 0x0105, 0x0105, 1024, 768, 8, 2, 128, 48, MD_SIS300|MD_SIS315}, 2431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x768x16", {0x4a,0x4a}, 0x0117, 0x0117, 1024, 768, 16, 2, 128, 48, MD_SIS300|MD_SIS315}, 2441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x768x24", {0x64,0x64}, 0x013c, 0x0118, 1024, 768, 32, 2, 128, 48, MD_SIS300|MD_SIS315}, 2451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1024x768x32", {0x64,0x64}, 0x013c, 0x0118, 1024, 768, 32, 2, 128, 48, MD_SIS300|MD_SIS315}, 2461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x768x8", {0x23,0x23}, 0x0000, 0x0000, 1152, 768, 8, 1, 144, 48, MD_SIS300 }, 2471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x768x16", {0x24,0x24}, 0x0000, 0x0000, 1152, 768, 16, 1, 144, 48, MD_SIS300 }, 2481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x768x24", {0x25,0x25}, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48, MD_SIS300 }, 2491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x768x32", {0x25,0x25}, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48, MD_SIS300 }, 2501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x864x8", {0x29,0x29}, 0x0000, 0x0000, 1152, 864, 8, 1, 144, 54, MD_SIS300|MD_SIS315}, 2511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*80*/ {"1152x864x16", {0x2a,0x2a}, 0x0000, 0x0000, 1152, 864, 16, 1, 144, 54, MD_SIS300|MD_SIS315}, 2521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x864x24", {0x2b,0x2b}, 0x0000, 0x0000, 1152, 864, 32, 1, 144, 54, MD_SIS300|MD_SIS315}, 2531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1152x864x32", {0x2b,0x2b}, 0x0000, 0x0000, 1152, 864, 32, 1, 144, 54, MD_SIS300|MD_SIS315}, 2541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x720x8", {0x79,0x79}, 0x0000, 0x0000, 1280, 720, 8, 1, 160, 45, MD_SIS300|MD_SIS315}, 2551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x720x16", {0x75,0x75}, 0x0000, 0x0000, 1280, 720, 16, 1, 160, 45, MD_SIS300|MD_SIS315}, 2561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x720x24", {0x78,0x78}, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45, MD_SIS300|MD_SIS315}, 2571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x720x32", {0x78,0x78}, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45, MD_SIS300|MD_SIS315}, 2581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x768x8", {0x55,0x23}, 0x0000, 0x0000, 1280, 768, 8, 1, 160, 48, MD_SIS300|MD_SIS315}, 2591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x768x16", {0x5a,0x24}, 0x0000, 0x0000, 1280, 768, 16, 1, 160, 48, MD_SIS300|MD_SIS315}, 2601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x768x24", {0x5b,0x25}, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48, MD_SIS300|MD_SIS315}, 2611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*90*/ {"1280x768x32", {0x5b,0x25}, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48, MD_SIS300|MD_SIS315}, 2621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x800x8", {0x14,0x14}, 0x0000, 0x0000, 1280, 800, 8, 1, 160, 50, MD_SIS315}, 2631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x800x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 800, 16, 1, 160, 50, MD_SIS315}, 2641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x800x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50, MD_SIS315}, 2651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x800x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50, MD_SIS315}, 266544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1280x854x8", {0x14,0x14}, 0x0000, 0x0000, 1280, 854, 8, 1, 160, 53, MD_SIS315}, 267544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1280x854x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 854, 16, 1, 160, 53, MD_SIS315}, 268544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1280x854x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 854, 32, 1, 160, 53, MD_SIS315}, 269544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1280x854x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 854, 32, 1, 160, 53, MD_SIS315}, 2701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x960x8", {0x7c,0x7c}, 0x0000, 0x0000, 1280, 960, 8, 1, 160, 60, MD_SIS300|MD_SIS315}, 271544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer/*100*/ {"1280x960x16", {0x7d,0x7d}, 0x0000, 0x0000, 1280, 960, 16, 1, 160, 60, MD_SIS300|MD_SIS315}, 2721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x960x24", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60, MD_SIS300|MD_SIS315}, 2731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x960x32", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60, MD_SIS300|MD_SIS315}, 2741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x1024x8", {0x3a,0x3a}, 0x0107, 0x0107, 1280, 1024, 8, 2, 160, 64, MD_SIS300|MD_SIS315}, 275544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315}, 2761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x1024x24", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315}, 2771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1280x1024x32", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315}, 2781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1360x768x8", {0x48,0x48}, 0x0000, 0x0000, 1360, 768, 8, 1, 170, 48, MD_SIS300|MD_SIS315}, 2791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1360x768x16", {0x4b,0x4b}, 0x0000, 0x0000, 1360, 768, 16, 1, 170, 48, MD_SIS300|MD_SIS315}, 2801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1360x768x24", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48, MD_SIS300|MD_SIS315}, 281544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer/*110*/ {"1360x768x32", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48, MD_SIS300|MD_SIS315}, 2821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1360x1024x8", {0x67,0x67}, 0x0000, 0x0000, 1360, 1024, 8, 1, 170, 64, MD_SIS300 }, 283544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define DEFAULT_MODE_1360 112 2841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1360x1024x16", {0x6f,0x6f}, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64, MD_SIS300 }, 2851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1360x1024x24", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300 }, 286544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300 }, 2871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1400x1050x8", {0x26,0x26}, 0x0000, 0x0000, 1400, 1050, 8, 1, 175, 65, MD_SIS315}, 2881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1400x1050x16", {0x27,0x27}, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65, MD_SIS315}, 2891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1400x1050x24", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65, MD_SIS315}, 2901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65, MD_SIS315}, 2911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1600x1200x8", {0x3c,0x3c}, 0x0130, 0x011c, 1600, 1200, 8, 1, 200, 75, MD_SIS300|MD_SIS315}, 292544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer/*120*/ {"1600x1200x16", {0x3d,0x3d}, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75, MD_SIS300|MD_SIS315}, 2931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1600x1200x24", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315}, 2941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1600x1200x32", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315}, 2951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1680x1050x8", {0x17,0x17}, 0x0000, 0x0000, 1680, 1050, 8, 1, 210, 65, MD_SIS315}, 296544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65, MD_SIS315}, 2971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1680x1050x24", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65, MD_SIS315}, 2981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1680x1050x32", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65, MD_SIS315}, 2991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1920x1080x8", {0x2c,0x2c}, 0x0000, 0x0000, 1920, 1080, 8, 1, 240, 67, MD_SIS315}, 3001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67, MD_SIS315}, 3011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1920x1080x24", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67, MD_SIS315}, 302544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer/*130*/ {"1920x1080x32", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67, MD_SIS315}, 3031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1920x1440x8", {0x68,0x68}, 0x013f, 0x0000, 1920, 1440, 8, 1, 240, 75, MD_SIS300|MD_SIS315}, 3041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1920x1440x16", {0x69,0x69}, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75, MD_SIS300|MD_SIS315}, 3051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"1920x1440x24", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315}, 306544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer {"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315}, 3071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"2048x1536x8", {0x6c,0x6c}, 0x0000, 0x0000, 2048, 1536, 8, 1, 256, 96, MD_SIS315}, 3081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"2048x1536x16", {0x6d,0x6d}, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96, MD_SIS315}, 3091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"2048x1536x24", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96, MD_SIS315}, 3101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"2048x1536x32", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96, MD_SIS315}, 3111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"\0", {0x00,0x00}, 0, 0, 0, 0, 0, 0, 0} 3121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 3131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 314544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#define SIS_LCD_NUMBER 18 315544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct _sis_lcd_data { 3161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 lcdtype; 3171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 xres; 3181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 yres; 3191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u8 default_mode_idx; 32048c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartman} sis_lcd_data[] = { 3211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_640x480, 640, 480, 23 }, 3221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_800x600, 800, 600, 43 }, 3231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1024x600, 1024, 600, 67 }, 3241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1024x768, 1024, 768, 71 }, 3251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1152x768, 1152, 768, 75 }, 3261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1152x864, 1152, 864, 79 }, 3271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1280x720, 1280, 720, 83 }, 3281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1280x768, 1280, 768, 87 }, 3291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { LCD_1280x800, 1280, 800, 91 }, 330544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_1280x854, 1280, 854, 95 }, 331544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_1280x960, 1280, 960, 99 }, 332544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_1280x1024, 1280, 1024, 103 }, 333544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_1400x1050, 1400, 1050, 115 }, 334544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_1680x1050, 1680, 1050, 123 }, 335544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_1600x1200, 1600, 1200, 119 }, 336544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_320x240_2, 320, 240, 9 }, 337544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_320x240_3, 320, 240, 9 }, 338544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { LCD_320x240, 320, 240, 9 }, 3391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 3401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 3411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* CR36 evaluation */ 34248c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartmanstatic unsigned short sis300paneltype[] = { 343544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, 344544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768, 345544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, 346544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN 347544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer}; 348544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 34948c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartmanstatic unsigned short sis310paneltype[] = { 350544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, 351544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, 352544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, 353544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN 354544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer}; 355544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 35648c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartmanstatic unsigned short sis661paneltype[] = { 357544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, 358544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, 359544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, 360544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer LCD_1280x800, LCD_1680x1050, LCD_1280x720, LCD_UNKNOWN 361544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer}; 3621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 3631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FL_550_DSTN 0x01 3641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FL_550_FSTN 0x02 3651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FL_300 0x04 3661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FL_315 0x08 3671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 3681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct _sis_crt2type { 3691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds char name[32]; 3701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 type_no; 3711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 tvplug_no; 3721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 flags; 3731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds} sis_crt2type[] __initdata = { 3741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"NONE", 0, -1, FL_300|FL_315}, 3751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"LCD", CRT2_LCD, -1, FL_300|FL_315}, 3761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"TV", CRT2_TV, -1, FL_300|FL_315}, 3771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"VGA", CRT2_VGA, -1, FL_300|FL_315}, 3781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"SVIDEO", CRT2_TV, TV_SVIDEO, FL_300|FL_315}, 3791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"COMPOSITE", CRT2_TV, TV_AVIDEO, FL_300|FL_315}, 3801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"CVBS", CRT2_TV, TV_AVIDEO, FL_300|FL_315}, 3811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"SVIDEO+COMPOSITE", CRT2_TV, TV_AVIDEO|TV_SVIDEO, FL_300|FL_315}, 3821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"COMPOSITE+SVIDEO", CRT2_TV, TV_AVIDEO|TV_SVIDEO, FL_300|FL_315}, 3831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"SVIDEO+CVBS", CRT2_TV, TV_AVIDEO|TV_SVIDEO, FL_300|FL_315}, 3841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"CVBS+SVIDEO", CRT2_TV, TV_AVIDEO|TV_SVIDEO, FL_300|FL_315}, 3851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"SCART", CRT2_TV, TV_SCART, FL_300|FL_315}, 3861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"HIVISION", CRT2_TV, TV_HIVISION, FL_315}, 3871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"YPBPR480I", CRT2_TV, TV_YPBPR|TV_YPBPR525I, FL_315}, 3881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"YPBPR480P", CRT2_TV, TV_YPBPR|TV_YPBPR525P, FL_315}, 3891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"YPBPR720P", CRT2_TV, TV_YPBPR|TV_YPBPR750P, FL_315}, 3901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"YPBPR1080I", CRT2_TV, TV_YPBPR|TV_YPBPR1080I, FL_315}, 3911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"DSTN", CRT2_LCD, -1, FL_315|FL_550_DSTN}, 3921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"FSTN", CRT2_LCD, -1, FL_315|FL_550_FSTN}, 3931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"\0", -1, -1, 0} 3941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 3951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 3961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* TV standard */ 3971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct _sis_tvtype { 3981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds char name[6]; 3991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 type_no; 4001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds} sis_tvtype[] __initdata = { 4011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"PAL", TV_PAL}, 4021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"NTSC", TV_NTSC}, 4031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"PALM", TV_PAL|TV_PALM}, 4041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"PALN", TV_PAL|TV_PALN}, 4051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"NTSCJ", TV_NTSC|TV_NTSCJ}, 4061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds {"\0", -1} 4071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 4081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 4091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic const struct _sis_vrate { 4101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 idx; 4111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 xres; 4121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 yres; 4131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 refresh; 414c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson bool SiS730valid32bpp; 4151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds} sisfb_vrate[] = { 416c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 320, 200, 70, true}, 417c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 320, 240, 60, true}, 418c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 400, 300, 60, true}, 419c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 512, 384, 60, true}, 420c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 640, 400, 72, true}, 421c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 640, 480, 60, true}, {2, 640, 480, 72, true}, {3, 640, 480, 75, true}, 422c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 640, 480, 85, true}, {5, 640, 480, 100, true}, {6, 640, 480, 120, true}, 423c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {7, 640, 480, 160, true}, {8, 640, 480, 200, true}, 424c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 720, 480, 60, true}, 425c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 720, 576, 58, true}, 426c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 768, 576, 58, true}, 427c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 800, 480, 60, true}, {2, 800, 480, 75, true}, {3, 800, 480, 85, true}, 428c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 800, 600, 56, true}, {2, 800, 600, 60, true}, {3, 800, 600, 72, true}, 429c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 800, 600, 75, true}, {5, 800, 600, 85, true}, {6, 800, 600, 105, true}, 430c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {7, 800, 600, 120, true}, {8, 800, 600, 160, true}, 431c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 848, 480, 39, true}, {2, 848, 480, 60, true}, 432c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 856, 480, 39, true}, {2, 856, 480, 60, true}, 433c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 960, 540, 60, true}, 434c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 960, 600, 60, true}, 435c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1024, 576, 60, true}, {2, 1024, 576, 75, true}, {3, 1024, 576, 85, true}, 436c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1024, 600, 60, true}, 437c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1024, 768, 43, true}, {2, 1024, 768, 60, true}, {3, 1024, 768, 70, false}, 438c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 1024, 768, 75, false}, {5, 1024, 768, 85, true}, {6, 1024, 768, 100, true}, 439c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {7, 1024, 768, 120, true}, 440c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1152, 768, 60, true}, 441c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1152, 864, 60, true}, {2, 1152, 864, 75, true}, {3, 1152, 864, 84, true}, 442c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1280, 720, 60, true}, {2, 1280, 720, 75, true}, {3, 1280, 720, 85, true}, 443c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1280, 768, 60, true}, 444c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1280, 800, 60, true}, 445c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1280, 854, 60, true}, 446c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1280, 960, 60, true}, {2, 1280, 960, 85, true}, 447c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1280, 1024, 43, true}, {2, 1280, 1024, 60, true}, {3, 1280, 1024, 75, true}, 448c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 1280, 1024, 85, true}, 449c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1360, 768, 60, true}, 450c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1360, 1024, 59, true}, 451c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1400, 1050, 60, true}, {2, 1400, 1050, 75, true}, 452c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1600, 1200, 60, true}, {2, 1600, 1200, 65, true}, {3, 1600, 1200, 70, true}, 453c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 1600, 1200, 75, true}, {5, 1600, 1200, 85, true}, {6, 1600, 1200, 100, true}, 454c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {7, 1600, 1200, 120, true}, 455c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1680, 1050, 60, true}, 456c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1920, 1080, 30, true}, 457c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 1920, 1440, 60, true}, {2, 1920, 1440, 65, true}, {3, 1920, 1440, 70, true}, 458c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 1920, 1440, 75, true}, {5, 1920, 1440, 85, true}, {6, 1920, 1440, 100, true}, 459c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {1, 2048, 1536, 60, true}, {2, 2048, 1536, 65, true}, {3, 2048, 1536, 70, true}, 460c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {4, 2048, 1536, 75, true}, {5, 2048, 1536, 85, true}, 461c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson {0, 0, 0, 0, false} 4621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 4631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 464544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct _sisfbddcsmodes { 4651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 mask; 4661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 h; 4671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 v; 4681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 d; 46948c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartman} sisfb_ddcsmodes[] = { 4701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x10000, 67, 75, 108000}, 4711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x08000, 48, 72, 50000}, 4721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x04000, 46, 75, 49500}, 4731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x01000, 35, 43, 44900}, 4741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00800, 48, 60, 65000}, 4751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00400, 56, 70, 75000}, 4761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00200, 60, 75, 78800}, 4771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00100, 80, 75, 135000}, 4781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00020, 31, 60, 25200}, 4791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00008, 38, 72, 31500}, 4801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00004, 37, 75, 31500}, 4811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00002, 35, 56, 36000}, 4821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00001, 38, 60, 40000} 4831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 4841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 485544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct _sisfbddcfmodes { 4861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 x; 4871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 y; 4881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 v; 4891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u16 h; 4901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds u32 d; 49148c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartman} sisfb_ddcfmodes[] = { 492544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1280, 1024, 85, 92, 157500}, 493544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1600, 1200, 60, 75, 162000}, 494544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1600, 1200, 65, 82, 175500}, 495544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1600, 1200, 70, 88, 189000}, 496544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1600, 1200, 75, 94, 202500}, 497544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1600, 1200, 85, 107,229500}, 498544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1920, 1440, 60, 90, 234000}, 499544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 1920, 1440, 75, 113,297000} 5001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 5011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 5021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifdef CONFIG_FB_SIS_300 5031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct _chswtable { 504544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u16 subsysVendor; 505544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u16 subsysCard; 506544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *vendorName; 507544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *cardName; 50848c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartman} mychswtable[] = { 509544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 0x1631, 0x1002, "Mitachi", "0x1002" }, 5101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x1071, 0x7521, "Mitac" , "7521P" }, 5111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, "" , "" } 5121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 5131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 5141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 5151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstatic struct _customttable { 516544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u16 chipID; 517544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *biosversion; 518544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *biosdate; 519544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u32 bioschksum; 520544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u16 biosFootprintAddr[5]; 521544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u8 biosFootprintData[5]; 522544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u16 pcisubsysvendor; 523544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u16 pcisubsyscard; 524544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *vendorName; 525544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *cardName; 526544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer u32 SpecialID; 527544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer char *optionName; 52848c68c4f1b542444f175a9e136febcecf3e704d8Greg Kroah-Hartman} mycustomttable[] = { 5291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_630, "2.00.07", "09/27/2002-13:38:25", 5301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x3240A8, 5311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x220, 0x227, 0x228, 0x229, 0x0ee }, 5321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x01, 0xe3, 0x9a, 0x6a, 0xef }, 5331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1039, 0x6300, 5341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Barco", "iQ R200L/300/400", CUT_BARCO1366, "BARCO_1366" 5351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_630, "2.00.07", "09/27/2002-13:38:25", 5371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x323FBD, 5381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x220, 0x227, 0x228, 0x229, 0x0ee }, 5391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00, 0x5a, 0x64, 0x41, 0xef }, 5401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1039, 0x6300, 5411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Barco", "iQ G200L/300/400/500", CUT_BARCO1024, "BARCO_1024" 5421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 5451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x0e11, 0x083c, 5481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Inventec (Compaq)", "3017cl/3045US", CUT_COMPAQ12802, "COMPAQ_1280" 5491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 5521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00c, 0, 0, 0, 0 }, 5531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 'e' , 0, 0, 0, 0 }, 5541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1558, 0x0287, 5551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Clevo", "L285/L287 (Version 1)", CUT_CLEVO1024, "CLEVO_L28X_1" 5561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 5591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0x00c, 0, 0, 0, 0 }, 5601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 'y' , 0, 0, 0, 0 }, 5611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1558, 0x0287, 5621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Clevo", "L285/L287 (Version 2)", CUT_CLEVO10242, "CLEVO_L28X_2" 5631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 5661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1558, 0x0400, /* possibly 401 and 402 as well; not panelsize specific (?) */ 5691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Clevo", "D400S/D410S/D400H/D410H", CUT_CLEVO1400, "CLEVO_D4X0" 5701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, /* Shift LCD in LCD-via-CRT1 mode */ 5731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1558, 0x2263, 5761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Clevo", "D22ES/D27ES", CUT_UNIWILL1024, "CLEVO_D2X0ES" 5771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, /* Shift LCD in LCD-via-CRT1 mode */ 5801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1734, 0x101f, 5831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Uniwill", "N243S9", CUT_UNIWILL1024, "UNIWILL_N243S9" 5841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "", "", 5861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, /* Shift LCD in LCD-via-CRT1 mode */ 5871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1584, 0x5103, 5901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Uniwill", "N35BS1", CUT_UNIWILL10242, "UNIWILL_N35BS1" 5911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "1.09.2c", "", /* Other versions, too? */ 5931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, /* Shift LCD in LCD-via-CRT1 mode */ 5941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 5961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1019, 0x0f05, 5971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "ECS", "A928", CUT_UNIWILL1024, "ECS_A928" 5981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 5991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_740, "1.11.27a", "", 6001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 6011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1043, 0x1612, 6041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Asus", "L3000D/L3500D", CUT_ASUSL3000D, "ASUS_L3X00" 6051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 6061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "1.10.9k", "", 6071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 6081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1025, 0x0028, 6111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Acer", "Aspire 1700", CUT_ACER1280, "ACER_ASPIRE1700" 6121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 6131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "1.10.7w", "", 6141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 6151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x14c0, 0x0012, 6181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Compal", "??? (V1)", CUT_COMPAL1400_1, "COMPAL_1400_1" 6191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 6201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "1.10.7x", "", 6211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 6221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x14c0, 0x0012, 6251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Compal", "??? (V2)", CUT_COMPAL1400_2, "COMPAL_1400_2" 6261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 6271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "1.10.8o", "", 6281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, /* For EMI (unknown) */ 6291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1043, 0x1612, 6321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Asus", "A2H (V1)", CUT_ASUSA2H_1, "ASUS_A2H_1" 6331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 6341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { SIS_650, "1.10.8q", "", 6351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, /* For EMI */ 6361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0x1043, 0x1612, 6391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Asus", "A2H (V2)", CUT_ASUSA2H_2, "ASUS_A2H_2" 6401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 6411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 4321, "", "", /* never autodetected */ 6421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 6431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0, 0 }, 6451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 0, 6461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "Generic", "LVDS/Parallel 848x480", CUT_PANEL848, "PANEL848x480" 6471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds }, 648544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 4322, "", "", /* never autodetected */ 649544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 0, 650544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 0, 0, 0, 0, 0 }, 651544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer { 0, 0, 0, 0, 0 }, 652544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 0, 0, 653544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer "Generic", "LVDS/Parallel 856x480", CUT_PANEL856, "PANEL856x480" 654544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer }, 6551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, "", "", 6561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 6571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0 }, 6581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds { 0, 0, 0, 0 }, 6591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 0, 0, 6601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds "", "", CUT_NONE, "" 6611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds } 6621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 6631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 6641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* ---------------------- Prototypes ------------------------- */ 6651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 6661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Interface used by the world */ 6671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef MODULE 66814aefd1b49ff3bd13caa37fb06bd53488d5d1486Adrian Bunkstatic int sisfb_setup(char *options); 6691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 6701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 6711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Interface to the low level console driver */ 67214aefd1b49ff3bd13caa37fb06bd53488d5d1486Adrian Bunkstatic int sisfb_init(void); 6731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 6741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* fbdev routines */ 675544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, 676544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer struct fb_info *info); 6771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 67867a6680d64e18c7a1901f31ef747ea53b6cd986dChristoph Hellwigstatic int sisfb_ioctl(struct fb_info *info, unsigned int cmd, 67967a6680d64e18c7a1901f31ef747ea53b6cd986dChristoph Hellwig unsigned long arg); 680544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_set_par(struct fb_info *info); 681544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_blank(int blank, 682544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer struct fb_info *info); 683544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void fbcon_sis_fillrect(struct fb_info *info, 684544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer const struct fb_fillrect *rect); 685544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void fbcon_sis_copyarea(struct fb_info *info, 686544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer const struct fb_copyarea *area); 687544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern int fbcon_sis_sync(struct fb_info *info); 688544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 6891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Internal 2D accelerator functions */ 690544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern int sisfb_initaccel(struct sis_video_info *ivideo); 691544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void sisfb_syncaccel(struct sis_video_info *ivideo); 6921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 6931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Internal general routines */ 694c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonstatic void sisfb_search_mode(char *name, bool quiet); 695544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags); 696544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic u8 sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate, 697544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int index); 698544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_setcolreg(unsigned regno, unsigned red, unsigned green, 699544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer unsigned blue, unsigned transp, 700544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer struct fb_info *fb_info); 701544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, 702544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer struct fb_info *info); 703544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_pre_setmode(struct sis_video_info *ivideo); 704544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_post_setmode(struct sis_video_info *ivideo); 705c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonstatic bool sisfb_CheckVBRetrace(struct sis_video_info *ivideo); 706c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonstatic bool sisfbcheckvretracecrt2(struct sis_video_info *ivideo); 707c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonstatic bool sisfbcheckvretracecrt1(struct sis_video_info *ivideo); 708c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonstatic bool sisfb_bridgeisslave(struct sis_video_info *ivideo); 709544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_detect_VB_connect(struct sis_video_info *ivideo); 710544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_get_VB_type(struct sis_video_info *ivideo); 711544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val); 712544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_set_TVyposoffset(struct sis_video_info *ivideo, int val); 713544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#ifdef CONFIG_FB_SIS_300 714544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferunsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); 715544393fe584d333480659a4bed30f5295355df11Thomas Winischhofervoid sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg, unsigned int val); 716544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferunsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg); 717544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#endif 718544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#ifdef CONFIG_FB_SIS_315 719544393fe584d333480659a4bed30f5295355df11Thomas Winischhofervoid sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg, unsigned char val); 720544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferunsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg); 721544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#endif 7221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 7231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* SiS-specific exported functions */ 724544393fe584d333480659a4bed30f5295355df11Thomas Winischhofervoid sis_malloc(struct sis_memreq *req); 725544393fe584d333480659a4bed30f5295355df11Thomas Winischhofervoid sis_malloc_new(struct pci_dev *pdev, struct sis_memreq *req); 726544393fe584d333480659a4bed30f5295355df11Thomas Winischhofervoid sis_free(u32 base); 727544393fe584d333480659a4bed30f5295355df11Thomas Winischhofervoid sis_free_new(struct pci_dev *pdev, u32 base); 7281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 7291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Internal heap routines */ 730544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic int sisfb_heap_init(struct sis_video_info *ivideo); 731544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct SIS_OH * sisfb_poh_new_node(struct SIS_HEAP *memheap); 732544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct SIS_OH * sisfb_poh_allocate(struct SIS_HEAP *memheap, u32 size); 733544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_delete_node(struct SIS_OH *poh); 734544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_insert_node(struct SIS_OH *pohList, struct SIS_OH *poh); 735544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic struct SIS_OH * sisfb_poh_free(struct SIS_HEAP *memheap, u32 base); 736544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferstatic void sisfb_free_node(struct SIS_HEAP *memheap, struct SIS_OH *poh); 7371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 7381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Routines from init.c/init301.c */ 739544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay, 740c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutsson int VDisplay, int Depth, bool FSTN, unsigned short CustomT, 741544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int LCDwith, int LCDheight, unsigned int VBFlags2); 742544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay, 743544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int VDisplay, int Depth, unsigned int VBFlags2); 744544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay, 745544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int VDisplay, int Depth, unsigned int VBFlags2); 746544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); 747c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonextern bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo); 748544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable); 749544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable); 750544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 751c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonextern bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr); 752544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer 753c30660ead2dd6ced47ac6ad4c099fb9305263ffbRichard Knutssonextern bool sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, 754544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer int *htotal, int *vtotal, unsigned char rateindex); 755544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, 756544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer unsigned char modeno, unsigned char rateindex); 757544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern int sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno, 758544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer unsigned char rateindex, struct fb_var_screeninfo *var); 7591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 7601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Chrontel TV, DDC and DPMS functions */ 761544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg); 762544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); 763544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg); 764544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val); 765544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, 766544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer unsigned char myor, unsigned char myand); 767544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime); 768544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo); 769544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine, 770544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer unsigned short adaptnum, unsigned short DDCdatatype, unsigned char *buffer, 771544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer unsigned int VBFlags2); 772544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr); 773544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#ifdef CONFIG_FB_SIS_315 774544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr); 775544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr); 776544393fe584d333480659a4bed30f5295355df11Thomas Winischhofer#endif 777544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr); 778544393fe584d333480659a4bed30f5295355df11Thomas Winischhoferextern void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr); 7791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 7801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 7811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 782