Commit 544393fe authored by Thomas Winischhofer's avatar Thomas Winischhofer Committed by Linus Torvalds

[PATCH] sisfb update

This lifts sisfb from version 1.7.17 to version 1.8.9. Changes include:

- Added support for XGI V3XT, V5, V8, Z7 chipsets, including POSTing of
  all of these chipsets.

- Added support for latest SiS chipsets (761).

- Added support for SiS76x memory "hybrid" mode.

- Added support for new LCD resolutions (eg 1280x854, 856x480).

- Fixed support for 320x240 STN panels (for embedded devices).

- Fixed many HDTV modes (525p, 750p, 1080i).

- Fixed PCI config register reading/writing to use proper kernel
  functions for this purpose.

- Fixed PCI ROM handling to use the kernel's proper functions.

- Removed lots of "typedef"s.

- Removed lots of code which was for X.org/XFree86 only.

- Fixed coding style in many places.

- Removed lots of 2.4 cruft.

- Reduced stack size by unifying two previously separate structs into
  one.

- Added new hooks for memory allocation (for DRM).  Now the driver can
  truly handle multiple cards, including memory management.

- Fixed numerous minor bugs.
Signed-off-by: default avatarThomas Winischhofer <thomas@winischhofer.net>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5c06e2aa
...@@ -1079,15 +1079,16 @@ config FB_SAVAGE_ACCEL ...@@ -1079,15 +1079,16 @@ config FB_SAVAGE_ACCEL
choose N here. choose N here.
config FB_SIS config FB_SIS
tristate "SiS acceleration" tristate "SiS/XGI display support"
depends on FB && PCI depends on FB && PCI
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
select FB_SOFT_CURSOR select FB_SOFT_CURSOR
help help
This is the frame buffer device driver for the SiS 300, 315 and This is the frame buffer device driver for the SiS 300, 315, 330
330 series VGA chipsets. Specs available at <http://www.sis.com> and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets.
Specs available at <http://www.sis.com> and <http://www.xgitech.com>.
To compile this driver as a module, choose M here; the module To compile this driver as a module, choose M here; the module
will be called sisfb. will be called sisfb.
...@@ -1099,11 +1100,12 @@ config FB_SIS_300 ...@@ -1099,11 +1100,12 @@ config FB_SIS_300
Say Y here to support use of the SiS 300/305, 540, 630 and 730. Say Y here to support use of the SiS 300/305, 540, 630 and 730.
config FB_SIS_315 config FB_SIS_315
bool "SiS 315/330 series support" bool "SiS 315/330/340 series and XGI support"
depends on FB_SIS depends on FB_SIS
help help
Say Y here to support use of the SiS 315 and 330 series Say Y here to support use of the SiS 315, 330 and 340 series
(315/H/PRO, 55x, 650, 651, 740, 330, 661, 741, 760). (315/H/PRO, 55x, 650, 651, 740, 330, 661, 741, 760, 761) as well
as XGI V3XT, V5, V8 and Z7.
config FB_NEOMAGIC config FB_NEOMAGIC
tristate "NeoMagic display support" tristate "NeoMagic display support"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* Register settings for SiS 300 series * Register settings for SiS 300 series
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,31 +50,7 @@ ...@@ -50,31 +50,7 @@
* *
*/ */
static const SiS_StStruct SiS300_SModeIDTable[] = static const struct SiS_Ext SiS300_EModeIDTable[] =
{
{0x01,0x9208,0x01,0x00,0x00,0x00,0x00,0x00, 0},
{0x01,0x1210,0x14,0x01,0x01,0x00,0x00,0x00, 0},
{0x01,0x1010,0x17,0x02,0x02,0x00,0x00,0x00, 0},
{0x03,0x8208,0x03,0x00,0x00,0x00,0x00,0x00, 0},
{0x03,0x0210,0x16,0x01,0x01,0x00,0x00,0x00, 0},
{0x03,0x0010,0x18,0x02,0x02,0x00,0x00,0x00, 0},
{0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x00, 0},
{0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x00, 0},
{0x07,0x0000,0x07,0x03,0x03,0x00,0x00,0x00, 0},
{0x07,0x0000,0x19,0x02,0x02,0x00,0x00,0x00, 0},
{0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x00, 0},
{0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x00, 0},
{0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x00, 0},
{0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x00, 0},
{0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x00, 0},
{0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x00, 0},
{0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x00, 0},
{0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x00, 0},
{0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x00, 0},
{0xff, 0, 0, 0, 0, 0, 0, 0, 0}
};
static const SiS_ExtStruct SiS300_EModeIDTable[] =
{ {
{0x6a,0x2212,0x0102,SIS_RI_800x600, 0x00,0x00,0x00,0x00,0x00,-1}, /* 800x600x? */ {0x6a,0x2212,0x0102,SIS_RI_800x600, 0x00,0x00,0x00,0x00,0x00,-1}, /* 800x600x? */
{0x2e,0x0a1b,0x0101,SIS_RI_640x480, 0x00,0x00,0x00,0x00,0x08,-1}, {0x2e,0x0a1b,0x0101,SIS_RI_640x480, 0x00,0x00,0x00,0x00,0x08,-1},
...@@ -119,8 +95,8 @@ static const SiS_ExtStruct SiS300_EModeIDTable[] = ...@@ -119,8 +95,8 @@ static const SiS_ExtStruct SiS300_EModeIDTable[] =
{0x68,0x067b,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1}, {0x68,0x067b,0x013f,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
{0x69,0x06fd,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1}, {0x69,0x06fd,0x0140,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
{0x6b,0x07ff,0x0000,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1}, {0x6b,0x07ff,0x0000,SIS_RI_1920x1440,0x00,0x00,0x00,0x00,0x27,-1},
{0x6c,0x067b,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1}, /* 2048x1536x8 - not in BIOS! */ {0x6c,0x067b,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1}, /* 2048x1536x8 */
{0x6d,0x06fd,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1}, /* 2048x1536x16 - not in BIOS! */ {0x6d,0x06fd,0x0000,SIS_RI_2048x1536,0x00,0x00,0x00,0x00,0x28,-1}, /* 2048x1536x16 */
{0x70,0x6a1b,0x0000,SIS_RI_800x480, 0x00,0x00,0x07,0x00,0x2d,-1}, /* 800x480x8 */ {0x70,0x6a1b,0x0000,SIS_RI_800x480, 0x00,0x00,0x07,0x00,0x2d,-1}, /* 800x480x8 */
{0x71,0x4a1b,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1}, /* 1024x576x8 */ {0x71,0x4a1b,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1}, /* 1024x576x8 */
{0x74,0x4a1d,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1}, /* 1024x576x16 */ {0x74,0x4a1d,0x0000,SIS_RI_1024x576, 0x00,0x00,0x00,0x00,0x30,-1}, /* 1024x576x16 */
...@@ -166,77 +142,77 @@ static const SiS_ExtStruct SiS300_EModeIDTable[] = ...@@ -166,77 +142,77 @@ static const SiS_ExtStruct SiS300_EModeIDTable[] =
{0xff,0x0000,0xffff,0, 0x00,0x00,0x00,0x00,0x00} {0xff,0x0000,0xffff,0, 0x00,0x00,0x00,0x00,0x00}
}; };
static const SiS_Ext2Struct SiS300_RefIndex[] = static const struct SiS_Ext2 SiS300_RefIndex[] =
{ {
{0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0}, /* 00 */ {0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 00 */
{0x0467,0x0e,0x44,0x05,0x05,0x6a, 800, 600, 0}, /* 01 */ {0x0467,0x0e,0x04,0x05,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 01 */
{0x0067,0x0f,0x07,0x48,0x05,0x6a, 800, 600, 0}, /* 02 - CRT1CRTC was 0x4f */ {0x0067,0x0f,0x07,0x48,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 02 - CRT1CRTC was 0x4f */
{0x0067,0x10,0x06,0x8b,0x05,0x6a, 800, 600, 0}, /* 03 */ {0x0067,0x10,0x06,0x8b,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 03 */
{0x0147,0x11,0x08,0x00,0x05,0x6a, 800, 600, 0}, /* 04 */ {0x0147,0x11,0x08,0x00,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 04 */
{0x0147,0x12,0x0c,0x00,0x05,0x6a, 800, 600, 0}, /* 05 */ {0x0147,0x12,0x0c,0x00,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 05 */
{0x0047,0x11,0x4e,0x00,0x05,0x6a, 800, 600, 0}, /* 06 - CRT1CRTC was 0x51 */ {0x0047,0x11,0x0e,0x00,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 06 - CRT1CRTC was 0x51 */
{0x0047,0x11,0x13,0x00,0x05,0x6a, 800, 600, 0}, /* 07 */ {0x0047,0x11,0x13,0x00,0x05,0x6a, 800, 600, 0, 0x00, 0x00}, /* 07 */
{0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0}, /* 08 */ {0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 08 */
{0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0}, /* 09 */ {0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 09 */
{0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0}, /* 0a */ {0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 0a */
{0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0}, /* 0b */ {0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 0b */
{0xc047,0x09,0x05,0x00,0x04,0x2e, 640, 480, 0}, /* 0c */ {0xc047,0x09,0x05,0x00,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 0c */
{0xc047,0x0a,0x08,0x00,0x04,0x2e, 640, 480, 0}, /* 0d */ {0xc047,0x0a,0x08,0x00,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 0d */
{0xc047,0x0b,0x0a,0x00,0x04,0x2e, 640, 480, 0}, /* 0e */ {0xc047,0x0b,0x0a,0x00,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 0e */
{0xc047,0x0c,0x10,0x00,0x04,0x2e, 640, 480, 0}, /* 0f */ {0xc047,0x0c,0x10,0x00,0x04,0x2e, 640, 480, 0, 0x00, 0x00}, /* 0f */
{0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0}, /* 10 */ {0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0, 0x4a, 0x49}, /* 10 */
{0xc06f,0x31,0x01,0x06,0x13,0x31, 720, 480, 0}, /* 11 */ {0xc06f,0x31,0x01,0x06,0x13,0x31, 720, 480, 0, 0x00, 0x00}, /* 11 */
{0x006f,0x32,0x03,0x06,0x14,0x32, 720, 576, 0}, /* 12 */ {0x006f,0x32,0x4a,0x06,0x14,0x32, 720, 576, 0, 0x00, 0x00}, /* 12 */ /* 4a was 03 */
{0x0187,0x15,0x05,0x00,0x06,0x37,1024, 768, 0}, /* 13 */ {0x0187,0x15,0x05,0x00,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 13 */
{0xc877,0x16,0x09,0x06,0x06,0x37,1024, 768, 0}, /* 14 */ {0xc877,0x16,0x09,0x06,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 14 */
{0xc067,0x17,0x0b,0x49,0x06,0x37,1024, 768, 0}, /* 15 - CRT1CRTC was 0x97 */ {0xc067,0x17,0x0b,0x49,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 15 - CRT1CRTC was 0x97 */
{0x0267,0x18,0x0d,0x00,0x06,0x37,1024, 768, 0}, /* 16 */ {0x0267,0x18,0x0d,0x00,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 16 */
{0x0047,0x19,0x11,0x8c,0x06,0x37,1024, 768, 0}, /* 17 - CRT1CRTC was 0x59 */ {0x0047,0x19,0x11,0x8c,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 17 - CRT1CRTC was 0x59 */
{0x0047,0x1a,0x52,0x00,0x06,0x37,1024, 768, 0}, /* 18 */ {0x0047,0x1a,0x12,0x00,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 18 */
{0x0007,0x1b,0x16,0x00,0x06,0x37,1024, 768, 0}, /* 19 - CRT1CRTC was 0x5b */ {0x0007,0x1b,0x16,0x00,0x06,0x37,1024, 768, 0, 0x00, 0x00}, /* 19 - CRT1CRTC was 0x5b */
{0x0387,0x1c,0x4d,0x00,0x07,0x3a,1280,1024, 0}, /* 1a - CRT1CRTC was 0x5c */ {0x0387,0x1c,0x0d,0x00,0x07,0x3a,1280,1024, 0, 0x00, 0x00}, /* 1a - CRT1CRTC was 0x5c */
{0x0077,0x1d,0x14,0x07,0x07,0x3a,1280,1024, 0}, /* 1b */ {0x0077,0x1d,0x14,0x07,0x07,0x3a,1280,1024, 0, 0x00, 0x00}, /* 1b */
{0x0047,0x1e,0x17,0x00,0x07,0x3a,1280,1024, 0}, /* 1c */ {0x0047,0x1e,0x17,0x00,0x07,0x3a,1280,1024, 0, 0x00, 0x00}, /* 1c */
{0x0007,0x1f,0x98,0x00,0x07,0x3a,1280,1024, 0}, /* 1d */ {0x0007,0x1f,0x18,0x00,0x07,0x3a,1280,1024, 0, 0x00, 0x00}, /* 1d */
{0x0007,0x20,0x59,0x00,0x00,0x3c,1600,1200, 0}, /* 1e - CRT1CRTC was 0x60 */ {0x0007,0x20,0x19,0x00,0x00,0x3c,1600,1200, 0, 0x00, 0x00}, /* 1e - CRT1CRTC was 0x60 */
{0x0007,0x21,0x5a,0x00,0x00,0x3c,1600,1200, 0}, /* 1f */ {0x0007,0x21,0x1a,0x00,0x00,0x3c,1600,1200, 0, 0x00, 0x00}, /* 1f */
{0x0007,0x22,0x1b,0x00,0x00,0x3c,1600,1200, 0}, /* 20 */ {0x0007,0x22,0x1b,0x00,0x00,0x3c,1600,1200, 0, 0x00, 0x00}, /* 20 */
{0x0007,0x23,0x1d,0x00,0x00,0x3c,1600,1200, 0}, /* 21 - CRT1CRTC was 0x63 */ {0x0007,0x23,0x1d,0x00,0x00,0x3c,1600,1200, 0, 0x00, 0x00}, /* 21 - CRT1CRTC was 0x63 */
{0x0007,0x24,0x1e,0x00,0x00,0x3c,1600,1200, 0}, /* 22 */ {0x0007,0x24,0x1e,0x00,0x00,0x3c,1600,1200, 0, 0x00, 0x00}, /* 22 */
{0x407f,0x00,0x00,0x00,0x00,0x40, 320, 200, 0}, /* 23 */ {0x407f,0x00,0x00,0x00,0x00,0x40, 320, 200, 0, 0x4b, 0x4b}, /* 23 */
{0xc07f,0x01,0x00,0x04,0x04,0x50, 320, 240, 0}, /* 24 */ {0xc07f,0x01,0x00,0x04,0x04,0x50, 320, 240, 0, 0x00, 0x00}, /* 24 */
{0x0077,0x02,0x04,0x05,0x05,0x51, 400, 300, 0}, /* 25 */ {0x0077,0x02,0x04,0x05,0x05,0x51, 400, 300, 0, 0x00, 0x00}, /* 25 */
{0xc877,0x03,0x09,0x06,0x06,0x52, 512, 384, 0}, /* 26 */ /* was c077 */ {0xc877,0x03,0x09,0x06,0x06,0x52, 512, 384, 0, 0x00, 0x00}, /* 26 */ /* was c077 */
{0x8207,0x25,0x1f,0x00,0x00,0x68,1920,1440, 0}, /* 27 */ {0x8207,0x25,0x1f,0x00,0x00,0x68,1920,1440, 0, 0x00, 0x00}, /* 27 */
{0x0007,0x26,0x20,0x00,0x00,0x6c,2048,1536, 0}, /* 28 */ {0x0007,0x26,0x20,0x00,0x00,0x6c,2048,1536, 0, 0x00, 0x00}, /* 28 */
{0x0067,0x27,0x14,0x08,0x0a,0x6e,1280, 960, 0}, /* 29 - 1280x960-60 */ {0x0067,0x27,0x14,0x08,0x0a,0x6e,1280, 960, 0, 0x00, 0x00}, /* 29 - 1280x960-60 */
{0x0027,0x45,0x3c,0x08,0x0a,0x6e,1280, 960, 0}, /* 2a - 1280x960-85 */ {0x0027,0x45,0x3c,0x08,0x0a,0x6e,1280, 960, 0, 0x00, 0x00}, /* 2a - 1280x960-85 */
{0xc077,0x33,0x09,0x06,0x00,0x20,1024, 600, 0}, /* 2b */ {0xc077,0x33,0x09,0x06,0x00,0x20,1024, 600, 0, 0x00, 0x00}, /* 2b */
{0xc077,0x34,0x0b,0x06,0x00,0x23,1152, 768, 0}, /* 2c */ /* VCLK 0x09 */ {0xc077,0x34,0x0b,0x06,0x00,0x23,1152, 768, 0, 0x00, 0x00}, /* 2c */ /* VCLK 0x09 */
{0x0077,0x35,0x27,0x08,0x18,0x70, 800, 480, 0}, /* 2d */ {0x0077,0x35,0x27,0x08,0x18,0x70, 800, 480, 0, 0x00, 0x00}, /* 2d */
{0x0047,0x36,0x37,0x08,0x18,0x70, 800, 480, 0}, /* 2e */ {0x0047,0x36,0x37,0x08,0x18,0x70, 800, 480, 0, 0x00, 0x00}, /* 2e */
{0x0047,0x37,0x08,0x08,0x18,0x70, 800, 480, 0}, /* 2f */ {0x0047,0x37,0x08,0x08,0x18,0x70, 800, 480, 0, 0x00, 0x00}, /* 2f */
{0x0077,0x38,0x09,0x09,0x19,0x71,1024, 576, 0}, /* 30 */ {0x0077,0x38,0x09,0x09,0x19,0x71,1024, 576, 0, 0x00, 0x00}, /* 30 */
{0x0047,0x39,0x38,0x09,0x19,0x71,1024, 576, 0}, /* 31 */ {0x0047,0x39,0x38,0x09,0x19,0x71,1024, 576, 0, 0x00, 0x00}, /* 31 */
{0x0047,0x3a,0x11,0x09,0x19,0x71,1024, 576, 0}, /* 32 */ {0x0047,0x3a,0x11,0x09,0x19,0x71,1024, 576, 0, 0x00, 0x00}, /* 32 */
{0x0077,0x3b,0x39,0x0a,0x0c,0x75,1280, 720, 0}, /* 33 */ {0x0077,0x3b,0x39,0x0a,0x0c,0x75,1280, 720, 0, 0x00, 0x00}, /* 33 */
{0x0047,0x3c,0x3a,0x0a,0x0c,0x75,1280, 720, 0}, /* 34 */ {0x0047,0x3c,0x3a,0x0a,0x0c,0x75,1280, 720, 0, 0x00, 0x00}, /* 34 */
{0x0007,0x3d,0x3b,0x0a,0x0c,0x75,1280, 720, 0}, /* 35 */ {0x0007,0x3d,0x3b,0x0a,0x0c,0x75,1280, 720, 0, 0x00, 0x00}, /* 35 */
{0x0067,0x49,0x35,0x06,0x1a,0x29,1152, 864, 0}, /* 36 1152x864-60Hz */ {0x0067,0x49,0x35,0x06,0x1a,0x29,1152, 864, 0, 0x00, 0x00}, /* 36 1152x864-60Hz */
{0x0067,0x3e,0x34,0x06,0x1a,0x29,1152, 864, 0}, /* 37 1152x864-75Hz */ {0x0067,0x3e,0x34,0x06,0x1a,0x29,1152, 864, 0, 0x00, 0x00}, /* 37 1152x864-75Hz */
{0x0047,0x44,0x3a,0x06,0x1a,0x29,1152, 864, 0}, /* 38 1152x864-85Hz */ {0x0047,0x44,0x3a,0x06,0x1a,0x29,1152, 864, 0, 0x00, 0x00}, /* 38 1152x864-85Hz */
{0x00c7,0x3f,0x28,0x00,0x16,0x39, 848, 480, 0}, /* 39 848x480-38Hzi */ {0x00c7,0x3f,0x28,0x00,0x16,0x39, 848, 480, 0, 0x00, 0x00}, /* 39 848x480-38Hzi */
{0xc067,0x40,0x3d,0x0b,0x16,0x39, 848, 480, 0}, /* 3a 848x480-60Hz */ {0xc067,0x40,0x3d,0x0b,0x16,0x39, 848, 480, 0, 0x00, 0x00}, /* 3a 848x480-60Hz */
{0x00c7,0x41,0x28,0x00,0x17,0x3f, 856, 480, 0}, /* 3b 856x480-38Hzi */ {0x00c7,0x41,0x28,0x00,0x17,0x3f, 856, 480, 0, 0x00, 0x00}, /* 3b 856x480-38Hzi */
{0xc047,0x42,0x28,0x00,0x17,0x3f, 856, 480, 0}, /* 3c 856x480-60Hz */ {0xc067,0x42,0x28,0x0c,0x17,0x3f, 856, 480, 0, 0x00, 0x00}, /* 3c 856x480-60Hz */
{0x0067,0x43,0x3e,0x0c,0x1b,0x48,1360, 768, 0}, /* 3d 1360x768-60Hz */ {0x0067,0x43,0x3e,0x0d,0x1b,0x48,1360, 768, 0, 0x00, 0x00}, /* 3d 1360x768-60Hz */
{0x0077,0x46,0x3f,0x08,0x08,0x55,1280, 768, 0}, /* 3e 1280x768-60Hz */ {0x0077,0x46,0x3f,0x08,0x08,0x55,1280, 768, 0, 0x00, 0x00}, /* 3e 1280x768-60Hz */
{0x006f,0x47,0x03,0x06,0x15,0x5f, 768, 576, 0}, /* 3f 768x576 */ {0x006f,0x47,0x4c,0x06,0x15,0x5f, 768, 576, 0, 0x00, 0x00}, /* 3f 768x576 */
{0x0027,0x48,0x13,0x08,0x00,0x67,1360,1024, 0}, /* 40 1360x1024-59Hz (BARCO1366 only) */ {0x0027,0x48,0x13,0x08,0x00,0x67,1360,1024, 0, 0x00, 0x00}, /* 40 1360x1024-59Hz (BARCO1366 only) */
{0xffff, 0, 0, 0, 0, 0, 0, 0, 0} {0xffff, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0x00}
}; };
static const SiS_VBModeStruct SiS300_VBModeIDTable[] = static const struct SiS_VBMode SiS300_VBModeIDTable[] =
{ {
{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01}, {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x01},
...@@ -303,53 +279,26 @@ static const SiS_VBModeStruct SiS300_VBModeIDTable[] = ...@@ -303,53 +279,26 @@ static const SiS_VBModeStruct SiS300_VBModeIDTable[] =
{0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00} {0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
}; };
static const SiS_CRT1TableStruct SiS300_CRT1Table[] = static const struct SiS_CRT1Table SiS300_CRT1Table[] =
{ {
#if 1
{{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x00 - 320x200 */ {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x00 - 320x200 */
0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00, /* HRE [4],[15] is invalid - but correcting it does not work */ 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00, /* HRE [4],[15] is invalid - but correcting it does not work */
0x00}}, 0x00}},
#endif
#if 0
{{0x2d,0x27,0x27,0x91,0x2c,0x92,0xbf,0x1f, /* 0x00 - corrected 320x200-72 - does not work */
0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x04,
0x00}},
#endif
{{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e, /* 0x01 */ {{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e, /* 0x01 */
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00, /* HRE [4],[15] is invalid - but correcting it does not work */ 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00, /* HRE [4],[15] is invalid - but correcting it does not work */
0x00}}, 0x00}},
#if 0
{{0x2d,0x27,0x27,0x91,0x2c,0x92,0x0b,0x3e, /* 0x01 - corrected 320x240-60 - does not work */
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x04,
0x00}},
#endif
{{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0, /* 0x02 */ {{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0, /* 0x02 */
0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05, 0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05,
0x01}}, 0x01}},
#if 0
{{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0, /* 0x02 - corrected 400x300-60 */
0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05,
0x01}},
#endif
{{0x4f,0x3f,0x3f,0x93,0x45,0x0d,0x24,0xf5, {{0x4f,0x3f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x01, 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x01,
0x01}}, 0x01}},
{{0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, {{0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x05, 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x05,
0x00}}, 0x00}},
#if 0
{{0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, /* 0x05 */
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
0x00}},
#endif
{{0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e, /* 0x05 - corrected 640x480-60 */ {{0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e, /* 0x05 - corrected 640x480-60 */
0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05, 0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05,
0x00}}, 0x00}},
#if 0
{{0x63,0x4f,0x50,0x86,0x56,0x9b,0x06,0x3e, /* 0x06 */
0xe8,0x8b,0xdf,0xe7,0xff,0x10,0x00,0x01,
0x00}},
#endif
{{0x63,0x4f,0x4f,0x87,0x56,0x9b,0x06,0x3e, /* 0x06 - corrected 640x480-72 */ {{0x63,0x4f,0x4f,0x87,0x56,0x9b,0x06,0x3e, /* 0x06 - corrected 640x480-72 */
0xe8,0x8a,0xdf,0xe7,0x07,0x00,0x00,0x01, 0xe8,0x8a,0xdf,0xe7,0x07,0x00,0x00,0x01,
0x00}}, 0x00}},
...@@ -359,19 +308,9 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] = ...@@ -359,19 +308,9 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] =
{{0x63,0x4f,0x4f,0x87,0x5a,0x81,0xfb,0x1f, {{0x63,0x4f,0x4f,0x87,0x5a,0x81,0xfb,0x1f,
0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05, 0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05,
0x00}}, 0x00}},
#if 0
{{0x66,0x4f,0x4f,0x86,0x56,0x9e,0x03,0x3e, /* 0x09 */
0xe4,0x87,0xdf,0xdf,0x04,0x00,0x00,0x01,
0x00}},
#endif
{{0x67,0x4f,0x4f,0x8b,0x57,0x83,0x10,0x3e, /* 0x09 - corrected 640x480-100 */ {{0x67,0x4f,0x4f,0x8b,0x57,0x83,0x10,0x3e, /* 0x09 - corrected 640x480-100 */
0xe7,0x8d,0xdf,0xe6,0x11,0x00,0x00,0x05, 0xe7,0x8d,0xdf,0xe6,0x11,0x00,0x00,0x05,
0x00}}, 0x00}},
#if 0
{{0x6c,0x4f,0x4f,0x83,0x59,0x9e,0x00,0x3e, /* 0x0a */
0xe5,0x8d,0xdf,0xdf,0x01,0x00,0x00,0x01,
0x00}},
#endif
{{0x67,0x4f,0x4f,0x8b,0x57,0x83,0x10,0x3e, /* 0x0a - corrected 640x480-120 */ {{0x67,0x4f,0x4f,0x8b,0x57,0x83,0x10,0x3e, /* 0x0a - corrected 640x480-120 */
0xe7,0x8d,0xdf,0xe6,0x11,0x00,0x00,0x05, 0xe7,0x8d,0xdf,0xe6,0x11,0x00,0x00,0x05,
0x00}}, 0x00}},
...@@ -459,11 +398,6 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] = ...@@ -459,11 +398,6 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] =
{{0x55,0xff,0xff,0x99,0x0d,0x0c,0x3e,0xba, {{0x55,0xff,0xff,0x99,0x0d,0x0c,0x3e,0xba,
0x00,0x84,0xff,0xff,0x3f,0x0f,0x41,0x05, 0x00,0x84,0xff,0xff,0x3f,0x0f,0x41,0x05,
0x00}}, 0x00}},
#if 0
{{0xdc,0x9f,0x9f,0x00,0xab,0x19,0xe6,0xef, /* 0x27: 1280x960-70 - invalid! */
0xc0,0xc3,0xbf,0xbf,0xe7,0x10,0x00,0x07,
0x01}},
#endif
{{0xdc,0x9f,0x9f,0x80,0xaf,0x9d,0xe6,0xff, /* 0x27: 1280x960-60 - correct */ {{0xdc,0x9f,0x9f,0x80,0xaf,0x9d,0xe6,0xff, /* 0x27: 1280x960-60 - correct */
0xc0,0x83,0xbf,0xbf,0xe7,0x10,0x00,0x07, 0xc0,0x83,0xbf,0xbf,0xe7,0x10,0x00,0x07,
0x01}}, 0x01}},
...@@ -497,9 +431,9 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] = ...@@ -497,9 +431,9 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] =
{{0x6b,0x59,0x59,0x8f,0x5e,0x8c,0x0b,0x3e, {{0x6b,0x59,0x59,0x8f,0x5e,0x8c,0x0b,0x3e,
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05, 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
0x00}}, 0x00}},
{{0x7b,0x59,0x63,0x9f,0x6a,0x93,0x6f,0xf0, /* 0x32 */ {{0x6d,0x59,0x59,0x91,0x60,0x89,0x53,0xf0, /* 0x32: 720x576, corrected to 60Hz */
0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05, 0x41,0x84,0x3f,0x3f,0x54,0x00,0x00,0x05,
0x01}}, 0x41}},
{{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1, /* 0x33 - 1024x600 */ {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1, /* 0x33 - 1024x600 */
0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02, 0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02,
0x01}}, 0x01}},
...@@ -560,18 +494,24 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] = ...@@ -560,18 +494,24 @@ static const SiS_CRT1TableStruct SiS300_CRT1Table[] =
{{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x20,0xf5, /* 1280x768-60 */ {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x20,0xf5, /* 1280x768-60 */
0x03,0x88,0xff,0xff,0x21,0x10,0x00,0x07, 0x03,0x88,0xff,0xff,0x21,0x10,0x00,0x07,
0x01}}, /* 0x46 */ 0x01}}, /* 0x46 */
{{0x7b,0x5f,0x63,0x9f,0x6a,0x93,0x6f,0xf0, /* 768x576 */ {{0x75,0x5f,0x5f,0x99,0x66,0x90,0x53,0xf0, /* 768x576, corrected to 60Hz */
0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05, 0x41,0x84,0x3f,0x3f,0x54,0x00,0x00,0x05,
0x01}}, /* 0x47 */ 0x41}}, /* 0x47 */
{{0xce,0xa9,0xa9,0x92,0xb1,0x07,0x28,0x52, /* 1360x1024 (Barco iQ Pro R300) */ {{0xce,0xa9,0xa9,0x92,0xb1,0x07,0x28,0x52, /* 1360x1024 (Barco iQ Pro R300) */
0x02,0x8e,0xff,0x00,0x29,0x0d,0x00,0x03, 0x02,0x8e,0xff,0x00,0x29,0x0d,0x00,0x03,
0x00}}, /* 0x48 */ 0x00}}, /* 0x48 */
{{0xcd,0x8f,0x8f,0x91,0x9b,0x1b,0x7a,0xff, /* 1152x864-60 */ {{0xcd,0x8f,0x8f,0x91,0x9b,0x1b,0x7a,0xff, /* 1152x864-60 */
0x64,0x8c,0x5f,0x62,0x7b,0x10,0x00,0x07, 0x64,0x8c,0x5f,0x62,0x7b,0x10,0x00,0x07,
0x41}} /* 0x49 */ 0x41}}, /* 0x49 */
{{0x5c,0x4f,0x4f,0x80,0x57,0x80,0xa3,0x1f, /* fake 640x400@60Hz (for LCD and TV, not actually used) */
0x98,0x8c,0x8f,0x96,0xa4,0x30,0x00,0x05,
0x40}}, /* 0x4a */
{{0x2c,0x27,0x27,0x90,0x2d,0x92,0xa4,0x1f, /* fake 320x200@60Hz (for LCD and TV, not actually used) */
0x98,0x8c,0x8f,0x96,0xa5,0x30,0x00,0x04,
0x00}} /* 0x4b */
}; };
static const SiS_MCLKDataStruct SiS300_MCLKData_630[] = static const struct SiS_MCLKData SiS300_MCLKData_630[] =
{ {
{ 0x5a,0x64,0x80, 66}, { 0x5a,0x64,0x80, 66},
{ 0xb3,0x45,0x80, 83}, { 0xb3,0x45,0x80, 83},
...@@ -583,7 +523,7 @@ static const SiS_MCLKDataStruct SiS300_MCLKData_630[] = ...@@ -583,7 +523,7 @@ static const SiS_MCLKDataStruct SiS300_MCLKData_630[] =
{ 0x37,0x61,0x80,100} { 0x37,0x61,0x80,100}
}; };
static const SiS_MCLKDataStruct SiS300_MCLKData_300[] = static const struct SiS_MCLKData SiS300_MCLKData_300[] =
{ {
{ 0x68,0x43,0x80,125}, { 0x68,0x43,0x80,125},
{ 0x68,0x43,0x80,125}, { 0x68,0x43,0x80,125},
...@@ -595,7 +535,7 @@ static const SiS_MCLKDataStruct SiS300_MCLKData_300[] = ...@@ -595,7 +535,7 @@ static const SiS_MCLKDataStruct SiS300_MCLKData_300[] =
{ 0x37,0x61,0x80,100} { 0x37,0x61,0x80,100}
}; };
static SiS_VCLKDataStruct SiS300_VCLKData[] = static struct SiS_VCLKData SiS300_VCLKData[] =
{ {
{ 0x1b,0xe1, 25}, /* 0x00 */ { 0x1b,0xe1, 25}, /* 0x00 */
{ 0x4e,0xe4, 28}, /* 0x01 */ { 0x4e,0xe4, 28}, /* 0x01 */
...@@ -669,53 +609,26 @@ static SiS_VCLKDataStruct SiS300_VCLKData[] = ...@@ -669,53 +609,26 @@ static SiS_VCLKDataStruct SiS300_VCLKData[] =
{ 0xe2,0x46,135}, /* 0x45 */ /* 1280x1024-75, better clock for VGA2 */ { 0xe2,0x46,135}, /* 0x45 */ /* 1280x1024-75, better clock for VGA2 */
{ 0x70,0x29, 81}, /* 0x46 */ /* unused */ { 0x70,0x29, 81}, /* 0x46 */ /* unused */
{ 0, 0, 0}, /* 0x47 custom (will be filled out) */ { 0, 0, 0}, /* 0x47 custom (will be filled out) */
{ 0xce,0x25,189} /* 0x48 */ /* Replacement for index 0x1b for 730 (and 540?) */ { 0xce,0x25,189}, /* 0x48 */ /* Replacement for index 0x1b for 730 (and 540?) */
{ 0x15,0xe1, 20}, /* 0x49 */ /* 640x400@60 (fake, not actually used) */
{ 0x5f,0xc6, 33}, /* 0x4a */ /* 720x576@60 */
{ 0x37,0x5a, 10}, /* 0x4b */ /* 320x200@60 (fake, not actually used) */
{ 0x2b,0xc2, 35} /* 0x4c */ /* 768@576@60 */
}; };
#ifdef LINUX_KERNEL static const unsigned char SiS300_SR15[4 * 8] =
static UCHAR SiS300_SR07 = 0x10;
#endif
static const DRAM4Type SiS300_SR15[8] =
{ {
{0x01,0x09,0xa3,0x00}, 0x01,0x09,0xa3,0x00,
{0x43,0x43,0x43,0x00}, 0x43,0x43,0x43,0x00,
{0x1e,0x1e,0x1e,0x00}, 0x1e,0x1e,0x1e,0x00,
{0x2a,0x2a,0x2a,0x00}, 0x2a,0x2a,0x2a,0x00,
{0x06,0x06,0x06,0x00}, 0x06,0x06,0x06,0x00,
{0x00,0x00,0x00,0x00}, 0x00,0x00,0x00,0x00,
{0x00,0x00,0x00,0x00}, 0x00,0x00,0x00,0x00,
{0x00,0x00,0x00,0x00} 0x00,0x00,0x00,0x00
}; };
#ifdef LINUX_KERNEL static const struct SiS_PanelDelayTbl SiS300_PanelDelayTbl[] =
static UCHAR SiS300_SR1F = 0x00;
static UCHAR SiS300_SR21 = 0x16;
static UCHAR SiS300_SR22 = 0xb2;
static UCHAR SiS300_SR23 = 0xf6;
static UCHAR SiS300_SR24 = 0x0d;
static UCHAR SiS300_SR25[] = {0x0,0x0};
static UCHAR SiS300_SR31 = 0x00;
static UCHAR SiS300_SR32 = 0x11;
static UCHAR SiS300_SR33 = 0x00;
static UCHAR SiS300_CRT2Data_1_2 = 0x40;
static UCHAR SiS300_CRT2Data_4_D = 0x00;
static UCHAR SiS300_CRT2Data_4_E = 0x00;
static UCHAR SiS300_CRT2Data_4_10 = 0x80;
static const USHORT SiS300_RGBSenseData = 0xd1;
static const USHORT SiS300_VideoSenseData = 0xb3;
static const USHORT SiS300_YCSenseData = 0xb9;
static const USHORT SiS300_RGBSenseData2 = 0x0190;
static const USHORT SiS300_VideoSenseData2 = 0x0174;
static const USHORT SiS300_YCSenseData2 = 0x016b;
static const DRAM4Type SiS300_CR40[5];
static UCHAR SiS300_CR49[2];
#endif
static const SiS_PanelDelayTblStruct SiS300_PanelDelayTbl[] =
{ {
{{0x05,0xaa}}, {{0x05,0xaa}},
{{0x05,0x14}}, {{0x05,0x14}},
...@@ -735,33 +648,11 @@ static const SiS_PanelDelayTblStruct SiS300_PanelDelayTbl[] = ...@@ -735,33 +648,11 @@ static const SiS_PanelDelayTblStruct SiS300_PanelDelayTbl[] =
{{0x05,0x60}} {{0x05,0x60}}
}; };
#if 0
static const SiS_PanelDelayTblStruct SiS300_PanelDelayTblLVDS[] =
{
{{0x05,0xaa}},
{{0x05,0x14}},
{{0x05,0x36}},
{{0x05,0x14}},
{{0x05,0x14}},
{{0x05,0x14}},
{{0x05,0x90}},
{{0x05,0x90}},
{{0x05,0x14}},
{{0x05,0x14}},
{{0x05,0x14}},
{{0x05,0x14}}, /* 2.07a (JVC): 14,96 */
{{0x05,0x28}}, /* 2.04.5c: 20, 80 - Clevo (2.04.2c): 05, 28 */
{{0x05,0x14}},
{{0x05,0x14}}, /* Some BIOSes: 05, 40 */
{{0x05,0x60}}
};
#endif
/**************************************************************/ /**************************************************************/
/* SIS VIDEO BRIDGE ----------------------------------------- */ /* SIS VIDEO BRIDGE ----------------------------------------- */
/**************************************************************/ /**************************************************************/
static const SiS_LCDDataStruct SiS300_St2LCD1024x768Data[] = static const struct SiS_LCDData SiS300_St2LCD1024x768Data[] =
{ {
{ 62, 25, 800, 546,1344, 806}, { 62, 25, 800, 546,1344, 806},
{ 32, 15, 930, 546,1344, 806}, { 32, 15, 930, 546,1344, 806},
...@@ -772,7 +663,7 @@ static const SiS_LCDDataStruct SiS300_St2LCD1024x768Data[] = ...@@ -772,7 +663,7 @@ static const SiS_LCDDataStruct SiS300_St2LCD1024x768Data[] =
{ 1, 1,1344, 806,1344, 806} { 1, 1,1344, 806,1344, 806}
}; };
static const SiS_LCDDataStruct SiS300_ExtLCD1024x768Data[] = static const struct SiS_LCDData SiS300_ExtLCD1024x768Data[] =
{ {
{ 12, 5, 896, 512,1344, 806}, { 12, 5, 896, 512,1344, 806},
{ 12, 5, 896, 510,1344, 806}, { 12, 5, 896, 510,1344, 806},
...@@ -789,7 +680,7 @@ static const SiS_LCDDataStruct SiS300_ExtLCD1024x768Data[] = ...@@ -789,7 +680,7 @@ static const SiS_LCDDataStruct SiS300_ExtLCD1024x768Data[] =
{ 1, 1,1344, 806,1344, 806} { 1, 1,1344, 806,1344, 806}
}; };
static const SiS_LCDDataStruct SiS300_St2LCD1280x1024Data[] = static const struct SiS_LCDData SiS300_St2LCD1280x1024Data[] =
{ {
{ 22, 5, 800, 510,1650,1088}, { 22, 5, 800, 510,1650,1088},
{ 22, 5, 800, 510,1650,1088}, { 22, 5, 800, 510,1650,1088},
...@@ -801,7 +692,7 @@ static const SiS_LCDDataStruct SiS300_St2LCD1280x1024Data[] = ...@@ -801,7 +692,7 @@ static const SiS_LCDDataStruct SiS300_St2LCD1280x1024Data[] =
{ 1, 1,1688,1066,1688,1066} { 1, 1,1688,1066,1688,1066}
}; };
static const SiS_LCDDataStruct SiS300_ExtLCD1280x1024Data[] = static const struct SiS_LCDData SiS300_ExtLCD1280x1024Data[] =
{ {
{ 211, 60,1024, 501,1688,1066}, { 211, 60,1024, 501,1688,1066},
{ 211, 60,1024, 508,1688,1066}, { 211, 60,1024, 508,1688,1066},
...@@ -813,7 +704,7 @@ static const SiS_LCDDataStruct SiS300_ExtLCD1280x1024Data[] = ...@@ -813,7 +704,7 @@ static const SiS_LCDDataStruct SiS300_ExtLCD1280x1024Data[] =
{ 1, 1,1688,1066,1688,1066} { 1, 1,1688,1066,1688,1066}
}; };
static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_1[] = static const struct SiS_Part2PortTbl SiS300_CRT2Part2_1024x768_1[] =
{ /* VESA Timing */ { /* VESA Timing */
{{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}}, {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
{{0x2c,0x12,0x9a,0xae,0x88,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}}, {{0x2c,0x12,0x9a,0xae,0x88,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
...@@ -824,7 +715,7 @@ static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_1[] = ...@@ -824,7 +715,7 @@ static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_1[] =
{{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}} {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}}
}; };
static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_2[] = static const struct SiS_Part2PortTbl SiS300_CRT2Part2_1024x768_2[] =
{ /* Non-VESA */ { /* Non-VESA */
{{0x28,0x12,0xa3,0xd0,0xaa,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}, {{0x28,0x12,0xa3,0xd0,0xaa,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{0x2c,0x12,0x9a,0xae,0x88,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}, {{0x2c,0x12,0x9a,0xae,0x88,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
...@@ -835,22 +726,7 @@ static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_2[] = ...@@ -835,22 +726,7 @@ static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_2[] =
{{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}} {{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}
}; };
static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1024x768_3[] = static const struct SiS_Part2PortTbl SiS300_CRT2Part2_1024x768_3[] =
{
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
};
static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_1[] =
{
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
};
static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_2[] =
{
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
};
static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_3[] =
{ {
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
}; };
...@@ -859,7 +735,85 @@ static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_3[] = ...@@ -859,7 +735,85 @@ static const SiS_Part2PortTblStruct SiS300_CRT2Part2_1280x1024_3[] =
/* LVDS/Chrontel -------------------------------------------- */ /* LVDS/Chrontel -------------------------------------------- */
/**************************************************************/ /**************************************************************/
static const SiS_LVDSDataStruct SiS300_CHTVUPALData[] = /* Custom data for Barco iQ R series */
static const struct SiS_LVDSData SiS300_LVDSBARCO1366Data_1[]=
{
{ 832, 438,1331, 806},
{ 832, 388,1331, 806},
{ 832, 438,1331, 806},
{ 832, 388,1331, 806},
{ 832, 518,1331, 806},
{1050, 638,1344, 806},
{1344, 806,1344, 806},
{1688,1066,1688,1066},
{1688,1066,1688,1066} /* 1360x1024 */
};
/* Custom data for Barco iQ R series */
static const struct SiS_LVDSData SiS300_LVDSBARCO1366Data_2[]=
{
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1688,1066,1688,1066},
{1688,1066,1688,1066} /* 1360x1024 */
};
/* Custom data for Barco iQ G series */
static const struct SiS_LVDSData SiS300_LVDSBARCO1024Data_1[]=
{
{ 832, 438,1331, 806},
{ 832, 409,1331, 806},
{ 832, 438,1331, 806},
{ 832, 409,1331, 806},
{ 832, 518,1331, 806}, /* 640x480 */
{1050, 638,1344, 806}, /* 800x600 */
{1344, 806,1344, 806}, /* 1024x768 */
};
/* Custom data for 848x480 and 856x480 parallel LVDS panels */
static const struct SiS_LVDSData SiS300_LVDS848x480Data_1[]=
{
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 640x480 TODO */
{1088, 525,1088, 525}, /* 800x600 TODO */
{1088, 525,1088, 525}, /* 1024x768 TODO */
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 848x480 */
{1088, 525,1088, 525}, /* 856x480 */
{1088, 525,1088, 525} /* 1360x768 TODO */
};
/* Custom data for 848x480 parallel panel */
static const struct SiS_LVDSData SiS300_LVDS848x480Data_2[]=
{
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 640x480 */
{1088, 525,1088, 525}, /* 800x600 */
{1088, 525,1088, 525}, /* 1024x768 */
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 848x480 */
{1088, 525,1088, 525}, /* 856x480 */
{1088, 525,1088, 525} /* 1360x768 TODO */
};
static const struct SiS_LVDSData SiS300_CHTVUPALData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -869,7 +823,7 @@ static const SiS_LVDSDataStruct SiS300_CHTVUPALData[] = ...@@ -869,7 +823,7 @@ static const SiS_LVDSDataStruct SiS300_CHTVUPALData[] =
{ 936, 836, 936, 836} { 936, 836, 936, 836}
}; };
static const SiS_LVDSDataStruct SiS300_CHTVOPALData[] = static const struct SiS_LVDSData SiS300_CHTVOPALData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -879,7 +833,7 @@ static const SiS_LVDSDataStruct SiS300_CHTVOPALData[] = ...@@ -879,7 +833,7 @@ static const SiS_LVDSDataStruct SiS300_CHTVOPALData[] =
{ 960, 750, 960, 750} { 960, 750, 960, 750}
}; };
static const SiS_LVDSDataStruct SiS300_CHTVSOPALData[] = static const struct SiS_LVDSData SiS300_CHTVSOPALData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -889,486 +843,8 @@ static const SiS_LVDSDataStruct SiS300_CHTVSOPALData[] = ...@@ -889,486 +843,8 @@ static const SiS_LVDSDataStruct SiS300_CHTVSOPALData[] =
{ 944, 625, 944, 625} { 944, 625, 944, 625}
}; };
/* Custom des data for Barco iQ R200/300/400 (BIOS 2.00.07) */
static const SiS_LVDSDesStruct SiS300_PanelType00_1[] = static const struct SiS_LVDSDes SiS300_PanelType04_1a[] = /* 1280x1024 (1366x1024) */
{
{ 1059, 626 }, /* 2.08 */
{ 1059, 624 },
{ 1059, 626 },
{ 1059, 624 },
{ 1059, 624 },
{ 0, 627 },
{ 0, 627 },
{ 0, 0 },
{ 0, 0 }
#if 0
{0, 626},
{0, 624},
{0, 626},
{0, 624},
{0, 624},
{0, 627},
{0, 627},
{0, 0},
{0, 0}
#endif
};
static const SiS_LVDSDesStruct SiS300_PanelType01_1[] =
{
{ 0, 0 }, /* 2.08 */
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 }
#if 0
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
#endif
};
static const SiS_LVDSDesStruct SiS300_PanelType02_1[] =
{
{ 1059, 626 }, /* 2.08 */
{ 1059, 624 },
{ 1059, 626 },
{ 1059, 624 },
{ 1059, 624 },
{ 0, 627 },
{ 0, 627 },
{ 0, 0 },
{ 0, 0 }
#if 0
{0, 626},
{0, 624},
{0, 626},
{0, 624},
{0, 624},
{0, 627},
{0, 627},
{0, 0},
{0, 0}
#endif
};
static const SiS_LVDSDesStruct SiS300_PanelType03_1[] =
{
{ 8, 436},
{ 8, 440},
{ 8, 436},
{ 8, 440},
{ 8, 512},
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794}
};
static const SiS_LVDSDesStruct SiS300_PanelType04_1[] = /* 1280x1024 */
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType05_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType06_1[] = /* Clevo Trumpion 1024x768 */
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType07_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType08_1[] =
{
{1059, 626},
{1059, 624},
{1059, 626},
{1059, 624},
{1059, 624},
{ 0, 627},
{ 0, 627},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType09_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0a_1[] =
{
{1059, 626},
{1059, 624},
{1059, 626},
{1059, 624},
{1059, 624},
{ 0, 627},
{ 0, 627},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0b_1[] =
{
{1343, 0},
{1343, 0},
{1343, 0},
{1343, 0},
{1343, 0},
{1343, 0},
{ 0, 799},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0c_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0d_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0e_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0}, /* 640x480 */
{1343, 0}, /* 800x600 */
{ 0, 805}, /* 1024x768 */
{ 0, 794}, /* 1280x1024 */
{ 0, 0} /* 1280x960 - not applicable */
};
static const SiS_LVDSDesStruct SiS300_PanelType0f_1[] =
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType00_2[] =
{
{976, 527},
{976, 502},
{976, 527},
{976, 502},
{976, 567},
{ 0, 627},
{ 0, 627},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType01_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType02_2[] =
{
{976, 527},
{976, 502},
{976, 527},
{976, 502},
{976, 567},
{ 0, 627},
{ 0, 627},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType03_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{1152, 622},
{1152, 597}
};
static const SiS_LVDSDesStruct SiS300_PanelType04_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType05_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType06_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType07_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType08_2[] =
{
{976, 527},
{976, 502},
{976, 527},
{976, 502},
{976, 567},
{ 0, 627},
{ 0, 627},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType09_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0a_2[] =
{
{976, 527},
{976, 502},
{976, 527},
{976, 502},
{976, 567},
{ 0, 627},
{ 0, 627},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0b_2[] =
{
{ 1152, 700},
{ 1152, 675},
{ 1152, 700},
{ 1152, 675},
{ 1152, 740},
{ 1232, 799},
{ 0, 799},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0c_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0d_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0e_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelType0f_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelTypeNS_1[]=
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 805},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS300_PanelTypeNS_2[] =
{
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0}
};
/* Custom data for Barco iQ R200/300/400 (BIOS 2.00.07) */
static const SiS_LVDSDesStruct SiS300_PanelType04_1a[] = /* 1280x1024 (1366x1024) */
{ {
{1330, 798}, /* 320x200 */ {1330, 798}, /* 320x200 */
{1330, 794}, {1330, 794},
...@@ -1381,7 +857,7 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_1a[] = /* 1280x1024 (1366x102 ...@@ -1381,7 +857,7 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_1a[] = /* 1280x1024 (1366x102
{ 0, 0} /* 1360x1024 */ { 0, 0} /* 1360x1024 */
}; };
static const SiS_LVDSDesStruct SiS300_PanelType04_2a[] = static const struct SiS_LVDSDes SiS300_PanelType04_2a[] =
{ {
{1152, 622}, {1152, 622},
{1152, 597}, {1152, 597},
...@@ -1394,8 +870,8 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_2a[] = ...@@ -1394,8 +870,8 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_2a[] =
{ 0, 0} { 0, 0}
}; };
/* Custom data for Barco iQ G200/300/400 (BIOS 2.00.07) */ /* Custom des data for Barco iQ G200/300/400 (BIOS 2.00.07) */
static const SiS_LVDSDesStruct SiS300_PanelType04_1b[] = /* 1024x768 */ static const struct SiS_LVDSDes SiS300_PanelType04_1b[] = /* 1024x768 */
{ {
{1330, 798}, /* 320x200 */ {1330, 798}, /* 320x200 */
{1330, 794}, {1330, 794},
...@@ -1406,7 +882,7 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_1b[] = /* 1024x768 */ ...@@ -1406,7 +882,7 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_1b[] = /* 1024x768 */
{ 0, 805} /* 1024x768 / 512x384 */ { 0, 805} /* 1024x768 / 512x384 */
}; };
static const SiS_LVDSDesStruct SiS300_PanelType04_2b[] = static const struct SiS_LVDSDes SiS300_PanelType04_2b[] =
{ {
{1152, 622}, {1152, 622},
{1152, 597}, {1152, 597},
...@@ -1419,376 +895,7 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_2b[] = ...@@ -1419,376 +895,7 @@ static const SiS_LVDSDesStruct SiS300_PanelType04_2b[] =
/* CRT1 CRTC for slave modes */ /* CRT1 CRTC for slave modes */
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_1[] = static const struct SiS_LVDSCRT1Data SiS300_CHTVCRT1UNTSC[] =
{
{{0x65,0x4f,0x89,0x56,0x83,0xaf,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
0x00 }},
{{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
0x00 }},
{{0x65,0x4f,0x89,0x56,0x83,0xaf,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
0x00 }},
{{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
0x00 }},
{{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
0x00 }},
{{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_1_H[] =
{
{{0x30,0x27,0x94,0x2c,0x92,0xaf,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x04,
0x00 }},
{{0x30,0x27,0x94,0x2c,0x92,0x83,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x04,
0x00 }},
{{0x30,0x27,0x94,0x2c,0x92,0xaf,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x04,
0x00 }},
{{0x30,0x27,0x94,0x2c,0x92,0x83,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x04,
0x00 }},
{{0x30,0x27,0x94,0x2c,0x92,0x04,0x3e,
0xe0,0x85,0xdf,0xfb,0x10,0x00,0x04,
0x00 }},
{{0x3d,0x31,0x81,0x37,0x1f,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x05,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_1[] =
{
{{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x04,0x3e,
0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
0x00}},
{{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_1_H[] =
{
{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00 }},
{{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
0x60,0x87,0x5D,0x83,0x10,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
0x60,0x87,0x5D,0x83,0x10,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
0xE2,0x89,0xdf,0x05,0x00,0x00,0x44,
0x00}},
{{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
0x5A,0x8F,0x57,0x7D,0x20,0x00,0x55,
0x01}},
{{0x4f,0x3F,0x93,0x45,0x0D,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01 }}
#if 0
{{0x37,0x27,0x9B,0x2b,0x94,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00 }},
{{0x37,0x27,0x9B,0x2b,0x94,0x97,0x1f,
0x60,0x87,0x5D,0x83,0x01,0x00,0x44,
0x00}},
{{0x37,0x27,0x9B,0x2b,0x94,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00}},
{{0x37,0x27,0x9B,0x2b,0x94,0x97,0x1f,
0x60,0x87,0x5D,0x83,0x01,0x00,0x44,
0x00}},
{{0x37,0x27,0x9B,0x2b,0x94,0x04,0x3e,
0xE2,0x89,0xDf,0x05,0x00,0x00,0x44,
0x00}},
{{0x41,0x31,0x85,0x35,0x1d,0x7c,0xf0,
0x5A,0x8F,0x57,0x7D,0x20,0x00,0x55,
0x01}},
{{0x4f,0x3F,0x93,0x45,0x0D,0x24,0xf5,
0x02,0x88,0xFf,0x25,0x10,0x00,0x01,
0x01 }}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_1[] =
{
{{0x63,0x4f,0x87,0x54,0x9f,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
0x00 }},
{{0x63,0x4f,0x87,0x54,0x9f,0x82,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
0x00 }},
{{0x63,0x4f,0x87,0x54,0x9f,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
0x00 }},
{{0x63,0x4f,0x87,0x54,0x9f,0x82,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
0x00 }},
{{0x63,0x4f,0x87,0x54,0x9f,0x04,0x3e,
0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
0x00 }},
{{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
0x01 }},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_1_H[] =
{
{{0x2f,0x27,0x93,0x2b,0x90,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x04,
0x00 }},
{{0x2f,0x27,0x93,0x2b,0x90,0x82,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x04,
0x00 }},
{{0x2f,0x27,0x93,0x2b,0x90,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x04,
0x00 }},
{{0x2f,0x27,0x93,0x2b,0x90,0x82,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x04,
0x00 }},
{{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
0xe2,0x89,0xdf,0x05,0x00,0x00,0x04,
0x00 }},
{{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
0x01 }},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_2[] =
{
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xf4,0x88,0x8f,0x73,0x20,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xdb,0x8f,0x5d,0x73,0x20,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xf4,0x88,0x8f,0x73,0x20,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xdb,0x8f,0x5d,0x73,0x20,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0xba,
0x1c,0x80,0xdf,0x73,0x00,0x00,0x06,
0x00 }},
{{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT1800x600_2_H[] =
{
{{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
0xf4,0x88,0x8f,0x73,0x20,0x00,0x05,
0x00 }},
{{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
0xdb,0x8f,0x5d,0x73,0x20,0x00,0x05,
0x00 }},
{{0x3d,0x27,0x81,0x32,0x1a,0x72,0x3e,
0xf4,0x88,0x8f,0x73,0x20,0x00,0x05,
0x00 }},
{{0x3d,0x27,0x81,0x3a,0x1a,0x72,0x3e,
0xdb,0x8f,0x5d,0x73,0x20,0x00,0x05,
0x00 }},
{{0x3d,0x27,0x81,0x32,0x1a,0x72,0xba,
0x1c,0x80,0xdf,0x73,0x00,0x00,0x05,
0x00 }},
{{0x3d,0x31,0x81,0x37,0x1f,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x05,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_2[] =
{
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x02,
0x01 }},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11024x768_2_H[] =
{
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x01,
0x01 }},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_2[] =
{
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x02,
0x01 }},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT11280x1024_2_H[] =
{
{{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x27,0x93,0x39,0x81,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
0x00 }},
{{0x4f,0x31,0x93,0x3e,0x86,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x01,
0x01 }},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT1XXXxXXX_1[] =
{
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xe7,0x04,0x00,0x00,0x05,
0x00}},
{{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01}},
{{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
0x00,0x84,0xff,0x29,0x09,0x00,0x07,
0x01}},
{{0xce,0x9f,0x92,0xa9,0x17,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x07,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS300_LVDSCRT1XXXxXXX_1_H[] =
{
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0x0b,0x3e,
0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
0x00}},
{{0x4d,0x31,0x91,0x3b,0x03,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x01,
0x01}},
{{0x63,0x3f,0x87,0x4a,0x92,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1UNTSC[] =
{ {
{{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e, {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
0xe8,0x84,0x8f,0x57,0x20,0x00,0x01, 0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,
...@@ -1810,7 +917,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1UNTSC[] = ...@@ -1810,7 +917,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1UNTSC[] =
0x01 }} 0x01 }}
}; };
static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1ONTSC[] = static const struct SiS_LVDSCRT1Data SiS300_CHTVCRT1ONTSC[] =
{ {
{{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e, {{0x64,0x4f,0x88,0x5a,0x9f,0x0b,0x3e,
0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01, 0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,
...@@ -1832,7 +939,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1ONTSC[] = ...@@ -1832,7 +939,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1ONTSC[] =
0x01 }} 0x01 }}
}; };
static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1UPAL[] = static const struct SiS_LVDSCRT1Data SiS300_CHTVCRT1UPAL[] =
{ {
{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e, {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
0xf8,0x83,0x8f,0x70,0x20,0x00,0x05, 0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,
...@@ -1854,7 +961,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1UPAL[] = ...@@ -1854,7 +961,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1UPAL[] =
0x01 }} 0x01 }}
}; };
static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1OPAL[] = static const struct SiS_LVDSCRT1Data SiS300_CHTVCRT1OPAL[] =
{ {
{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e, {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
0xf0,0x83,0x8f,0x70,0x20,0x00,0x05, 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
...@@ -1876,7 +983,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1OPAL[] = ...@@ -1876,7 +983,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1OPAL[] =
0x01 }} 0x01 }}
}; };
static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1SOPAL[] = static const struct SiS_LVDSCRT1Data SiS300_CHTVCRT1SOPAL[] =
{ {
{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e, {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
0xf0,0x83,0x8f,0x70,0x20,0x00,0x05, 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
...@@ -1898,7 +1005,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1SOPAL[] = ...@@ -1898,7 +1005,7 @@ static const SiS_LVDSCRT1DataStruct SiS300_CHTVCRT1SOPAL[] =
0x01 }} 0x01 }}
}; };
static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UNTSC[] = static const struct SiS_CHTVRegData SiS300_CHTVReg_UNTSC[] =
{ {
{{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}}, {{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
{{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}}, {{0x4a,0x94,0x00,0x48,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
...@@ -1908,7 +1015,7 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UNTSC[] = ...@@ -1908,7 +1015,7 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UNTSC[] =
{{0x8d,0xc4,0x00,0x3b,0xfb,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 24: 800x600 NTSC 7/10 */ {{0x8d,0xc4,0x00,0x3b,0xfb,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 24: 800x600 NTSC 7/10 */
}; };
static const SiS_CHTVRegDataStruct SiS300_CHTVReg_ONTSC[] = static const struct SiS_CHTVRegData SiS300_CHTVReg_ONTSC[] =
{ {
{{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}}, {{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
{{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}}, {{0x49,0x94,0x00,0x34,0xfe,0,0,0,0,0,0,0,0,0,0,0}},
...@@ -1918,7 +1025,7 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_ONTSC[] = ...@@ -1918,7 +1025,7 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_ONTSC[] =
{{0x8c,0xb4,0x00,0x32,0xf9,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 23: 800x600 NTSC 3/4 */ {{0x8c,0xb4,0x00,0x32,0xf9,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 23: 800x600 NTSC 3/4 */
}; };
static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UPAL[] = static const struct SiS_CHTVRegData SiS300_CHTVReg_UPAL[] =
{ {
{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}}, {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
...@@ -1929,7 +1036,7 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UPAL[] = ...@@ -1929,7 +1036,7 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_UPAL[] =
}; };
static const SiS_CHTVRegDataStruct SiS300_CHTVReg_OPAL[] = static const struct SiS_CHTVRegData SiS300_CHTVReg_OPAL[] =
{ {
{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */ {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */
{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}}, {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
...@@ -1940,26 +1047,26 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_OPAL[] = ...@@ -1940,26 +1047,26 @@ static const SiS_CHTVRegDataStruct SiS300_CHTVReg_OPAL[] =
}; };
static const SiS_CHTVRegDataStruct SiS300_CHTVReg_SOPAL[] = static const struct SiS_CHTVRegData SiS300_CHTVReg_SOPAL[] =
{ {
{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */ {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 9: 640x400 PAL 1/1 */
{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}}, {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
{{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}}, {{0x41,0x12,0x01,0x50,0x34,0,0,0,0,0,0,0,0,0,0,0}},
{{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}}, {{0x41,0x12,0x00,0x50,0x00,0,0,0,0,0,0,0,0,0,0,0}},
{{0x60,0x30,0x00,0x10,0x00,0,0,0,0,0,0,0,0,0,0,0}}, /* TW: Mode 13: 640x480 PAL 5/4 */ {{0x60,0x30,0x00,0x10,0x00,0,0,0,0,0,0,0,0,0,0,0}}, /* Mode 13: 640x480 PAL 5/4 */
{{0x81,0x50,0x00,0x1b,0x00,0,0,0,0,0,0,0,0,0,0,0}} /* TW: Mode 19: 800x600 PAL 1/1 */ {{0x81,0x50,0x00,0x1b,0x00,0,0,0,0,0,0,0,0,0,0,0}} /* Mode 19: 800x600 PAL 1/1 */
}; };
static const UCHAR SiS300_CHTVVCLKUNTSC[] = {0x29,0x29,0x29,0x29,0x2a,0x2e}; static const unsigned char SiS300_CHTVVCLKUNTSC[] = { 0x29,0x29,0x29,0x29,0x2a,0x2e };
static const UCHAR SiS300_CHTVVCLKONTSC[] = {0x2c,0x2c,0x2c,0x2c,0x2d,0x2b}; static const unsigned char SiS300_CHTVVCLKONTSC[] = { 0x2c,0x2c,0x2c,0x2c,0x2d,0x2b };
static const UCHAR SiS300_CHTVVCLKSONTSC[] = {0x2c,0x2c,0x2c,0x2c,0x2d,0x2b}; static const unsigned char SiS300_CHTVVCLKSONTSC[] = { 0x2c,0x2c,0x2c,0x2c,0x2d,0x2b };
static const UCHAR SiS300_CHTVVCLKUPAL[] = {0x2f,0x2f,0x2f,0x2f,0x2f,0x31}; static const unsigned char SiS300_CHTVVCLKUPAL[] = { 0x2f,0x2f,0x2f,0x2f,0x2f,0x31 };
static const UCHAR SiS300_CHTVVCLKOPAL[] = {0x2f,0x2f,0x2f,0x2f,0x30,0x32}; static const unsigned char SiS300_CHTVVCLKOPAL[] = { 0x2f,0x2f,0x2f,0x2f,0x30,0x32 };
static const UCHAR SiS300_CHTVVCLKSOPAL[] = {0x2f,0x2f,0x2f,0x2f,0x36,0x29}; static const unsigned char SiS300_CHTVVCLKSOPAL[] = { 0x2f,0x2f,0x2f,0x2f,0x36,0x29 };
/* $XFree86$ */ /* $XFree86$ */
/* $XdotOrg$ */ /* $XdotOrg$ */
/* /*
* Register settings for SiS 315/330 series * Register settings for SiS 315/330/340 series
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,31 +50,7 @@ ...@@ -50,31 +50,7 @@
* *
*/ */
static const SiS_StStruct SiS310_SModeIDTable[]= static const struct SiS_Ext SiS310_EModeIDTable[] =
{
{0x01,0x9208,0x01,0x00,0x00,0x00,0x01,0x00, 0x40},
{0x01,0x1210,0x14,0x01,0x01,0x00,0x01,0x00, 0x40},
{0x01,0x1010,0x17,0x02,0x02,0x00,0x01,0x01, 0x40},
{0x03,0x8208,0x03,0x00,0x00,0x00,0x01,0x02, 0x40},
{0x03,0x0210,0x16,0x01,0x01,0x00,0x01,0x02, 0x40},
{0x03,0x0010,0x18,0x02,0x02,0x00,0x01,0x03, 0x40},
{0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x04, 0x40},
{0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x05, 0x40},
{0x07,0x0000,0x07,0x03,0x03,0x00,0x01,0x03, 0x40},
{0x07,0x0000,0x19,0x02,0x02,0x00,0x01,0x03, 0x40},
{0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x04, 0x40},
{0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x05, 0x40},
{0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x05, 0x40},
{0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x05, 0x40},
{0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x05, 0x40},
{0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x05, 0x40},
{0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x04, 0x40},
{0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x05, 0x40},
{0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x05, 0x40},
{0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00, 0x40}
};
static const SiS_ExtStruct SiS310_EModeIDTable[]=
{ {
{0x6a,0x2212,0x0102,SIS_RI_800x600, 0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x? */ {0x6a,0x2212,0x0102,SIS_RI_800x600, 0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x? */
{0x2e,0x0a1b,0x0101,SIS_RI_640x480, 0x00,0x00,0x05,0x05,0x08, 2}, /* 640x480x8 */ {0x2e,0x0a1b,0x0101,SIS_RI_640x480, 0x00,0x00,0x05,0x05,0x08, 2}, /* 640x480x8 */
...@@ -139,198 +115,142 @@ static const SiS_ExtStruct SiS310_EModeIDTable[]= ...@@ -139,198 +115,142 @@ static const SiS_ExtStruct SiS310_EModeIDTable[]=
{0x23,0x0e3b,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x8 */ {0x23,0x0e3b,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x8 */
{0x24,0x0e7d,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x16 */ {0x24,0x0e7d,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x16 */
{0x25,0x0eff,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x32 */ {0x25,0x0eff,0x0000,SIS_RI_1280x768, 0x00,0x00,0x00,0x00,0x40, 6}, /* 1280x768x32 */
{0x26,0x0e3b,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41, 9}, /* 1400x1050x8 */ {0x26,0x0e3b,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x43, 9}, /* 1400x1050x8 */
{0x27,0x0e7d,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41, 9}, /* 1400x1050x16 */ {0x27,0x0e7d,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x43, 9}, /* 1400x1050x16 */
{0x28,0x0eff,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x41, 9}, /* 1400x1050x32*/ {0x28,0x0eff,0x0000,SIS_RI_1400x1050,0x00,0x00,0x00,0x00,0x43, 9}, /* 1400x1050x32*/
{0x29,0x4e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1}, /* 1152x864 */ {0x29,0x4e1b,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x45,-1}, /* 1152x864 */
{0x2a,0x4e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1}, {0x2a,0x4e3d,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x45,-1},
{0x2b,0x4e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x43,-1}, {0x2b,0x4e7f,0x0000,SIS_RI_1152x864, 0x00,0x00,0x00,0x00,0x45,-1},
{0x39,0x6a1b,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x00,0x46,-1}, /* 848x480 */ {0x39,0x6a1b,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x00,0x48,-1}, /* 848x480 */
{0x3b,0x6a3d,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x00,0x46,-1}, {0x3b,0x6a3d,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x00,0x48,-1},
{0x3e,0x6a7f,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x00,0x46,-1}, {0x3e,0x6a7f,0x0000,SIS_RI_848x480, 0x00,0x00,0x00,0x00,0x48,-1},
{0x3f,0x6a1b,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x00,0x48,-1}, /* 856x480 */ {0x3f,0x6a1b,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x00,0x4a,-1}, /* 856x480 */
{0x42,0x6a3d,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x00,0x48,-1}, {0x42,0x6a3d,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x00,0x4a,-1},
{0x45,0x6a7f,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x00,0x48,-1}, {0x45,0x6a7f,0x0000,SIS_RI_856x480, 0x00,0x00,0x00,0x00,0x4a,-1},
{0x48,0x6a3b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4a,-1}, /* 1360x768 */ {0x48,0x6a3b,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4c,-1}, /* 1360x768 */
{0x4b,0x6a7d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4a,-1}, {0x4b,0x6a7d,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4c,-1},
{0x4e,0x6aff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4a,-1}, {0x4e,0x6aff,0x0000,SIS_RI_1360x768, 0x00,0x00,0x00,0x00,0x4c,-1},
{0x4f,0x9a1f,0x0000,SIS_RI_320x200, 0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x32 */ {0x4f,0x9a1f,0x0000,SIS_RI_320x200, 0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x32 */
{0x53,0x9a1f,0x0000,SIS_RI_320x240, 0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x32 */ {0x53,0x9a1f,0x0000,SIS_RI_320x240, 0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x32 */
{0x54,0xba1f,0x0000,SIS_RI_400x300, 0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x32 */ {0x54,0xba1f,0x0000,SIS_RI_400x300, 0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x32 */
{0x5f,0x6a1b,0x0000,SIS_RI_768x576, 0x00,0x00,0x06,0x06,0x4b,-1}, /* 768x576 */ {0x5f,0x6a1b,0x0000,SIS_RI_768x576, 0x00,0x00,0x06,0x06,0x4d,-1}, /* 768x576 */
{0x60,0x6a1d,0x0000,SIS_RI_768x576, 0x00,0x00,0x06,0x06,0x4b,-1}, {0x60,0x6a1d,0x0000,SIS_RI_768x576, 0x00,0x00,0x06,0x06,0x4d,-1},
{0x61,0x6a3f,0x0000,SIS_RI_768x576, 0x00,0x00,0x06,0x06,0x4b,-1}, {0x61,0x6a3f,0x0000,SIS_RI_768x576, 0x00,0x00,0x06,0x06,0x4d,-1},
{0x14,0x0e3b,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4c, 7}, /* 1280x800 */ {0x14,0x0e3b,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4e, 7}, /* 1280x800 */
{0x15,0x0e7d,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4c, 7}, {0x15,0x0e7d,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4e, 7},
{0x16,0x0eff,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4c, 7}, {0x16,0x0eff,0x0000,SIS_RI_1280x800, 0x00,0x00,0x00,0x00,0x4e, 7},
{0x17,0x0e3b,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4d, 9}, /* 1680x1050 */ {0x17,0x0e3b,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x51, 9}, /* 1680x1050 */
{0x18,0x0e7d,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4d, 9}, {0x18,0x0e7d,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x51, 9},
{0x19,0x0eff,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x4d, 9}, {0x19,0x0eff,0x0000,SIS_RI_1680x1050,0x00,0x00,0x00,0x00,0x51, 9},
{0x2c,0x267b,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4e,-1}, /* 1920x1080(i) */ {0x2c,0x267b,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x52,-1}, /* 1920x1080(i) */
{0x2d,0x26fd,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4e,-1}, {0x2d,0x26fd,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x52,-1},
{0x73,0x27ff,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x4e,-1}, {0x73,0x27ff,0x0000,SIS_RI_1920x1080,0x00,0x00,0x00,0x00,0x52,-1},
{0x1d,0x6a1b,0x0000,SIS_RI_960x540, 0x00,0x00,0x00,0x00,0x4f,-1}, /* 960x540 */ {0x1d,0x6a1b,0x0000,SIS_RI_960x540, 0x00,0x00,0x00,0x00,0x53,-1}, /* 960x540 */
{0x1e,0x6a3d,0x0000,SIS_RI_960x540, 0x00,0x00,0x00,0x00,0x4f,-1}, {0x1e,0x6a3d,0x0000,SIS_RI_960x540, 0x00,0x00,0x00,0x00,0x53,-1},
{0x1f,0x6a7f,0x0000,SIS_RI_960x540, 0x00,0x00,0x00,0x00,0x4f,-1}, {0x1f,0x6a7f,0x0000,SIS_RI_960x540, 0x00,0x00,0x00,0x00,0x53,-1},
{0x20,0x6a1b,0x0000,SIS_RI_960x600, 0x00,0x00,0x00,0x00,0x50,-1}, /* 960x600 */ {0x20,0x6a1b,0x0000,SIS_RI_960x600, 0x00,0x00,0x00,0x00,0x54,-1}, /* 960x600 */
{0x21,0x6a3d,0x0000,SIS_RI_960x600, 0x00,0x00,0x00,0x00,0x50,-1}, {0x21,0x6a3d,0x0000,SIS_RI_960x600, 0x00,0x00,0x00,0x00,0x54,-1},
{0x22,0x6a7f,0x0000,SIS_RI_960x600, 0x00,0x00,0x00,0x00,0x50,-1}, {0x22,0x6a7f,0x0000,SIS_RI_960x600, 0x00,0x00,0x00,0x00,0x54,-1},
{0x1a,0x0e3b,0x0000,SIS_RI_1280x854, 0x00,0x00,0x00,0x00,0x55, 8}, /* 1280x854 */
{0x1b,0x0e7d,0x0000,SIS_RI_1280x854, 0x00,0x00,0x00,0x00,0x55, 8},
{0x1c,0x0eff,0x0000,SIS_RI_1280x854, 0x00,0x00,0x00,0x00,0x55, 8},
{0xff,0x0000,0x0000,0, 0x00,0x00,0x00,0x00,0x00,-1} {0xff,0x0000,0x0000,0, 0x00,0x00,0x00,0x00,0x00,-1}
}; };
static const SiS_Ext2Struct SiS310_RefIndex[]= static const struct SiS_Ext2 SiS310_RefIndex[] =
{ {
{0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0x40}, /* 0x0 */ {0x085f,0x0d,0x03,0x05,0x05,0x6a, 800, 600, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x0 */
{0x0067,0x0e,0x04,0x05,0x05,0x6a, 800, 600, 0x40}, /* 0x1 */ {0x0067,0x0e,0x04,0x05,0x05,0x6a, 800, 600, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1 */
{0x0067,0x0f,0x08,0x48,0x05,0x6a, 800, 600, 0x40}, /* 0x2 */ {0x0067,0x0f,0x08,0x48,0x05,0x6a, 800, 600, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2 */
{0x0067,0x10,0x07,0x8b,0x05,0x6a, 800, 600, 0x40}, /* 0x3 */ {0x0067,0x10,0x07,0x8b,0x05,0x6a, 800, 600, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x3 */
{0x0047,0x11,0x0a,0x00,0x05,0x6a, 800, 600, 0x40}, /* 0x4 */ {0x0047,0x11,0x0a,0x00,0x05,0x6a, 800, 600, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x4 */
{0x0047,0x12,0x0d,0x00,0x05,0x6a, 800, 600, 0x40}, /* 0x5 */ {0x0047,0x12,0x0d,0x00,0x05,0x6a, 800, 600, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x5 */
{0x0047,0x13,0x13,0x00,0x05,0x6a, 800, 600, 0x20}, /* 0x6 */ {0x0047,0x13,0x13,0x00,0x05,0x6a, 800, 600, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x6 */
{0x0107,0x14,0x1c,0x00,0x05,0x6a, 800, 600, 0x20}, /* 0x7 */ {0x0107,0x14,0x1c,0x00,0x05,0x6a, 800, 600, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x7 */
{0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0x40}, /* 0x8 */ {0xc85f,0x05,0x00,0x04,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x8 */
{0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0x40}, /* 0x9 */ {0xc067,0x06,0x02,0x04,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x9 */
{0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0x40}, /* 0xa */ {0xc067,0x07,0x02,0x47,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0xa */
{0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0x40}, /* 0xb */ {0xc067,0x08,0x03,0x8a,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0xb */
{0xc047,0x09,0x05,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xc */ {0xc047,0x09,0x05,0x00,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0xc */
{0xc047,0x0a,0x09,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xd */ {0xc047,0x0a,0x09,0x00,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0xd */
{0xc047,0x0b,0x0e,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xe */ {0xc047,0x0b,0x0e,0x00,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0xe */
{0xc047,0x0c,0x15,0x00,0x04,0x2e, 640, 480, 0x40}, /* 0xf */ {0xc047,0x0c,0x15,0x00,0x04,0x2e, 640, 480, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0xf */
{0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0x30}, /* 0x10 */ {0x487f,0x04,0x00,0x00,0x00,0x2f, 640, 400, 0x30, 0x55, 0x6e, 0x00, 0x00, 0x00, 0x00}, /* 0x10 */
{0xc06f,0x3c,0x01,0x06,0x13,0x31, 720, 480, 0x30}, /* 0x11 */ {0xc06f,0x3c,0x01,0x06,0x13,0x31, 720, 480, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x11 */
{0x006f,0x3d,0x03,0x06,0x14,0x32, 720, 576, 0x30}, /* 0x12 */ {0x006f,0x3d,0x6f,0x06,0x14,0x32, 720, 576, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x12 (6f was 03) */
{0x0087,0x15,0x06,0x00,0x06,0x37,1024, 768, 0x30}, /* 0x13 */ {0x0087,0x15,0x06,0x00,0x06,0x37,1024, 768, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x13 */
{0xc877,0x16,0x0b,0x06,0x06,0x37,1024, 768, 0x20}, /* 0x14 */ {0xc877,0x16,0x0b,0x06,0x06,0x37,1024, 768, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x14 */
{0xc067,0x17,0x0f,0x49,0x06,0x37,1024, 768, 0x20}, /* 0x15 */ {0xc067,0x17,0x0f,0x49,0x06,0x37,1024, 768, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x15 */
{0x0067,0x18,0x11,0x00,0x06,0x37,1024, 768, 0x20}, /* 0x16 */ {0x0067,0x18,0x11,0x00,0x06,0x37,1024, 768, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x16 */
{0x0047,0x19,0x16,0x8c,0x06,0x37,1024, 768, 0x20}, /* 0x17 */ {0x0047,0x19,0x16,0x8c,0x06,0x37,1024, 768, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x17 */
{0x0107,0x1a,0x1b,0x00,0x06,0x37,1024, 768, 0x10}, /* 0x18 */ {0x0107,0x1a,0x1b,0x00,0x06,0x37,1024, 768, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x18 */
{0x0107,0x1b,0x1f,0x00,0x06,0x37,1024, 768, 0x10}, /* 0x19 */ {0x0107,0x1b,0x1f,0x00,0x06,0x37,1024, 768, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x19 */
{0x0087,0x1c,0x11,0x00,0x07,0x3a,1280,1024, 0x30}, /* 0x1a */ {0x0087,0x1c,0x11,0x00,0x07,0x3a,1280,1024, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1a */
{0x0137,0x1d,0x19,0x07,0x07,0x3a,1280,1024, 0x00}, /* 0x1b */ {0x0137,0x1d,0x19,0x07,0x07,0x3a,1280,1024, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1b */
{0x0107,0x1e,0x1e,0x00,0x07,0x3a,1280,1024, 0x00}, /* 0x1c */ {0x0107,0x1e,0x1e,0x00,0x07,0x3a,1280,1024, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1c */
{0x0207,0x1f,0x20,0x00,0x07,0x3a,1280,1024, 0x00}, /* 0x1d */ {0x0207,0x1f,0x20,0x00,0x07,0x3a,1280,1024, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1d */
{0x0227,0x20,0x21,0x09,0x09,0x3c,1600,1200, 0x00}, /* 0x1e */ {0x0227,0x20,0x21,0x09,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1e */
{0x0407,0x21,0x22,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x1f */ {0x0407,0x21,0x22,0x00,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x1f */
{0x0407,0x22,0x23,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x20 */ {0x0407,0x22,0x23,0x00,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x20 */
{0x0407,0x23,0x25,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x21 */ {0x0407,0x23,0x25,0x00,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x21 */
{0x0007,0x24,0x26,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x22 */ {0x0007,0x24,0x26,0x00,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x22 */
{0x0007,0x25,0x2c,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x23 */ {0x0007,0x25,0x2c,0x00,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x23 */
{0x0007,0x26,0x34,0x00,0x09,0x3c,1600,1200, 0x00}, /* 0x24 */ {0x0007,0x26,0x34,0x00,0x09,0x3c,1600,1200, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x24 */
{0x407f,0x00,0x00,0x00,0x00,0x40, 320, 200, 0x30}, /* 0x25 */ {0x407f,0x00,0x00,0x00,0x00,0x40, 320, 200, 0x30, 0x56, 0x4e, 0x00, 0x00, 0x00, 0x00}, /* 0x25 */
{0xc07f,0x01,0x00,0x04,0x04,0x50, 320, 240, 0x30}, /* 0x26 */ {0xc07f,0x01,0x00,0x04,0x04,0x50, 320, 240, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x26 */
{0x007f,0x02,0x04,0x05,0x05,0x51, 400, 300, 0x30}, /* 0x27 */ {0x007f,0x02,0x04,0x05,0x05,0x51, 400, 300, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x27 */
{0xc077,0x03,0x0b,0x06,0x06,0x52, 512, 384, 0x30}, /* 0x28 */ {0xc077,0x03,0x0b,0x06,0x06,0x52, 512, 384, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x28 */
{0x8007,0x27,0x27,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x29 */ {0x8007,0x27,0x27,0x00,0x00,0x68,1920,1440, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x29 */
{0x4007,0x28,0x29,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2a */ {0x4007,0x28,0x29,0x00,0x00,0x68,1920,1440, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2a */
{0x4007,0x29,0x2e,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2b */ {0x4007,0x29,0x2e,0x00,0x00,0x68,1920,1440, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2b */
{0x4007,0x2a,0x30,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2c */ {0x4007,0x2a,0x30,0x00,0x00,0x68,1920,1440, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2c */
{0x4007,0x2b,0x35,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2d */ {0x4007,0x2b,0x35,0x00,0x00,0x68,1920,1440, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2d */
{0x4005,0x2c,0x39,0x00,0x00,0x68,1920,1440, 0x00}, /* 0x2e */ {0x4005,0x2c,0x39,0x00,0x00,0x68,1920,1440, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2e */
{0x4007,0x2d,0x2b,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x2f */ {0x4007,0x2d,0x2b,0x00,0x00,0x6c,2048,1536, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x2f */
{0x4007,0x2e,0x31,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x30 */ {0x4007,0x2e,0x31,0x00,0x00,0x6c,2048,1536, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x30 */
{0x4007,0x2f,0x33,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x31 */ {0x4007,0x2f,0x33,0x00,0x00,0x6c,2048,1536, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x31 */
{0x4007,0x30,0x37,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x32 */ {0x4007,0x30,0x37,0x00,0x00,0x6c,2048,1536, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x32 */
{0x4005,0x31,0x38,0x00,0x00,0x6c,2048,1536, 0x00}, /* 0x33 */ {0x4005,0x31,0x38,0x00,0x00,0x6c,2048,1536, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x33 */
{0x0077,0x32,0x40,0x08,0x18,0x70, 800, 480, 0x30}, /* 0x34 */ {0x2077,0x32,0x40,0x08,0x18,0x70, 800, 480, 0x30, 0x00, 0x00, 0x32, 0x40, 0x5e, 0x73}, /* 0x34 */
{0x0047,0x33,0x07,0x08,0x18,0x70, 800, 480, 0x30}, /* 0x35 */ {0x2047,0x33,0x07,0x08,0x18,0x70, 800, 480, 0x30, 0x00, 0x00, 0x33, 0x07, 0xff, 0xff}, /* 0x35 */
{0x0047,0x34,0x0a,0x08,0x18,0x70, 800, 480, 0x30}, /* 0x36 */ {0x2047,0x34,0x0a,0x08,0x18,0x70, 800, 480, 0x30, 0x00, 0x00, 0x34, 0x0a, 0xff, 0xff}, /* 0x36 */
{0x0077,0x35,0x0b,0x09,0x19,0x71,1024, 576, 0x30}, /* 0x37 */ {0x2077,0x35,0x0b,0x09,0x19,0x71,1024, 576, 0x30, 0x00, 0x00, 0x35, 0x0b, 0x5f, 0x74}, /* 0x37 */
{0x0047,0x36,0x11,0x09,0x19,0x71,1024, 576, 0x30}, /* 0x38 */ {0x2047,0x36,0x11,0x09,0x19,0x71,1024, 576, 0x30, 0x00, 0x00, 0x36, 0x11, 0xff, 0xff}, /* 0x38 */
{0x0047,0x37,0x16,0x09,0x19,0x71,1024, 576, 0x30}, /* 0x39 */ {0x2047,0x37,0x16,0x09,0x19,0x71,1024, 576, 0x30, 0x00, 0x00, 0x37, 0x16, 0xff, 0xff}, /* 0x39 */
{0x1137,0x38,0x19,0x0a,0x0c,0x75,1280, 720, 0x30}, /* 0x3a */ {0x3137,0x38,0x19,0x0a,0x0c,0x75,1280, 720, 0x30, 0x00, 0x00, 0x38, 0x19, 0x60, 0x75}, /* 0x3a */
{0x1107,0x39,0x1e,0x0a,0x0c,0x75,1280, 720, 0x30}, /* 0x3b */ {0x3107,0x39,0x1e,0x0a,0x0c,0x75,1280, 720, 0x30, 0x00, 0x00, 0x39, 0x1e, 0xff, 0xff}, /* 0x3b */
{0x1307,0x3a,0x20,0x0a,0x0c,0x75,1280, 720, 0x30}, /* 0x3c */ {0x3307,0x3a,0x20,0x0a,0x0c,0x75,1280, 720, 0x30, 0x00, 0x00, 0x3a, 0x20, 0xff, 0xff}, /* 0x3c */
{0x0127,0x3b,0x19,0x08,0x0a,0x7c,1280, 960, 0x30}, /* 0x3d */ {0x0127,0x3b,0x19,0x08,0x0a,0x7c,1280, 960, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x3d */
{0x0227,0x4c,0x59,0x08,0x0a,0x7c,1280, 960, 0x20}, /* 0x3e */ {0x0227,0x4c,0x59,0x08,0x0a,0x7c,1280, 960, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x3e */
{0xc07f,0x4e,0x00,0x06,0x04,0x5a, 320, 240, 0x30}, /* 0x3f */ /* FSTN 320x240 */ {0xc07f,0x4e,0x00,0x06,0x04,0x5a, 320, 240, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x3f */ /* FSTN 320x240 */
{0x0077,0x42,0x5b,0x08,0x11,0x23,1280, 768, 0x30}, /* 0x40 */ /* 0x5b was 0x12 */ {0x2077,0x42,0x5b,0x08,0x11,0x23,1280, 768, 0x30, 0x00, 0x00, 0x58, 0x19, 0x42, 0x5b}, /* 0x40 */ /* 0x5b was 0x12 */
{0x0127,0x43,0x4d,0x08,0x0b,0x26,1400,1050, 0x30}, /* 0x41 */ {0x2077,0x42,0x5b,0x08,0x11,0x23,1280, 768, 0x30, 0x00, 0x00, 0x59, 0x1e, 0xff, 0xff}, /* 0x41 */
{0x0207,0x4b,0x5a,0x08,0x0b,0x26,1400,1050, 0x30}, /* 0x42 1400x1050-75Hz */ {0x2077,0x42,0x5b,0x08,0x11,0x23,1280, 768, 0x30, 0x00, 0x00, 0x5a, 0x20, 0xff, 0xff}, /* 0x42 */
{0x0127,0x54,0x6d,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x43 1152x864-60Hz */ {0x0127,0x43,0x4d,0x08,0x0b,0x26,1400,1050, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x43 */
{0x0127,0x44,0x19,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x44 1152x864-75Hz */ {0x0207,0x4b,0x5a,0x08,0x0b,0x26,1400,1050, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x44 1400x1050-75Hz */
{0x0127,0x4a,0x1e,0x00,0x1a,0x29,1152, 864, 0x30}, /* 0x45 1152x864-85Hz */ {0x0127,0x54,0x6d,0x00,0x1a,0x29,1152, 864, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x45 1152x864-60Hz */
{0x0087,0x45,0x57,0x00,0x16,0x39, 848, 480, 0x30}, /* 0x46 848x480-38Hzi */ {0x0127,0x44,0x19,0x00,0x1a,0x29,1152, 864, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x46 1152x864-75Hz */
{0xc067,0x46,0x55,0x0b,0x16,0x39, 848, 480, 0x30}, /* 0x47 848x480-60Hz */ {0x0127,0x4a,0x1e,0x00,0x1a,0x29,1152, 864, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x47 1152x864-85Hz */
{0x0087,0x47,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x48 856x480-38Hzi */ {0x0087,0x45,0x57,0x00,0x16,0x39, 848, 480, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x48 848x480-38Hzi */
{0xc067,0x48,0x57,0x00,0x17,0x3f, 856, 480, 0x30}, /* 0x49 856x480-60Hz */ {0xc067,0x46,0x55,0x0b,0x16,0x39, 848, 480, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x49 848x480-60Hz */
{0x0067,0x49,0x58,0x0c,0x1b,0x48,1360, 768, 0x30}, /* 0x4a 1360x768-60Hz */ {0x0087,0x47,0x57,0x00,0x17,0x3f, 856, 480, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x4a 856x480-38Hzi */
{0x006f,0x4d,0x03,0x06,0x15,0x5f, 768, 576, 0x30}, /* 0x4b 768x576-56Hz */ {0xc067,0x48,0x57,0x00,0x17,0x3f, 856, 480, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x4b 856x480-60Hz */
{0x0067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30}, /* 0x4c 1280x800-60Hz */ {0x0067,0x49,0x58,0x0c,0x1b,0x48,1360, 768, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x4c 1360x768-60Hz */
{0x0067,0x50,0x5d,0x0c,0x0e,0x17,1680,1050, 0x30}, /* 0x4d 1680x1050-60Hz */ {0x006f,0x4d,0x71,0x06,0x15,0x5f, 768, 576, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x4d 768x576-56Hz */
{0x0087,0x51,0x69,0x00,0x00,0x2c,1920,1080, 0x30}, /* 0x4e 1920x1080 60Hzi */ {0x2067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30, 0x00, 0x00, 0x5b, 0x19, 0x4f, 0x5c}, /* 0x4e 1280x800-60Hz */
{0x0067,0x52,0x6a,0x00,0x1c,0x1d, 960, 540, 0x30}, /* 0x4f 960x540 60Hz */ {0x2067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30, 0x00, 0x00, 0x5c, 0x1e, 0xff, 0xff}, /* 0x4f 1280x800-75Hz */
{0x0077,0x53,0x6b,0x0b,0x1d,0x20, 960, 600, 0x30}, /* 0x50 960x600 60Hz */ {0x2067,0x4f,0x5c,0x08,0x0d,0x14,1280, 800, 0x30, 0x00, 0x00, 0x5d, 0x20, 0xff, 0xff}, /* 0x50 1280x800-85Hz */
{0xffff,0x00,0x00,0x00,0x00,0x00, 0, 0, 0} {0x0067,0x50,0x5d,0x0c,0x0e,0x17,1680,1050, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x51 1680x1050-60Hz */
}; {0x0087,0x51,0x69,0x00,0x00,0x2c,1920,1080, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x52 1920x1080 60Hzi */
{0x0067,0x52,0x6a,0x00,0x1c,0x1d, 960, 540, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x53 960x540 60Hz */
#ifdef LINUX_XF86 {0x0077,0x53,0x6b,0x0b,0x1d,0x20, 960, 600, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x54 960x600 60Hz */
static const struct { {0x2067,0x61,0x76,0x0d,0x22,0x1a,1280, 854, 0x30, 0x00, 0x00, 0x62, 0x19, 0x61, 0x76}, /* 0x55 1280x854-60Hz */
UCHAR Ext_ModeID; /* ModeID in new ROM */ {0x2067,0x61,0x76,0x0d,0x22,0x1a,1280, 854, 0x30, 0x00, 0x00, 0x63, 0x1e, 0xff, 0xff}, /* 0x56 1280x854-75Hz */
UCHAR Ext_MyModeID; /* corresponding ModeID in my tables (0 = identical) */ {0x2067,0x61,0x76,0x0d,0x22,0x1a,1280, 854, 0x30, 0x00, 0x00, 0x64, 0x20, 0xff, 0xff}, /* 0x57 1280x854-85Hz */
USHORT Ext_VESAID; /* corresponding VESA ID in new ROM */ {0xffff,0x00,0x00,0x00,0x00,0x00, 0, 0, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
} SiS_EModeIDTable661[] = { };
{ 0x6a, 0x00, 0x0102 },
{ 0x1d, 0x20, 0x0000 }, static const struct SiS_CRT1Table SiS310_CRT1Table[] =
{ 0x1e, 0x21, 0x0000 },
{ 0x1f, 0x22, 0x0000 },
{ 0x20, 0x29, 0x0000 },
{ 0x21, 0x2a, 0x0000 },
{ 0x22, 0x2b, 0x0000 },
{ 0x23, 0x00, 0x011c },
{ 0x24, 0x00, 0x011d },
{ 0x25, 0x00, 0x011e },
{ 0x26, 0x00, 0x011f },
{ 0x27, 0x00, 0x0120 },
{ 0x28, 0x00, 0x0121 },
{ 0x2a, 0x14, 0x013d },
{ 0x2b, 0x15, 0x013e },
{ 0x2c, 0x16, 0x013f },
{ 0x2e, 0x00, 0x0101 },
{ 0x2f, 0x00, 0x0100 },
{ 0x30, 0x00, 0x0103 },
{ 0x37, 0x00, 0x0104 },
{ 0x38, 0x00, 0x0105 },
{ 0x3a, 0x00, 0x0107 },
{ 0x3c, 0x00, 0x0125 },
{ 0x3d, 0x00, 0x0126 },
{ 0x40, 0x00, 0x010d },
{ 0x41, 0x00, 0x010e },
{ 0x43, 0x00, 0x0110 },
{ 0x44, 0x00, 0x0111 },
{ 0x46, 0x00, 0x0113 },
{ 0x47, 0x00, 0x0114 },
{ 0x49, 0x00, 0x0116 },
{ 0x4a, 0x00, 0x0117 },
{ 0x4c, 0x00, 0x0119 },
{ 0x4d, 0x00, 0x011a },
{ 0x50, 0x00, 0x0127 },
{ 0x51, 0x00, 0x0128 },
{ 0x52, 0x00, 0x0129 },
{ 0x56, 0x00, 0x012a },
{ 0x57, 0x00, 0x012b },
{ 0x58, 0x00, 0x012c },
{ 0x59, 0x00, 0x012d },
{ 0x5a, 0x17, 0x012e },
{ 0x5b, 0x18, 0x012f },
{ 0x5c, 0x19, 0x0130 },
{ 0x5d, 0x00, 0x0131 },
{ 0x62, 0x00, 0x0112 },
{ 0x63, 0x00, 0x0115 },
{ 0x64, 0x00, 0x0118 },
{ 0x65, 0x00, 0x011b },
{ 0x66, 0x00, 0x0132 },
{ 0x75, 0x00, 0x013a },
{ 0x78, 0x00, 0x013b },
{ 0x79, 0x00, 0x013c },
{ 0x7b, 0x7c, 0x0136 },
{ 0x7c, 0x7d, 0x0137 },
{ 0x7d, 0x7e, 0x0138 },
{ 0xff, 0xff, 0xffff }
};
#endif
static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
{ {
{{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00, 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00,
...@@ -347,22 +267,12 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]= ...@@ -347,22 +267,12 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
{{0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, {{0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x05, 0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x05,
0x00}}, /* 0x4 */ 0x00}}, /* 0x4 */
#if 0 {{0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e, /* corrected 640x480-60 */
{{0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
0x00}}, /* 0x5 */
#endif
{{0x5f,0x4f,0x4f,0x83,0x55,0x81,0x0b,0x3e, /* 0x05 - corrected 640x480-60 */
0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05, 0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05,
0x00}}, 0x00}}, /* 0x5 */
#if 0 {{0x63,0x4f,0x4f,0x87,0x56,0x9b,0x06,0x3e, /* corrected 640x480-72 */
{{0x63,0x4f,0x50,0x86,0x56,0x9b,0x06,0x3e,
0xe8,0x8b,0xdf,0xe7,0xff,0x10,0x00,0x01,
0x00}}, /* 0x6 */
#endif
{{0x63,0x4f,0x4f,0x87,0x56,0x9b,0x06,0x3e, /* 0x06 - corrected 640x480-72 */
0xe8,0x8a,0xdf,0xe7,0x07,0x00,0x00,0x01, 0xe8,0x8a,0xdf,0xe7,0x07,0x00,0x00,0x01,
0x00}}, 0x00}}, /* 0x6 */
{{0x64,0x4f,0x4f,0x88,0x55,0x9d,0xf2,0x1f, {{0x64,0x4f,0x4f,0x88,0x55,0x9d,0xf2,0x1f,
0xe0,0x83,0xdf,0xdf,0xf3,0x10,0x00,0x01, 0xe0,0x83,0xdf,0xdf,0xf3,0x10,0x00,0x01,
0x00}}, /* 0x7 */ 0x00}}, /* 0x7 */
...@@ -443,7 +353,7 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]= ...@@ -443,7 +353,7 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
0x00}}, /* 0x20 */ 0x00}}, /* 0x20 */
{{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10, {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04, 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
0x00}}, /* 0x21 @ 4084 */ 0x00}}, /* 0x21 */
{{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10, {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04, 0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
0x00}}, /* 0x22 */ 0x00}}, /* 0x22 */
...@@ -519,20 +429,15 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]= ...@@ -519,20 +429,15 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
{{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xd4, {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xd4,
0x7d,0x81,0xcf,0xcf,0x2f,0x21,0x00,0x07, 0x7d,0x81,0xcf,0xcf,0x2f,0x21,0x00,0x07,
0x01}}, /* 0x3a */ 0x01}}, /* 0x3a */
#if 0
{{0xdc,0x9f,0x9f,0x00,0xab,0x19,0xe6,0xef, /* 1280x960 - invalid */
0xc0,0xc3,0xbf,0xbf,0xe7,0x10,0x00,0x07,
0x01}}, /* 0x3b */
#endif
{{0xdc,0x9f,0x9f,0x80,0xaf,0x9d,0xe6,0xff, /* 1280x960-60 - corrected */ {{0xdc,0x9f,0x9f,0x80,0xaf,0x9d,0xe6,0xff, /* 1280x960-60 - corrected */
0xc0,0x83,0xbf,0xbf,0xe7,0x10,0x00,0x07, 0xc0,0x83,0xbf,0xbf,0xe7,0x10,0x00,0x07,
0x01}}, /* 0x3b */ 0x01}}, /* 0x3b */
{{0x6b,0x59,0x59,0x8f,0x5e,0x8c,0x0b,0x3e, {{0x6b,0x59,0x59,0x8f,0x5e,0x8c,0x0b,0x3e,
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05, 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
0x00}}, /* 0x3c */ 0x00}}, /* 0x3c */
{{0x7b,0x59,0x63,0x9f,0x6a,0x93,0x6f,0xf0, {{0x6d,0x59,0x59,0x91,0x60,0x89,0x53,0xf0, /* 720x576, corrected to 60Hz */
0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05, 0x41,0x84,0x3f,0x3f,0x54,0x00,0x00,0x05,
0x01}}, /* 0x3d */ 0x41}}, /* 0x3d */
{{0x86,0x6a,0x6a,0x8a,0x74,0x06,0x8c,0x15, {{0x86,0x6a,0x6a,0x8a,0x74,0x06,0x8c,0x15,
0x4f,0x83,0xef,0xef,0x8d,0x30,0x00,0x02, 0x4f,0x83,0xef,0xef,0x8d,0x30,0x00,0x02,
0x00}}, /* 0x3e */ 0x00}}, /* 0x3e */
...@@ -578,11 +483,11 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]= ...@@ -578,11 +483,11 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
{{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0xf1,0xff, /* 1280x960-85 */ {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0xf1,0xff, /* 1280x960-85 */
0xc0,0x83,0xbf,0xbf,0xf2,0x10,0x00,0x07, 0xc0,0x83,0xbf,0xbf,0xf2,0x10,0x00,0x07,
0x01}}, /* 0x4c */ 0x01}}, /* 0x4c */
{{0x7b,0x5f,0x63,0x9f,0x6a,0x93,0x6f,0xf0, /* 768x576 */ {{0x75,0x5f,0x5f,0x99,0x66,0x90,0x53,0xf0, /* 768x576, corrected to 60Hz */
0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05, 0x41,0x84,0x3f,0x3f,0x54,0x00,0x00,0x05,
0x01}}, /* 0x4d */ 0x41}}, /* 0x4d */
{{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e, /* FSTN 320x480, TEMP - possibly invalid */ {{0x5f,0x27,0x4f,0x83,0x55,0x81,0x0b,0x3e, /* FSTN 320x240 (working) */
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00, 0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x05,
0x00}}, /* 0x4e */ 0x00}}, /* 0x4e */
{{0xcd,0x9f,0x9f,0x91,0xab,0x1c,0x3a,0xff, /* 1280x800-60 */ {{0xcd,0x9f,0x9f,0x91,0xab,0x1c,0x3a,0xff, /* 1280x800-60 */
0x20,0x83,0x1f,0x1f,0x3b,0x10,0x00,0x07, 0x20,0x83,0x1f,0x1f,0x3b,0x10,0x00,0x07,
...@@ -601,10 +506,58 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]= ...@@ -601,10 +506,58 @@ static const SiS_CRT1TableStruct SiS310_CRT1Table[]=
0x01}}, /* 0x53 */ 0x01}}, /* 0x53 */
{{0xcd,0x8f,0x8f,0x91,0x9b,0x1b,0x7a,0xff, /* 1152x864-60 */ {{0xcd,0x8f,0x8f,0x91,0x9b,0x1b,0x7a,0xff, /* 1152x864-60 */
0x64,0x8c,0x5f,0x62,0x7b,0x10,0x00,0x07, 0x64,0x8c,0x5f,0x62,0x7b,0x10,0x00,0x07,
0x41}} /* 0x54 */ 0x41}}, /* 0x54 */
}; {{0x5c,0x4f,0x4f,0x80,0x57,0x80,0xa3,0x1f, /* fake 640x400@60Hz (for LCD and TV, not actually used) */
0x98,0x8c,0x8f,0x96,0xa4,0x30,0x00,0x05,
static const SiS_MCLKDataStruct SiS310_MCLKData_0_315[] = 0x40}}, /* 0x55 */
{{0x2c,0x27,0x27,0x90,0x2d,0x92,0xa4,0x1f, /* fake 320x200@60Hz (for LCD and TV, not actually used) */
0x98,0x8c,0x8f,0x96,0xa5,0x30,0x00,0x04,
0x00}}, /* 0x56 */
{{0xd7,0xc7,0xc7,0x9b,0xd1,0x15,0xd1,0x10, /* 1600x1200 for LCDA */
0xb2,0x86,0xaf,0xb0,0xd2,0x2f,0x00,0x03,
0x00}}, /* 0x57 */
{{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xdc, /* 1280x768 (1280x1024) 60 Hz */
0x92,0x86,0xff,0x91,0x29,0x21,0x00,0x07,
0x01}}, /* 0x58 */
{{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xdc, /* 1280x768 (1280x1024) 75 Hz */
0x92,0x86,0xff,0x91,0x29,0x21,0x00,0x07,
0x01}}, /* 0x59 */
{{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xdc, /* 1280x768 (1280x1024) 85 Hz */
0x95,0x89,0xff,0x94,0x2f,0x21,0x00,0x07,
0x01}}, /* 0x5a */
{{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xde, /* 1280x800 (1280x1024) 60 Hz */
0xa2,0x86,0x1f,0xa1,0x29,0x01,0x00,0x07,
0x01}}, /* 0x5b */
{{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xde, /* 1280x800 (1280x1024) 75 Hz */
0xa2,0x86,0x1f,0xa1,0x29,0x01,0x00,0x07,
0x01}}, /* 0x5c */
{{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xde, /* 1280x800 (1280x1024) 85 Hz */
0xa5,0x89,0x1f,0xa4,0x2f,0x01,0x00,0x07,
0x01}}, /* 0x5d */
{{0x7f,0x63,0x63,0x83,0x6d,0x1d,0x0b,0x3e, /* 800x480 (wide) 60 Hz */
0xe9,0x8b,0xdf,0xe8,0x0c,0x00,0x00,0x06,
0x00}}, /* 0x5e */
{{0xa0,0x7f,0x7f,0x84,0x85,0x97,0x52,0xf0, /* 1024x576 (wide) 60 Hz */
0x41,0x85,0x3f,0x40,0x53,0x00,0x00,0x02,
0x01}}, /* 0x5f */
{{0xc9,0x9f,0x9f,0x8d,0xb0,0x15,0xec,0xf0, /* 1280x720 (wide) 60 Hz */
0xd4,0x89,0xcf,0xd3,0xed,0x20,0x00,0x07,
0x01}}, /* 0x60 */
{{0xcb,0x9f,0x9f,0x8f,0xa5,0x13,0x5b,0xff, /* 1280x854-60 wide */
0x56,0x89,0x55,0x55,0x5c,0x30,0x00,0x07,
0x01}}, /* 0x61 */
{{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xde, /* 1280x854 (1280x1024) 60 Hz */
0xbd,0x81,0x55,0xbc,0x29,0x01,0x00,0x07,
0x41}}, /* 0x62 */
{{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xde, /* 1280x854 (1280x1024) 75 Hz */
0xbd,0x81,0x55,0xbc,0x29,0x01,0x00,0x07,
0x41}}, /* 0x63 */
{{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xde, /* 1280x854 (1280x1024) 85 Hz */
0xc0,0x84,0x55,0xbf,0x2f,0x01,0x00,0x07,
0x41}} /* 0x64 */
};
static const struct SiS_MCLKData SiS310_MCLKData_0_315[] =
{ {
{ 0x3b,0x22,0x01,143}, { 0x3b,0x22,0x01,143},
{ 0x5c,0x23,0x01,166}, { 0x5c,0x23,0x01,166},
...@@ -616,7 +569,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_315[] = ...@@ -616,7 +569,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_315[] =
{ 0x5c,0x23,0x01,166} { 0x5c,0x23,0x01,166}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_0_650[] = static const struct SiS_MCLKData SiS310_MCLKData_0_650[] =
{ {
{ 0x5a,0x64,0x82, 66}, { 0x5a,0x64,0x82, 66},
{ 0xb3,0x45,0x82, 83}, { 0xb3,0x45,0x82, 83},
...@@ -628,7 +581,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_650[] = ...@@ -628,7 +581,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_650[] =
{ 0x37,0x22,0x82,133} { 0x37,0x22,0x82,133}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_0_330[] = static const struct SiS_MCLKData SiS310_MCLKData_0_330[] =
{ {
{ 0x5c,0x23,0x01,166}, { 0x5c,0x23,0x01,166},
{ 0x5c,0x23,0x01,166}, { 0x5c,0x23,0x01,166},
...@@ -640,7 +593,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_330[] = ...@@ -640,7 +593,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_330[] =
{ 0x79,0x06,0x01,250} { 0x79,0x06,0x01,250}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_0_660[] = static const struct SiS_MCLKData SiS310_MCLKData_0_660[] =
{ {
{ 0x5c,0x23,0x82,166}, { 0x5c,0x23,0x82,166},
{ 0x5c,0x23,0x82,166}, { 0x5c,0x23,0x82,166},
...@@ -652,7 +605,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_660[] = ...@@ -652,7 +605,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_660[] =
{ 0x37,0x21,0x82,200} { 0x37,0x21,0x82,200}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_0_760[] = static const struct SiS_MCLKData SiS310_MCLKData_0_760[] =
{ {
{ 0x37,0x22,0x82,133}, { 0x37,0x22,0x82,133},
{ 0x5c,0x23,0x82,166}, { 0x5c,0x23,0x82,166},
...@@ -664,7 +617,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_760[] = ...@@ -664,7 +617,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_760[] =
{ 0x37,0x21,0x82,200} { 0x37,0x21,0x82,200}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_0_761[] = static const struct SiS_MCLKData SiS310_MCLKData_0_761[] =
{ {
{ 0x37,0x22,0x82,133}, /* Preliminary */ { 0x37,0x22,0x82,133}, /* Preliminary */
{ 0x5c,0x23,0x82,166}, { 0x5c,0x23,0x82,166},
...@@ -676,7 +629,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_761[] = ...@@ -676,7 +629,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_761[] =
{ 0x37,0x21,0x82,200} { 0x37,0x21,0x82,200}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_0_340[] = static const struct SiS_MCLKData SiS310_MCLKData_0_340[] =
{ {
{ 0x79,0x06,0x01,250}, { 0x79,0x06,0x01,250},
{ 0x7c,0x08,0x01,200}, { 0x7c,0x08,0x01,200},
...@@ -688,7 +641,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_340[] = ...@@ -688,7 +641,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_340[] =
{ 0x29,0x01,0x81,300} { 0x29,0x01,0x81,300}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_1[] = /* ECLK */ static const struct SiS_MCLKData SiS310_MCLKData_1[] = /* ECLK */
{ {
{ 0x29,0x21,0x82,150}, { 0x29,0x21,0x82,150},
{ 0x5c,0x23,0x82,166}, { 0x5c,0x23,0x82,166},
...@@ -700,7 +653,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_1[] = /* ECLK */ ...@@ -700,7 +653,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_1[] = /* ECLK */
{ 0x37,0x22,0x82,133} { 0x37,0x22,0x82,133}
}; };
static const SiS_MCLKDataStruct SiS310_MCLKData_1_340[] = static const struct SiS_MCLKData SiS310_MCLKData_1_340[] =
{ {
{ 0x7c,0x08,0x01,200}, { 0x7c,0x08,0x01,200},
{ 0x7c,0x08,0x01,200}, { 0x7c,0x08,0x01,200},
...@@ -712,7 +665,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_1_340[] = ...@@ -712,7 +665,7 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_1_340[] =
{ 0x29,0x01,0x81,300} { 0x29,0x01,0x81,300}
}; };
static SiS_VCLKDataStruct SiS310_VCLKData[]= static struct SiS_VCLKData SiS310_VCLKData[] =
{ {
{ 0x1b,0xe1, 25}, /* 0x00 */ { 0x1b,0xe1, 25}, /* 0x00 */
{ 0x4e,0xe4, 28}, /* 0x01 */ { 0x4e,0xe4, 28}, /* 0x01 */
...@@ -823,10 +776,19 @@ static SiS_VCLKDataStruct SiS310_VCLKData[]= ...@@ -823,10 +776,19 @@ static SiS_VCLKDataStruct SiS310_VCLKData[]=
{ 0x7c,0x6b, 38}, /* 0x6a 960x540@60 */ { 0x7c,0x6b, 38}, /* 0x6a 960x540@60 */
{ 0xe3,0x56, 41}, /* 0x6b 960x600@60 */ { 0xe3,0x56, 41}, /* 0x6b 960x600@60 */
{ 0x45,0x25, 83}, /* 0x6c 1280x800 */ { 0x45,0x25, 83}, /* 0x6c 1280x800 */
{ 0x70,0x28, 90} /* 0x6d 1152x864@60 */ { 0x70,0x28, 90}, /* 0x6d 1152x864@60 */
{ 0x15,0xe1, 20}, /* 0x6e 640x400@60 (fake, not actually used) */
{ 0x5f,0xc6, 33}, /* 0x6f 720x576@60 */
{ 0x37,0x5a, 10}, /* 0x70 320x200@60 (fake, not actually used) */
{ 0x2b,0xc2, 35}, /* 0x71 768x576@60 */
{ 0xa8,0x42,131}, /* 0x72 1600x1200@60 for LCDA */
{ 0x1b,0xc1, 34}, /* 0x73 800x480 60Hz (wide) */
{ 0x41,0x64, 48}, /* 0x74 1024x576 60Hz (wide) */
{ 0x52,0x27, 75}, /* 0x75 1280x720 60Hz (wide) */
{ 0x75,0x13, 84} /* 0x76 1280x854 60Hz (wide) */
}; };
static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]= static struct SiS_VBVCLKData SiS310_VBVCLKData[] =
{ {
{ 0x1b,0xe1, 25}, /* 0x00 */ { 0x1b,0xe1, 25}, /* 0x00 */
{ 0x4e,0xe4, 28}, /* 0x01 */ { 0x4e,0xe4, 28}, /* 0x01 */
...@@ -858,12 +820,6 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]= ...@@ -858,12 +820,6 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]=
{ 0x5e,0x43,113}, /* 0x1b */ { 0x5e,0x43,113}, /* 0x1b */
{ 0xbc,0x44,116}, /* 0x1c */ { 0xbc,0x44,116}, /* 0x1c */
{ 0xe0,0x46,132}, /* 0x1d */ { 0xe0,0x46,132}, /* 0x1d */
#if 0
{ 0xd4,0x28,135}, /* 0x1e */
{ 0xea,0x2a,139}, /* 0x1f */
{ 0x41,0x22,157}, /* 0x20 */
{ 0x70,0x24,162}, /* 0x21 */
#endif
{ 0xe2,0x46,135}, /* 0x1e */ /* 1280x1024-75, better clock for VGA2 */ { 0xe2,0x46,135}, /* 0x1e */ /* 1280x1024-75, better clock for VGA2 */
{ 0xe5,0x46,139}, /* 0x1f */ /* 1024x768-120, better clock for VGA2 */ { 0xe5,0x46,139}, /* 0x1f */ /* 1024x768-120, better clock for VGA2 */
{ 0x15,0x01,157}, /* 0x20 */ /* 1280x1024-85, better clock for VGA2 */ { 0x15,0x01,157}, /* 0x20 */ /* 1280x1024-85, better clock for VGA2 */
...@@ -912,7 +868,7 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]= ...@@ -912,7 +868,7 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]=
{ 0x34,0x61, 95}, /* 0x4b UNUSED */ { 0x34,0x61, 95}, /* 0x4b UNUSED */
{ 0x78,0x27,108}, /* 0x4c UNUSED */ { 0x78,0x27,108}, /* 0x4c UNUSED */
{ 0x66,0x43,123}, /* 0x4d 1400x1050-60 */ { 0x66,0x43,123}, /* 0x4d 1400x1050-60 */
{ 0x41,0x4e, 21}, /* 0x4e UNUSED */ { 0x41,0x4e, 21}, /* 0x4e */
{ 0xa1,0x4a, 29}, /* 0x4f UNUSED */ { 0xa1,0x4a, 29}, /* 0x4f UNUSED */
{ 0x19,0x42, 42}, /* 0x50 UNUSED */ { 0x19,0x42, 42}, /* 0x50 UNUSED */
{ 0x54,0x46, 58}, /* 0x51 UNUSED */ { 0x54,0x46, 58}, /* 0x51 UNUSED */
...@@ -943,55 +899,31 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]= ...@@ -943,55 +899,31 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]=
{ 0x7c,0x6b, 38}, /* 0x6a 960x540@60 */ { 0x7c,0x6b, 38}, /* 0x6a 960x540@60 */
{ 0xe3,0x56, 41}, /* 0x6b 960x600@60 */ { 0xe3,0x56, 41}, /* 0x6b 960x600@60 */
{ 0x9c,0x62, 69}, /* 0x6c 1280x800 (SiS TMDS) (special) */ { 0x9c,0x62, 69}, /* 0x6c 1280x800 (SiS TMDS) (special) */
{ 0x70,0x28, 90} /* 0x6d 1152x864@60 */ { 0x70,0x28, 90}, /* 0x6d 1152x864@60 */
}; { 0x15,0xe1, 20}, /* 0x6e 640x400@60 (fake, not actually used) */
{ 0x5f,0xc6, 33}, /* 0x6f 720x576@60 */
static const DRAM4Type SiS310_SR15[8] = { { 0x37,0x5a, 10}, /* 0x70 320x200@60 (fake, not actually used) */
{0x00,0x04,0x60,0x60}, { 0x2b,0xc2, 35}, /* 0x71 768@576@60 */
{0x0f,0x0f,0x0f,0x0f}, { 0xa8,0x42,131}, /* 0x72 1600x1200@60 for LCDA */
{0xba,0xba,0xba,0xba}, { 0x1b,0xc1, 34}, /* 0x73 800x480 60Hz (wide) */
{0xa9,0xa9,0xac,0xac}, { 0x41,0x64, 48}, /* 0x74 1024x576 60Hz (wide) */
{0xa0,0xa0,0xa0,0xa8}, { 0x52,0x27, 75}, /* 0x75 1280x720 60Hz (wide) */
{0x00,0x00,0x02,0x02}, { 0x75,0x13, 84} /* 0x76 1280x854 60Hz (SiS LVDS) LCD */
{0x30,0x30,0x40,0x40},
{0x00,0xa5,0xfb,0xf6}
}; };
#ifdef LINUX_KERNEL static const unsigned char SiS310_SR15[4 * 8] =
{
static UCHAR SiS310_SR07 = 0x18; 0x00,0x04,0x60,0x60,
0x0f,0x0f,0x0f,0x0f,
static const DRAM4Type SiS310_CR40[5] = { 0xba,0xba,0xba,0xba,
{0x77,0x77,0x33,0x33}, 0xa9,0xa9,0xac,0xac,
{0x77,0x77,0x33,0x33}, 0xa0,0xa0,0xa0,0xa8,
{0x00,0x00,0x00,0x00}, 0x00,0x00,0x02,0x02,
{0x5b,0x5b,0x03,0x03}, 0x30,0x30,0x40,0x40,
{0x00,0x00,0xf0,0xf8} 0x00,0xa5,0xfb,0xf6
}; };
static UCHAR SiS310_CR49[] = {0xaa,0x88}; static const struct SiS_PanelDelayTbl SiS310_PanelDelayTbl[] =
static UCHAR SiS310_SR1F = 0x00;
static UCHAR SiS310_SR21 = 0xa5;
static UCHAR SiS310_SR22 = 0xfb;
static UCHAR SiS310_SR23 = 0xf6;
static UCHAR SiS310_SR24 = 0x0d;
static UCHAR SiS310_SR25[] = {0x33,0x3};
static UCHAR SiS310_SR31 = 0x00;
static UCHAR SiS310_SR32 = 0x11;
static UCHAR SiS310_SR33 = 0x00;
static UCHAR SiS310_CRT2Data_1_2 = 0x00;
static UCHAR SiS310_CRT2Data_4_D = 0x00;
static UCHAR SiS310_CRT2Data_4_E = 0x00;
static UCHAR SiS310_CRT2Data_4_10 = 0x80;
static const USHORT SiS310_RGBSenseData = 0xd1;
static const USHORT SiS310_VideoSenseData = 0xb9;
static const USHORT SiS310_YCSenseData = 0xb3;
static const USHORT SiS310_RGBSenseData2 = 0x0190;
static const USHORT SiS310_VideoSenseData2 = 0x0174;
static const USHORT SiS310_YCSenseData2 = 0x016b;
#endif
static const SiS_PanelDelayTblStruct SiS310_PanelDelayTbl[]=
{ {
{{0x10,0x40}}, {{0x10,0x40}},
{{0x10,0x40}}, {{0x10,0x40}},
...@@ -1011,7 +943,7 @@ static const SiS_PanelDelayTblStruct SiS310_PanelDelayTbl[]= ...@@ -1011,7 +943,7 @@ static const SiS_PanelDelayTblStruct SiS310_PanelDelayTbl[]=
{{0x10,0x40}} {{0x10,0x40}}
}; };
static const SiS_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]= static const struct SiS_PanelDelayTbl SiS310_PanelDelayTblLVDS[] =
{ {
{{0x28,0xc8}}, {{0x28,0xc8}},
{{0x28,0xc8}}, {{0x28,0xc8}},
...@@ -1035,7 +967,7 @@ static const SiS_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]= ...@@ -1035,7 +967,7 @@ static const SiS_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]=
/* SIS VIDEO BRIDGE ----------------------------------------- */ /* SIS VIDEO BRIDGE ----------------------------------------- */
/**************************************************************/ /**************************************************************/
static const SiS_LCDDataStruct SiS310_St2LCD1024x768Data[] = static const struct SiS_LCDData SiS310_St2LCD1024x768Data[] =
{ {
{ 62, 25, 800, 546,1344, 806}, { 62, 25, 800, 546,1344, 806},
{ 32, 15, 930, 546,1344, 806}, { 32, 15, 930, 546,1344, 806},
...@@ -1046,7 +978,7 @@ static const SiS_LCDDataStruct SiS310_St2LCD1024x768Data[] = ...@@ -1046,7 +978,7 @@ static const SiS_LCDDataStruct SiS310_St2LCD1024x768Data[] =
{ 1, 1,1344, 806,1344, 806} { 1, 1,1344, 806,1344, 806}
}; };
static const SiS_LCDDataStruct SiS310_ExtLCD1024x768Data[] = static const struct SiS_LCDData SiS310_ExtLCD1024x768Data[] =
{ {
{ 42, 25,1536, 419,1344, 806}, { 42, 25,1536, 419,1344, 806},
{ 48, 25,1536, 369,1344, 806}, { 48, 25,1536, 369,1344, 806},
...@@ -1057,7 +989,7 @@ static const SiS_LCDDataStruct SiS310_ExtLCD1024x768Data[] = ...@@ -1057,7 +989,7 @@ static const SiS_LCDDataStruct SiS310_ExtLCD1024x768Data[] =
{ 1, 1,1344, 806,1344, 806} { 1, 1,1344, 806,1344, 806}
}; };
static const SiS_LCDDataStruct SiS310_St2LCD1280x1024Data[] = static const struct SiS_LCDData SiS310_St2LCD1280x1024Data[] =
{ {
{ 22, 5, 800, 510,1650,1088}, { 22, 5, 800, 510,1650,1088},
{ 22, 5, 800, 510,1650,1088}, { 22, 5, 800, 510,1650,1088},
...@@ -1069,7 +1001,7 @@ static const SiS_LCDDataStruct SiS310_St2LCD1280x1024Data[] = ...@@ -1069,7 +1001,7 @@ static const SiS_LCDDataStruct SiS310_St2LCD1280x1024Data[] =
{ 1, 1,1688,1066,1688,1066} { 1, 1,1688,1066,1688,1066}
}; };
static const SiS_LCDDataStruct SiS310_ExtLCD1280x1024Data[] = static const struct SiS_LCDData SiS310_ExtLCD1280x1024Data[] =
{ {
{ 211, 60,1024, 501,1688,1066}, { 211, 60,1024, 501,1688,1066},
{ 211, 60,1024, 508,1688,1066}, { 211, 60,1024, 508,1688,1066},
...@@ -1081,7 +1013,7 @@ static const SiS_LCDDataStruct SiS310_ExtLCD1280x1024Data[] = ...@@ -1081,7 +1013,7 @@ static const SiS_LCDDataStruct SiS310_ExtLCD1280x1024Data[] =
{ 1, 1,1688,1066,1688,1066} { 1, 1,1688,1066,1688,1066}
}; };
static const SiS_Part2PortTblStruct SiS310_CRT2Part2_1024x768_1[] = static const struct SiS_Part2PortTbl SiS310_CRT2Part2_1024x768_1[] =
{ {
{{0x25,0x12,0xc9,0xdc,0xb6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x25,0x12,0xc9,0xdc,0xb6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x2c,0x12,0x9a,0xae,0x88,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x2c,0x12,0x9a,0xae,0x88,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
...@@ -1092,34 +1024,11 @@ static const SiS_Part2PortTblStruct SiS310_CRT2Part2_1024x768_1[] = ...@@ -1092,34 +1024,11 @@ static const SiS_Part2PortTblStruct SiS310_CRT2Part2_1024x768_1[] =
{{0x36,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}} {{0x36,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}
}; };
/* *** LCDA *** */
#if 0
static const SiS_LVDSDataStruct SiS_LCDA1600x1200Data_1[]=
{ /* Clevo, 651+301C */
{1200, 450, 2048,1250},
{1200, 400, 2048,1250},
{1280, 450, 2048,1250},
{1280, 400, 2048,1250},
{1200, 530, 2048,1250},
{1360, 650, 2048,1250},
{1584, 818, 2048,1250},
{1688,1066, 2048,1250},
{1688,1066, 2048,1250},
#if 0
{2048,1250, 2048,1250} /* this should be correct */
#endif
#if 1
{2160,1250, 2048,1250} /* ? */
#endif
};
#endif
/**************************************************************/ /**************************************************************/
/* LVDS, CHRONTEL ------------------------------------------- */ /* LVDS, CHRONTEL ------------------------------------------- */
/**************************************************************/ /**************************************************************/
static const SiS_LVDSDataStruct SiS310_CHTVUPALData[]= static const struct SiS_LVDSData SiS310_CHTVUPALData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -1130,7 +1039,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALData[]= ...@@ -1130,7 +1039,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALData[]=
{1400,1000,1400,1000} {1400,1000,1400,1000}
}; };
static const SiS_LVDSDataStruct SiS310_CHTVOPALData[]= static const struct SiS_LVDSData SiS310_CHTVOPALData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -1141,7 +1050,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALData[]= ...@@ -1141,7 +1050,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALData[]=
{1400, 875,1400, 875} {1400, 875,1400, 875}
}; };
static const SiS_LVDSDataStruct SiS310_CHTVUPALMData[]= static const struct SiS_LVDSData SiS310_CHTVUPALMData[] =
{ {
{ 840, 600, 840, 600}, { 840, 600, 840, 600},
{ 840, 600, 840, 600}, { 840, 600, 840, 600},
...@@ -1152,7 +1061,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALMData[]= ...@@ -1152,7 +1061,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALMData[]=
{1160, 945,1160, 945} {1160, 945,1160, 945}
}; };
static const SiS_LVDSDataStruct SiS310_CHTVOPALMData[]= static const struct SiS_LVDSData SiS310_CHTVOPALMData[] =
{ {
{ 840, 525, 840, 525}, { 840, 525, 840, 525},
{ 840, 525, 840, 525}, { 840, 525, 840, 525},
...@@ -1163,7 +1072,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALMData[]= ...@@ -1163,7 +1072,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALMData[]=
{1160, 840,1160, 840} {1160, 840,1160, 840}
}; };
static const SiS_LVDSDataStruct SiS310_CHTVUPALNData[]= static const struct SiS_LVDSData SiS310_CHTVUPALNData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -1174,7 +1083,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALNData[]= ...@@ -1174,7 +1083,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALNData[]=
{1400,1000,1400,1000} {1400,1000,1400,1000}
}; };
static const SiS_LVDSDataStruct SiS310_CHTVOPALNData[]= static const struct SiS_LVDSData SiS310_CHTVOPALNData[] =
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -1185,7 +1094,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALNData[]= ...@@ -1185,7 +1094,7 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALNData[]=
{1400, 875,1400, 875} {1400, 875,1400, 875}
}; };
static const SiS_LVDSDataStruct SiS310_CHTVSOPALData[]= /* (super overscan - no effect on 7019) */ static const struct SiS_LVDSData SiS310_CHTVSOPALData[] = /* (super overscan - no effect on 7019) */
{ {
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{1008, 625,1008, 625}, {1008, 625,1008, 625},
...@@ -1196,1332 +1105,9 @@ static const SiS_LVDSDataStruct SiS310_CHTVSOPALData[]= /* (super overscan - ...@@ -1196,1332 +1105,9 @@ static const SiS_LVDSDataStruct SiS310_CHTVSOPALData[]= /* (super overscan -
{1400, 875,1400, 875} {1400, 875,1400, 875}
}; };
static const SiS_LVDSDesStruct SiS310_PanelType00_1[]= /* 800x600 */
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType01_1[]= /* 1024x768 */
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 805},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType02_1[]= /* 1280x1024 */
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 1065},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType03_1[]=
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType04_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType05_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType06_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType07_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType08_1[]= /* 1400x1050 */
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType09_1[]= /* 1280x768 */
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0a_1[]= /* 1600x1200 */
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0b_1[]= /* 640x480_2 */
{
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 8, 524},
{ 0, 524}
};
static const SiS_LVDSDesStruct SiS310_PanelType0c_1[]= /* 640x480_3 */
{
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 0, 524},
{ 8, 524},
{ 0, 524}
};
static const SiS_LVDSDesStruct SiS310_PanelType0d_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0e_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0f_1[]=
{
{1343, 798},
{1343, 794},
{1343, 798},
{1343, 794},
{1343, 0},
{1343, 0},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType00_2[]=
{
{980, 528},
{980, 503},
{980, 528},
{980, 503},
{980, 568},
{ 0, 628},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType01_2[]=
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 806},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType02_2[]=
{
{1368, 754},
{1368, 729},
{1368, 754},
{1368, 729},
{1368, 794},
{1448, 854},
{1560, 938},
{ 0,1066},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType03_2[]=
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType04_2[]=
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType05_2[]=
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType06_2[]=
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType07_2[]=
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType08_2[]= /* 1400x1050 */
{
{1308, 741},
{1308, 716},
{1308, 741},
{1308, 716},
{1308, 781},
{1388, 841},
{1500, 925},
{1628,1053},
{ 0,1065},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType09_2[]= /* 1280x768 */
{
{1083, 622},
{1083, 597},
{1083, 622},
{1083, 597},
{1083, 662},
{1163, 722},
{1286, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0a_2[]= /* 1600x1200 */
{
{1568, 920},
{1568, 895},
{1568, 920},
{1568, 895},
{1568, 960},
{1648,1020},
{1760,1104},
{1888,1232},
{1948,1245},
{ 0, 0}
#if 0
{1568, 850},
{1568, 825},
{1568, 850},
{1568, 825},
{1568, 890},
{1648, 950},
{1760,1034},
{1888,1162},
{1948,1175},
{ 0, 0}
#endif
};
static const SiS_LVDSDesStruct SiS310_PanelType0b_2[]= /* 640x480_2 */
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0c_2[]= /* 640x480_3 */
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0d_2[]=
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0e_2[]=
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelType0f_2[] =
{
{1152, 622},
{1152, 597},
{1152, 622},
{1152, 597},
{1152, 662},
{1232, 722},
{ 0, 805},
{ 0, 794},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelTypeNS_1[]=
{
{ 8, 0},
{ 8, 0},
{ 8, 0},
{ 8, 0},
{ 8, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 806},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS310_PanelTypeNS_2[] =
{
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0},
{ 0 , 0}
};
/* CRT1 CRTC for SlaveModes and LCDA */
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT1800x600_1[] =
{
{{0x6b,0x4f,0x8f,0x55,0x85,0xaa,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
0x00 }},
{{0x6b,0x4f,0x8f,0x55,0x85,0x78,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
0x00 }},
{{0x6b,0x4f,0x8f,0x55,0x85,0xaa,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
0x00 }},
{{0x6b,0x4f,0x8f,0x55,0x85,0x78,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
0x00 }},
{{0x6b,0x4f,0x8f,0x55,0x85,0xfa,0x1f,
0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
0x00 }},
{{0x7f,0x63,0x83,0x69,0x19,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT1800x600_1_H[] =
{
{{0x43,0x27,0x87,0x2d,0x1d,0xaa,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
0x00 }},
{{0x43,0x27,0x87,0x2d,0x1d,0x78,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
0x00 }},
{{0x43,0x27,0x87,0x2d,0x1d,0xfa,0x1f,
0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
0x00 }},
{{0x43,0x27,0x87,0x2d,0x1d,0x78,0x1f,
0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
0x00 }},
{{0x43,0x27,0x87,0x2d,0x1d,0xfa,0x1f,
0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
0x00 }},
{{0x4d,0x31,0x91,0x37,0x07,0x72,0xf0,
0x58,0x8d,0x57,0x73,0x20,0x00,0x01,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT1800x600_2[]=
{
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xff,0x84,0x8f,0x73,0x00,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xe6,0x8b,0x5d,0x73,0x00,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xff,0x84,0x8f,0x73,0x00,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0x3e,
0xe6,0x8b,0x5d,0x73,0x00,0x00,0x06,
0x00 }},
{{0x7f,0x4f,0x83,0x62,0x12,0x72,0xba,
0x27,0x8c,0xdf,0x73,0x00,0x00,0x06,
0x00 }},
{{0x7f,0x63,0x83,0x69,0x19,0x72,0xf0,
0x58,0x8d,0x57,0x73,0x20,0x00,0x06,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT1800x600_2_H[] =
{
{{0x57,0x27,0x9b,0x3a,0x0a,0x72,0x3e,
0xff,0x84,0x8f,0x73,0x00,0x00,0x01,
0x00 }},
{{0x57,0x27,0x9b,0x3a,0x0a,0x72,0x3e,
0xd6,0x8b,0x5d,0x73,0x00,0x00,0x01,
0x00 }},
{{0x57,0x27,0x9b,0x3a,0x0a,0x72,0x3e,
0xff,0x84,0x8f,0x73,0x00,0x00,0x01,
0x00 }},
{{0x57,0x27,0x9b,0x3a,0x0a,0x72,0x3e,
0xd6,0x8b,0x5d,0x73,0x00,0x00,0x01,
0x00 }},
{{0x57,0x27,0x9b,0x3a,0x0a,0x72,0xba,
0x27,0x8c,0xdf,0x73,0x00,0x00,0x01,
0x00 }},
{{0x4d,0x31,0x91,0x3a,0x0a,0x72,0xf0,
0x63,0x88,0x57,0x73,0x00,0x00,0x01,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11024x768_1[] =
{
{{0x73,0x4f,0x97,0x53,0x84,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x05,
0x00}},
{{0x73,0x4f,0x97,0x53,0x84,0x82,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x05,
0x00}},
{{0x73,0x4f,0x97,0x53,0x84,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x05,
0x00}},
{{0x73,0x4f,0x97,0x53,0x84,0x82,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x05,
0x00}},
{{0x73,0x4f,0x97,0x53,0x84,0x04,0x3e,
0xE2,0x89,0xDf,0x05,0x00,0x00,0x05,
0x00}},
{{0x87,0x63,0x8B,0x67,0x18,0x7c,0xf0,
0x5A,0x81,0x57,0x7D,0x00,0x00,0x06,
0x01}},
{{0xA3,0x7f,0x87,0x83,0x94,0x24,0xf5,
0x02,0x89,0xFf,0x25,0x10,0x00,0x02,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11024x768_1_H[] =
{
{{0x4b,0x27,0x8f,0x2b,0x1c,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x05,
0x00 }},
{{0x4b,0x27,0x8f,0x2b,0x1c,0x82,0x1f,
0x60,0x87,0x5D,0x83,0x01,0x00,0x05,
0x00}},
{{0x4b,0x27,0x8f,0x2b,0x1c,0xb4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x05,
0x00}},
{{0x4b,0x27,0x8f,0x2b,0x1c,0x82,0x1f,
0x60,0x87,0x5D,0x83,0x01,0x00,0x05,
0x00}},
{{0x4b,0x27,0x8f,0x2b,0x1c,0x04,0x3e,
0xE2,0x89,0xDf,0x05,0x00,0x00,0x05,
0x00}},
{{0x55,0x31,0x99,0x35,0x06,0x7c,0xf0,
0x5A,0x81,0x57,0x7D,0x00,0x00,0x01,
0x01}},
{{0x63,0x3F,0x87,0x43,0x94,0x24,0xf5,
0x02,0x89,0xFf,0x25,0x10,0x00,0x01,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11024x768_2[] =
{
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x57,0x8e,0x8f,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x3e,0x85,0x5d,0x25,0x10,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x57,0x8e,0x8f,0x25,0x30,0x00,0x06,
0x00 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x3e,0x85,0x5d,0x25,0x10,0x00,0x06,
0x01 }},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x7f,0x86,0xdf,0x25,0x10,0x00,0x06,
0x00 }},
{{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
0xbb,0x82,0x57,0x25,0x10,0x00,0x02,
0x01 }},
{{0xa3,0x7f,0x87,0x83,0x94,0x24,0xf5,
0x02,0x89,0xff,0x25,0x10,0x00,0x02,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11024x768_2_H[] =
{
{{0x7b,0x27,0x9f,0x46,0x97,0x24,0xbb,
0x57,0x8e,0x8f,0x25,0x30,0x00,0x01,
0x00 }},
{{0x7b,0x27,0x9f,0x46,0x97,0x24,0xbb,
0x3e,0x85,0x5d,0x25,0x10,0x00,0x01,
0x00 }},
{{0x7b,0x27,0x9f,0x46,0x97,0x24,0xbb,
0x57,0x8e,0x8f,0x25,0x30,0x00,0x01,
0x00 }},
{{0x7b,0x27,0x9f,0x46,0x97,0x24,0xbb,
0x3e,0x85,0x5d,0x25,0x10,0x00,0x01,
0x00 }},
{{0x7b,0x27,0x9f,0x46,0x97,0x24,0xbb,
0x7f,0x86,0xdf,0x25,0x10,0x00,0x01,
0x00 }},
{{0x71,0x31,0x95,0x46,0x97,0x24,0xf1,
0xbb,0x82,0x57,0x25,0x10,0x00,0x01,
0x01 }},
{{0x63,0x3f,0x87,0x46,0x97,0x24,0xf5,
0x0f,0x86,0xff,0x25,0x30,0x00,0x01,
0x01 }}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11280x1024_1[] =
{
{{0x7e,0x4f,0x82,0x58,0x04,0xb8,0x1f,
0x90,0x84,0x8f,0xb9,0x30,0x00,0x06,
0x00}},
{{0x7e,0x4f,0x82,0x58,0x04,0x86,0x1f,
0x5e,0x82,0x5d,0x87,0x10,0x00,0x06,
0x00}},
{{0x7e,0x4f,0x82,0x58,0x04,0xb8,0x1f,
0x90,0x84,0x8f,0xb9,0x30,0x00,0x06,
0x00}},
{{0x7e,0x4f,0x82,0x58,0x04,0x86,0x1f,
0x5e,0x82,0x5d,0x87,0x10,0x00,0x06,
0x00}},
{{0x7e,0x4f,0x82,0x58,0x04,0x08,0x3e,
0xe0,0x84,0xdf,0x09,0x00,0x00,0x06,
0x00}},
{{0x92,0x63,0x96,0x6c,0x18,0x80,0xf0,
0x58,0x8c,0x57,0x81,0x20,0x00,0x06,
0x01}},
{{0xae,0x7f,0x92,0x88,0x94,0x28,0xf5,
0x00,0x84,0xff,0x29,0x10,0x00,0x02,
0x01}},
{{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
0x00,0x84,0xff,0x29,0x09,0x00,0x07,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11280x1024_1_H[] =
{
{{0x56,0x27,0x9a,0x31,0x1c,0xb8,0x1f,
0x90,0x84,0x8f,0xb9,0x30,0x00,0x05,
0x00}},
{{0x56,0x27,0x9a,0x31,0x1c,0x86,0x1f,
0x5e,0x82,0x5d,0x87,0x10,0x00,0x05,
0x00}},
{{0x56,0x27,0x9a,0x31,0x1c,0xb8,0x1f,
0x90,0x84,0x8f,0xb9,0x30,0x00,0x05,
0x00}},
{{0x56,0x27,0x9a,0x31,0x1c,0x86,0x1f,
0x5e,0x82,0x5d,0x87,0x10,0x00,0x05,
0x01}},
{{0x56,0x27,0x9a,0x31,0x1c,0x08,0x3e,
0xe0,0x84,0xdf,0x09,0x00,0x00,0x05,
0x00}},
{{0x60,0x31,0x84,0x3a,0x86,0x80,0xf0,
0x58,0x8c,0x57,0x81,0x20,0x00,0x01,
0x01}},
{{0x6e,0x3f,0x92,0x48,0x94,0x28,0xf5,
0x00,0x84,0xff,0x29,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11280x1024_2[] =
{
{{0xce,0x72,0x91,0x81,0x8f,0x28,0x92,
0xc8,0x8c,0x5d,0x5c,0x01,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x81,0x8f,0x28,0x92,
0xaf,0x83,0x44,0x43,0x21,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x81,0x8f,0x28,0x92,
0xc8,0x8c,0x5d,0x5c,0x01,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x81,0x8f,0x28,0x92,
0xaf,0x83,0x44,0x43,0x21,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x81,0x8f,0x28,0x92,
0xf0,0x84,0x85,0x84,0x11,0x00,0x02,
0x01}},
{{0xce,0x63,0x92,0x8b,0x19,0x28,0xd4,
0x3f,0x83,0x57,0x29,0x01,0x00,0x03,
0x01}},
{{0xce,0x7f,0x92,0x99,0x07,0x28,0xd4,
0x93,0x87,0xff,0x29,0x21,0x00,0x07,
0x01}},
{{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
0x00,0x84,0xff,0x29,0x09,0x00,0x07,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11280x1024_2_H[] =
{
{{0xa6,0x4a,0x89,0x59,0x07,0x28,0x92,
0xc8,0x8c,0x5d,0x5c,0x01,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x59,0x07,0x28,0x92,
0xaf,0x83,0x44,0x43,0x21,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x59,0x07,0x28,0x92,
0xc8,0x8c,0x5d,0x5c,0x01,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x59,0x07,0x28,0x92,
0xfa,0x83,0x44,0x43,0x31,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x59,0x07,0x28,0x92,
0xf0,0x84,0x85,0x84,0x11,0x00,0x06,
0x01}},
{{0x9c,0x31,0x80,0x59,0x87,0x28,0xd4,
0x3f,0x83,0x57,0x29,0x01,0x00,0x06,
0x01}},
{{0x8e,0x3f,0x92,0x59,0x07,0x28,0xd4,
0x93,0x87,0xff,0x29,0x21,0x00,0x06,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11400x1050_1[] =
{
{{0x6f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
0x8f,0x81,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0x6c,0x1f,
0x5e,0x81,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
0x90,0x83,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0xee,0x1f,
0xdf,0x82,0xdf,0xef,0x10,0x00,0x05,
0x00}},
{{0x83,0x63,0x87,0x68,0x16,0x66,0xf0,
0x57,0x8e,0x57,0x67,0x20,0x00,0x06,
0x01}},
{{0x9f,0x7f,0x83,0x84,0x92,0x0e,0xf1,
0xff,0x86,0xff,0x0f,0x10,0x00,0x02,
0x01,}},
{{0xbf,0x9f,0x83,0xa4,0x12,0x0e,0xde,
0xff,0x86,0xff,0x0f,0x01,0x00,0x07,
0x01}},
{{0xce,0xae,0x92,0xb3,0x01,0x28,0x10,
0x19,0x80,0x19,0x29,0x0f,0x00,0x03,
0x00}}
#if 0
{{0x6f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
0x93,0x86,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0x9e,0x1f,
0x93,0x86,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x6f,0x4f,0x93,0x54,0x82,0xee,0x1f,
0xe2,0x86,0xdf,0xef,0x10,0x00,0x05,
0x00}},
{{0x83,0x63,0x87,0x68,0x16,0x66,0xf0,
0x5a,0x8e,0x57,0x67,0x20,0x00,0x06,
0x01}},
{{0x9f,0x7f,0x83,0x84,0x92,0x0e,0xf5,
0x02,0x86,0xff,0x0f,0x10,0x00,0x02,
0x01}},
{{0xbf,0x9f,0x83,0xa4,0x12,0x0e,0x5a,
0x02,0x86,0xff,0x0f,0x09,0x00,0x07,
0x01}},
{{0xce,0xae,0x92,0xb3,0x01,0x28,0x10,
0x1a,0x80,0x19,0x29,0x0f,0x00,0x03,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11400x1050_1_H[] =
{
{{0x47,0x27,0x8b,0x2c,0x1a,0x9e,0x1f,
0x8f,0x81,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x30,0x1e,0x9e,0x1f,
0x90,0x83,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0xee,0x1f,
0xdf,0x86,0xdf,0xef,0x10,0x00,0x05,
0x00}},
{{0x51,0x31,0x95,0x36,0x04,0x66,0xf0,
0x57,0x8e,0x57,0x67,0x20,0x00,0x01,
0x01}},
{{0x5f,0x3f,0x83,0x44,0x92,0x0e,0xf1,
0xff,0x86,0xff,0x0f,0x10,0x00,0x01,
0x01}},
{{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
0x01}},
{{0x76,0x56,0x9a,0x5b,0x89,0x28,0x10,
0x1c,0x80,0x19,0x29,0x0b,0x00,0x05,
0x00}}
#if 0
{{0x47,0x27,0x8b,0x2c,0x1a,0x9e,0x1f,
0x93,0x86,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x30,0x1e,0x9e,0x1f,
0x92,0x86,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0xee,0x1f,
0xe2,0x86,0xdf,0xef,0x10,0x00,0x05,
0x00}},
{{0x51,0x31,0x95,0x36,0x04,0x66,0xf0,
0x5a,0x8e,0x57,0x67,0x20,0x00,0x01,
0x01}},
{{0x5f,0x3f,0x83,0x44,0x92,0x0e,0xf5,
0x02,0x86,0xff,0x0f,0x10,0x00,0x01,
0x01}},
{{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
0x01}},
{{0x76,0x56,0x9a,0x5b,0x89,0x28,0x10,
0x1c,0x80,0x19,0x29,0x0b,0x00,0x05,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11400x1050_2[] =
{
{{0xce,0x72,0x91,0x84,0x92,0x28,0x92,
0xd7,0x8b,0x5d,0x5c,0x21,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x84,0x92,0x28,0x92,
0xbe,0x82,0x44,0x43,0x01,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x84,0x92,0x28,0x92,
0xd7,0x8b,0x5d,0x5c,0x21,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x84,0x92,0x28,0x92,
0xbe,0x82,0x44,0x43,0x01,0x00,0x02,
0x01}},
{{0xce,0x72,0x91,0x84,0x92,0x28,0x92,
0xff,0x83,0x85,0x84,0x11,0x00,0x02,
0x01}},
{{0xce,0x63,0x92,0x8e,0x1c,0x28,0xd4,
0x3f,0x83,0x57,0x29,0x01,0x00,0x03,
0x01}},
{{0xce,0x7f,0x92,0x9c,0x0a,0x28,0xd4,
0x93,0x87,0xff,0x29,0x21,0x00,0x07,
0x01}},
{{0xce,0x9f,0x92,0xac,0x1a,0x28,0x5a,
0x13,0x87,0xff,0x29,0x29,0x00,0x07,
0x01}},
{{0xce,0xae,0x92,0xbc,0x0a,0x28,0x10,
0x20,0x84,0x19,0x29,0x0f,0x00,0x03,
0x00}}
#if 0
{{0xce,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
0xdb,0x8f,0x8f,0x29,0x21,0x00,0x03,
0x00}},
{{0xce,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
0xc2,0x86,0x5d,0x29,0x01,0x00,0x03,
0x01}},
{{0xce,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
0xdb,0x8f,0x8f,0x29,0x21,0x00,0x03,
0x00}},
{{0xce,0x4f,0x92,0x8c,0x1a,0x28,0x9a,
0xc2,0x86,0x5d,0x29,0x01,0x00,0x03,
0x00}},
{{0xce,0x4f,0x92,0x8c,0x1a,0x28,0x9e,
0x03,0x87,0xdf,0x29,0x01,0x00,0x03,
0x00}},
{{0xce,0x63,0x92,0x96,0x04,0x28,0xd4,
0x3f,0x83,0x57,0x29,0x01,0x00,0x07,
0x01}},
{{0xce,0x7f,0x92,0xa4,0x12,0x28,0xd4,
0x93,0x87,0xff,0x29,0x21,0x00,0x07,
0x01}},
{{0xce,0x9f,0x92,0xb4,0x02,0x28,0x5a,
0x13,0x87,0xff,0x29,0x29,0x00,0x03,
0x01}},
{{0xce,0xae,0x92,0xbc,0x0a,0x28,0x10,
0x20,0x84,0x19,0x29,0x0f,0x00,0x03,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11400x1050_2_H[] =
{
{{0xa6,0x4a,0x89,0x5c,0x0a,0x28,0x92,
0xd7,0x8b,0x5d,0x5c,0x21,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x5c,0x0a,0x28,0x92,
0xbe,0x82,0x44,0x43,0x01,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x5c,0x0a,0x28,0x92,
0xd7,0x8b,0x5d,0x5c,0x21,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x5c,0x0a,0x28,0x92,
0xbe,0x82,0x44,0x43,0x01,0x00,0x06,
0x01}},
{{0xa6,0x4a,0x89,0x5c,0x0a,0x28,0x92,
0xff,0x83,0x85,0x84,0x11,0x00,0x06,
0x01}},
{{0x9c,0x31,0x80,0x5c,0x8a,0x28,0xd4,
0x3f,0x83,0x57,0x29,0x01,0x00,0x06,
0x01}},
{{0x8e,0x3f,0x92,0x5c,0x0a,0x28,0xd4,
0x93,0x87,0xff,0x29,0x21,0x00,0x06,
0x01}},
{{0x7e,0x4f,0x82,0x5c,0x0a,0x28,0x5a,
0x13,0x87,0xff,0x29,0x29,0x00,0x06,
0x01}},
{{0x76,0x56,0x9a,0x64,0x92,0x28,0x10,
0x20,0x84,0x19,0x29,0x0f,0x00,0x05,
0x00}}
#if 0
{{0xa6,0x27,0x8a,0x64,0x92,0x28,0x9a,
0xdb,0x8f,0x8f,0x29,0x21,0x00,0x06,
0x00}},
{{0xa6,0x27,0x8a,0x64,0x92,0x28,0x9a,
0xc2,0x86,0x5d,0x29,0x01,0x00,0x06,
0x00}},
{{0xa6,0x27,0x8a,0x64,0x92,0x28,0x9a,
0xdb,0x8f,0x8f,0x29,0x21,0x00,0x06,
0x00}},
{{0xa6,0x27,0x8a,0x64,0x92,0x28,0x9a,
0xc2,0x86,0x5d,0x29,0x01,0x00,0x06,
0x00}},
{{0xa6,0x27,0x8a,0x64,0x92,0x28,0x9e,
0x03,0x87,0xdf,0x29,0x01,0x00,0x06,
0x00}},
{{0x9c,0x31,0x80,0x64,0x92,0x28,0xd4,
0x3f,0x83,0x57,0x29,0x01,0x00,0x06,
0x01}},
{{0x8e,0x3f,0x92,0x64,0x12,0x28,0xd4,
0x93,0x87,0xff,0x29,0x21,0x00,0x06,
0x01}},
{{0x7e,0x4f,0x82,0x64,0x12,0x28,0x5a,
0x13,0x87,0xff,0x29,0x29,0x00,0x06,
0x01}},
{{0x76,0x56,0x9a,0x64,0x92,0x28,0x10,
0x20,0x84,0x19,0x29,0x0f,0x00,0x05,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11600x1200_1[] =
{
{{0x83,0x4F,0x87,0x5B,0x13,0x06,0x3E,
0xB3,0x86,0x8F,0x07,0x20,0x00,0x06,
0x00}},
{{0x83,0x4F,0x87,0x5B,0x13,0xD4,0x1F,
0x81,0x84,0x5D,0xD5,0x10,0x00,0x06,
0x00}},
{{0x83,0x4F,0x87,0x5B,0x13,0x06,0x3E,
0xB3,0x86,0x8F,0x07,0x20,0x00,0x06,
0x00}},
{{0x83,0x4F,0x87,0x5B,0x13,0xD4,0x1F,
0x81,0x84,0x5D,0xD5,0x10,0x00,0x06,
0x00}},
{{0x83,0x4F,0x87,0x5B,0x13,0x56,0xBA,
0x03,0x86,0xDF,0x57,0x00,0x00,0x06,
0x00}},
{{0x97,0x63,0x9B,0x6F,0x07,0xCE,0xF0,
0x7B,0x8E,0x57,0xCF,0x20,0x00,0x02,
0x01}},
{{0xB3,0x7F,0x97,0x8B,0x83,0x76,0xF5,
0x23,0x86,0xFF,0x77,0x10,0x00,0x06,
0x01}},
{{0xD3,0x9F,0x97,0xAB,0x03,0x76,0x5A,
0x23,0x86,0xFF,0x77,0x09,0x00,0x03,
0x01}},
{{0xE2,0xAE,0x86,0xBA,0x92,0x90,0x10,
0x3D,0x80,0x19,0x91,0x0F,0x00,0x03,
0x00}},
{{0xFB,0xC7,0x9F,0xD3,0x8B,0x26,0x11,
0xD3,0x86,0xAF,0x27,0x3F,0x00,0x07,
0x00}}
#if 0
{{0x83,0x4f,0x87,0x51,0x09,0xc0,0x1f,
0x90,0x84,0x8f,0xc1,0x30,0x00,0x06,
0x00}},
{{0x83,0x4f,0x87,0x51,0x09,0x8e,0x1f,
0x5e,0x82,0x5d,0x8f,0x10,0x00,0x06,
0x00}},
{{0x83,0x4f,0x87,0x51,0x09,0xc0,0x1f,
0x90,0x84,0x8f,0xc1,0x30,0x00,0x06,
0x00}},
{{0x83,0x4f,0x87,0x51,0x09,0x8e,0x1f,
0x5e,0x82,0x5d,0x8f,0x10,0x00,0x06,
0x00}},
{{0x83,0x4f,0x87,0x51,0x09,0x10,0x3e,
0xe0,0x84,0xdf,0x11,0x00,0x00,0x06,
0x00}},
{{0x97,0x63,0x9b,0x65,0x1d,0x88,0xf0,
0x58,0x8c,0x57,0x89,0x20,0x00,0x06,
0x01}},
{{0xb3,0x7f,0x97,0x81,0x99,0x30,0xf5,
0x00,0x84,0xff,0x31,0x10,0x00,0x02,
0x01}},
{{0xd3,0x9f,0x97,0xa1,0x19,0x30,0x5a,
0x00,0x84,0xff,0x31,0x09,0x00,0x07,
0x01}},
{{0xe2,0xae,0x86,0xb0,0x88,0x4a,0x10,
0x1a,0x8e,0x19,0x4b,0x2f,0x00,0x03,
0x00}},
{{0xfb,0xc7,0x9f,0xc9,0x81,0xe0,0x10,
0xb0,0x84,0xaf,0xe1,0x2f,0x00,0x07,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11600x1200_1_H[] =
{
{{0x5B,0x27,0x9F,0x33,0x0B,0x06,0x2E,
0xB3,0x86,0x8F,0x07,0x20,0x00,0x01,
0x00}},
{{0x5B,0x27,0x9F,0x29,0x01,0x8E,0x1F,
0x81,0x84,0x5D,0xD5,0x10,0x00,0x06,
0x00}},
{{0x5B,0x27,0x9F,0x33,0x0B,0x06,0x2E,
0xB3,0x86,0x8F,0x07,0x20,0x00,0x01,
0x00}},
{{0x83,0x4F,0x87,0x5B,0x13,0xD4,0x1F,
0x81,0x84,0x5D,0xD5,0x10,0x00,0x06,
0x00}},
{{0x5B,0x27,0x9F,0x33,0x0B,0x56,0xBA,
0x03,0x86,0xDF,0x57,0x00,0x00,0x01,
0x00}},
{{0x65,0x31,0x89,0x3D,0x95,0xCE,0xF0,
0x7B,0x8E,0x57,0xCF,0x20,0x00,0x01,
0x01}},
{{0x73,0x3F,0x97,0x4B,0x83,0x76,0xF5,
0x23,0x86,0xFF,0x77,0x10,0x00,0x05,
0x01}},
{{0xD3,0x9F,0x97,0xAB,0x03,0x76,0x5A,
0x23,0x86,0xFF,0x77,0x09,0x00,0x03,
0x01}},
{{0xE2,0xAE,0x86,0xBA,0x92,0x90,0x10,
0x3D,0x80,0x19,0x91,0x0F,0x00,0x03,
0x00}},
{{0x97,0x63,0x9B,0x6F,0x07,0xE0,0x10,
0xB0,0x84,0xAF,0xE1,0x2F,0x00,0x06,
0x00}}
#if 0
{{0x5b,0x27,0x9f,0x29,0x01,0xc0,0x1f,
0x90,0x84,0x8f,0xc1,0x30,0x00,0x01,
0x00}},
{{0x5b,0x27,0x9f,0x29,0x01,0x8e,0x1f,
0x5e,0x82,0x5d,0x8f,0x10,0x00,0x01,
0x00}},
{{0x5b,0x27,0x9f,0x29,0x01,0xc0,0x1f,
0x90,0x84,0x8f,0xc1,0x30,0x00,0x01,
0x00}},
{{0x5b,0x27,0x9f,0x29,0x01,0x8e,0x1f,
0x5e,0x82,0x5d,0x8f,0x10,0x00,0x01,
0x00}},
{{0x5b,0x27,0x9f,0x29,0x01,0x10,0x3e,
0xe0,0x84,0xdf,0x11,0x00,0x00,0x01,
0x00}},
{{0x65,0x31,0x89,0x33,0x8b,0x88,0xf0,
0x58,0x8c,0x57,0x89,0x20,0x00,0x01,
0x01}},
{{0x73,0x3f,0x97,0x41,0x99,0x30,0xf5,
0x00,0x84,0xff,0x31,0x10,0x00,0x01,
0x01}},
{{0x83,0x4f,0x87,0x51,0x09,0x30,0x5a,
0x00,0x84,0xff,0x31,0x09,0x00,0x06,
0x01}},
{{0x8a,0x56,0x8e,0x58,0x10,0x4a,0x10,
0x1a,0x8e,0x19,0x4b,0x2f,0x00,0x06,
0x00}},
{{0x97,0x63,0x9b,0x65,0x1d,0xe0,0x10,
0xb0,0x84,0xaf,0xe1,0x2f,0x00,0x06,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11600x1200_2[] =
{
{{0xFB,0x87,0x86,0x97,0x0F,0x26,0x97,
0x43,0x86,0xDB,0xDA,0x11,0x00,0x07,
0x01}},
{{0xFB,0x87,0x86,0x97,0x0F,0x26,0x97,
0x2A,0x8D,0xC2,0xC1,0x11,0x00,0x07,
0x01}},
{{0xFB,0x87,0x86,0x97,0x0F,0x26,0x97,
0x43,0x86,0xDB,0xDA,0x11,0x00,0x07,
0x01}},
{{0xFB,0x87,0x86,0x97,0x0F,0x26,0x97,
0x2A,0x8D,0xC2,0xC1,0x11,0x00,0x07,
0x01}},
{{0xFB,0x87,0x86,0x97,0x0F,0x26,0x9F,
0x6B,0x8E,0x03,0x02,0x01,0x00,0x07,
0x01}},
{{0xFB,0x63,0x9F,0xA1,0x99,0x26,0xD5,
0xA7,0x8A,0xBF,0xBE,0x01,0x00,0x07,
0x01}},
{{0xFB,0x7F,0x9F,0xAF,0x87,0x26,0xDD,
0xFB,0x8E,0x13,0x12,0x31,0x00,0x03,
0x01}},
{{0xFB,0x9F,0x9F,0xBF,0x97,0x26,0x5B,
0x7B,0x8E,0xFF,0x27,0x39,0x00,0x03,
0x01}},
{{0xFB,0xAE,0x9F,0xC6,0x9E,0x26,0x11,
0x88,0x8B,0x19,0x27,0x1F,0x00,0x03,
0x00}},
{{0xFB,0xC7,0x9F,0xD3,0x8B,0x26,0x11,
0xD3,0x86,0xAF,0x27,0x3F,0x00,0x07,
0x00}}
#if 0
{{0xfb,0x88,0x87,0x90,0x08,0xe0,0x96,
0x20,0x84,0xb9,0xb8,0x01,0x00,0x07,
0x01}},
{{0xfb,0x88,0x87,0x90,0x08,0xe0,0x96,
0x07,0x8b,0xa0,0x9f,0x01,0x00,0x07,
0x01}},
{{0xfb,0x88,0x87,0x90,0x08,0xe0,0x96,
0x20,0x84,0xb9,0xb8,0x01,0x00,0x07,
0x01}},
{{0xfb,0x88,0x87,0x90,0x08,0xe0,0x96,
0x07,0x8b,0xa0,0x9f,0x01,0x00,0x07,
0x01}},
{{0xfb,0x88,0x87,0x90,0x08,0xe0,0x96,
0x48,0x8c,0xe1,0xe0,0x11,0x00,0x07,
0x01}},
{{0xfb,0x63,0x9f,0x9a,0x92,0xe0,0xd4,
0x9b,0x8f,0x9d,0x9c,0x21,0x00,0x07,
0x01}},
{{0xfb,0x7f,0x9f,0xa8,0x80,0xe0,0xd4,
0xef,0x83,0xff,0xe1,0x21,0x00,0x03,
0x01}},
{{0xfb,0x9f,0x9f,0xb8,0x90,0xe0,0x5a,
0x6f,0x83,0xff,0xe1,0x29,0x00,0x03,
0x01}},
{{0xfb,0xae,0x9f,0xbf,0x97,0xe0,0x10,
0x7c,0x80,0x19,0xe1,0x0f,0x00,0x03,
0x00}},
{{0xfb,0xc7,0x9f,0xc9,0x84,0xe0,0x10,
0xc7,0x8b,0xaf,0xe1,0x0f,0x00,0x07,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT11600x1200_2_H[] =
{
{{0xD3,0x5F,0x9E,0x6F,0x07,0x26,0x97,
0x43,0x86,0xDB,0xDA,0x11,0x00,0x02,
0x01}},
{{0xD3,0x27,0x97,0x6F,0x07,0x26,0x97,
0x6B,0x8E,0x83,0x82,0x01,0x00,0x03,
0x01}},
{{0xD3,0x5F,0x9E,0x6F,0x07,0x26,0x97,
0x43,0x86,0xDB,0xDA,0x11,0x00,0x02,
0x01}},
{{0xD3,0x27,0x97,0x6F,0x07,0x26,0x97,
0x07,0x8B,0xA0,0x9F,0x01,0x00,0x02,
0x01}},
{{0xD3,0x27,0x97,0x6F,0x07,0x26,0x97,
0x6B,0x8E,0x83,0x82,0x01,0x00,0x03,
0x01}},
{{0xC9,0x31,0x8D,0x6F,0x07,0x26,0xD5,
0xA7,0x8A,0xBF,0xBE,0x01,0x00,0x03,
0x01}},
{{0xBB,0x3F,0x9F,0x6F,0x87,0x26,0xDD,
0xFB,0x8E,0x13,0x12,0x31,0x00,0x02,
0x01}},
{{0xAB,0x4F,0x8F,0x68,0x80,0xE0,0x5A,
0x6F,0x83,0xFF,0xE1,0x29,0x00,0x02,
0x01}},
{{0xA3,0x56,0x87,0x67,0x9F,0xE0,0x10,
0x7C,0x80,0x19,0xE1,0x0F,0x00,0x06,
0x00}},
{{0x97,0x63,0x9B,0x68,0x00,0xE0,0x10,
0xC7,0x8B,0xAF,0xE1,0x0F,0x00,0x02,
0x00}}
#if 0
{{0xd3,0x60,0x9f,0x68,0x00,0xe0,0x96,
0x20,0x84,0xb9,0xb8,0x01,0x00,0x02,
0x01}},
{{0xd3,0x60,0x9f,0x68,0x00,0xe0,0x96,
0x07,0x8b,0xa0,0x9f,0x01,0x00,0x02,
0x01}},
{{0xd3,0x60,0x9f,0x68,0x00,0xe0,0x96,
0x20,0x84,0xb9,0xb8,0x01,0x00,0x02,
0x01}},
{{0xd3,0x60,0x9f,0x68,0x00,0xe0,0x96,
0x07,0x8b,0xa0,0x9f,0x01,0x00,0x02,
0x01}},
{{0xd3,0x60,0x9f,0x68,0x00,0xe0,0x96,
0x48,0x8c,0xe1,0xe0,0x11,0x00,0x02,
0x01}},
{{0xc9,0x31,0x8d,0x68,0x00,0xe0,0xd4,
0x9b,0x8f,0x9d,0x9c,0x21,0x00,0x03,
0x01}},
{{0xbb,0x3f,0x9f,0x68,0x80,0xe0,0xd4,
0xef,0x83,0xff,0xe1,0x21,0x00,0x02,
0x01}},
{{0xab,0x4f,0x8f,0x68,0x80,0xe0,0x5a,
0x6f,0x83,0xff,0xe1,0x29,0x00,0x02,
0x01}},
{{0xa3,0x56,0x87,0x67,0x9f,0xe0,0x10,
0x7c,0x80,0x19,0xe1,0x0f,0x00,0x06,
0x00}},
{{0x97,0x63,0x9b,0x68,0x00,0xe0,0x10,
0xc7,0x8b,0xaf,0xe1,0x0f,0x00,0x02,
0x00}}
#endif
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT1XXXxXXX_1[] =
{
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xe7,0x04,0x00,0x00,0x05,
0x00}},
{{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01}},
{{0xce,0x9f,0x92,0xa8,0x14,0x28,0x5a,
0x00,0x84,0xff,0x29,0x09,0x00,0x07,
0x01}},
{{0xce,0x9f,0x92,0xa9,0x17,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x07,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS310_LVDSCRT1XXXxXXX_1_H[] =
{
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x30,0x00,0x00,
0x00}},
{{0x38,0x27,0x9c,0x2c,0x80,0x0b,0x3e,
0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
0x00}},
{{0x4d,0x31,0x91,0x3b,0x03,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x01,
0x01}},
{{0x63,0x3f,0x87,0x4a,0x92,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
/* CRT1 CRTC for Chrontel TV slave modes */ /* CRT1 CRTC for Chrontel TV slave modes */
static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1UNTSC[] = static const struct SiS_LVDSCRT1Data SiS310_CHTVCRT1UNTSC[] =
{ {
{{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e, {{0x64,0x4f,0x88,0x56,0x9f,0x56,0x3e,
0xe8,0x84,0x8f,0x57,0x20,0x00,0x01, 0xe8,0x84,0x8f,0x57,0x20,0x00,0x01,
...@@ -2546,7 +1132,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1UNTSC[] = ...@@ -2546,7 +1132,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1UNTSC[] =
0x01}} 0x01}}
}; };
static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1ONTSC[] = static const struct SiS_LVDSCRT1Data SiS310_CHTVCRT1ONTSC[] =
{ {
{{0x63,0x4f,0x87,0x5a,0x9f,0x0b,0x3e, {{0x63,0x4f,0x87,0x5a,0x9f,0x0b,0x3e,
0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01, 0xc0,0x84,0x8f,0x0c,0x20,0x00,0x01,
...@@ -2571,7 +1157,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1ONTSC[] = ...@@ -2571,7 +1157,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1ONTSC[] =
0x01 }} 0x01 }}
}; };
static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1UPAL[] = static const struct SiS_LVDSCRT1Data SiS310_CHTVCRT1UPAL[] =
{ {
{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e, {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
0xf8,0x83,0x8f,0x70,0x20,0x00,0x05, 0xf8,0x83,0x8f,0x70,0x20,0x00,0x05,
...@@ -2596,7 +1182,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1UPAL[] = ...@@ -2596,7 +1182,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1UPAL[] =
0x01}} 0x01}}
}; };
static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1OPAL[] = static const struct SiS_LVDSCRT1Data SiS310_CHTVCRT1OPAL[] =
{ {
{{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e, {{0x79,0x4f,0x9d,0x5a,0x90,0x6f,0x3e,
0xf0,0x83,0x8f,0x70,0x20,0x00,0x05, 0xf0,0x83,0x8f,0x70,0x20,0x00,0x05,
...@@ -2621,8 +1207,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1OPAL[] = ...@@ -2621,8 +1207,7 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1OPAL[] =
0x01 }} 0x01 }}
}; };
static const struct SiS_CHTVRegData SiS310_CHTVReg_UNTSC[] =
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UNTSC[] =
{ {
{{0x4a,0x77,0xbb,0x94,0x84,0x48,0xfe,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x4a,0x77,0xbb,0x94,0x84,0x48,0xfe,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
{{0x4a,0x77,0xbb,0x94,0x84,0x48,0xfe,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x4a,0x77,0xbb,0x94,0x84,0x48,0xfe,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
...@@ -2642,7 +1227,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UNTSC[] = ...@@ -2642,7 +1227,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UNTSC[] =
for PAL-M and PAL-N all above is corrected. for PAL-M and PAL-N all above is corrected.
*/ */
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_ONTSC[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_ONTSC[] =
{ {
{{0x49,0x77,0xbb,0x7b,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x49,0x77,0xbb,0x7b,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
{{0x49,0x77,0xbb,0x7b,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x49,0x77,0xbb,0x7b,0x84,0x34,0x00,0x50,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
...@@ -2653,7 +1238,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_ONTSC[] = ...@@ -2653,7 +1238,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_ONTSC[] =
{{0xed,0x77,0xbb,0x66,0x8c,0x21,0x02,0x5a,0x04,0x00,0x80,0x1f,0x9f,0xc1,0x0c,0x00}} {{0xed,0x77,0xbb,0x66,0x8c,0x21,0x02,0x5a,0x04,0x00,0x80,0x1f,0x9f,0xc1,0x0c,0x00}}
}; };
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPAL[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_UPAL[] =
{ {
{{0x41,0x7f,0xb7,0x34,0xad,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x41,0x7f,0xb7,0x34,0xad,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
{{0x41,0x7f,0xb7,0x80,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x41,0x7f,0xb7,0x80,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
...@@ -2664,7 +1249,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPAL[] = ...@@ -2664,7 +1249,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPAL[] =
{{0xe5,0x7f,0xb7,0x1d,0xa7,0x3e,0x04,0x5a,0x05,0x00,0x80,0x20,0x3e,0xe4,0x22,0x00}} {{0xe5,0x7f,0xb7,0x1d,0xa7,0x3e,0x04,0x5a,0x05,0x00,0x80,0x20,0x3e,0xe4,0x22,0x00}}
}; };
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPAL[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_OPAL[] =
{ {
{{0x41,0x7f,0xb7,0x36,0xad,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x41,0x7f,0xb7,0x36,0xad,0x50,0x34,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
{{0x41,0x7f,0xb7,0x86,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x41,0x7f,0xb7,0x86,0x85,0x50,0x00,0x83,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
...@@ -2675,7 +1260,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPAL[] = ...@@ -2675,7 +1260,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPAL[] =
{{0xe4,0x7f,0xb7,0x1e,0xaf,0x29,0x37,0x5a,0x05,0x00,0x80,0x25,0x8c,0xb2,0x2a,0x00}} {{0xe4,0x7f,0xb7,0x1e,0xaf,0x29,0x37,0x5a,0x05,0x00,0x80,0x25,0x8c,0xb2,0x2a,0x00}}
}; };
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALM[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_UPALM[] =
{ {
{{0x52,0x77,0xbb,0x94,0x84,0x48,0xfe,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x52,0x77,0xbb,0x94,0x84,0x48,0xfe,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
{{0x52,0x77,0xbb,0x94,0x84,0x48,0xfe,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x52,0x77,0xbb,0x94,0x84,0x48,0xfe,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
...@@ -2691,7 +1276,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALM[] = ...@@ -2691,7 +1276,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALM[] =
#endif #endif
}; };
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALM[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_OPALM[] =
{ {
{{0x51,0x77,0xbb,0x7b,0x84,0x34,0x00,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x51,0x77,0xbb,0x7b,0x84,0x34,0x00,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
{{0x51,0x77,0xbb,0x7b,0x84,0x34,0x00,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}}, {{0x51,0x77,0xbb,0x7b,0x84,0x34,0x00,0x83,0x04,0x00,0x80,0x00,0x00,0x00,0x00,0x01}},
...@@ -2707,7 +1292,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALM[] = ...@@ -2707,7 +1292,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALM[] =
#endif #endif
}; };
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALN[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_UPALN[] =
{ {
{{0x41,0x7f,0xb7,0x34,0xad,0x50,0x34,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}}, {{0x41,0x7f,0xb7,0x34,0xad,0x50,0x34,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
{{0x41,0x7f,0xb7,0x80,0x85,0x50,0x00,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}}, {{0x41,0x7f,0xb7,0x80,0x85,0x50,0x00,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
...@@ -2723,7 +1308,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALN[] = ...@@ -2723,7 +1308,7 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_UPALN[] =
#endif #endif
}; };
static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALN[] = static const struct SiS_CHTVRegData SiS310_CHTVReg_OPALN[] =
{ {
{{0x41,0x7f,0xb7,0x36,0xad,0x50,0x34,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}}, {{0x41,0x7f,0xb7,0x36,0xad,0x50,0x34,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
{{0x41,0x7f,0xb7,0x86,0x85,0x50,0x00,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}}, {{0x41,0x7f,0xb7,0x86,0x85,0x50,0x00,0x6e,0x05,0x00,0x80,0x00,0x00,0x00,0x00,0x03}},
...@@ -2739,16 +1324,16 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALN[] = ...@@ -2739,16 +1324,16 @@ static const SiS_CHTVRegDataStruct SiS310_CHTVReg_OPALN[] =
#endif #endif
}; };
static const UCHAR SiS310_CHTVVCLKUNTSC[] = {0x41,0x41,0x41,0x41,0x42,0x46,0x53}; static const unsigned char SiS310_CHTVVCLKUNTSC[] = { 0x41,0x41,0x41,0x41,0x42,0x46,0x53 };
static const UCHAR SiS310_CHTVVCLKONTSC[] = {0x48,0x48,0x48,0x48,0x45,0x43,0x51}; static const unsigned char SiS310_CHTVVCLKONTSC[] = { 0x48,0x48,0x48,0x48,0x45,0x43,0x51 };
static const UCHAR SiS310_CHTVVCLKUPAL[] = {0x47,0x47,0x47,0x47,0x48,0x4a,0x54}; static const unsigned char SiS310_CHTVVCLKUPAL[] = { 0x47,0x47,0x47,0x47,0x48,0x4a,0x54 };
static const UCHAR SiS310_CHTVVCLKOPAL[] = {0x47,0x47,0x47,0x47,0x48,0x4f,0x52}; static const unsigned char SiS310_CHTVVCLKOPAL[] = { 0x47,0x47,0x47,0x47,0x48,0x4f,0x52 };
static const UCHAR SiS310_CHTVVCLKUPALM[] = {0x41,0x41,0x41,0x41,0x42,0x46,0x53}; static const unsigned char SiS310_CHTVVCLKUPALM[] = { 0x41,0x41,0x41,0x41,0x42,0x46,0x53 };
static const UCHAR SiS310_CHTVVCLKOPALM[] = {0x48,0x48,0x48,0x48,0x45,0x43,0x51}; static const unsigned char SiS310_CHTVVCLKOPALM[] = { 0x48,0x48,0x48,0x48,0x45,0x43,0x51 };
static const UCHAR SiS310_CHTVVCLKUPALN[] = {0x47,0x47,0x47,0x47,0x48,0x4a,0x54}; static const unsigned char SiS310_CHTVVCLKUPALN[] = { 0x47,0x47,0x47,0x47,0x48,0x4a,0x54 };
static const UCHAR SiS310_CHTVVCLKOPALN[] = {0x47,0x47,0x47,0x47,0x48,0x4f,0x52}; static const unsigned char SiS310_CHTVVCLKOPALN[] = { 0x47,0x47,0x47,0x47,0x48,0x4f,0x52 };
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
obj-$(CONFIG_FB_SIS) += sisfb.o obj-$(CONFIG_FB_SIS) += sisfb.o
sisfb-objs := sis_main.o sis_accel.o init.o init301.o sisfb-objs := sis_main.o sis_accel.o init.o init301.o initextlfb.o
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* Data and prototypes for init.c * Data and prototypes for init.c
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,18 +50,24 @@ ...@@ -50,18 +50,24 @@
* *
*/ */
#ifndef _INIT_ #ifndef _INIT_H_
#define _INIT_ #define _INIT_H_
#include "osdef.h" #include "osdef.h"
#include "initdef.h" #include "initdef.h"
#ifdef LINUX_XF86 #ifdef SIS_XORG_XF86
#include "sis.h" #include "sis.h"
#define SIS_NEED_inSISREG
#define SIS_NEED_inSISREGW
#define SIS_NEED_inSISREGL
#define SIS_NEED_outSISREG
#define SIS_NEED_outSISREGW
#define SIS_NEED_outSISREGL
#include "sis_regs.h" #include "sis_regs.h"
#endif #endif
#ifdef LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
#include "vgatypes.h" #include "vgatypes.h"
#include "vstruct.h" #include "vstruct.h"
#ifdef SIS_CP #ifdef SIS_CP
...@@ -73,6 +79,10 @@ ...@@ -73,6 +79,10 @@
#include <asm/io.h> #include <asm/io.h>
#include <linux/fb.h> #include <linux/fb.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include <video/fbcon.h>
#endif
#include "sis.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include <linux/sisfb.h> #include <linux/sisfb.h>
#else #else
#include <video/sisfb.h> #include <video/sisfb.h>
...@@ -80,44 +90,45 @@ ...@@ -80,44 +90,45 @@
#endif #endif
/* Mode numbers */ /* Mode numbers */
static const USHORT ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f}; static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f};
static const USHORT ModeIndex_320x240[] = {0x50, 0x56, 0x00, 0x53}; static const unsigned short ModeIndex_320x240[] = {0x50, 0x56, 0x00, 0x53};
static const USHORT ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00}; /* FSTN */ static const unsigned short ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00}; /* FSTN */
static const USHORT ModeIndex_400x300[] = {0x51, 0x57, 0x00, 0x54}; static const unsigned short ModeIndex_400x300[] = {0x51, 0x57, 0x00, 0x54};
static const USHORT ModeIndex_512x384[] = {0x52, 0x58, 0x00, 0x5c}; static const unsigned short ModeIndex_512x384[] = {0x52, 0x58, 0x00, 0x5c};
static const USHORT ModeIndex_640x400[] = {0x2f, 0x5d, 0x00, 0x5e}; static const unsigned short ModeIndex_640x400[] = {0x2f, 0x5d, 0x00, 0x5e};
static const USHORT ModeIndex_640x480[] = {0x2e, 0x44, 0x00, 0x62}; static const unsigned short ModeIndex_640x480[] = {0x2e, 0x44, 0x00, 0x62};
static const USHORT ModeIndex_720x480[] = {0x31, 0x33, 0x00, 0x35}; static const unsigned short ModeIndex_720x480[] = {0x31, 0x33, 0x00, 0x35};
static const USHORT ModeIndex_720x576[] = {0x32, 0x34, 0x00, 0x36}; static const unsigned short ModeIndex_720x576[] = {0x32, 0x34, 0x00, 0x36};
static const USHORT ModeIndex_768x576[] = {0x5f, 0x60, 0x00, 0x61}; static const unsigned short ModeIndex_768x576[] = {0x5f, 0x60, 0x00, 0x61};
static const USHORT ModeIndex_800x480[] = {0x70, 0x7a, 0x00, 0x76}; static const unsigned short ModeIndex_800x480[] = {0x70, 0x7a, 0x00, 0x76};
static const USHORT ModeIndex_800x600[] = {0x30, 0x47, 0x00, 0x63}; static const unsigned short ModeIndex_800x600[] = {0x30, 0x47, 0x00, 0x63};
static const USHORT ModeIndex_848x480[] = {0x39, 0x3b, 0x00, 0x3e}; static const unsigned short ModeIndex_848x480[] = {0x39, 0x3b, 0x00, 0x3e};
static const USHORT ModeIndex_856x480[] = {0x3f, 0x42, 0x00, 0x45}; static const unsigned short ModeIndex_856x480[] = {0x3f, 0x42, 0x00, 0x45};
static const USHORT ModeIndex_960x540[] = {0x1d, 0x1e, 0x00, 0x1f}; /* 315 series only */ static const unsigned short ModeIndex_960x540[] = {0x1d, 0x1e, 0x00, 0x1f}; /* 315 series only */
static const USHORT ModeIndex_960x600[] = {0x20, 0x21, 0x00, 0x22}; /* 315 series only */ static const unsigned short ModeIndex_960x600[] = {0x20, 0x21, 0x00, 0x22}; /* 315 series only */
static const USHORT ModeIndex_1024x768[] = {0x38, 0x4a, 0x00, 0x64}; static const unsigned short ModeIndex_1024x768[] = {0x38, 0x4a, 0x00, 0x64};
static const USHORT ModeIndex_1024x576[] = {0x71, 0x74, 0x00, 0x77}; static const unsigned short ModeIndex_1024x576[] = {0x71, 0x74, 0x00, 0x77};
static const USHORT ModeIndex_1024x600[] = {0x20, 0x21, 0x00, 0x22}; /* 300 series only */ static const unsigned short ModeIndex_1024x600[] = {0x20, 0x21, 0x00, 0x22}; /* 300 series only */
static const USHORT ModeIndex_1280x1024[] = {0x3a, 0x4d, 0x00, 0x65}; static const unsigned short ModeIndex_1280x1024[] = {0x3a, 0x4d, 0x00, 0x65};
static const USHORT ModeIndex_1280x960[] = {0x7c, 0x7d, 0x00, 0x7e}; static const unsigned short ModeIndex_1280x960[] = {0x7c, 0x7d, 0x00, 0x7e};
static const USHORT ModeIndex_1152x768[] = {0x23, 0x24, 0x00, 0x25}; /* 300 series only */ static const unsigned short ModeIndex_1152x768[] = {0x23, 0x24, 0x00, 0x25}; /* 300 series only */
static const USHORT ModeIndex_1152x864[] = {0x29, 0x2a, 0x00, 0x2b}; static const unsigned short ModeIndex_1152x864[] = {0x29, 0x2a, 0x00, 0x2b};
static const USHORT ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b}; static const unsigned short ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b};
static const USHORT ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25}; static const unsigned short ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25};
static const USHORT ModeIndex_1280x720[] = {0x79, 0x75, 0x00, 0x78}; static const unsigned short ModeIndex_1280x720[] = {0x79, 0x75, 0x00, 0x78};
static const USHORT ModeIndex_1280x800[] = {0x14, 0x15, 0x00, 0x16}; static const unsigned short ModeIndex_1280x800[] = {0x14, 0x15, 0x00, 0x16};
static const USHORT ModeIndex_1360x768[] = {0x48, 0x4b, 0x00, 0x4e}; static const unsigned short ModeIndex_1280x854[] = {0x1a, 0x1b, 0x00, 0x1c};
static const USHORT ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72}; /* 300 series, BARCO only */ static const unsigned short ModeIndex_1360x768[] = {0x48, 0x4b, 0x00, 0x4e};
static const USHORT ModeIndex_1400x1050[] = {0x26, 0x27, 0x00, 0x28}; /* 315 series only */ static const unsigned short ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72}; /* 300 series, BARCO only */
static const USHORT ModeIndex_1680x1050[] = {0x17, 0x18, 0x00, 0x19}; /* 315 series only */ static const unsigned short ModeIndex_1400x1050[] = {0x26, 0x27, 0x00, 0x28}; /* 315 series only */
static const USHORT ModeIndex_1600x1200[] = {0x3c, 0x3d, 0x00, 0x66}; static const unsigned short ModeIndex_1680x1050[] = {0x17, 0x18, 0x00, 0x19}; /* 315 series only */
static const USHORT ModeIndex_1920x1080[] = {0x2c, 0x2d, 0x00, 0x73}; /* 315 series only */ static const unsigned short ModeIndex_1600x1200[] = {0x3c, 0x3d, 0x00, 0x66};
static const USHORT ModeIndex_1920x1440[] = {0x68, 0x69, 0x00, 0x6b}; static const unsigned short ModeIndex_1920x1080[] = {0x2c, 0x2d, 0x00, 0x73}; /* 315 series only */
static const USHORT ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00}; static const unsigned short ModeIndex_1920x1440[] = {0x68, 0x69, 0x00, 0x6b};
static const USHORT ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e}; static const unsigned short ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00};
static const unsigned short ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
static const USHORT SiS_DRAMType[17][5]={
static const unsigned short SiS_DRAMType[17][5]={
{0x0C,0x0A,0x02,0x40,0x39}, {0x0C,0x0A,0x02,0x40,0x39},
{0x0D,0x0A,0x01,0x40,0x48}, {0x0D,0x0A,0x01,0x40,0x48},
{0x0C,0x09,0x02,0x20,0x35}, {0x0C,0x09,0x02,0x20,0x35},
...@@ -137,7 +148,7 @@ static const USHORT SiS_DRAMType[17][5]={ ...@@ -137,7 +148,7 @@ static const USHORT SiS_DRAMType[17][5]={
{0x09,0x08,0x01,0x01,0x00} {0x09,0x08,0x01,0x01,0x00}
}; };
static const USHORT SiS_SDRDRAM_TYPE[13][5] = static const unsigned short SiS_SDRDRAM_TYPE[13][5] =
{ {
{ 2,12, 9,64,0x35}, { 2,12, 9,64,0x35},
{ 1,13, 9,64,0x44}, { 1,13, 9,64,0x44},
...@@ -154,7 +165,7 @@ static const USHORT SiS_SDRDRAM_TYPE[13][5] = ...@@ -154,7 +165,7 @@ static const USHORT SiS_SDRDRAM_TYPE[13][5] =
{ 1, 9, 8, 2,0x00} { 1, 9, 8, 2,0x00}
}; };
static const USHORT SiS_DDRDRAM_TYPE[4][5] = static const unsigned short SiS_DDRDRAM_TYPE[4][5] =
{ {
{ 2,12, 9,64,0x35}, { 2,12, 9,64,0x35},
{ 2,12, 8,32,0x31}, { 2,12, 8,32,0x31},
...@@ -162,7 +173,7 @@ static const USHORT SiS_DDRDRAM_TYPE[4][5] = ...@@ -162,7 +173,7 @@ static const USHORT SiS_DDRDRAM_TYPE[4][5] =
{ 2, 9, 8, 4,0x01} { 2, 9, 8, 4,0x01}
}; };
static const USHORT SiS_MDA_DAC[] = static const unsigned char SiS_MDA_DAC[] =
{ {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
...@@ -174,7 +185,7 @@ static const USHORT SiS_MDA_DAC[] = ...@@ -174,7 +185,7 @@ static const USHORT SiS_MDA_DAC[] =
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
}; };
static const USHORT SiS_CGA_DAC[] = static const unsigned char SiS_CGA_DAC[] =
{ {
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
...@@ -186,7 +197,7 @@ static const USHORT SiS_CGA_DAC[] = ...@@ -186,7 +197,7 @@ static const USHORT SiS_CGA_DAC[] =
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
}; };
static const USHORT SiS_EGA_DAC[] = static const unsigned char SiS_EGA_DAC[] =
{ {
0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15, 0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35, 0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
...@@ -198,7 +209,7 @@ static const USHORT SiS_EGA_DAC[] = ...@@ -198,7 +209,7 @@ static const USHORT SiS_EGA_DAC[] =
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
}; };
static const USHORT SiS_VGA_DAC[] = static const unsigned char SiS_VGA_DAC[] =
{ {
0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15, 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F, 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
...@@ -212,7 +223,31 @@ static const USHORT SiS_VGA_DAC[] = ...@@ -212,7 +223,31 @@ static const USHORT SiS_VGA_DAC[] =
0x0B,0x0C,0x0D,0x0F,0x10 0x0B,0x0C,0x0D,0x0F,0x10
}; };
static const SiS_StResInfoStruct SiS_StResInfo[]= static const struct SiS_St SiS_SModeIDTable[] =
{
{0x01,0x9208,0x01,0x00,0x00,0x00,0x01,0x00,0x40},
{0x01,0x1210,0x14,0x01,0x01,0x00,0x01,0x00,0x40},
{0x01,0x1010,0x17,0x02,0x02,0x00,0x01,0x01,0x40},
{0x03,0x8208,0x03,0x00,0x00,0x00,0x01,0x02,0x40},
{0x03,0x0210,0x16,0x01,0x01,0x00,0x01,0x02,0x40},
{0x03,0x0010,0x18,0x02,0x02,0x00,0x01,0x03,0x40},
{0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x04,0x40},
{0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x05,0x40},
{0x07,0x0000,0x07,0x03,0x03,0x00,0x01,0x03,0x40},
{0x07,0x0000,0x19,0x02,0x02,0x00,0x01,0x03,0x40},
{0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x04,0x40},
{0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x05,0x40},
{0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x05,0x40},
{0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x05,0x40},
{0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x05,0x40},
{0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x05,0x40},
{0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x04,0x40},
{0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x05,0x40},
{0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x05,0x40},
{0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
};
static const struct SiS_StResInfo_S SiS_StResInfo[]=
{ {
{ 640,400}, { 640,400},
{ 640,350}, { 640,350},
...@@ -221,7 +256,7 @@ static const SiS_StResInfoStruct SiS_StResInfo[]= ...@@ -221,7 +256,7 @@ static const SiS_StResInfoStruct SiS_StResInfo[]=
{ 640,480} { 640,480}
}; };
static const SiS_ModeResInfoStruct SiS_ModeResInfo[] = static const struct SiS_ModeResInfo_S SiS_ModeResInfo[] =
{ {
{ 320, 200, 8, 8}, /* 0x00 */ { 320, 200, 8, 8}, /* 0x00 */
{ 320, 240, 8, 8}, /* 0x01 */ { 320, 240, 8, 8}, /* 0x01 */
...@@ -256,11 +291,12 @@ static const SiS_ModeResInfoStruct SiS_ModeResInfo[] = ...@@ -256,11 +291,12 @@ static const SiS_ModeResInfoStruct SiS_ModeResInfo[] =
{ 1280, 800, 8,16}, /* 0x1e */ { 1280, 800, 8,16}, /* 0x1e */
{ 1920,1080, 8,16}, /* 0x1f */ { 1920,1080, 8,16}, /* 0x1f */
{ 960, 540, 8,16}, /* 0x20 */ { 960, 540, 8,16}, /* 0x20 */
{ 960, 600, 8,16} /* 0x21 */ { 960, 600, 8,16}, /* 0x21 */
{ 1280, 854, 8,16} /* 0x22 */
}; };
#if defined(SIS300) || defined(SIS315H) #if defined(SIS300) || defined(SIS315H)
static const SiS_StandTableStruct SiS_StandTable[]= static const struct SiS_StandTable_S SiS_StandTable[]=
{ {
/* 0x00: MD_0_200 */ /* 0x00: MD_0_200 */
{ {
...@@ -704,11 +740,11 @@ static const SiS_StandTableStruct SiS_StandTable[]= ...@@ -704,11 +740,11 @@ static const SiS_StandTableStruct SiS_StandTable[]=
/* SIS VIDEO BRIDGE ----------------------------------------- */ /* SIS VIDEO BRIDGE ----------------------------------------- */
/**************************************************************/ /**************************************************************/
static const UCHAR SiS_SoftSetting = 0x30; /* RAM setting */ static const unsigned char SiS_SoftSetting = 0x30; /* RAM setting */
static const UCHAR SiS_OutputSelect = 0x40; static const unsigned char SiS_OutputSelect = 0x40;
static const UCHAR SiS_NTSCTiming[] = { static const unsigned char SiS_NTSCTiming[] = {
0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
...@@ -719,7 +755,7 @@ static const UCHAR SiS_NTSCTiming[] = { ...@@ -719,7 +755,7 @@ static const UCHAR SiS_NTSCTiming[] = {
0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
}; };
static const UCHAR SiS_PALTiming[] = { static const unsigned char SiS_PALTiming[] = {
0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70, 0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70,
0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d, 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d,
0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b, 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b,
...@@ -730,7 +766,7 @@ static const UCHAR SiS_PALTiming[] = { ...@@ -730,7 +766,7 @@ static const UCHAR SiS_PALTiming[] = {
0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00
}; };
static const UCHAR SiS_HiTVExtTiming[] = { static const unsigned char SiS_HiTVExtTiming[] = {
0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64, 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
...@@ -741,7 +777,7 @@ static const UCHAR SiS_HiTVExtTiming[] = { ...@@ -741,7 +777,7 @@ static const UCHAR SiS_HiTVExtTiming[] = {
0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
}; };
static const UCHAR SiS_HiTVSt1Timing[] = { static const unsigned char SiS_HiTVSt1Timing[] = {
0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65, 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
...@@ -752,7 +788,7 @@ static const UCHAR SiS_HiTVSt1Timing[] = { ...@@ -752,7 +788,7 @@ static const UCHAR SiS_HiTVSt1Timing[] = {
0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00 0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00
}; };
static const UCHAR SiS_HiTVSt2Timing[] = { static const unsigned char SiS_HiTVSt2Timing[] = {
0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64, 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
...@@ -764,7 +800,7 @@ static const UCHAR SiS_HiTVSt2Timing[] = { ...@@ -764,7 +800,7 @@ static const UCHAR SiS_HiTVSt2Timing[] = {
}; };
#if 0 #if 0
static const UCHAR SiS_HiTVTextTiming[] = { static const unsigned char SiS_HiTVTextTiming[] = {
0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65, 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d, 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f, 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
...@@ -776,7 +812,7 @@ static const UCHAR SiS_HiTVTextTiming[] = { ...@@ -776,7 +812,7 @@ static const UCHAR SiS_HiTVTextTiming[] = {
}; };
#endif #endif
static const UCHAR SiS_HiTVGroup3Data[] = { static const unsigned char SiS_HiTVGroup3Data[] = {
0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f, 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f,
0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6, 0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6,
0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20, 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
...@@ -787,7 +823,7 @@ static const UCHAR SiS_HiTVGroup3Data[] = { ...@@ -787,7 +823,7 @@ static const UCHAR SiS_HiTVGroup3Data[] = {
0x18,0x05,0x18,0x05,0x4c,0xa8,0x01 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
}; };
static const UCHAR SiS_HiTVGroup3Simu[] = { static const unsigned char SiS_HiTVGroup3Simu[] = {
0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95, 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95,
0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6, 0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6,
0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20, 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
...@@ -799,7 +835,7 @@ static const UCHAR SiS_HiTVGroup3Simu[] = { ...@@ -799,7 +835,7 @@ static const UCHAR SiS_HiTVGroup3Simu[] = {
}; };
#if 0 #if 0
static const UCHAR SiS_HiTVGroup3Text[] = { static const unsigned char SiS_HiTVGroup3Text[] = {
0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7, 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7,
0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6, 0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6,
0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20, 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
...@@ -811,136 +847,141 @@ static const UCHAR SiS_HiTVGroup3Text[] = { ...@@ -811,136 +847,141 @@ static const UCHAR SiS_HiTVGroup3Text[] = {
}; };
#endif #endif
static const UCHAR SiS_NTSCPhase[] = {0x21,0xed,0xba,0x08}; static const struct SiS_TVData SiS_StPALData[] =
static const UCHAR SiS_PALPhase[] = {0x2a,0x05,0xe3,0x00};
static const UCHAR SiS_PALMPhase[] = {0x21,0xE4,0x2E,0x9B};
static const UCHAR SiS_PALNPhase[] = {0x21,0xF4,0x3E,0xBA};
static const UCHAR SiS_NTSCPhase2[] = {0x21,0xF0,0x7B,0xD6};
static const UCHAR SiS_PALPhase2[] = {0x2a,0x09,0x86,0xe9};
static const UCHAR SiS_PALMPhase2[] = {0x21,0xE6,0xEF,0xA4};
static const UCHAR SiS_PALNPhase2[] = {0x21,0xF6,0x94,0x46};
static const UCHAR SiS_SpecialPhase[] = {0x1e,0x8c,0x5c,0x7a};
static const UCHAR SiS_SpecialPhaseM[]= {0x1e,0x83,0x0a,0xe0};
static const UCHAR SiS_SpecialPhaseJ[]= {0x25,0xd4,0xfd,0x5e};
static const SiS_TVDataStruct SiS_StPALData[] =
{ {
{ 1, 1, 864, 525,1270, 400, 100, 0, 760,0xf4,0xff,0x1c,0x22}, { 1, 1, 864, 525,1270, 400, 100, 0, 760, 0,0xf4,0xff,0x1c,0x22},
{ 1, 1, 864, 525,1270, 350, 100, 0, 760,0xf4,0xff,0x1c,0x22}, { 1, 1, 864, 525,1270, 350, 100, 0, 760, 0,0xf4,0xff,0x1c,0x22},
{ 1, 1, 864, 525,1270, 400, 0, 0, 720,0xf1,0x04,0x1f,0x18}, { 1, 1, 864, 525,1270, 400, 0, 0, 720, 0,0xf1,0x04,0x1f,0x18},
{ 1, 1, 864, 525,1270, 350, 0, 0, 720,0xf4,0x0b,0x1c,0x0a}, { 1, 1, 864, 525,1270, 350, 0, 0, 720, 0,0xf4,0x0b,0x1c,0x0a},
{ 1, 1, 864, 525,1270, 480, 50, 0, 760,0xf4,0xff,0x1c,0x22}, { 1, 1, 864, 525,1270, 480, 50, 0, 760, 0,0xf4,0xff,0x1c,0x22},
{ 1, 1, 864, 525,1270, 600, 50, 0, 0,0xf4,0xff,0x1c,0x22} { 1, 1, 864, 525,1270, 600, 50, 0, 0,0x300,0xf4,0xff,0x1c,0x22}
}; };
static const SiS_TVDataStruct SiS_ExtPALData[] = static const struct SiS_TVData SiS_ExtPALData[] =
{ {
{ 27, 10, 848, 448,1270, 530, 50, 0, 50,0xf4,0xff,0x1c,0x22}, /* 640x400, 320x200 */ { 27, 10, 848, 448,1270, 530, 50, 0, 50, 0,0xf4,0xff,0x1c,0x22}, /* 640x400, 320x200 */
{ 108, 35, 848, 398,1270, 530, 50, 0, 50,0xf4,0xff,0x1c,0x22}, { 108, 35, 848, 398,1270, 530, 50, 0, 50, 0,0xf4,0xff,0x1c,0x22},
{ 12, 5, 954, 448,1270, 530, 50, 0, 50,0xf1,0x04,0x1f,0x18}, { 12, 5, 954, 448,1270, 530, 50, 0, 50, 0,0xf1,0x04,0x1f,0x18},
{ 9, 4, 960, 463,1644, 438, 50, 0, 50,0xf4,0x0b,0x1c,0x0a}, { 9, 4, 960, 463,1644, 438, 50, 0, 50, 0,0xf4,0x0b,0x1c,0x0a},
{ 9, 4, 848, 528,1270, 530, 0, 0, 50,0xf5,0xfb,0x1b,0x2a}, /* 640x480, 320x240 */ { 9, 4, 848, 528,1270, 530, 0, 0, 50, 0,0xf5,0xfb,0x1b,0x2a}, /* 640x480, 320x240 */
/*{ 36, 25,1060, 648,1316, 530, 438, 0, 438,0xeb,0x05,0x25,0x16},*//* 800x600, 400x300 */ { 36, 25,1060, 648,1270, 530, 438, 0, 438, 0,0xeb,0x05,0x25,0x16}, /* 800x600, 400x300 */
{ 36, 25,1060, 648,1270, 530, 438, 0, 438,0xeb,0x05,0x25,0x16}, /* 800x600, 400x300 - better */ { 3, 2,1080, 619,1270, 540, 438, 0, 438, 0,0xf3,0x00,0x1d,0x20}, /* 720x576 */
{ 3, 2,1080, 619,1270, 540, 438, 0, 438,0xf3,0x00,0x1d,0x20}, /* 720x576 */ { 1, 1,1170, 821,1270, 520, 686, 0, 686, 0,0xF3,0x00,0x1D,0x20}, /* 1024x768 */
{ 1, 1,1170, 821,1270, 520, 686, 0, 686,0xF3,0x00,0x1D,0x20}, /* 1024x768 */ { 1, 1,1170, 821,1270, 520, 686, 0, 686, 0,0xF3,0x00,0x1D,0x20}, /* 1024x768 (for NTSC equ) */
{ 1, 1,1170, 821,1270, 520, 686, 0, 686,0xF3,0x00,0x1D,0x20}, /* 1024x768 (for NTSC equ) */ { 9, 4, 848, 528,1270, 530, 0, 0, 50, 0,0xf5,0xfb,0x1b,0x2a} /* 720x480 */
{ 9, 4, 848, 528,1270, 530, 0, 0, 50,0xf5,0xfb,0x1b,0x2a} /* 720x480 test */
}; };
static const SiS_TVDataStruct SiS_StNTSCData[] = static const struct SiS_TVData SiS_StNTSCData[] =
{ {
{ 1, 1, 858, 525,1270, 400, 50, 0, 760,0xf1,0x04,0x1f,0x18}, { 1, 1, 858, 525,1270, 400, 50, 0, 760, 0,0xf1,0x04,0x1f,0x18},
{ 1, 1, 858, 525,1270, 350, 50, 0, 640,0xf1,0x04,0x1f,0x18}, { 1, 1, 858, 525,1270, 350, 50, 0, 640, 0,0xf1,0x04,0x1f,0x18},
{ 1, 1, 858, 525,1270, 400, 0, 0, 720,0xf1,0x04,0x1f,0x18}, { 1, 1, 858, 525,1270, 400, 0, 0, 720, 0,0xf1,0x04,0x1f,0x18},
{ 1, 1, 858, 525,1270, 350, 0, 0, 720,0xf4,0x0b,0x1c,0x0a}, { 1, 1, 858, 525,1270, 350, 0, 0, 720, 0,0xf4,0x0b,0x1c,0x0a},
{ 1, 1, 858, 525,1270, 480, 0, 0, 760,0xf1,0x04,0x1f,0x18} { 1, 1, 858, 525,1270, 480, 0, 0, 760, 0,0xf1,0x04,0x1f,0x18}
}; };
static const SiS_TVDataStruct SiS_ExtNTSCData[] = static const struct SiS_TVData SiS_ExtNTSCData[] =
{ {
{ 143, 65, 858, 443,1270, 440, 171, 0, 171,0xf1,0x04,0x1f,0x18}, /* 640x400, 320x200 */ { 143, 65, 858, 443,1270, 440, 171, 0, 171, 0,0xf1,0x04,0x1f,0x18}, /* 640x400, 320x200 */
{ 88, 35, 858, 393,1270, 440, 171, 0, 171,0xf1,0x04,0x1f,0x18}, { 88, 35, 858, 393,1270, 440, 171, 0, 171, 0,0xf1,0x04,0x1f,0x18},
{ 143, 70, 924, 443,1270, 440, 92, 0, 92,0xf1,0x04,0x1f,0x18}, { 143, 70, 924, 443,1270, 440, 92, 0, 92, 0,0xf1,0x04,0x1f,0x18},
{ 143, 70, 924, 393,1270, 440, 92, 0, 92,0xf4,0x0b,0x1c,0x0a}, { 143, 70, 924, 393,1270, 440, 92, 0, 92, 0,0xf4,0x0b,0x1c,0x0a},
{ 143, 76, 836, 523,1270, 440, 224, 0, 0,0xf1,0x05,0x1f,0x16}, /* 640x480, 320x240 */ { 143, 76, 836, 523,1270, 440, 224, 0, 0, 0,0xf1,0x05,0x1f,0x16}, /* 640x480, 320x240 */
{ 143, 120,1056, 643,1270, 440, 0, 128, 0,0xf4,0x10,0x1c,0x00}, /* 800x600, 400x300 */ { 143, 120,1056, 643,1270, 440, 0, 1, 0, 0,0xf4,0x10,0x1c,0x00}, /* 800x600, 400x300 */
/*{ 2, 1, 858, 503,1270, 480, 0, 128, 0,0xee,0x0c,0x22,0x08},*/ /* 720x480 (old, from 650) */ { 143, 76, 836, 523,1270, 440, 0, 1, 0, 0,0xee,0x0c,0x22,0x08}, /* 720x480 - BETTER (from 300 series) */
{ 143, 76, 836, 523,1270, 440, 0, 128, 0,0xee,0x0c,0x22,0x08}, /* 720x480 - BETTER (from 300 series) */ { 1, 1,1100, 811,1412, 440, 0, 1, 0, 0,0xee,0x0c,0x22,0x08}, /* 1024x768 (525i) CORRECTED */
/*{ 65, 64,1056, 791,1270, 480, 638, 0, 0,0xEE,0x0C,0x22,0x08} */ /* 1024x768 (525i) */ #if 0 /* flimmert und ist unten abgeschnitten (NTSCHT, NTSC clock) */
{ 1, 1,1100, 811,1412, 440, 0, 128, 0,0xee,0x0c,0x22,0x08}, /* 1024x768 (525i) CORRECTED */ { 65, 64,1056, 791,1270, 480, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
{ 65, 64,1056, 791,1270, 480, 455, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */ #endif
#if 0
{ 1, 1,1100, 811,1412, 440, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
#endif
#if 0
{ 1, 1,1120, 821,1516, 420, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
#endif
#if 0
{ 1, 1, 938, 821,1516, 420, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
#endif
#if 0 /* zoom hin, unten abgeschnitten (NTSC2HT, NTSC1024 clock) */
{ 1, 1,1072, 791,1270, 480, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
#endif
#if 1 /* zu weit links (squeezed) (NTSC2HT, NTSC1024 clock) */
{ 1, 1,1100, 846,1270, 440, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
#endif
#if 0 /* zu weit links, rechts abgeschnitten (NTSC2HT, NTSC1024 clock) */
{ 1, 1,1100, 846,1412, 440, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
#endif
}; };
static const SiS_TVDataStruct SiS_StHiTVData[] = /* Slave + TVSimu */ static const struct SiS_TVData SiS_StHiTVData[] = /* Slave + TVSimu */
{ {
{ 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0, 0, 0, 0, 0},
{ 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
{ 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0, 0, 0, 0, 0},
{ 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
{ 1, 1, 0x37c,0x233,0x2b2,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x150,128, 0, 0x00,0x00,0x00,0x00} { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x150, 1, 0, 0, 0, 0, 0, 0}
}; };
static const SiS_TVDataStruct SiS_St2HiTVData[] = /* Slave */ static const struct SiS_TVData SiS_St2HiTVData[] = /* Slave */
{ {
{ 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0},
{ 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0},
{ 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
{ 5, 2, 0x348,0x233,0x670,0x3c0,0x08d,128, 0, 0x00,0x00,0x00,0x00}, { 5, 2, 0x348,0x233,0x670,0x3c0,0x08d, 1, 0, 0, 0, 0, 0, 0},
{ 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x17c,128, 0, 0x00,0x00,0x00,0x00} { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x17c, 1, 0, 0, 0, 0, 0, 0}
}; };
static const SiS_TVDataStruct SiS_ExtHiTVData[] = static const struct SiS_TVData SiS_ExtHiTVData[] =
{ { /* all ok */
{ 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0x00,0x00,0x00,0x00}, { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 5, 1, 0x348,0x233,0x670,0x3c0,0x166,128, 0, 0x00,0x00,0x00,0x00}, /* 640x480 */ { 5, 1, 0x348,0x233,0x670,0x3c0,0x166, 1, 0, 0, 0, 0, 0, 0}, /* 640x480 */
{ 16, 5, 0x41a,0x2ab,0x670,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00}, /* 800x600 */ { 16, 5, 0x41a,0x2ab,0x670,0x3c0,0x143, 1, 0, 0, 0, 0, 0, 0}, /* 800x600 */
{ 25, 12, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x768 */ { 25, 12, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 1024x768 */
{ 5, 4, 0x627,0x464,0x670,0x3c0,0x128, 0, 0, 0x00,0x00,0x00,0x00}, /* 1280x1024 */ { 5, 4, 0x627,0x464,0x670,0x3c0,0x128, 0, 0, 0, 0, 0, 0, 0}, /* 1280x1024 */
{ 4, 1, 0x41a,0x233,0x60c,0x3c0,0x143,128, 0, 0x00,0x00,0x00,0x00}, /* 800x480 */ { 4, 1, 0x41a,0x233,0x60c,0x3c0,0x143, 1, 0, 0, 0, 0, 0, 0}, /* 800x480 */
{ 5, 2, 0x578,0x293,0x670,0x3c0,0x032, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x576 */ { 5, 2, 0x578,0x293,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 1024x576 */
{ 8, 5, 0x6d6,0x323,0x670,0x3c0,0x128, 0, 0, 0x00,0x00,0x00,0x00}, /* 1280x720 */ { 8, 5, 0x6d6,0x323,0x670,0x3c0,0x128, 0, 0, 0, 0, 0, 0, 0}, /* 1280x720 */
{ 137, 32, 0x3d4,0x233,0x663,0x3bf,0x143, 0, 0, 0x00,0x00,0x00,0x00} /* 960x600 */ { 8, 3, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 960x600 */
}; };
static const SiS_TVDataStruct SiS_St525pData[] = static const struct SiS_TVData SiS_St525pData[] =
{ {
{ 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00}, { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
{ 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00}, { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
{ 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00}, { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
{ 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00}, { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
{ 1, 1, 0x6b4,0x20d,0x4f6,0x1e0, 0, 0, 0x2f8, 0x00,0x00,0x00,0x00} { 1, 1, 0x6b4,0x20d,0x4f6,0x1e0, 0, 0, 0x2f8, 0, 0, 0, 0, 0}
}; };
static const SiS_TVDataStruct SiS_St750pData[] = static const struct SiS_TVData SiS_St750pData[] =
{ {
{ 1, 1, 0x672,0x2ee,0x500,0x190, 50, 0, 0x2f8, 0x00,0x00,0x00,0x00}, { 1, 1, 0x672,0x2ee,0x500,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
{ 1, 1, 0x672,0x2ee,0x500,0x15e, 50, 0, 0x280, 0x00,0x00,0x00,0x00}, { 1, 1, 0x672,0x2ee,0x500,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
{ 1, 1, 0x672,0x2ee,0x500,0x190, 0, 0, 0x2d0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x672,0x2ee,0x500,0x190, 0, 0, 0x2d0, 0, 0, 0, 0, 0},
{ 1, 1, 0x672,0x2ee,0x500,0x15e, 0, 0, 0x2d0, 0x00,0x00,0x00,0x00}, { 1, 1, 0x672,0x2ee,0x500,0x15e, 0, 0, 0x2d0, 0, 0, 0, 0, 0},
{ 1, 1, 0x672,0x2ee,0x500,0x1e0, 0, 0, 0x2f8, 0x00,0x00,0x00,0x00} { 1, 1, 0x672,0x2ee,0x500,0x1e0, 0, 0, 0x2f8, 0, 0, 0, 0, 0}
}; };
static const SiS_TVDataStruct SiS_Ext750pData[] = static const struct SiS_TVData SiS_Ext750pData[] =
{ { /* all ok */
{ 143, 65, 0x35a,0x1bb,0x4f6,0x1b8,0x0ab, 0, 0x0ab, 0x00,0x00,0x00,0x00}, { 3, 1, 935, 470, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0}, /* 320x200/640x400 */
{ 88, 35, 0x35a,0x189,0x4f6,0x1b8,0x0ab, 0, 0x0ab, 0x00,0x00,0x00,0x00}, { 24, 7, 935, 420, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
{ 18, 5, 0x339,0x1ae,0x500,0x2d0,0x05c, 0, 0x05c, 0x00,0x00,0x00,0x00}, { 3, 1, 935, 470, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
{ 143, 70, 0x39c,0x189,0x4f6,0x1b8,0x05c, 0, 0x05c, 0x00,0x00,0x00,0x00}, { 24, 7, 935, 420, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
{ 99, 32, 0x320,0x1fe,0x500,0x2d0, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 640x480 */ { 2, 1, 1100, 590, 1130, 640, 50, 0, 0, 0, 0, 0, 0, 0}, /* 640x480 */
{ 5, 4, 0x5d8,0x29e,0x500,0x2a8, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 800x600 */ { 3, 2, 1210, 690, 1130, 660, 50, 0, 0, 0, 0, 0, 0, 0}, /* 800x600 OK */
{ 99, 32, 0x320,0x1fe,0x500,0x2d0, 50, 0, 0, 0x00,0x00,0x00,0x00}, /* 720x480 test WORKS */ { 2, 1, 1100, 562, 1130, 640, 0, 1, 0, 0, 0, 0, 0, 0}, /* 720x480 OK */
{ 68, 64, 0x55f,0x346,0x500,0x2a8,0x27e, 0, 0, 0x00,0x00,0x00,0x00}, /* 1024x768 */ { 1, 1, 1375, 878, 1130, 640, 638, 0, 0, 0, 0, 0, 0, 0}, /* 1024x768 OK */
{ 5, 2, 0x3a7,0x226,0x500,0x2a8, 0,128, 0, 0x00,0x00,0x00,0x00}, /* 720x576 */ { 5, 3, 1100, 675, 1130, 640, 0, 1, 0, 0, 0, 0, 0, 0}, /* 720/768x576 OK */
{ 25, 24, 0x5d8,0x2f3,0x460,0x2a8, 50, 0, 0, 0x00,0x00,0x00,0x00} /* 1280x720 WORKS */ { 25, 24, 1496, 755, 1120, 680, 50, 0, 0, 0, 0, 0, 0, 0} /* 1280x720 OK */
}; };
static const SiS_LCDDataStruct SiS_LCD1280x720Data[] = /* 2.03.00 */ static const struct SiS_LCDData SiS_LCD1280x720Data[] = /* 2.03.00 */
{ {
{ 44, 15, 864, 430, 1408, 806 }, /* 640x400 */ { 44, 15, 864, 430, 1408, 806 }, /* 640x400 */
{ 128, 35, 792, 385, 1408, 806 }, { 128, 35, 792, 385, 1408, 806 },
...@@ -962,7 +1003,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x720Data[] = /* 2.03.00 */ ...@@ -962,7 +1003,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x720Data[] = /* 2.03.00 */
* (Note: 1280x768_3 is now special for SiS301/NetVista * (Note: 1280x768_3 is now special for SiS301/NetVista
*/ */
static const SiS_LCDDataStruct SiS_StLCD1280x768_2Data[] = /* 2.03.00 */ static const struct SiS_LCDData SiS_StLCD1280x768_2Data[] = /* 2.03.00 */
{ {
{ 64, 21, 858, 434, 1408, 806 }, /* 640x400 */ { 64, 21, 858, 434, 1408, 806 }, /* 640x400 */
{ 32, 9, 858, 372, 1408, 806 }, { 32, 9, 858, 372, 1408, 806 },
...@@ -977,7 +1018,7 @@ static const SiS_LCDDataStruct SiS_StLCD1280x768_2Data[] = /* 2.03.00 */ ...@@ -977,7 +1018,7 @@ static const SiS_LCDDataStruct SiS_StLCD1280x768_2Data[] = /* 2.03.00 */
{ 16, 15, 1600, 750, 1600, 806 } /* 1280x720 - from Ext */ { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 - from Ext */
}; };
static const SiS_LCDDataStruct SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */ static const struct SiS_LCDData SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */
{ {
{ 16, 5, 960, 410, 1600, 806 }, /* 640x400 */ { 16, 5, 960, 410, 1600, 806 }, /* 640x400 */
{ 64, 21, 1152, 364, 1600, 806 }, { 64, 21, 1152, 364, 1600, 806 },
...@@ -993,7 +1034,7 @@ static const SiS_LCDDataStruct SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */ ...@@ -993,7 +1034,7 @@ static const SiS_LCDDataStruct SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */
}; };
#if 0 /* Not used; _3 now reserved for NetVista (SiS301) */ #if 0 /* Not used; _3 now reserved for NetVista (SiS301) */
static const SiS_LCDDataStruct SiS_LCD1280x768_3Data[] = static const struct SiS_LCDData SiS_LCD1280x768_3Data[] =
{ {
{ 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */ { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */
{ 128, 39, 884, 396, 1408, 806 }, /* ,640 */ { 128, 39, 884, 396, 1408, 806 }, /* ,640 */
...@@ -1009,7 +1050,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x768_3Data[] = ...@@ -1009,7 +1050,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x768_3Data[] =
}; };
#endif #endif
static const SiS_LCDDataStruct SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */ static const struct SiS_LCDData SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */
{ {
{ 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */ { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
{ 128, 49, 1232, 361, 1408, 816 }, { 128, 49, 1232, 361, 1408, 816 },
...@@ -1024,7 +1065,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */ ...@@ -1024,7 +1065,7 @@ static const SiS_LCDDataStruct SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */
{ 0, 0, 0, 0, 0, 0 } /* 1280x720 */ { 0, 0, 0, 0, 0, 0 } /* 1280x720 */
}; };
static const SiS_LCDDataStruct SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */ static const struct SiS_LCDData SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */
{ {
{ 97, 42, 1344, 409, 1552, 812 }, /* 640x400 */ { 97, 42, 1344, 409, 1552, 812 }, /* 640x400 */
{ 97, 35, 1280, 358, 1552, 812 }, { 97, 35, 1280, 358, 1552, 812 },
...@@ -1039,7 +1080,42 @@ static const SiS_LCDDataStruct SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */ ...@@ -1039,7 +1080,42 @@ static const SiS_LCDDataStruct SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */
{ 97, 90, 1600, 730, 1552, 812 } /* 1280x720 */ { 97, 90, 1600, 730, 1552, 812 } /* 1280x720 */
}; };
static const SiS_LCDDataStruct SiS_LCD1280x960Data[] = #if 0
static const struct SiS_LCDData SiS_LCD1280x800_3Data[] = /* 2.02.05a (LVDS); m250 */
{
{ 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
{ 128, 49, 1232, 361, 1408, 816 },
{ 128, 51, 1122, 412, 1408, 816 },
{ 128, 49, 1232, 361, 1408, 816 },
{ 8, 3, 880, 491, 1408, 816 }, /* 640x480 */
{ 11, 6, 1024, 612, 1408, 816 }, /* 800x600 */
{ 22, 21, 1400, 784, 1408, 816 }, /* 1024x768 */
{ 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
{ 1, 1, 1408, 816, 1408, 816 }, /* 1280x800 */
{ 0, 0, 0, 0, 0, 0 }, /* 1280x768 - patch index */
{ 0, 0, 0, 0, 0, 0 } /* 1280x720 */
};
#endif
static const struct SiS_LCDData SiS_LCD1280x854Data[] = /* 2.21.00CS (LVDS) */
{
{ 56, 15, 936, 410, 1664, 861 }, /* 640x400 */
{ 64, 25, 1586, 355, 1664, 861 },
{ 56, 15, 936, 410, 1664, 861 },
{ 64, 25, 1586, 355, 1664, 861 },
{ 91, 45, 1464, 485, 1664, 861 }, /* 640x480 */
{ 182, 75, 976, 605, 1664, 861 }, /* 800x600 */
{ 91, 66, 1342, 774, 1664, 861 }, /* 1024x768 */
{ 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
{ 26, 25, 1708, 807, 1664, 861 }, /* 1280x800 */
{ 13, 12, 1708, 774, 1664, 861 }, /* 1280x768 - patch index */
{ 52, 45, 1708, 725, 1664, 861 }, /* 1280x720 */
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 1, 1, 1664, 861, 1664, 861 } /* 1280x854 */
};
static const struct SiS_LCDData SiS_LCD1280x960Data[] =
{ {
{ 9, 2, 800, 500, 1800, 1000 }, { 9, 2, 800, 500, 1800, 1000 },
{ 9, 2, 800, 500, 1800, 1000 }, { 9, 2, 800, 500, 1800, 1000 },
...@@ -1049,10 +1125,15 @@ static const SiS_LCDDataStruct SiS_LCD1280x960Data[] = ...@@ -1049,10 +1125,15 @@ static const SiS_LCDDataStruct SiS_LCD1280x960Data[] =
{ 30, 11, 1056, 625, 1800, 1000 }, { 30, 11, 1056, 625, 1800, 1000 },
{ 5, 3, 1350, 800, 1800, 1000 }, { 5, 3, 1350, 800, 1800, 1000 },
{ 1, 1, 1576, 1050, 1576, 1050 }, { 1, 1, 1576, 1050, 1576, 1050 },
{ 1, 1, 1800, 1000, 1800, 1000 } { 1, 1, 1800, 1000, 1800, 1000 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
}; };
static const SiS_LCDDataStruct SiS_StLCD1400x1050Data[] = static const struct SiS_LCDData SiS_StLCD1400x1050Data[] =
{ {
{ 211, 100, 2100, 408, 1688, 1066 }, { 211, 100, 2100, 408, 1688, 1066 },
{ 211, 64, 1536, 358, 1688, 1066 }, { 211, 64, 1536, 358, 1688, 1066 },
...@@ -1062,10 +1143,15 @@ static const SiS_LCDDataStruct SiS_StLCD1400x1050Data[] = ...@@ -1062,10 +1143,15 @@ static const SiS_LCDDataStruct SiS_StLCD1400x1050Data[] =
{ 211, 72, 1008, 609, 1688, 1066 }, { 211, 72, 1008, 609, 1688, 1066 },
{ 211, 128, 1400, 776, 1688, 1066 }, { 211, 128, 1400, 776, 1688, 1066 },
{ 211, 205, 1680, 1041, 1688, 1066 }, { 211, 205, 1680, 1041, 1688, 1066 },
{ 1, 1, 1688, 1066, 1688, 1066 } { 1, 1, 1688, 1066, 1688, 1066 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
}; };
static const SiS_LCDDataStruct SiS_ExtLCD1400x1050Data[] = static const struct SiS_LCDData SiS_ExtLCD1400x1050Data[] =
{ {
/* { 211, 60, 1260, 410, 1688, 1066 }, 640x400 (6330) */ /* { 211, 60, 1260, 410, 1688, 1066 }, 640x400 (6330) */
{ 211, 100, 2100, 408, 1688, 1066 }, /* 640x400 (6325) WORKS */ { 211, 100, 2100, 408, 1688, 1066 }, /* 640x400 (6325) WORKS */
...@@ -1080,10 +1166,13 @@ static const SiS_LCDDataStruct SiS_ExtLCD1400x1050Data[] = ...@@ -1080,10 +1166,13 @@ static const SiS_LCDDataStruct SiS_ExtLCD1400x1050Data[] =
{ 211, 205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */ { 211, 205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */
{ 1, 1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */ { 1, 1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */
{ 0, 0, 0, 0, 0, 0 }, /* kludge */ { 0, 0, 0, 0, 0, 0 }, /* kludge */
{ 211, 120, 1400, 730, 1688, 1066 } /* 1280x720 */ { 211, 120, 1400, 730, 1688, 1066 }, /* 1280x720 */
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
}; };
static const SiS_LCDDataStruct SiS_LCD1680x1050Data[] = static const struct SiS_LCDData SiS_LCD1680x1050Data[] =
{ {
{ 95, 24, 1260, 410, 1900, 1066 }, /* 0 640x400 */ { 95, 24, 1260, 410, 1900, 1066 }, /* 0 640x400 */
{ 10, 3, 1710, 362, 1900, 1066 }, { 10, 3, 1710, 362, 1900, 1066 },
...@@ -1097,10 +1186,11 @@ static const SiS_LCDDataStruct SiS_LCD1680x1050Data[] = ...@@ -1097,10 +1186,11 @@ static const SiS_LCDDataStruct SiS_LCD1680x1050Data[] =
{ 95, 69, 1800, 817, 1900, 1066 }, /* 9 1280x800 patch index */ { 95, 69, 1800, 817, 1900, 1066 }, /* 9 1280x800 patch index */
{ 13, 9, 1900, 739, 1900, 1066 }, /* 10 1280x720 */ { 13, 9, 1900, 739, 1900, 1066 }, /* 10 1280x720 */
{ 95, 94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */ { 95, 94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */
{ 1, 1, 1900, 1066, 1900, 1066 } /* 12 1680x1050 */ { 1, 1, 1900, 1066, 1900, 1066 }, /* 12 1680x1050 */
{ 0, 0, 0, 0, 0, 0 }
}; };
static const SiS_LCDDataStruct SiS_StLCD1600x1200Data[] = static const struct SiS_LCDData SiS_StLCD1600x1200Data[] =
{ {
{27, 4, 800, 500, 2160, 1250 }, {27, 4, 800, 500, 2160, 1250 },
{27, 4, 800, 500, 2160, 1250 }, {27, 4, 800, 500, 2160, 1250 },
...@@ -1111,10 +1201,14 @@ static const SiS_LCDDataStruct SiS_StLCD1600x1200Data[] = ...@@ -1111,10 +1201,14 @@ static const SiS_LCDDataStruct SiS_StLCD1600x1200Data[] =
{ 5, 2,1350, 800, 2160, 1250 }, { 5, 2,1350, 800, 2160, 1250 },
{135,88,1600,1100, 2160, 1250 }, {135,88,1600,1100, 2160, 1250 },
{72, 49,1680,1092, 2160, 1250 }, {72, 49,1680,1092, 2160, 1250 },
{ 1, 1,2160,1250, 2160, 1250 } { 1, 1,2160,1250, 2160, 1250 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
}; };
static const SiS_LCDDataStruct SiS_ExtLCD1600x1200Data[] = static const struct SiS_LCDData SiS_ExtLCD1600x1200Data[] =
{ {
{72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */ {72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */
/* {27, 4, 800, 500, 2160, 1250 }, 640x400 (6235) */ /* {27, 4, 800, 500, 2160, 1250 }, 640x400 (6235) */
...@@ -1127,10 +1221,14 @@ static const SiS_LCDDataStruct SiS_ExtLCD1600x1200Data[] = ...@@ -1127,10 +1221,14 @@ static const SiS_LCDDataStruct SiS_ExtLCD1600x1200Data[] =
{ 5, 2,1350, 800, 2160, 1250 }, { 5, 2,1350, 800, 2160, 1250 },
{27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */ {27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */
{72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */ {72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */
{ 1, 1,2160,1250, 2160, 1250 } { 1, 1,2160,1250, 2160, 1250 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
}; };
static const SiS_LCDDataStruct SiS_NoScaleData[] = static const struct SiS_LCDData SiS_NoScaleData[] =
{ {
{ 1, 1, 800, 449, 800, 449 }, /* 0x00: 320x200, 640x400 */ { 1, 1, 800, 449, 800, 449 }, /* 0x00: 320x200, 640x400 */
{ 1, 1, 800, 449, 800, 449 }, { 1, 1, 800, 449, 800, 449 },
...@@ -1162,14 +1260,18 @@ static const SiS_LCDDataStruct SiS_NoScaleData[] = ...@@ -1162,14 +1260,18 @@ static const SiS_LCDDataStruct SiS_NoScaleData[] =
{ 1, 1,1808, 808,1808, 808 }, /* 0x1b: 1360x768 */ { 1, 1,1808, 808,1808, 808 }, /* 0x1b: 1360x768 */
{ 1, 1,1104, 563,1104, 563 }, /* 0x1c: 960x540 */ { 1, 1,1104, 563,1104, 563 }, /* 0x1c: 960x540 */
{ 1, 1,1120, 618,1120, 618 }, /* 0x1d: 960x600 */ { 1, 1,1120, 618,1120, 618 }, /* 0x1d: 960x600 */
{ 1, 1,1408, 816,1408, 816 } /* 0x1f: 1280x800 (TMDS special) */ { 1, 1,1408, 816,1408, 816 }, /* 0x1f: 1280x800 (TMDS special) */
{ 1, 1,1760,1235,1760,1235 }, /* 0x20: 1600x1200 for LCDA */
{ 1, 1,2048,1320,2048,1320 }, /* 0x21: 1600x1200 for non-SiS LVDS */
{ 1, 1,1664, 861,1664, 861 } /* 0x22: 1280x854 */
}; };
/**************************************************************/ /**************************************************************/
/* LVDS ----------------------------------------------------- */ /* LVDS ----------------------------------------------------- */
/**************************************************************/ /**************************************************************/
static const SiS_LVDSDataStruct SiS_LVDS320x480Data_1[]= /* FSTN/DSTN 320x240, 2 variants */
static const struct SiS_LVDSData SiS_LVDS320x240Data_1[]=
{ {
{ 848, 433, 400, 525}, { 848, 433, 400, 525},
{ 848, 389, 400, 525}, { 848, 389, 400, 525},
...@@ -1177,157 +1279,40 @@ static const SiS_LVDSDataStruct SiS_LVDS320x480Data_1[]= ...@@ -1177,157 +1279,40 @@ static const SiS_LVDSDataStruct SiS_LVDS320x480Data_1[]=
{ 848, 389, 400, 525}, { 848, 389, 400, 525},
{ 848, 518, 400, 525}, { 848, 518, 400, 525},
{1056, 628, 400, 525}, {1056, 628, 400, 525},
{ 400, 525, 400, 525}, { 400, 525, 400, 525} /* xSTN */
{ 800, 449,1000, 644},
{ 800, 525,1000, 635}
}; };
static const SiS_LVDSDataStruct SiS_LVDS640x480Data_1[]= static const struct SiS_LVDSData SiS_LVDS320x240Data_2[]=
{ {
{ 800, 445, 800, 525}, /* 800, 449, 800, 449 */ { 800, 445, 800, 525},
{ 800, 395, 800, 525}, { 800, 395, 800, 525},
{ 800, 445, 800, 525}, { 800, 445, 800, 525},
{ 800, 395, 800, 525}, { 800, 395, 800, 525},
{ 800, 525, 800, 525}, { 800, 525, 800, 525},
{ 800, 525, 800, 525}, /* pseudo */ {1056, 628,1056, 628},
{ 800, 525, 800, 525} /* pseudo */ { 480, 525, 480, 525} /* xSTN */
}; };
/* FSTN 320x240 */ static const struct SiS_LVDSData SiS_LVDS640x480Data_1[]=
static const SiS_LVDSDataStruct SiS_LVDS640x480Data_2[]=
{ {
{ 800, 445, 800, 525}, { 800, 445, 800, 525}, /* 800, 449, 800, 449 */
{ 800, 395, 800, 525}, { 800, 395, 800, 525},
{ 800, 445, 800, 525}, { 800, 445, 800, 525},
{ 800, 395, 800, 525}, { 800, 395, 800, 525},
{ 800, 525, 800, 525}, { 800, 525, 800, 525}
{ 800, 525, 800, 525}, /* pseudo */
{ 800, 525, 800, 525} /* pseudo */
}; };
static const SiS_LVDSDataStruct SiS_LVDS800x600Data_1[]= static const struct SiS_LVDSData SiS_LVDS800x600Data_1[]=
{ {
{ 848, 433,1060, 629}, { 848, 433,1060, 629},
{ 848, 389,1060, 629}, { 848, 389,1060, 629},
{ 848, 433,1060, 629}, { 848, 433,1060, 629},
{ 848, 389,1060, 629}, { 848, 389,1060, 629},
{ 848, 518,1060, 629}, { 848, 518,1060, 629},
{1056, 628,1056, 628},
{1056, 628,1056, 628}
};
static const SiS_LVDSDataStruct SiS_LVDS800x600Data_2[]=
{
{1056, 628,1056, 628} {1056, 628,1056, 628}
}; };
static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_1[]= static const struct SiS_LVDSData SiS_LVDS1024x600Data_1[] =
{
{ 840, 438,1344, 806},
{ 840, 409,1344, 806},
{ 840, 438,1344, 806},
{ 840, 409,1344, 806},
{ 840, 518,1344, 806}, /* 640x480 */
{1050, 638,1344, 806}, /* 800x600 */
{1344, 806,1344, 806}, /* 1024x768 */
};
static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_2[]=
{
{1344, 806,1344, 806}
};
static const SiS_LVDSDataStruct SiS_LVDS1280x1024Data_1[]=
{
{1048, 442,1688,1066},
{1048, 392,1688,1066},
{1048, 442,1688,1066},
{1048, 392,1688,1066},
{1048, 522,1688,1066},
{1208, 642,1688,1066},
{1432, 810,1688,1066},
{1688,1066,1688,1066}
};
static const SiS_LVDSDataStruct SiS_LVDS1280x1024Data_2[]=
{
{1688,1066,1688,1066}
};
static const SiS_LVDSDataStruct SiS_LVDS1400x1050Data_1[]=
{
{ 928, 416, 1688,1066},
{ 928, 366, 1688,1066},
{ 928, 416, 1688,1066},
{ 928, 366, 1688,1066},
{ 928, 496, 1688,1066},
{1088, 616, 1688,1066},
{1312, 784, 1688,1066},
{1568,1040, 1688,1066},
{1688,1066, 1688,1066}
};
static const SiS_LVDSDataStruct SiS_LVDS1400x1050Data_2[]=
{
{1688,1066, 1688,1066}
};
static const SiS_LVDSDataStruct SiS_LVDS1600x1200Data_1[]=
{
{1088, 520, 2048,1320},
{1088, 470, 2048,1320},
{1088, 520, 2048,1320},
{1088, 470, 2048,1320},
{1088, 600, 2048,1320},
{1248, 720, 2048,1320},
{1472, 888, 2048,1320},
{1728,1144, 2048,1320},
{1848,1170, 2048,1320},
{2048,1320, 2048,1320}
};
static const SiS_LVDSDataStruct SiS_LVDS1600x1200Data_2[]=
{
{2048,1320, 2048,1320}
};
static const SiS_LVDSDataStruct SiS_LVDS1280x960Data_1[]=
{
{ 840, 438,1344, 806},
{ 840, 409,1344, 806},
{ 840, 438,1344, 806},
{ 840, 409,1344, 806},
{ 840, 518,1344, 806},
{1050, 638,1344, 806},
{1344, 806,1344, 806},
{ 800, 449,1280, 801},
{ 800, 525,1280, 813}
};
static const SiS_LVDSDataStruct SiS_LVDS1280x960Data_2[]=
{
{1344, 806,1344, 806}
};
static const SiS_LVDSDataStruct SiS_LVDS1280x768Data_1[]=
{
{ 768, 438, 1408, 806},
{ 768, 388, 1408, 806},
{ 768, 438, 1408, 806},
{ 768, 388, 1408, 806},
{ 768, 518, 1408, 806},
{ 928, 638, 1408, 806},
{1152, 806, 1408, 806},
{1408, 806, 1408, 806},
{1408, 806, 1408, 806}
};
static const SiS_LVDSDataStruct SiS_LVDS1280x768Data_2[]=
{
{1408, 806, 1408, 806}
};
static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_1[] =
{ {
{ 840, 604,1344, 800}, { 840, 604,1344, 800},
{ 840, 560,1344, 800}, { 840, 560,1344, 800},
...@@ -1338,124 +1323,18 @@ static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_1[] = ...@@ -1338,124 +1323,18 @@ static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_1[] =
{1344, 800,1344, 800} {1344, 800,1344, 800}
}; };
static const SiS_LVDSDataStruct SiS_LVDS1024x600Data_2[] = static const struct SiS_LVDSData SiS_LVDS1024x768Data_1[]=
{
{1344, 800,1344, 800}
};
static const SiS_LVDSDataStruct SiS_LVDS1152x768Data_1[] =
{ {
{ 840, 438,1344, 806}, { 840, 438,1344, 806},
{ 840, 409,1344, 806}, { 840, 409,1344, 806},
{ 840, 438,1344, 806}, { 840, 438,1344, 806},
{ 840, 409,1344, 806}, { 840, 409,1344, 806},
{ 840, 518,1344, 806}, { 840, 518,1344, 806}, /* 640x480 */
{1050, 638,1344, 806},
{1344, 806,1344, 806}
};
static const SiS_LVDSDataStruct SiS_LVDS1152x768Data_2[] =
{
{1344, 806,1344, 806}
};
/* Pass 1:1 data */
static const SiS_LVDSDataStruct SiS_LVDSXXXxXXXData_1[]=
{
{ 800, 449, 800, 449},
{ 800, 449, 800, 449},
{ 900, 449, 900, 449},
{ 900, 449, 900, 449},
{ 800, 525, 800, 525}, /* 640x480 */
{1056, 628, 1056, 628}, /* 800x600 */
{1344, 806, 1344, 806}, /* 1024x768 */
{1688,1066, 1688,1066}, /* 1280x1024 */ /* INSERTED */
{1688, 806, 1688, 806}, /* 1280x768 */
};
/* Custom data for Barco iQ R series */
static const SiS_LVDSDataStruct SiS_LVDSBARCO1366Data_1[]=
{
{ 832, 438,1331, 806},
{ 832, 388,1331, 806},
{ 832, 438,1331, 806},
{ 832, 388,1331, 806},
{ 832, 518,1331, 806},
{1050, 638,1344, 806},
{1344, 806,1344, 806},
{1688,1066,1688,1066},
{1688,1066,1688,1066} /* 1360x1024 */
};
/* Custom data for Barco iQ R series */
static const SiS_LVDSDataStruct SiS_LVDSBARCO1366Data_2[]=
{
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1344, 806,1344, 806},
{1688,1066,1688,1066},
{1688,1066,1688,1066} /* 1360x1024 */
};
/* Custom data for Barco iQ G series */
static const SiS_LVDSDataStruct SiS_LVDSBARCO1024Data_1[]=
{
{ 832, 438,1331, 806},
{ 832, 409,1331, 806},
{ 832, 438,1331, 806},
{ 832, 409,1331, 806},
{ 832, 518,1331, 806}, /* 640x480 */
{1050, 638,1344, 806}, /* 800x600 */ {1050, 638,1344, 806}, /* 800x600 */
{1344, 806,1344, 806}, /* 1024x768 */ {1344, 806,1344, 806}, /* 1024x768 */
}; };
/* Custom data for Barco iQ G series */ static const struct SiS_LVDSData SiS_CHTVUNTSCData[]=
static const SiS_LVDSDataStruct SiS_LVDSBARCO1024Data_2[]=
{
{1344, 806,1344, 806}
};
/* Custom data for 848x480 parallel panel */
static const SiS_LVDSDataStruct SiS_LVDS848x480Data_1[]=
{
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 640x480 TODO */
{1088, 525,1088, 525}, /* 800x600 TODO */
{1088, 525,1088, 525}, /* 1024x768 TODO */
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 848x480 */
{1088, 525,1088, 525} /* 1360x768 TODO */
};
/* Custom data for 848x480 parallel panel */
static const SiS_LVDSDataStruct SiS_LVDS848x480Data_2[]=
{
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 640x480 */
{1088, 525,1088, 525}, /* 800x600 */
{1088, 525,1088, 525}, /* 1024x768 */
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{1088, 525,1088, 525}, /* 848x480 */
{1088, 525,1088, 525} /* 1360x768 TODO */
};
static const SiS_LVDSDataStruct SiS_CHTVUNTSCData[]=
{ {
{ 840, 600, 840, 600}, { 840, 600, 840, 600},
{ 840, 600, 840, 600}, { 840, 600, 840, 600},
...@@ -1466,7 +1345,7 @@ static const SiS_LVDSDataStruct SiS_CHTVUNTSCData[]= ...@@ -1466,7 +1345,7 @@ static const SiS_LVDSDataStruct SiS_CHTVUNTSCData[]=
{1160, 945,1160, 945} {1160, 945,1160, 945}
}; };
static const SiS_LVDSDataStruct SiS_CHTVONTSCData[]= static const struct SiS_LVDSData SiS_CHTVONTSCData[]=
{ {
{ 840, 525, 840, 525}, { 840, 525, 840, 525},
{ 840, 525, 840, 525}, { 840, 525, 840, 525},
...@@ -1477,55 +1356,9 @@ static const SiS_LVDSDataStruct SiS_CHTVONTSCData[]= ...@@ -1477,55 +1356,9 @@ static const SiS_LVDSDataStruct SiS_CHTVONTSCData[]=
{1160, 840,1160, 840} {1160, 840,1160, 840}
}; };
/* Chrontel TV Skew */
static const SiS_LVDSDesStruct SiS_CHTVUNTSCDesData[]=
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS_CHTVONTSCDesData[]=
{
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS_CHTVUPALDesData[]=
{
{256, 0},
{256, 0},
{256, 0},
{256, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
static const SiS_LVDSDesStruct SiS_CHTVOPALDesData[]=
{
{256, 0},
{256, 0},
{256, 0},
{256, 0},
{ 0, 0},
{ 0, 0},
{ 0, 0}
};
/* CRT1 CRTC data for slave modes */ /* CRT1 CRTC data for slave modes */
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1320x480_1[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_1[] =
{ {
{{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f, {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05, 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
...@@ -1550,48 +1383,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1320x480_1[] = ...@@ -1550,48 +1383,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1320x480_1[] =
0x00 }} 0x00 }}
}; };
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_1[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2[] =
{
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}},
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}},
{{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_1_H[] =
{
{{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
0x00}},
{{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x83,0x85,0x63,0xba,0x00,0x00,0x00,
0x00}},
{{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
0x00}},
{{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x83,0x85,0x63,0xba,0x00,0x00,0x00,
0x00}},
{{0x2d,0x28,0x90,0x2c,0x80,0x0b,0x3e,
0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
0x00}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2[] =
{ {
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05, 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
...@@ -1611,12 +1403,17 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2[] = ...@@ -1611,12 +1403,17 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2[] =
{{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0, {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x73,0x20,0x00,0x06, 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01}}, 0x01}},
#if 0
{{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e, {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00, 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
0x00}} 0x00}}
#endif
{{0x5f,0x4f,0x83,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xe8,0x0c,0x00,0x00,0x05,
0x00}},
}; };
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2_H[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2_H[] =
{ {
{{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f, {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05, 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
...@@ -1641,7 +1438,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2_H[] = ...@@ -1641,7 +1438,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_2_H[] =
0x00}} 0x00}}
}; };
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3[] =
{ {
{{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05, 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
...@@ -1666,7 +1463,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3[] = ...@@ -1666,7 +1463,7 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3[] =
0x00}} 0x00}}
}; };
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3_H[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3_H[] =
{ {
{{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f, {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
0x90,0x85,0x8f,0xab,0x30,0x00,0x05, 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
...@@ -1691,778 +1488,175 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3_H[] = ...@@ -1691,778 +1488,175 @@ static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT1640x480_3_H[] =
0x00}} 0x00}}
}; };
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_1[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1[] =
{
{{0x64,0x4f,0x88,0x54,0x9f,0x5a,0x3e,
0xe8,0x8f,0x8f,0x5b,0x00,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x2e,0x3e,
0xb9,0x80,0x5d,0x2f,0x00,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x5a,0x3e,
0xe8,0x8f,0x8f,0x5b,0x00,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x2e,0x3e,
0xb9,0x80,0x5d,0x2f,0x00,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0xaf,0xba,
0x3b,0x82,0xdf,0xb0,0x00,0x00,0x01,
0x00}},
{{0x7e,0x63,0x82,0x68,0x15,0x1e,0xf1,
0xae,0x85,0x57,0x1f,0x30,0x00,0x26,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x1e,0xf1,
0xae,0x85,0x57,0x1f,0x30,0x00,0x02,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_1_H[] =
{
{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
0xe2,0x89,0xdf,0x05,0x00,0x00,0x44,
0x00}},
{{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
0x01}},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_2[] =
{
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x02,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11024x600_2_H[] =
{
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x01,
0x01}},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_1[] =
{
{{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x01,
0x00}},
{{0x64,0x4f,0x88,0x54,0x9f,0x04,0x3e,
0xe2,0x89,0xdf,0x05,0x00,0x00,0x01,
0x00}},
{{0x7e,0x63,0x82,0x68,0x15,0x7c,0xf0,
0x5a,0x8f,0x57,0x7d,0x20,0x00,0x26,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_1_H[] =
{
{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0xc4,0x1f,
0x92,0x89,0x8f,0xb5,0x30,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x97,0x1f,
0x60,0x87,0x5d,0x83,0x10,0x00,0x44,
0x00}},
{{0x2f,0x27,0x93,0x2b,0x90,0x04,0x3e,
0xe2,0x89,0xdf,0x05,0x00,0x00,0x44,
0x00}},
{{0x3c,0x31,0x80,0x35,0x1c,0x7c,0xf0,
0x5a,0x8f,0x57,0x7d,0x20,0x00,0x55,
0x01}},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_2[] =
{
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x4f,0x87,0x6e,0x9f,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x06,
0x00}},
{{0xa3,0x63,0x87,0x78,0x89,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x02,
0x01}},
{{0xa3,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x02,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11152x768_2_H[] =
{
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x4a,0x80,0x8f,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x31,0x87,0x5d,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x27,0x93,0x39,0x01,0x24,0xbb,
0x72,0x88,0xdf,0x25,0x30,0x00,0x01,
0x00}},
{{0x4f,0x31,0x93,0x3e,0x06,0x24,0xf1,
0xae,0x84,0x57,0x25,0x30,0x00,0x01,
0x01}},
{{0x4f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
0x02,0x88,0xff,0x25,0x10,0x00,0x01,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_1[] =
{ {
{{0x5b,0x4f,0x9f,0x55,0x19,0xb4,0x1f, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0x9c,0x8e,0x8f,0xb5,0x10,0x00,0x01, 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}},
{{0x5b,0x4f,0x9f,0x55,0x19,0x82,0x1f,
0x6a,0x8c,0x5d,0x83,0x30,0x00,0x01,
0x00}},
{{0x5b,0x4f,0x9f,0x55,0x19,0xb4,0x1f,
0x9c,0x8e,0x8f,0xb5,0x10,0x00,0x01,
0x00}},
{{0x5b,0x4f,0x9f,0x55,0x19,0x82,0x1f,
0x6a,0x8c,0x5d,0x83,0x30,0x00,0x01,
0x00}},
{{0x5b,0x4f,0x9f,0x55,0x19,0x04,0x3e,
0xec,0x8e,0xdf,0x05,0x20,0x00,0x01,
0x00}},
{{0x6f,0x63,0x93,0x69,0x8d,0x7c,0xf0,
0x64,0x86,0x57,0x7d,0x20,0x00,0x05,
0x01}},
{{0x8b,0x7f,0x8f,0x85,0x09,0x24,0xf5,
0x0c,0x8e,0xff,0x25,0x30,0x00,0x02,
0x01}},
{{0xab,0x9f,0x8f,0xa5,0x89,0x24,0xf5,
0x0c,0x8e,0xff,0x25,0x30,0x00,0x06,
0x01}},
{{0xab,0x9f,0x8f,0xa5,0x89,0x24,0xf5,
0x0c,0x8e,0xff,0x25,0x30,0x00,0x06,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_1_H[] =
{
{{0x47,0x27,0x8b,0x2c,0x1a,0x9e,0x1f,
0x93,0x86,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x30,0x1e,0x9e,0x1f,
0x92,0x86,0x8f,0x9f,0x30,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0x6c,0x1f,
0x60,0x84,0x5d,0x6d,0x10,0x00,0x05,
0x00}},
{{0x47,0x27,0x8b,0x2c,0x1a,0xee,0x1f,
0xe2,0x86,0xdf,0xef,0x10,0x00,0x05,
0x00}}, 0x00}},
{{0x51,0x31,0x95,0x36,0x04,0x66,0xf0, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0x5a,0x8e,0x57,0x67,0x20,0x00,0x01, 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x01}},
{{0x5f,0x3f,0x83,0x44,0x92,0x0e,0xf5,
0x02,0x86,0xff,0x0f,0x10,0x00,0x01,
0x01}},
{{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
0x01}},
{{0x6f,0x4f,0x93,0x54,0x82,0x0e,0x5a,
0x02,0x86,0xff,0x0f,0x09,0x00,0x05,
0x01}}
};
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_2[] =
{
{{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb,
0x54,0x86,0xdb,0xda,0x00,0x00,0x02,
0x00}}, 0x00}},
{{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x02, 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}}, 0x00}},
{{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0x54,0x86,0xdb,0xda,0x00,0x00,0x02, 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}}, 0x00}},
{{0xab,0x60,0x9f,0x80,0x04,0x24,0xbb, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x02, 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
0x00}}, 0x00}},
{{0xab,0x60,0x9f,0x80,0x04,0x24,0xb3, {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x7c,0x8e,0x03,0x02,0x10,0x00,0x02, 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
0x01}},
{{0xab,0x63,0x8f,0x8a,0x8e,0x24,0xf1,
0xb6,0x88,0x57,0x25,0x10,0x00,0x02,
0x01}},
{{0xab,0x7f,0x8f,0x98,0x9c,0x24,0xf5,
0x0a,0x8c,0xff,0x25,0x30,0x00,0x02,
0x01}},
{{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
0x01}},
{{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
0x01}} 0x01}}
}; };
static const SiS_LVDSCRT1DataStruct SiS_LVDSCRT11280x768_2_H[] = static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] =
{ {
{{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x54,0x86,0xdb,0xda,0x00,0x00,0x01, 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
0x00}}, 0x00}},
{{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x01, 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
0x00}}, 0x00}},
{{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x54,0x86,0xdb,0xda,0x00,0x00,0x01, 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
0x00}}, 0x00}},
{{0x83,0x38,0x97,0x58,0x9c,0x24,0xbb, {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
0x3b,0x8d,0xc2,0xc1,0x00,0x00,0x01, 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
0x00}}, 0x00}},
{{0x83,0x38,0x97,0x58,0x9c,0x24,0xb3, {{0x2d,0x28,0x90,0x2c,0x80,0x0b,0x3e,
0x7c,0x8e,0x03,0x02,0x10,0x00,0x01, 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
0x01}}, 0x00}}
{{0x79,0x31,0x9d,0x58,0x9c,0x24,0xf1,
0xb6,0x88,0x57,0x25,0x10,0x00,0x01,
0x01}},
{{0x6b,0x3f,0x8f,0x58,0x9c,0x24,0xf5,
0x0a,0x8c,0xff,0x25,0x30,0x00,0x01,
0x01}},
{{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
0x01}},
{{0xab,0x9f,0x8f,0xa8,0x8c,0x24,0xf5,
0x0a,0x8c,0xff,0x25,0x30,0x00,0x06,
0x01}}
};
/**************************************************************/
/* COMMON --------------------------------------------------- */
/**************************************************************/
#ifdef LINUX_XF86
#define SIS_PL_HSYNCP 0x01
#define SIS_PL_HSYNCN 0x02
#define SIS_PL_VSYNCP 0x04
#define SIS_PL_VSYNCN 0x08
#define SIS_PL_DVI 0x80
typedef struct _SiS_PlasmaModes
{
const char *name;
ULONG clock;
USHORT HDisplay, HTotal, HFrontPorch, HSyncWidth;
USHORT VDisplay, VTotal, VFrontPorch, VSyncWidth;
UCHAR SyncFlags;
} SiS_PlasmaModes;
typedef struct _SiS_PlasmaTables
{
USHORT vendor;
UCHAR productnum;
USHORT product[5];
const char *DDCnames[5];
const char *plasmaname;
USHORT maxx,maxy;
USHORT prefx, prefy;
UCHAR modenum;
UCHAR plasmamodes[20]; /* | 0x80 = DVI-capable, | 0x40 = analog */
} SiS_PlasmaTables;
static const SiS_PlasmaModes SiS_PlasmaMode[] = {
{ "640x400", /* 00: IBM 400@70 */
25175,
640, 800, 17, 64,
400, 449, 13, 2,
SIS_PL_HSYNCN | SIS_PL_VSYNCN },
{ "640x480", /* 01: VESA 480@72 */
31500,
640, 832, 24, 40,
480, 520, 9, 3,
SIS_PL_HSYNCN | SIS_PL_VSYNCN },
{ "800x600", /* 02: VESA 600@72 */
50000,
800, 1040, 56, 120,
600, 666, 37, 6,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "864x480", /* 03: Cereb wide 1 */
42526,
864, 1134, 22, 86,
480, 500, 1, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCN },
{ "848x480", /* 04: VESA wide (NEC1) */
33750,
848, 1088, 16, 112,
480, 517, 6, 8,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1024x576", /* 05: VESA wide (NEC2) */
47250,
1024, 1320, 16, 144,
576, 596, 2, 4,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1280x720", /* 06: VESA wide (NEC3) */
76500,
1280, 1696, 48, 176,
720, 750, 4, 8,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1360x765", /* 07: VESA wide (NEC4) */
85500,
1360, 1792, 64, 176,
765, 795, 4, 8,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1024x600", /* 08: CEREB wide 2 */
51200,
1024, 1352, 51, 164,
600, 628, 1, 4,
SIS_PL_HSYNCN | SIS_PL_VSYNCP },
{ "1024x768", /* 09: VESA 768@75 */
78750,
1024, 1312, 16, 96,
768, 800, 1, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1152x864", /* 10: VESA 1152x864@75 */
108000,
1152, 1600, 64, 128,
864, 900, 1, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1280x1024", /* 11: VESA 1024@60 */
108000,
1280, 1688, 48, 112,
1024, 1066, 1, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1280x768", /* 12: W_XGA */
81000,
1280, 1688, 48, 112,
768, 802, 3, 6,
SIS_PL_HSYNCP | SIS_PL_VSYNCN },
{ "1280x768", /* 13: I/O Data W_XGA@56Hz */
76064,
1280, 1688, 48, 112,
768, 802, 2, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1376x768", /* 14: I/O Wide XGA */
87340,
1376, 1808, 32, 128,
768, 806, 3, 6,
SIS_PL_HSYNCN | SIS_PL_VSYNCP },
{ "1280x960", /* 15: VESA 960@60 */
108000,
1280, 1800, 96, 112,
960, 1000, 1, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1400x1050", /* 16: VESA 1050@60Hz */
108000,
1400, 1688, 48, 112,
1050, 1066, 1, 3,
SIS_PL_HSYNCN | SIS_PL_VSYNCN },
{ "1360x768", /* 17: VESA wide (NEC4/2) */
85500,
1360, 1792, 64, 112,
765, 795, 3, 6,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "800x600", /* 18: VESA 600@56 */
36000,
800, 1024, 24, 2,
600, 625, 1, 2,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1072x600", /* 19: Panasonic 1072x600 (sync?) */
54100,
1072, 1424, 48, 176,
600, 628, 16, 1,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "848x480", /* 20: Panasonic 848x480 (sync?) */
33070, /* is 852x480, but we can't use 852 */
848, 1068, 20, 40, /* differs from DDC data, better centered */
480, 516, 3, 5, /* won't work assumingly, because data is % 8 */
SIS_PL_HSYNCN | SIS_PL_VSYNCN },
{ "1280x720", /* 21: WIDE720(60) (aka "750p") (Panasonic) */
74300,
1280, 1650,110, 40,
720, 750, 5, 5,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1280x768", /* 22: 1280x768@56.5 (Panasonic) */
76200, /* (According to manual not supported for HDMI; but works) */
1280, 1680, 16, 24,
768, 802, 2, 5,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1280x720@50", /* 23: WIDE720(50) (aka "750p") (Panasonic) */
74300, /* Panasonic states 45.0kHz. Not possible. This one works (with some overscan) */
1280, 1980,400, 80,
720, 750, 1, 2,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "720x480", /* 24: 720x480 (aka "525p" and "480p") (Panasonic) */
27000,
720, 856, 40, 32,
480, 525, 1, 3,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "720x576", /* 25: 720x576 (aka "625p"and "576p") (Panasonic) */
27500,
720, 864, 16, 64,
576, 625, 5, 6,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
{ "1280x720@50", /* 26: WIDE720(50) (aka "750p") (Generic) */
74300,
1280, 1980,400, 80,
720, 750, 5, 5,
SIS_PL_HSYNCP | SIS_PL_VSYNCP },
}; };
/* BOOLEAN SiSInitPtr(struct SiS_Private *SiS_Pr);
27.00 720 755 791 858 480 480 484 525 #ifdef SIS_XORG_XF86
27.50 720 732 795 864 576 581 587 625 unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
*/ int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight);
static const SiS_PlasmaTables SiS_PlasmaTable[] = {
#if 0 /* Product IDs missing */
{ 0x38a3, 4,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 42VP4/42VP4D/42VP4G/42VP4DG",
0, 0,
0, 0,
11, /* All DVI, except 0, 7, 13 */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
17|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
#endif
#if 0 /* Product IDs missing */
{ 0x38a3, 3,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 42PD1/50PD1/50PD2",
0, 0,
0, 0,
5, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0, 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 42PD3",
0, 0,
0, 0,
10, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 7|0x40, 8|0xc0, 9|0xc0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 2,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 42VM3/61XM1",
0, 0,
0, 0,
11, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 8|0xc0, 9|0xc0,11|0xc0,
17|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 2,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 42MP1/42MP2",
0, 0,
0, 0,
6, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0,11|0xc0, 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 50MP1",
0, 0,
0, 0,
10, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
#endif #endif
{ 0x38a3, 4, unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
{ 0xa482, 0xa483, 0x0000, 0x0000, 0x0000 }, int VDisplay, int Depth, BOOLEAN FSTN,
{ "PX-42VM", "", "", "", "" }, unsigned short CustomT, int LCDwith, int LCDheight,
"NEC PlasmaSync 42MP3/42MP4/50MP2/61MP1", unsigned int VBFlags2);
0, 0, unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
0, 0, int VDisplay, int Depth, unsigned int VBFlags2);
11, /* All DVI except 0, 7, 13, 17 */ unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0, int VDisplay, int Depth, unsigned int VBFlags2);
17|0x40, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
}, void SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data);
#if 0 /* Product IDs missing */ void SiS_SetRegByte(SISIOADDRESS port, unsigned short data);
{ 0x38a3, 1, void SiS_SetRegShort(SISIOADDRESS port, unsigned short data);
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, void SiS_SetRegLong(SISIOADDRESS port, unsigned int data);
{ "", "", "", "", "" }, unsigned char SiS_GetReg(SISIOADDRESS port, unsigned short index);
"NEC PlasmaSync 3300W", unsigned char SiS_GetRegByte(SISIOADDRESS port);
0, 0, unsigned short SiS_GetRegShort(SISIOADDRESS port);
0, 0, unsigned int SiS_GetRegLong(SISIOADDRESS port);
3, void SiS_SetRegANDOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND,
{ 0|0x40, 1|0xc0,18|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , unsigned short DataOR);
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } void SiS_SetRegAND(SISIOADDRESS Port,unsigned short Index, unsigned short DataAND);
}, void SiS_SetRegOR(SISIOADDRESS Port,unsigned short Index, unsigned short DataOR);
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
{ "", "", "", "", "" }, void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
"NEC PlasmaSync 4200W", void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
4, /* DVI entirely unknown */ #ifndef SIS_LINUX_KERNEL
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , void SiSSetLVDSetc(struct SiS_Private *SiS_Pr);
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 4210W",
0, 0,
0, 0,
6, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 9|0xc0,11|0xc0, 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 5000W",
0, 0,
0, 0,
7, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,11|0xc0, 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
#endif #endif
{ 0x412f, 2, void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
{ 0x000c, 0x000b, 0x0000, 0x0000, 0x0000 }, void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
{ "", "", "", "", "" }, unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
"Pioneer 503CMX/PDA-5002", unsigned short ModeIdIndex);
0, 0, BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
0, 0, #ifndef SIS_LINUX_KERNEL
6, /* DVI unknown */ void SiS_GetVBType(struct SiS_Private *SiS_Pr);
{ 1|0xc0, 2|0xc0, 9|0xc0,11|0xc0,12|0xc0,15|0xc0, 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x34a9, 1,
{ 0xa00e, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"Panasonic TH-42",
0, 0,
0, 0,
5, /* No DVI output */
{ 1|0x40, 2|0x40, 4|0x40, 9|0x40,15|0x40, 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x34a9, 1,
{ 0xa005, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "TH-42PW*4", "", "", "", "" },
"Panasonic TH-42PW5",
0, 0,
0, 0,
1, /* No special modes otherwise; no DVI. */
{20|0x40,19|0x40, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x4c2e, 1,
{ 0x9b05, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "PLV-Z2", "", "", "", "" },
"Sanyo PLV-Z2 (non HDCP-mode)", /* HDCP mode would be id 9b06, but not needed */
1280, 768, /* as it then advertises correct size */
1280, 720,
1, /* 1280x720, no special modes otherwise */
{21|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x34a9, 1,
{ 0xd034, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "AE500U (DVI-D)", "", "", "", "" },
"Panasonic AE500U",
1280, 768,
1280, 720,
1, /* 1280x720, no special modes otherwise */
{21|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x34a9, 1,
{ 0xd043, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "AE700U (HDMI)", "", "", "", "" },
"Panasonic AE700U",
1360, 768,
1280, 720,
6, /* 1280x720/60, 1280x720/50, 1280x768@56(digital/analog), 720x480, 720x576 */
{21|0xc0,23|0xc0,22|0x80,13|0x40,24|0x80,25|0x80, 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x0000 }
};
#endif #endif
#ifdef LINUX_XF86 BOOLEAN SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
USHORT SiS_GetModeID(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, unsigned short *ModeIdIndex);
int Depth, BOOLEAN FSTN, int LCDwith, int LCDheight); unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short RRTI);
#ifdef SIS300
void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1,
unsigned short *idx2);
unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2);
unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
#endif #endif
USHORT SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, BOOLEAN FSTN, void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
USHORT CustomT, int LCDwith, int LCDheight); #ifdef SIS_XORG_XF86
USHORT SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth); BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo,
USHORT SiS_GetModeID_VGA2(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth); BOOLEAN dosetpitch);
BOOLEAN SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
void SiS_SetReg(SISIOADDRESS port, USHORT index, USHORT data);
void SiS_SetRegByte(SISIOADDRESS port, USHORT data);
void SiS_SetRegShort(SISIOADDRESS port, USHORT data);
void SiS_SetRegLong(SISIOADDRESS port, ULONG data);
UCHAR SiS_GetReg(SISIOADDRESS port, USHORT index);
UCHAR SiS_GetRegByte(SISIOADDRESS port);
USHORT SiS_GetRegShort(SISIOADDRESS port);
ULONG SiS_GetRegLong(SISIOADDRESS port);
void SiS_SetRegANDOR(SISIOADDRESS Port, USHORT Index, USHORT DataAND, USHORT DataOR);
void SiS_SetRegAND(SISIOADDRESS Port,USHORT Index, USHORT DataAND);
void SiS_SetRegOR(SISIOADDRESS Port,USHORT Index, USHORT DataOR);
void SiS_DisplayOn(SiS_Private *SiS_Pr);
void SiS_DisplayOff(SiS_Private *SiS_Pr);
void SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
BOOLEAN SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex);
UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
USHORT SiS_GetOffset(SiS_Private *SiS_Pr,USHORT ModeNo, USHORT ModeIdIndex,
USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo, USHORT ModeIdIndex);
void SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
#ifdef LINUX_XF86
BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,ScrnInfoPtr pScrn,USHORT ModeNo, BOOLEAN dosetpitch);
BOOLEAN SiSBIOSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom); DisplayModePtr mode, BOOLEAN IsCustom);
BOOLEAN SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn, BOOLEAN SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom); DisplayModePtr mode, BOOLEAN IsCustom);
BOOLEAN SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn, BOOLEAN SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom); DisplayModePtr mode, BOOLEAN IsCustom);
int SiSTranslateToVESA(ScrnInfoPtr pScrn, int modenumber); #endif
int SiSTranslateToOldMode(int modenumber); #ifdef SIS_LINUX_KERNEL
BOOLEAN SiS_GetPanelID(SiS_Private *SiS_Pr, PSIS_HW_INFO); BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
USHORT SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags); #endif
DisplayModePtr SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfordvi); void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct, int *maxx, int *maxy, int *prefx, int *prefy); void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c); unsigned short ModeIdIndex);
#else #ifdef SIS_XORG_XF86
BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo); void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
int yres, DisplayModePtr current);
#endif
#ifdef SIS_LINUX_KERNEL
void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);
#endif #endif
#ifdef LINUX_KERNEL /* From init301.c: */
int sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
UCHAR modeno, UCHAR rateindex); unsigned short ModeIdIndex, int chkcrt2mode);
int sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, extern void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
UCHAR modeno, UCHAR rateindex, unsigned short ModeIdIndex);
struct fb_var_screeninfo *var); extern void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
BOOLEAN sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, extern void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
UCHAR modeno, int *htotal, int *vtotal, UCHAR rateindex); unsigned short ModeIdIndex);
extern void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
extern void SiS_DisableBridge(struct SiS_Private *);
extern BOOLEAN SiS_SetCRT2Group(struct SiS_Private *, unsigned short);
extern unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
extern void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
extern unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
extern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex, unsigned short RRTI);
extern BOOLEAN SiS_IsVAMode(struct SiS_Private *);
extern BOOLEAN SiS_IsDualEdge(struct SiS_Private *);
#ifdef SIS_XORG_XF86
/* From other modules: */
extern unsigned short SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode,
unsigned int VBFlags);
extern unsigned char SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, unsigned short offset,
unsigned char value);
extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id);
extern unsigned short SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode,
unsigned int VBFlags);
#endif #endif
/* init301.c: */ #ifdef SIS_LINUX_KERNEL
extern void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, #ifdef SIS300
PSIS_HW_INFO HwInfo, int chkcrt2mode); extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
extern void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg,
PSIS_HW_INFO HwInfo); unsigned int val);
extern void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); #endif
extern void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); #ifdef SIS315H
extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg,
extern void SiS_DisableBridge(SiS_Private *, PSIS_HW_INFO); unsigned char val);
extern BOOLEAN SiS_SetCRT2Group(SiS_Private *, PSIS_HW_INFO, USHORT); extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
extern USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, #endif
PSIS_HW_INFO HwInfo);
extern void SiS_WaitRetrace1(SiS_Private *SiS_Pr);
extern USHORT SiS_GetResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
extern USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
extern USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
extern BOOLEAN SiS_IsVAMode(SiS_Private *, PSIS_HW_INFO);
extern BOOLEAN SiS_IsDualEdge(SiS_Private *, PSIS_HW_INFO);
#ifdef LINUX_XF86
/* From other sis driver modules: */
extern int SiS_compute_vclk(int Clock, int *out_n, int *out_dn, int *out_div,
int *out_sbit, int *out_scale);
extern void SiSCalcClock(ScrnInfoPtr pScrn, int clock, int max_VLD, unsigned int *vclk);
extern UCHAR SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, USHORT offset, UCHAR value);
extern UCHAR SiS_GetSetModeID(ScrnInfoPtr pScrn, UCHAR id);
extern USHORT SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, ULONG VBFlags);
#endif #endif
#endif #endif
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* Data and prototypes for init301.c * Data and prototypes for init301.c
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,18 +50,18 @@ ...@@ -50,18 +50,18 @@
* *
*/ */
#ifndef _INIT301_ #ifndef _INIT301_H_
#define _INIT301_ #define _INIT301_H_
#include "osdef.h" #include "osdef.h"
#include "initdef.h" #include "initdef.h"
#ifdef LINUX_XF86 #ifdef SIS_XORG_XF86
#include "sis.h" #include "sis.h"
#include "sis_regs.h" #include "sis_regs.h"
#endif #endif
#ifdef LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
#include "vgatypes.h" #include "vgatypes.h"
#include "vstruct.h" #include "vstruct.h"
#ifdef SIS_CP #ifdef SIS_CP
...@@ -69,8 +69,13 @@ ...@@ -69,8 +69,13 @@
#endif #endif
#include <linux/config.h> #include <linux/config.h>
#include <linux/version.h> #include <linux/version.h>
#include <asm/io.h>
#include <linux/types.h> #include <linux/types.h>
#include <asm/io.h>
#include <linux/fb.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include <video/fbcon.h>
#endif
#include "sis.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include <linux/sisfb.h> #include <linux/sisfb.h>
#else #else
...@@ -78,7 +83,7 @@ ...@@ -78,7 +83,7 @@
#endif #endif
#endif #endif
static const UCHAR SiS_YPbPrTable[3][64] = { static const unsigned char SiS_YPbPrTable[3][64] = {
{ {
0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c, 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a, 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
...@@ -90,17 +95,17 @@ static const UCHAR SiS_YPbPrTable[3][64] = { ...@@ -90,17 +95,17 @@ static const UCHAR SiS_YPbPrTable[3][64] = {
0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
}, },
{ {
0x1d,0x11,0x06,0x09,0x0b,0x0c,0x0c,0x0c, 0x33,0x06,0x06,0x09,0x0b,0x0c,0x0c,0x0c,
0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a, 0x98,0x0a,0x01,0x0d,0x06,0x0d,0x04,0x0a,
0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4c /*0x4f*/,0x13, 0x0c,0x50,0xb2,0x9f,0x16,0x59,0x4f,0x13,
0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8, 0xad,0x11,0xad,0x1d,0x40,0x8a,0x3d,0xb8,
0x51,0x5e,0x60,0x57 /*0x49*/,0x7b /*0x7d*/,0x92,0x0f,0x40, 0x51,0x5e,0x60,0x49,0x7d,0x92,0x0f,0x40,
0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4b, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x4e,
0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00 0x43,0x41,0x11,0x00,0xfc,0xff,0x32,0x00
}, },
{ {
#if 1 #if 0 /* OK, but sticks to left edge */
0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c, 0x13,0x1d,0xe8,0x09,0x09,0xed,0x0c,0x0c,
0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a,
0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
...@@ -110,20 +115,42 @@ static const UCHAR SiS_YPbPrTable[3][64] = { ...@@ -110,20 +115,42 @@ static const UCHAR SiS_YPbPrTable[3][64] = {
0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x27,
0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00
#endif #endif
#if 0 #if 1 /* Perfect */
0x2a,0x14,0xe8,0x09,0x09,0xed,0x0c,0x0c, /* TEST (0.93) - BAD */ 0x23,0x2d,0xe8,0x09,0x09,0xed,0x0c,0x0c,
0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a, 0x98,0x0a,0x01,0x0c,0x06,0x0d,0x04,0x0a,
0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f, 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x3f,
0xed,0x50,0x70,0x9e,0x16,0x57,0x6c,0x13, 0xed,0x50,0x70,0x9f,0x16,0x59,0x60,0x13,
0x27,0x0b,0x27,0xfb,0x30,0x27,0x15,0xb0, 0x27,0x0b,0x27,0xfc,0x30,0x27,0x1c,0xb0,
0x3b,0xdb,0x61,0x24,0x78,0x92,0x0f,0xff, 0x4b,0x4b,0x6f,0x2f,0x63,0x92,0x0f,0x40,
0xff,0xff,0xff,0xff,0xff,0xff,0x14,0x6f, 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x73,
0x00,0x52,0xbb,0x00,0xd5,0xf7,0xa2,0x00 0x00,0x40,0x11,0x00,0xfc,0xff,0x32,0x00
#endif #endif
} }
}; };
static const UCHAR SiS_HiTVGroup3_1[] = { static const unsigned char SiS_TVPhase[] =
{
0x21,0xED,0xBA,0x08, /* 0x00 SiS_NTSCPhase */
0x2A,0x05,0xE3,0x00, /* 0x01 SiS_PALPhase */
0x21,0xE4,0x2E,0x9B, /* 0x02 SiS_PALMPhase */
0x21,0xF4,0x3E,0xBA, /* 0x03 SiS_PALNPhase */
0x1E,0x8B,0xA2,0xA7,
0x1E,0x83,0x0A,0xE0, /* 0x05 SiS_SpecialPhaseM */
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x21,0xF0,0x7B,0xD6, /* 0x08 SiS_NTSCPhase2 */
0x2A,0x09,0x86,0xE9, /* 0x09 SiS_PALPhase2 */
0x21,0xE6,0xEF,0xA4, /* 0x0a SiS_PALMPhase2 */
0x21,0xF6,0x94,0x46, /* 0x0b SiS_PALNPhase2 */
0x1E,0x8B,0xA2,0xA7,
0x1E,0x83,0x0A,0xE0, /* 0x0d SiS_SpecialPhaseM */
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x1e,0x8c,0x5c,0x7a, /* 0x10 SiS_SpecialPhase */
0x25,0xd4,0xfd,0x5e /* 0x11 SiS_SpecialPhaseJ */
};
static const unsigned char SiS_HiTVGroup3_1[] = {
0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13, 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x13,
0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6, 0xb1, 0x41, 0x62, 0x62, 0xff, 0xf4, 0x45, 0xa6,
0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
...@@ -134,7 +161,7 @@ static const UCHAR SiS_HiTVGroup3_1[] = { ...@@ -134,7 +161,7 @@ static const UCHAR SiS_HiTVGroup3_1[] = {
0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01 0x1a, 0x1f, 0x25, 0x2a, 0x4c, 0xaa, 0x01
}; };
static const UCHAR SiS_HiTVGroup3_2[] = { static const unsigned char SiS_HiTVGroup3_2[] = {
0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a, 0x00, 0x14, 0x15, 0x25, 0x55, 0x15, 0x0b, 0x7a,
0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6, 0x54, 0x41, 0xe7, 0xe7, 0xff, 0xf4, 0x45, 0xa6,
0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20, 0x25, 0x2f, 0x67, 0xf6, 0xbf, 0xff, 0x8e, 0x20,
...@@ -147,7 +174,7 @@ static const UCHAR SiS_HiTVGroup3_2[] = { ...@@ -147,7 +174,7 @@ static const UCHAR SiS_HiTVGroup3_2[] = {
/* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */ /* 301C / 302ELV extended Part2 TV registers (4 tap scaler) */
static const UCHAR SiS_Part2CLVX_1[] = { static const unsigned char SiS_Part2CLVX_1[] = {
0x00,0x00, 0x00,0x00,
0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E,
0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C,
...@@ -155,7 +182,7 @@ static const UCHAR SiS_Part2CLVX_1[] = { ...@@ -155,7 +182,7 @@ static const UCHAR SiS_Part2CLVX_1[] = {
0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E
}; };
static const UCHAR SiS_Part2CLVX_2[] = { static const unsigned char SiS_Part2CLVX_2[] = {
0x00,0x00, 0x00,0x00,
0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E, 0x00,0x20,0x00,0x00,0x7F,0x20,0x02,0x7F,0x7D,0x20,0x04,0x7F,0x7D,0x1F,0x06,0x7E,
0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C, 0x7C,0x1D,0x09,0x7E,0x7C,0x1B,0x0B,0x7E,0x7C,0x19,0x0E,0x7D,0x7C,0x17,0x11,0x7C,
...@@ -163,7 +190,7 @@ static const UCHAR SiS_Part2CLVX_2[] = { ...@@ -163,7 +190,7 @@ static const UCHAR SiS_Part2CLVX_2[] = {
0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E 0x7E,0x09,0x1D,0x7C,0x7F,0x06,0x1F,0x7C,0x7F,0x04,0x20,0x7D,0x00,0x02,0x20,0x7E
}; };
static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ static const unsigned char SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */
0xE0,0x01, 0xE0,0x01,
0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D,0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D, 0x04,0x1A,0x04,0x7E,0x03,0x1A,0x06,0x7D,0x01,0x1A,0x08,0x7D,0x00,0x19,0x0A,0x7D,
0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C,0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C, 0x7F,0x19,0x0C,0x7C,0x7E,0x18,0x0E,0x7C,0x7E,0x17,0x10,0x7B,0x7D,0x15,0x12,0x7C,
...@@ -182,7 +209,7 @@ static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */ ...@@ -182,7 +209,7 @@ static const UCHAR SiS_Part2CLVX_3[] = { /* NTSC, 525i, 525p */
0xFF,0xFF 0xFF,0xFF
}; };
static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */ static const unsigned char SiS_Part2CLVX_4[] = { /* PAL */
0x58,0x02, 0x58,0x02,
0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D,
0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D,
...@@ -201,7 +228,7 @@ static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */ ...@@ -201,7 +228,7 @@ static const UCHAR SiS_Part2CLVX_4[] = { /* PAL */
0xFF,0xFF 0xFF,0xFF
}; };
static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */ static const unsigned char SiS_Part2CLVX_5[] = { /* 750p */
0x00,0x03, 0x00,0x03,
0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D, 0x05,0x19,0x05,0x7D,0x03,0x19,0x06,0x7E,0x02,0x19,0x08,0x7D,0x01,0x18,0x0A,0x7D,
0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D, 0x00,0x18,0x0C,0x7C,0x7F,0x17,0x0E,0x7C,0x7E,0x16,0x0F,0x7D,0x7E,0x14,0x11,0x7D,
...@@ -210,7 +237,7 @@ static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */ ...@@ -210,7 +237,7 @@ static const UCHAR SiS_Part2CLVX_5[] = { /* 750p */
0xFF,0xFF 0xFF,0xFF
}; };
static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */ static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */
0x00,0x04, 0x00,0x04,
0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D, 0x04,0x1A,0x04,0x7E,0x02,0x1B,0x05,0x7E,0x01,0x1A,0x07,0x7E,0x00,0x1A,0x09,0x7D,
0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C, 0x7F,0x19,0x0B,0x7D,0x7E,0x18,0x0D,0x7D,0x7D,0x17,0x10,0x7C,0x7D,0x15,0x12,0x7C,
...@@ -221,7 +248,7 @@ static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */ ...@@ -221,7 +248,7 @@ static const UCHAR SiS_Part2CLVX_6[] = { /* 1080i */
#ifdef SIS315H #ifdef SIS315H
/* 661 et al LCD data structure (2.03.00) */ /* 661 et al LCD data structure (2.03.00) */
static const UCHAR SiS_LCDStruct661[] = { static const unsigned char SiS_LCDStruct661[] = {
/* 1024x768 */ /* 1024x768 */
/* type|CR37| HDE | VDE | HT | VT | hss | hse */ /* type|CR37| HDE | VDE | HT | VT | hss | hse */
0x02,0xC0,0x00,0x04,0x00,0x03,0x40,0x05,0x26,0x03,0x10,0x00,0x88, 0x02,0xC0,0x00,0x04,0x00,0x03,0x40,0x05,0x26,0x03,0x10,0x00,0x88,
...@@ -249,11 +276,20 @@ static const UCHAR SiS_LCDStruct661[] = { ...@@ -249,11 +276,20 @@ static const UCHAR SiS_LCDStruct661[] = {
/* 1680x1050 */ /* 1680x1050 */
0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C, 0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C,
0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06, 0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06,
/* 1280x800_3 */
0x0C,0xE0,0x00,0x05,0x20,0x03,0xAA,0x05,0x2E,0x03,0x30,0x00,0x50,
0x00,0x04,0x00,0x03,0x00,0x47,0xA9,0x10,0x00,0x00,0x00,0x00,0x07,
/* 800x600 */
0x01,0xC0,0x20,0x03,0x58,0x02,0x20,0x04,0x74,0x02,0x2A,0x00,0x80,
0x00,0x06,0x00,0x04,0x00,0x28,0x63,0x4B,0x00,0x00,0x00,0x00,0x00,
/* 1280x854 */
0x08,0xE0,0x00,0x05,0x56,0x03,0x80,0x06,0x5d,0x03,0x10,0x00,0x70,
0x00,0x01,0x00,0x03,0x00,0x54,0x75,0x13,0x00,0x00,0x00,0x00,0x08
}; };
#endif #endif
#ifdef SIS300 #ifdef SIS300
static UCHAR SiS300_TrumpionData[7][80] = { static unsigned char SiS300_TrumpionData[14][80] = {
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23, 0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23,
0x00,0x00,0x03,0x28,0x03,0x10,0x05,0x08,0x40,0x10,0x00,0x10,0x04,0x23,0x00,0x23, 0x00,0x00,0x03,0x28,0x03,0x10,0x05,0x08,0x40,0x10,0x00,0x10,0x04,0x23,0x00,0x23,
...@@ -288,119 +324,182 @@ static UCHAR SiS300_TrumpionData[7][80] = { ...@@ -288,119 +324,182 @@ static UCHAR SiS300_TrumpionData[7][80] = {
0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23, 0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23, 0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01, 0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01,
0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 } 0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 },
/* variant 2 */
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x15,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x18,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x44,0x03,0x28,0x06,0x08,0x40,0x18,0x00,0x18,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xA6,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x13,0x04,0x04,0x05,
0x04,0x0C,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x15,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x18,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x44,0x03,0x28,0x06,0x08,0x40,0x18,0x00,0x18,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xA6,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x13,0x04,0x04,0x05,
0x04,0x0C,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x8A,0x00,0xD8,0x02,
0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23,
0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05,
0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x72,0x00,0xD8,0x02,
0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23,
0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05,
0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x02,0x00,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x16,0x00,0xE0,0x01,0x0D,0x02,0x60,0x0C,0x30,0x98,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x45,0x03,0x48,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xF4,0x01,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x05,0x01,0x00,0x05,0x05,
0x04,0x0C,0x08,0x05,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x02,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0xBF,0x00,0x20,0x03,
0x20,0x04,0x0D,0x00,0x58,0x02,0x71,0x02,0x80,0x0C,0x30,0x9A,0x00,0xFA,0x03,0x1D,
0x00,0x01,0x03,0x22,0x03,0x28,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x1D,0x00,0x1D,
0x03,0x11,0x60,0x39,0x03,0x40,0x05,0xF4,0x18,0x07,0x02,0x06,0x04,0x01,0x06,0x0B,
0x02,0x0A,0x20,0x19,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0xEF,0x00,0x00,0x04,
0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01,
0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 }
}; };
#endif #endif
void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
void SiS_EnableCRT2(SiS_Private *SiS_Pr); #ifndef SIS_LINUX_KERNEL
USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); void SiS_LockCRT2(struct SiS_Private *SiS_Pr);
void SiS_WaitRetrace1(SiS_Private *SiS_Pr); #endif
BOOLEAN SiS_IsDualEdge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
BOOLEAN SiS_IsVAMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo); void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, BOOLEAN SiS_IsDualEdge(struct SiS_Private *SiS_Pr);
USHORT ModeIdIndex, PSIS_HW_INFO HwInfo, BOOLEAN SiS_IsVAMode(struct SiS_Private *SiS_Pr);
int checkcrt2mode); void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); unsigned short ModeIdIndex, int checkcrt2mode);
void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo); void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, unsigned short ModeIdIndex);
USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo); void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
USHORT SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex); unsigned short ModeIdIndex);
void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
BOOLEAN SiS_SetCRT2Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo); unsigned short RefreshRateTableIndex);
void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex);
void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
#ifndef SIS_LINUX_KERNEL
void SiS_EnableBridge(struct SiS_Private *SiS_Pr);
#endif
BOOLEAN SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax); void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax); unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax); void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax); unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax);
void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh); #ifndef SIS_LINUX_KERNEL
void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
unsigned short SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempax);
#endif
void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
unsigned char orval,unsigned short andval);
#ifdef SIS315H #ifdef SIS315H
static void SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr);
static void SiS_Chrontel701xOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr);
static void SiS_ChrontelInitTVVSync(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr);
static void SiS_ChrontelDoSomething1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); static void SiS_ChrontelDoSomething1(struct SiS_Private *SiS_Pr);
void SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);
void SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr); void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
#endif /* 315 */ #endif /* 315 */
#ifdef SIS300 #ifdef SIS300
#if 0 static BOOLEAN SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr);
static void SiS_SetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx); void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
static USHORT SiS_GetTrumpReg(SiS_Private *SiS_Pr, USHORT tempbx);
#endif
static BOOLEAN SiS_SetTrumpionBlock(SiS_Private *SiS_Pr, UCHAR *dataptr);
#endif #endif
void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime); void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr); unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr);
USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine,
USHORT adaptnum, USHORT DDCdatatype, UCHAR *buffer); unsigned short adaptnum, unsigned short DDCdatatype,
#ifdef LINUX_XF86 unsigned char *buffer, unsigned int VBFlags2);
USHORT SiS_SenseLCDDDC(SiS_Private *SiS_Pr, SISPtr pSiS);
USHORT SiS_SenseVGA2DDC(SiS_Private *SiS_Pr, SISPtr pSiS);
#endif
static void SiS_SetSwitchDDC2(SiS_Private *SiS_Pr); #ifdef SIS_XORG_XF86
static USHORT SiS_SetStart(SiS_Private *SiS_Pr); unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
static USHORT SiS_SetStop(SiS_Private *SiS_Pr); int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
static USHORT SiS_SetSCLKLow(SiS_Private *SiS_Pr); BOOLEAN checkcr32, unsigned int VBFlags2);
static USHORT SiS_SetSCLKHigh(SiS_Private *SiS_Pr); unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
static USHORT SiS_ReadDDC2Data(SiS_Private *SiS_Pr, USHORT tempax); unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
static USHORT SiS_WriteDDC2Data(SiS_Private *SiS_Pr, USHORT tempax); unsigned char *buffer);
static USHORT SiS_CheckACK(SiS_Private *SiS_Pr); #else
static USHORT SiS_InitDDCRegs(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
USHORT adaptnum, USHORT DDCdatatype, BOOLEAN checkcr32); int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
static USHORT SiS_WriteDABDDC(SiS_Private *SiS_Pr); BOOLEAN checkcr32, unsigned int VBFlags2);
static USHORT SiS_PrepareReadDDC(SiS_Private *SiS_Pr); static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
static USHORT SiS_PrepareDDC(SiS_Private *SiS_Pr); static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
static void SiS_SendACK(SiS_Private *SiS_Pr, USHORT yesno); unsigned char *buffer);
static USHORT SiS_DoProbeDDC(SiS_Private *SiS_Pr); #endif
static USHORT SiS_ProbeDDC(SiS_Private *SiS_Pr); static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr);
static USHORT SiS_ReadDDC(SiS_Private *SiS_Pr, USHORT DDCdatatype, UCHAR *buffer); static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr);
static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr);
static unsigned short SiS_SetSCLKLow(struct SiS_Private *SiS_Pr);
static unsigned short SiS_SetSCLKHigh(struct SiS_Private *SiS_Pr);
static unsigned short SiS_ReadDDC2Data(struct SiS_Private *SiS_Pr);
static unsigned short SiS_WriteDDC2Data(struct SiS_Private *SiS_Pr, unsigned short tempax);
static unsigned short SiS_CheckACK(struct SiS_Private *SiS_Pr);
static unsigned short SiS_WriteDABDDC(struct SiS_Private *SiS_Pr);
static unsigned short SiS_PrepareReadDDC(struct SiS_Private *SiS_Pr);
static unsigned short SiS_PrepareDDC(struct SiS_Private *SiS_Pr);
static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno);
static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr);
#ifdef SIS300
static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr,
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex);
static void SetOEMLCDData2(struct SiS_Private *SiS_Pr,
unsigned short ModeNo, unsigned short ModeIdIndex,unsigned short RefTableIndex);
#endif
#ifdef SIS315H #ifdef SIS315H
static void SiS_OEM310Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, static void SiS_OEM310Setting(struct SiS_Private *SiS_Pr,
USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI); unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI);
static void SiS_OEM661Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, static void SiS_OEM661Setting(struct SiS_Private *SiS_Pr,
USHORT ModeNo,USHORT ModeIdIndex, USHORT RRTI); unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI);
static void SiS_FinalizeLCD(SiS_Private *, USHORT, USHORT, PSIS_HW_INFO); static void SiS_FinalizeLCD(struct SiS_Private *, unsigned short, unsigned short);
#endif #endif
extern void SiS_SetReg(SISIOADDRESS, unsigned short, unsigned short);
extern void SiS_SetRegByte(SISIOADDRESS, unsigned short);
extern void SiS_SetRegShort(SISIOADDRESS, unsigned short);
extern void SiS_SetRegLong(SISIOADDRESS, unsigned int);
extern unsigned char SiS_GetReg(SISIOADDRESS, unsigned short);
extern unsigned char SiS_GetRegByte(SISIOADDRESS);
extern unsigned short SiS_GetRegShort(SISIOADDRESS);
extern unsigned int SiS_GetRegLong(SISIOADDRESS);
extern void SiS_SetRegANDOR(SISIOADDRESS, unsigned short, unsigned short, unsigned short);
extern void SiS_SetRegOR(SISIOADDRESS, unsigned short, unsigned short);
extern void SiS_SetRegAND(SISIOADDRESS, unsigned short, unsigned short);
extern void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
extern void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
extern BOOLEAN SiS_SearchModeID(struct SiS_Private *, unsigned short *, unsigned short *);
extern unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
extern unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
extern unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
extern unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex);
extern void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
unsigned short ModeIdIndex);
extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
#ifdef SIS300 #ifdef SIS300
static void SiS_OEM300Setting(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx,
USHORT ModeNo, USHORT ModeIdIndex, USHORT RefTabindex); unsigned short *tempcl);
static void SetOEMLCDData2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
USHORT ModeNo, USHORT ModeIdIndex,USHORT RefTableIndex); extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
#ifdef SIS_LINUX_KERNEL
extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
#endif #endif
extern void SiS_SetReg(SISIOADDRESS, USHORT, USHORT);
extern void SiS_SetRegByte(SISIOADDRESS, USHORT);
extern void SiS_SetRegShort(SISIOADDRESS, USHORT);
extern void SiS_SetRegLong(SISIOADDRESS, ULONG);
extern UCHAR SiS_GetReg(SISIOADDRESS, USHORT);
extern UCHAR SiS_GetRegByte(SISIOADDRESS);
extern USHORT SiS_GetRegShort(SISIOADDRESS);
extern ULONG SiS_GetRegLong(SISIOADDRESS);
extern void SiS_SetRegANDOR(SISIOADDRESS, USHORT, USHORT, USHORT);
extern void SiS_SetRegOR(SISIOADDRESS, USHORT, USHORT);
extern void SiS_SetRegAND(SISIOADDRESS, USHORT, USHORT);
extern void SiS_DisplayOff(SiS_Private *SiS_Pr);
extern void SiS_DisplayOn(SiS_Private *SiS_Pr);
extern BOOLEAN SiS_SearchModeID(SiS_Private *, USHORT *, USHORT *);
extern UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
extern USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
extern USHORT SiS_GetOffset(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
extern void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO, USHORT ModeNo,
USHORT ModeIdIndex);
extern void SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
#ifdef LINUX_XF86
extern void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
extern int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct,
int *maxx, int *maxy, int *prefx, int *prefy);
#endif #endif
#endif #endif
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* Global definitions for init.c and init301.c * Global definitions for init.c and init301.c
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -53,19 +53,20 @@ ...@@ -53,19 +53,20 @@
#ifndef _INITDEF_ #ifndef _INITDEF_
#define _INITDEF_ #define _INITDEF_
#define IS_SIS330 (HwInfo->jChipType == SIS_330) #define IS_SIS330 (SiS_Pr->ChipType == SIS_330)
#define IS_SIS550 (HwInfo->jChipType == SIS_550) #define IS_SIS550 (SiS_Pr->ChipType == SIS_550)
#define IS_SIS650 (HwInfo->jChipType == SIS_650) /* All versions, incl 651, M65x */ #define IS_SIS650 (SiS_Pr->ChipType == SIS_650) /* All versions, incl 651, M65x */
#define IS_SIS740 (HwInfo->jChipType == SIS_740) #define IS_SIS740 (SiS_Pr->ChipType == SIS_740)
#define IS_SIS651 (SiS_Pr->SiS_SysFlags & (SF_Is651 | SF_Is652)) #define IS_SIS651 (SiS_Pr->SiS_SysFlags & (SF_Is651 | SF_Is652))
#define IS_SISM650 (SiS_Pr->SiS_SysFlags & (SF_IsM650 | SF_IsM652 | SF_IsM653)) #define IS_SISM650 (SiS_Pr->SiS_SysFlags & (SF_IsM650 | SF_IsM652 | SF_IsM653))
#define IS_SIS65x (IS_SIS651 || IS_SISM650) /* Only special versions of 65x */ #define IS_SIS65x (IS_SIS651 || IS_SISM650) /* Only special versions of 65x */
#define IS_SIS661 (HwInfo->jChipType == SIS_661) #define IS_SIS661 (SiS_Pr->ChipType == SIS_661)
#define IS_SIS741 (HwInfo->jChipType == SIS_741) #define IS_SIS741 (SiS_Pr->ChipType == SIS_741)
#define IS_SIS660 (HwInfo->jChipType == SIS_660) #define IS_SIS660 (SiS_Pr->ChipType == SIS_660)
#define IS_SIS760 (HwInfo->jChipType == SIS_760) #define IS_SIS760 (SiS_Pr->ChipType == SIS_760)
#define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || IS_SIS760) #define IS_SIS761 (SiS_Pr->ChipType == SIS_761)
#define IS_SIS650740 ((HwInfo->jChipType >= SIS_650) && (HwInfo->jChipType < SIS_330)) #define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || IS_SIS760 || IS_SIS761)
#define IS_SIS650740 ((SiS_Pr->ChipType >= SIS_650) && (SiS_Pr->ChipType < SIS_330))
#define IS_SIS550650740 (IS_SIS550 || IS_SIS650740) #define IS_SIS550650740 (IS_SIS550 || IS_SIS650740)
#define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760) #define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760)
#define IS_SIS550650740660 (IS_SIS550 || IS_SIS650740660) #define IS_SIS550650740660 (IS_SIS550 || IS_SIS650740660)
...@@ -80,17 +81,30 @@ ...@@ -80,17 +81,30 @@
#define VB_SIS302LV 0x0010 #define VB_SIS302LV 0x0010
#define VB_SIS302ELV 0x0020 #define VB_SIS302ELV 0x0020
#define VB_SIS301C 0x0040 #define VB_SIS301C 0x0040
#define VB_SIS307T 0x0080
#define VB_SIS307LV 0x0100
#define VB_UMC 0x4000 #define VB_UMC 0x4000
#define VB_NoLCD 0x8000 #define VB_NoLCD 0x8000
#define VB_SIS301BLV302BLV (VB_SIS301B|VB_SIS301C|VB_SIS302B|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV) #define VB_SIS30xB (VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T)
#define VB_SIS301B302B (VB_SIS301B|VB_SIS301C|VB_SIS302B) #define VB_SIS30xC (VB_SIS301C | VB_SIS307T)
#define VB_SIS301LV302LV (VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV) #define VB_SISTMDS (VB_SIS301 | VB_SIS301B | VB_SIS301C | VB_SIS302B | VB_SIS307T)
#define VB_SISVB (VB_SIS301 | VB_SIS301BLV302BLV) #define VB_SISLVDS (VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISTMDS (VB_SIS301 | VB_SIS301B302B) #define VB_SIS30xBLV (VB_SIS30xB | VB_SISLVDS)
#define VB_SISLVDS VB_SIS301LV302LV #define VB_SIS30xCLV (VB_SIS30xC | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISLCDA (VB_SIS302B|VB_SIS301C|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV) #define VB_SISVB (VB_SIS301 | VB_SIS30xBLV)
#define VB_SISYPBPR (VB_SIS301C|VB_SIS301LV|VB_SIS302LV|VB_SIS302ELV) #define VB_SISLCDA (VB_SIS302B | VB_SIS301C | VB_SIS307T | VB_SISLVDS)
#define VB_SISHIVISION (VB_SIS301|VB_SIS301B|VB_SIS302B) #define VB_SISTMDSLCDA (VB_SIS301C | VB_SIS307T)
#define VB_SISPART4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISHIVISION (VB_SIS301 | VB_SIS301B | VB_SIS302B)
#define VB_SISYPBPR (VB_SIS301C | VB_SIS307T | VB_SIS301LV | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISTAP4SCALER (VB_SIS301C | VB_SIS307T | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISPART4OVERFLOW (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISPWD (VB_SIS301C | VB_SIS307T | VB_SISLVDS)
#define VB_SISEMI (VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISPOWER (VB_SIS301C | VB_SIS307T | VB_SIS302LV | VB_SIS302ELV | VB_SIS307LV)
#define VB_SISDUALLINK (VB_SIS302LV | VB_SIS302ELV | VB_SIS307T | VB_SIS307LV)
#define VB_SISVGA2 VB_SISTMDS
#define VB_SISRAMDAC202 (VB_SIS301C | VB_SIS307T)
/* VBInfo */ /* VBInfo */
#define SetSimuScanMode 0x0001 /* CR 30 */ #define SetSimuScanMode 0x0001 /* CR 30 */
...@@ -160,6 +174,7 @@ ...@@ -160,6 +174,7 @@
#define SupportRAMDAC2_202 0x0400 /* C (<= 202Mhz) */ #define SupportRAMDAC2_202 0x0400 /* C (<= 202Mhz) */
#define InterlaceMode 0x0080 #define InterlaceMode 0x0080
#define SyncPP 0x0000 #define SyncPP 0x0000
#define HaveWideTiming 0x2000 /* Have specific wide- and non-wide timing */
#define SyncPN 0x4000 #define SyncPN 0x4000
#define SyncNP 0x8000 #define SyncNP 0x8000
#define SyncNN 0xc000 #define SyncNN 0xc000
...@@ -188,6 +203,7 @@ ...@@ -188,6 +203,7 @@
#define TVSetTVSimuMode 0x0200 /* new 0x200, prev. 0x800 */ #define TVSetTVSimuMode 0x0200 /* new 0x200, prev. 0x800 */
#define TVRPLLDIV2XO 0x0400 /* prev 0x1000 */ #define TVRPLLDIV2XO 0x0400 /* prev 0x1000 */
#define TVSetNTSC1024 0x0800 /* new 0x100, prev. 0x2000 */ #define TVSetNTSC1024 0x0800 /* new 0x100, prev. 0x2000 */
#define TVSet525p1024 0x1000 /* TW */
#define TVAspect43 0x2000 #define TVAspect43 0x2000
#define TVAspect169 0x4000 #define TVAspect169 0x4000
#define TVAspect43LB 0x8000 #define TVAspect43LB 0x8000
...@@ -208,7 +224,8 @@ ...@@ -208,7 +224,8 @@
#define SF_IsM661 0x0020 #define SF_IsM661 0x0020
#define SF_IsM741 0x0040 #define SF_IsM741 0x0040
#define SF_IsM760 0x0080 #define SF_IsM760 0x0080
#define SF_760LFB 0x8000 /* 760: We have LFB */ #define SF_760UMA 0x4000 /* 76x: We have UMA */
#define SF_760LFB 0x8000 /* 76x: We have LFB */
/* CR32 (Newer 630, and 315 series) /* CR32 (Newer 630, and 315 series)
...@@ -228,7 +245,6 @@ ...@@ -228,7 +245,6 @@
#define TVOverScanShift 4 #define TVOverScanShift 4
/* CR35 (661 series only) /* CR35 (661 series only)
[0] 1 = PAL, 0 = NTSC [0] 1 = PAL, 0 = NTSC
[1] 1 = NTSC-J (if D0 = 0) [1] 1 = NTSC-J (if D0 = 0)
[2] 1 = PALM (if D0 = 1) [2] 1 = PALM (if D0 = 1)
...@@ -239,14 +255,9 @@ ...@@ -239,14 +255,9 @@
001 525p 001 525p
010 750p 010 750p
011 1080i (or HiVision on 301, 301B) 011 1080i (or HiVision on 301, 301B)
These bits are being translated to TVMode flag.
*/ */
/* /* CR37
CR37
[0] Set 24/18 bit (0/1) RGB to LVDS/TMDS transmitter (set by BIOS) [0] Set 24/18 bit (0/1) RGB to LVDS/TMDS transmitter (set by BIOS)
[3:1] External chip [3:1] External chip
300 series: 300 series:
...@@ -260,7 +271,7 @@ ...@@ -260,7 +271,7 @@
010 LVDS 010 LVDS
011 LVDS + Chrontel 7019 011 LVDS + Chrontel 7019
660 series [2:1] only: 660 series [2:1] only:
reserved (now in CR38) reserved (chip type now in CR38)
All other combinations reserved All other combinations reserved
[3] 661 only: Pass 1:1 data [3] 661 only: Pass 1:1 data
[4] LVDS: 0: Panel Link expands / 1: Panel Link does not expand [4] LVDS: 0: Panel Link expands / 1: Panel Link does not expand
...@@ -320,6 +331,7 @@ ...@@ -320,6 +331,7 @@
#define Enable302LV_DualLink 0x04 /* 302LV only; enable dual link */ #define Enable302LV_DualLink 0x04 /* 302LV only; enable dual link */
/* CR39 (661 and later) /* CR39 (661 and later)
D[7] LVDS (SiS or third party)
D[1:0] YPbPr Aspect Ratio D[1:0] YPbPr Aspect Ratio
00 4:3 letterbox 00 4:3 letterbox
01 4:3 01 4:3
...@@ -350,6 +362,26 @@ ...@@ -350,6 +362,26 @@
[7] TV UnderScan/OverScan (set by BIOS) [7] TV UnderScan/OverScan (set by BIOS)
*/ */
/* CR7C - 661 and later
[7] DualEdge enabled (or: to be enabled)
[6] CRT2 = TV/LCD/VGA enabled (or: to be enabled)
[5] Init done (set at end of SiS_Init)
{4] LVDS LCD capabilities
[3] LVDS LCD capabilities
[2] LVDS LCD capabilities (PWD)
[1] LVDS LCD capabilities (PWD)
[0] LVDS=1, TMDS=0 (SiS or third party)
*/
/* CR7E - 661 and later
VBType:
[7] LVDS (third party)
[3] 301C
[2] 302LV
[1] 301LV
[0] 301B
*/
/* LCDResInfo */ /* LCDResInfo */
#define Panel300_800x600 0x01 /* CR36 */ #define Panel300_800x600 0x01 /* CR36 */
#define Panel300_1024x768 0x02 #define Panel300_1024x768 0x02
...@@ -359,7 +391,6 @@ ...@@ -359,7 +391,6 @@
#define Panel300_1024x600 0x06 #define Panel300_1024x600 0x06
#define Panel300_1152x768 0x07 #define Panel300_1152x768 0x07
#define Panel300_1280x768 0x0a #define Panel300_1280x768 0x0a
#define Panel300_320x480 0x0e /* fstn - This is fake, can be any */
#define Panel300_Custom 0x0f #define Panel300_Custom 0x0f
#define Panel300_Barco1366 0x10 #define Panel300_Barco1366 0x10
...@@ -374,9 +405,9 @@ ...@@ -374,9 +405,9 @@
#define Panel310_1400x1050 0x09 #define Panel310_1400x1050 0x09
#define Panel310_1280x768 0x0a #define Panel310_1280x768 0x0a
#define Panel310_1600x1200 0x0b #define Panel310_1600x1200 0x0b
#define Panel310_640x480_2 0x0c #define Panel310_320x240_2 0x0c /* xSTN */
#define Panel310_640x480_3 0x0d #define Panel310_320x240_3 0x0d /* xSTN */
#define Panel310_320x480 0x0e /* fstn - TW: This is fake, can be any */ #define Panel310_320x240_1 0x0e /* xSTN - This is fake, can be any */
#define Panel310_Custom 0x0f #define Panel310_Custom 0x0f
#define Panel661_800x600 0x01 #define Panel661_800x600 0x01
...@@ -386,7 +417,7 @@ ...@@ -386,7 +417,7 @@
#define Panel661_1024x600 0x05 #define Panel661_1024x600 0x05
#define Panel661_1152x864 0x06 #define Panel661_1152x864 0x06
#define Panel661_1280x960 0x07 #define Panel661_1280x960 0x07
#define Panel661_1152x768 0x08 #define Panel661_1280x854 0x08
#define Panel661_1400x1050 0x09 #define Panel661_1400x1050 0x09
#define Panel661_1280x768 0x0a #define Panel661_1280x768 0x0a
#define Panel661_1600x1200 0x0b #define Panel661_1600x1200 0x0b
...@@ -410,14 +441,16 @@ ...@@ -410,14 +441,16 @@
#define Panel_1680x1050 0x0d /* 661etc */ #define Panel_1680x1050 0x0d /* 661etc */
#define Panel_1280x720 0x0e /* 661etc */ #define Panel_1280x720 0x0e /* 661etc */
#define Panel_Custom 0x0f /* MUST BE 0x0f (for DVI DDC detection) */ #define Panel_Custom 0x0f /* MUST BE 0x0f (for DVI DDC detection) */
#define Panel_320x480 0x10 /* SiS 550 fstn - TW: This is fake, can be any */ #define Panel_320x240_1 0x10 /* SiS 550 xSTN */
#define Panel_Barco1366 0x11 #define Panel_Barco1366 0x11
#define Panel_848x480 0x12 #define Panel_848x480 0x12
#define Panel_640x480_2 0x13 /* SiS 550 */ #define Panel_320x240_2 0x13 /* SiS 550 xSTN */
#define Panel_640x480_3 0x14 /* SiS 550 */ #define Panel_320x240_3 0x14 /* SiS 550 xSTN */
#define Panel_1280x768_2 0x15 /* 30xLV */ #define Panel_1280x768_2 0x15 /* 30xLV */
#define Panel_1280x768_3 0x16 /* (unused) */ #define Panel_1280x768_3 0x16 /* (unused) */
#define Panel_1280x800_2 0x17 /* 30xLV */ #define Panel_1280x800_2 0x17 /* 30xLV */
#define Panel_856x480 0x18
#define Panel_1280x854 0x19 /* 661etc */
/* Index in ModeResInfo table */ /* Index in ModeResInfo table */
#define SIS_RI_320x200 0 #define SIS_RI_320x200 0
...@@ -454,6 +487,7 @@ ...@@ -454,6 +487,7 @@
#define SIS_RI_1920x1080 31 #define SIS_RI_1920x1080 31
#define SIS_RI_960x540 32 #define SIS_RI_960x540 32
#define SIS_RI_960x600 33 #define SIS_RI_960x600 33
#define SIS_RI_1280x854 34
/* CR5F */ /* CR5F */
#define IsM650 0x80 #define IsM650 0x80
...@@ -482,16 +516,18 @@ ...@@ -482,16 +516,18 @@
#define VCLK100_300 0x43 /* Index in VCLKData table (300) */ #define VCLK100_300 0x43 /* Index in VCLKData table (300) */
#define VCLK34_300 0x3d /* Index in VCLKData table (300) */ #define VCLK34_300 0x3d /* Index in VCLKData table (300) */
#define VCLK_CUSTOM_300 0x47 #define VCLK_CUSTOM_300 0x47
#define VCLK65_315 0x0b /* Index in (VB)VCLKData table (315) */
#define VCLK108_2_315 0x19 /* Index in (VB)VCLKData table (315) */ #define VCLK65_315 0x0b /* Indices in (VB)VCLKData table (315) */
#define VCLK81_315 0x5b /* Index in (VB)VCLKData table (315) */ #define VCLK108_2_315 0x19
#define VCLK162_315 0x5e /* Index in (VB)VCLKData table (315) */ #define VCLK81_315 0x5b
#define VCLK108_3_315 0x45 /* Index in VBVCLKData table (315) */ #define VCLK162_315 0x5e
#define VCLK100_315 0x46 /* Index in VBVCLKData table (315) */ #define VCLK108_3_315 0x45
#define VCLK100_315 0x46
#define VCLK34_315 0x55 #define VCLK34_315 0x55
#define VCLK68_315 0x0d #define VCLK68_315 0x0d
#define VCLK_1280x800_315_2 0x5c /* Index in VBVCLKData table (315) */ #define VCLK_1280x800_315_2 0x5c
#define VCLK121_315 0x5d /* Index in VBVCLKData table (315) */ #define VCLK121_315 0x5d
#define VCLK130_315 0x72
#define VCLK_1280x720 0x5f #define VCLK_1280x720 0x5f
#define VCLK_1280x768_2 0x60 #define VCLK_1280x768_2 0x60
#define VCLK_1280x768_3 0x61 /* (unused?) */ #define VCLK_1280x768_3 0x61 /* (unused?) */
...@@ -507,6 +543,7 @@ ...@@ -507,6 +543,7 @@
#define VCLK_1152x864 0x64 #define VCLK_1152x864 0x64
#define VCLK_1360x768 0x58 #define VCLK_1360x768 0x58
#define VCLK_1280x800_315 0x6c #define VCLK_1280x800_315 0x6c
#define VCLK_1280x854 0x76
#define TVCLKBASE_300 0x21 /* Indices on TV clocks in VCLKData table (300) */ #define TVCLKBASE_300 0x21 /* Indices on TV clocks in VCLKData table (300) */
#define TVCLKBASE_315 0x3a /* Indices on TV clocks in (VB)VCLKData table (315) */ #define TVCLKBASE_315 0x3a /* Indices on TV clocks in (VB)VCLKData table (315) */
......
/*
* SiS 300/540/630[S]/730[S]
* SiS 315[E|PRO]/550/[M]65x/[M]66x[F|M|G]X/[M]74x[GX]/330/[M]76x[GX]
* XGI V3XT/V5/V8, Z7
* frame buffer driver for Linux kernels >= 2.4.14 and >=2.6.3
*
* Linux kernel specific extensions to init.c/init301.c
*
* Copyright (C) 2001-2005 Thomas Winischhofer, Vienna, Austria.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the named License,
* or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
*
* Author: Thomas Winischhofer <thomas@winischhofer.net>
*/
#include "osdef.h"
#include "initdef.h"
#include "vgatypes.h"
#include "vstruct.h"
#include <linux/config.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/fb.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr,
unsigned char modeno, unsigned char rateindex);
int sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
unsigned char rateindex, struct fb_var_screeninfo *var);
#endif
BOOLEAN sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno,
int *htotal, int *vtotal, unsigned char rateindex);
extern BOOLEAN SiSInitPtr(struct SiS_Private *SiS_Pr);
extern BOOLEAN SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
unsigned short *ModeIdIndex);
extern void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
int xres, int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
int
sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, unsigned char modeno,
unsigned char rateindex)
{
unsigned short ModeNo = modeno;
unsigned short ModeIdIndex = 0, ClockIndex = 0;
unsigned short RRTI = 0;
int Clock;
if(!SiSInitPtr(SiS_Pr)) return 65000;
if(rateindex > 0) rateindex--;
#ifdef SIS315H
switch(ModeNo) {
case 0x5a: ModeNo = 0x50; break;
case 0x5b: ModeNo = 0x56;
}
#endif
if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) {;
printk(KERN_ERR "Could not find mode %x\n", ModeNo);
return 65000;
}
RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & HaveWideTiming) {
if(SiS_Pr->SiS_UseWide == 1) {
/* Wide screen: Ignore rateindex */
ClockIndex = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRTVCLK_WIDE;
} else {
RRTI += rateindex;
ClockIndex = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRTVCLK_NORM;
}
} else {
RRTI += rateindex;
ClockIndex = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRTVCLK;
}
Clock = SiS_Pr->SiS_VCLKData[ClockIndex].CLOCK * 1000;
return Clock;
}
int
sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
unsigned char rateindex, struct fb_var_screeninfo *var)
{
unsigned short ModeNo = modeno;
unsigned short ModeIdIndex = 0, index = 0, RRTI = 0;
int j;
if(!SiSInitPtr(SiS_Pr)) return 0;
if(rateindex > 0) rateindex--;
#ifdef SIS315H
switch(ModeNo) {
case 0x5a: ModeNo = 0x50; break;
case 0x5b: ModeNo = 0x56;
}
#endif
if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return 0;
RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & HaveWideTiming) {
if(SiS_Pr->SiS_UseWide == 1) {
/* Wide screen: Ignore rateindex */
index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT1CRTC_WIDE;
} else {
RRTI += rateindex;
index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT1CRTC_NORM;
}
} else {
RRTI += rateindex;
index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT1CRTC;
}
SiS_Generic_ConvertCRData(SiS_Pr,
(unsigned char *)&SiS_Pr->SiS_CRT1Table[index].CR[0],
SiS_Pr->SiS_RefIndex[RRTI].XRes,
SiS_Pr->SiS_RefIndex[RRTI].YRes,
var, FALSE);
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & 0x8000)
var->sync &= ~FB_SYNC_VERT_HIGH_ACT;
else
var->sync |= FB_SYNC_VERT_HIGH_ACT;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & 0x4000)
var->sync &= ~FB_SYNC_HOR_HIGH_ACT;
else
var->sync |= FB_SYNC_HOR_HIGH_ACT;
var->vmode = FB_VMODE_NONINTERLACED;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & 0x0080)
var->vmode = FB_VMODE_INTERLACED;
else {
j = 0;
while(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID != 0xff) {
if(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeID ==
SiS_Pr->SiS_RefIndex[RRTI].ModeID) {
if(SiS_Pr->SiS_EModeIDTable[j].Ext_ModeFlag & DoubleScanMode) {
var->vmode = FB_VMODE_DOUBLE;
}
break;
}
j++;
}
}
if((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
#if 0 /* Do this? */
var->upper_margin <<= 1;
var->lower_margin <<= 1;
var->vsync_len <<= 1;
#endif
} else if((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
var->upper_margin >>= 1;
var->lower_margin >>= 1;
var->vsync_len >>= 1;
}
return 1;
}
#endif /* Linux >= 2.5 */
BOOLEAN
sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *htotal,
int *vtotal, unsigned char rateindex)
{
unsigned short ModeNo = modeno;
unsigned short ModeIdIndex = 0, CRT1Index = 0;
unsigned short RRTI = 0;
unsigned char sr_data, cr_data, cr_data2;
if(!SiSInitPtr(SiS_Pr)) return FALSE;
if(rateindex > 0) rateindex--;
#ifdef SIS315H
switch(ModeNo) {
case 0x5a: ModeNo = 0x50; break;
case 0x5b: ModeNo = 0x56;
}
#endif
if(!(SiS_SearchModeID(SiS_Pr, &ModeNo, &ModeIdIndex))) return FALSE;
RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & HaveWideTiming) {
if(SiS_Pr->SiS_UseWide == 1) {
/* Wide screen: Ignore rateindex */
CRT1Index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT1CRTC_WIDE;
} else {
RRTI += rateindex;
CRT1Index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT1CRTC_NORM;
}
} else {
RRTI += rateindex;
CRT1Index = SiS_Pr->SiS_RefIndex[RRTI].Ext_CRT1CRTC;
}
sr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[14];
cr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[0];
*htotal = (((cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8)) + 5) * 8;
sr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[13];
cr_data = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[6];
cr_data2 = SiS_Pr->SiS_CRT1Table[CRT1Index].CR[7];
*vtotal = ((cr_data & 0xFF) |
((unsigned short)(cr_data2 & 0x01) << 8) |
((unsigned short)(cr_data2 & 0x20) << 4) |
((unsigned short)(sr_data & 0x01) << 10)) + 2;
if(SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag & InterlaceMode)
*vtotal *= 2;
return TRUE;
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* OEM Data for 300 series * OEM Data for 300 series
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
* *
*/ */
static const UCHAR SiS300_OEMTVDelay301[8][4] = static const unsigned char SiS300_OEMTVDelay301[8][4] =
{ {
{0x08,0x08,0x08,0x08}, {0x08,0x08,0x08,0x08},
{0x08,0x08,0x08,0x08}, {0x08,0x08,0x08,0x08},
...@@ -62,7 +62,7 @@ static const UCHAR SiS300_OEMTVDelay301[8][4] = ...@@ -62,7 +62,7 @@ static const UCHAR SiS300_OEMTVDelay301[8][4] =
{0x20,0x20,0x20,0x20} {0x20,0x20,0x20,0x20}
}; };
static const UCHAR SiS300_OEMTVDelayLVDS[8][4] = static const unsigned char SiS300_OEMTVDelayLVDS[8][4] =
{ {
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
...@@ -74,7 +74,7 @@ static const UCHAR SiS300_OEMTVDelayLVDS[8][4] = ...@@ -74,7 +74,7 @@ static const UCHAR SiS300_OEMTVDelayLVDS[8][4] =
{0x20,0x20,0x20,0x20} {0x20,0x20,0x20,0x20}
}; };
static const UCHAR SiS300_OEMTVFlicker[8][4] = static const unsigned char SiS300_OEMTVFlicker[8][4] =
{ {
{0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00},
...@@ -86,25 +86,7 @@ static const UCHAR SiS300_OEMTVFlicker[8][4] = ...@@ -86,25 +86,7 @@ static const UCHAR SiS300_OEMTVFlicker[8][4] =
{0x00,0x00,0x00,0x00} {0x00,0x00,0x00,0x00}
}; };
#if 0 /* TW: Not used */ static const unsigned char SiS300_OEMLCDDelay2[64][4] = /* for 301/301b/302b/301LV/302LV */
static const UCHAR SiS300_OEMLCDDelay1[12][4]={
{0x2c,0x2c,0x2c,0x2c},
{0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20},
{0x2c,0x2c,0x2c,0x2c},
{0x2c,0x2c,0x2c,0x2c},
{0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20},
{0x24,0x24,0x24,0x24},
{0x24,0x24,0x24,0x24},
{0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20},
{0x24,0x24,0x24,0x24}
};
#endif
/* From 630/301B BIOS */
static const UCHAR SiS300_OEMLCDDelay2[64][4] = /* for 301/301b/302b/301LV/302LV */
{ {
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
...@@ -172,8 +154,7 @@ static const UCHAR SiS300_OEMLCDDelay2[64][4] = /* for 301/301b/302b/301LV/302 ...@@ -172,8 +154,7 @@ static const UCHAR SiS300_OEMLCDDelay2[64][4] = /* for 301/301b/302b/301LV/302
{0x20,0x20,0x20,0x20} {0x20,0x20,0x20,0x20}
}; };
/* From 300/301LV BIOS */ static const unsigned char SiS300_OEMLCDDelay4[12][4] =
static const UCHAR SiS300_OEMLCDDelay4[12][4] =
{ {
{0x2c,0x2c,0x2c,0x2c}, {0x2c,0x2c,0x2c,0x2c},
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
...@@ -189,8 +170,7 @@ static const UCHAR SiS300_OEMLCDDelay4[12][4] = ...@@ -189,8 +170,7 @@ static const UCHAR SiS300_OEMLCDDelay4[12][4] =
{0x24,0x24,0x24,0x24} {0x24,0x24,0x24,0x24}
}; };
/* From 300/301LV BIOS */ static const unsigned char SiS300_OEMLCDDelay5[32][4] =
static const UCHAR SiS300_OEMLCDDelay5[32][4] =
{ {
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
...@@ -226,8 +206,8 @@ static const UCHAR SiS300_OEMLCDDelay5[32][4] = ...@@ -226,8 +206,8 @@ static const UCHAR SiS300_OEMLCDDelay5[32][4] =
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
}; };
/* Added for LVDS */ static const unsigned char SiS300_OEMLCDDelay3[64][4] = /* For LVDS */
static const UCHAR SiS300_OEMLCDDelay3[64][4] = { /* For LVDS */ {
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
{0x20,0x20,0x20,0x20}, {0x20,0x20,0x20,0x20},
...@@ -294,7 +274,7 @@ static const UCHAR SiS300_OEMLCDDelay3[64][4] = { /* For LVDS */ ...@@ -294,7 +274,7 @@ static const UCHAR SiS300_OEMLCDDelay3[64][4] = { /* For LVDS */
{0x20,0x20,0x20,0x20} {0x20,0x20,0x20,0x20}
}; };
static const UCHAR SiS300_Phase1[8][5][4] = static const unsigned char SiS300_Phase1[8][5][4] =
{ {
{ {
{0x21,0xed,0x00,0x08}, {0x21,0xed,0x00,0x08},
...@@ -354,8 +334,7 @@ static const UCHAR SiS300_Phase1[8][5][4] = ...@@ -354,8 +334,7 @@ static const UCHAR SiS300_Phase1[8][5][4] =
} }
}; };
static const unsigned char SiS300_Phase2[8][5][4] =
static const UCHAR SiS300_Phase2[8][5][4] =
{ {
{ {
{0x21,0xed,0x00,0x08}, {0x21,0xed,0x00,0x08},
...@@ -415,7 +394,7 @@ static const UCHAR SiS300_Phase2[8][5][4] = ...@@ -415,7 +394,7 @@ static const UCHAR SiS300_Phase2[8][5][4] =
} }
}; };
static const UCHAR SiS300_Filter1[10][16][4] = static const unsigned char SiS300_Filter1[10][16][4] =
{ {
{ {
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
...@@ -599,7 +578,7 @@ static const UCHAR SiS300_Filter1[10][16][4] = ...@@ -599,7 +578,7 @@ static const UCHAR SiS300_Filter1[10][16][4] =
}, },
}; };
static const UCHAR SiS300_Filter2[10][9][7] = static const unsigned char SiS300_Filter2[10][9][7] =
{ {
{ {
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
...@@ -714,9 +693,11 @@ static const UCHAR SiS300_Filter2[10][9][7] = ...@@ -714,9 +693,11 @@ static const UCHAR SiS300_Filter2[10][9][7] =
}; };
/* Custom data for Barco iQ Pro R300 */ /* Custom data for Barco iQ Pro R300 */
static const UCHAR barco_p1[2][9][7][3] = { static const unsigned char barco_p1[2][9][7][3] =
{
{ {
{ { 0x16, 0xcf, 0x00 }, {
{ 0x16, 0xcf, 0x00 },
{ 0x18, 0x00, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1a, 0xe7, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1b, 0x26, 0x00 }, { 0x1b, 0x26, 0x00 },
......
/* $XFree86$ */ /* $XFree86$ */
/* $XdotOrg$ */ /* $XdotOrg$ */
/* /*
* OEM Data for 315/330 series * OEM Data for 315/330/340 series
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
* *
*/ */
static const UCHAR SiS310_LCDDelayCompensation_301[] = /* 301 */ static const unsigned char SiS310_LCDDelayCompensation_301[] = /* 301 */
{ {
0x00,0x00,0x00, /* 800x600 */ 0x00,0x00,0x00, /* 800x600 */
0x0b,0x0b,0x0b, /* 1024x768 */ 0x0b,0x0b,0x0b, /* 1024x768 */
...@@ -70,7 +70,7 @@ static const UCHAR SiS310_LCDDelayCompensation_301[] = /* 301 */ ...@@ -70,7 +70,7 @@ static const UCHAR SiS310_LCDDelayCompensation_301[] = /* 301 */
}; };
/* This is contained in 650+301B BIOSes, but it is wrong - so we don't use it */ /* This is contained in 650+301B BIOSes, but it is wrong - so we don't use it */
static const UCHAR SiS310_LCDDelayCompensation_650301LV[] = /* 650 + 30xLV */ static const unsigned char SiS310_LCDDelayCompensation_650301LV[] = /* 650 + 30xLV */
{ {
0x01,0x01,0x01, /* 800x600 */ 0x01,0x01,0x01, /* 800x600 */
0x01,0x01,0x01, /* 1024x768 */ 0x01,0x01,0x01, /* 1024x768 */
...@@ -89,7 +89,7 @@ static const UCHAR SiS310_LCDDelayCompensation_650301LV[] = /* 650 + 30xLV * ...@@ -89,7 +89,7 @@ static const UCHAR SiS310_LCDDelayCompensation_650301LV[] = /* 650 + 30xLV *
0x02,0x02,0x02 0x02,0x02,0x02
}; };
static const UCHAR SiS310_LCDDelayCompensation_651301LV[] = /* M650/651 301LV */ static const unsigned char SiS310_LCDDelayCompensation_651301LV[] = /* M650/651 301LV */
{ {
0x33,0x33,0x33, /* 800x600 (guessed) - new: PanelType, not PanelRes ! */ 0x33,0x33,0x33, /* 800x600 (guessed) - new: PanelType, not PanelRes ! */
0x33,0x33,0x33, /* 1024x768 */ 0x33,0x33,0x33, /* 1024x768 */
...@@ -108,7 +108,7 @@ static const UCHAR SiS310_LCDDelayCompensation_651301LV[] = /* M650/651 301LV ...@@ -108,7 +108,7 @@ static const UCHAR SiS310_LCDDelayCompensation_651301LV[] = /* M650/651 301LV
0x33,0x33,0x33 0x33,0x33,0x33
}; };
static const UCHAR SiS310_LCDDelayCompensation_651302LV[] = /* M650/651 302LV */ static const unsigned char SiS310_LCDDelayCompensation_651302LV[] = /* M650/651 302LV */
{ {
0x33,0x33,0x33, /* 800x600 (guessed) */ 0x33,0x33,0x33, /* 800x600 (guessed) */
0x33,0x33,0x33, /* 1024x768 */ 0x33,0x33,0x33, /* 1024x768 */
...@@ -127,7 +127,7 @@ static const UCHAR SiS310_LCDDelayCompensation_651302LV[] = /* M650/651 302L ...@@ -127,7 +127,7 @@ static const UCHAR SiS310_LCDDelayCompensation_651302LV[] = /* M650/651 302L
0x33,0x33,0x33 0x33,0x33,0x33
}; };
static const UCHAR SiS310_LCDDelayCompensation_3xx301B[] = /* 30xB */ static const unsigned char SiS310_LCDDelayCompensation_3xx301B[] = /* 30xB */
{ {
0x01,0x01,0x01, /* 800x600 */ 0x01,0x01,0x01, /* 800x600 */
0x0C,0x0C,0x0C, /* 1024x768 */ 0x0C,0x0C,0x0C, /* 1024x768 */
...@@ -146,7 +146,7 @@ static const UCHAR SiS310_LCDDelayCompensation_3xx301B[] = /* 30xB */ ...@@ -146,7 +146,7 @@ static const UCHAR SiS310_LCDDelayCompensation_3xx301B[] = /* 30xB */
0x02,0x02,0x02 0x02,0x02,0x02
}; };
static const UCHAR SiS310_LCDDelayCompensation_3xx301LV[] = /* 315+30xLV */ static const unsigned char SiS310_LCDDelayCompensation_3xx301LV[] = /* 315+30xLV */
{ {
0x01,0x01,0x01, /* 800x600 */ 0x01,0x01,0x01, /* 800x600 */
0x04,0x04,0x04, /* 1024x768 (A531/BIOS 1.14.05f: 4 - works with 6 */ 0x04,0x04,0x04, /* 1024x768 (A531/BIOS 1.14.05f: 4 - works with 6 */
...@@ -165,42 +165,42 @@ static const UCHAR SiS310_LCDDelayCompensation_3xx301LV[] = /* 315+30xLV */ ...@@ -165,42 +165,42 @@ static const UCHAR SiS310_LCDDelayCompensation_3xx301LV[] = /* 315+30xLV */
0x02,0x02,0x02 0x02,0x02,0x02
}; };
static const UCHAR SiS310_TVDelayCompensation_301[] = /* 301 */ static const unsigned char SiS310_TVDelayCompensation_301[] = /* 301 */
{ {
0x02,0x02, /* NTSC Enhanced, Standard */ 0x02,0x02, /* NTSC Enhanced, Standard */
0x02,0x02, /* PAL */ 0x02,0x02, /* PAL */
0x08,0x0b /* HiVision */ 0x08,0x0b /* HiVision */
}; };
static const UCHAR SiS310_TVDelayCompensation_301B[] = /* 30xB, 30xLV */ static const unsigned char SiS310_TVDelayCompensation_301B[] = /* 30xB, 30xLV */
{ {
0x03,0x03, 0x03,0x03,
0x03,0x03, 0x03,0x03,
0x03,0x03 0x03,0x03
}; };
static const UCHAR SiS310_TVDelayCompensation_740301B[] = /* 740 + 30xB (30xLV?) */ static const unsigned char SiS310_TVDelayCompensation_740301B[] = /* 740 + 30xB (30xLV?) */
{ {
0x05,0x05, 0x05,0x05,
0x05,0x05, 0x05,0x05,
0x05,0x05 0x05,0x05
}; };
static const UCHAR SiS310_TVDelayCompensation_651301LV[] = /* M650, 651, 301LV */ static const unsigned char SiS310_TVDelayCompensation_651301LV[] = /* M650, 651, 301LV */
{ {
0x33,0x33, 0x33,0x33,
0x33,0x33, 0x33,0x33,
0x33,0x33 0x33,0x33
}; };
static const UCHAR SiS310_TVDelayCompensation_651302LV[] = /* M650, 651, 302LV */ static const unsigned char SiS310_TVDelayCompensation_651302LV[] = /* M650, 651, 302LV */
{ {
0x33,0x33, 0x33,0x33,
0x33,0x33, 0x33,0x33,
0x33,0x33 0x33,0x33
}; };
static const UCHAR SiS_TVDelay661_301[] = /* 661, 301 */ static const unsigned char SiS_TVDelay661_301[] = /* 661, 301 */
{ {
0x44,0x44, 0x44,0x44,
0x44,0x44, 0x44,0x44,
...@@ -210,7 +210,7 @@ static const UCHAR SiS_TVDelay661_301[] = /* 661, 301 */ ...@@ -210,7 +210,7 @@ static const UCHAR SiS_TVDelay661_301[] = /* 661, 301 */
0x44,0x44 0x44,0x44
}; };
static const UCHAR SiS_TVDelay661_301B[] = /* 661, 301B et al */ static const unsigned char SiS_TVDelay661_301B[] = /* 661, 301B et al */
{ {
0x44,0x44, 0x44,0x44,
0x44,0x44, 0x44,0x44,
...@@ -220,14 +220,14 @@ static const UCHAR SiS_TVDelay661_301B[] = /* 661, 301B et al */ ...@@ -220,14 +220,14 @@ static const UCHAR SiS_TVDelay661_301B[] = /* 661, 301B et al */
0x44,0x44 0x44,0x44
}; };
static const UCHAR SiS310_TVDelayCompensation_LVDS[] = /* LVDS */ static const unsigned char SiS310_TVDelayCompensation_LVDS[] = /* LVDS */
{ {
0x0a,0x0a, 0x0a,0x0a,
0x0a,0x0a, 0x0a,0x0a,
0x0a,0x0a 0x0a,0x0a
}; };
static const UCHAR SiS310_TVAntiFlick1[6][2] = static const unsigned char SiS310_TVAntiFlick1[6][2] =
{ {
{0x4,0x0}, {0x4,0x0},
{0x4,0x8}, {0x4,0x8},
...@@ -237,7 +237,7 @@ static const UCHAR SiS310_TVAntiFlick1[6][2] = ...@@ -237,7 +237,7 @@ static const UCHAR SiS310_TVAntiFlick1[6][2] =
{0x0,0x0} {0x0,0x0}
}; };
static const UCHAR SiS310_TVEdge1[6][2] = static const unsigned char SiS310_TVEdge1[6][2] =
{ {
{0x0,0x4}, {0x0,0x4},
{0x0,0x4}, {0x0,0x4},
...@@ -247,7 +247,7 @@ static const UCHAR SiS310_TVEdge1[6][2] = ...@@ -247,7 +247,7 @@ static const UCHAR SiS310_TVEdge1[6][2] =
{0x0,0x0} {0x0,0x0}
}; };
static const UCHAR SiS310_TVYFilter1[5][8][4] = static const unsigned char SiS310_TVYFilter1[5][8][4] =
{ {
{ {
{0x00,0xf4,0x10,0x38}, /* NTSC */ {0x00,0xf4,0x10,0x38}, /* NTSC */
...@@ -301,7 +301,7 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] = ...@@ -301,7 +301,7 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] =
} }
}; };
static const UCHAR SiS310_TVYFilter2[5][9][7] = static const unsigned char SiS310_TVYFilter2[5][9][7] =
{ {
{ {
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* NTSC */ {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* NTSC */
...@@ -360,7 +360,7 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] = ...@@ -360,7 +360,7 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] =
} }
}; };
static const UCHAR SiS310_TVPhaseIncr1[3][2][4] = static const unsigned char SiS310_TVPhaseIncr1[3][2][4] =
{ {
{ {
{0x21,0xed,0xba,0x08}, {0x21,0xed,0xba,0x08},
...@@ -376,7 +376,7 @@ static const UCHAR SiS310_TVPhaseIncr1[3][2][4] = ...@@ -376,7 +376,7 @@ static const UCHAR SiS310_TVPhaseIncr1[3][2][4] =
} }
}; };
static const UCHAR SiS310_TVPhaseIncr2[3][2][4] = static const unsigned char SiS310_TVPhaseIncr2[3][2][4] =
{ {
{ {
{0x21,0xf0,0x7b,0xd6}, {0x21,0xf0,0x7b,0xd6},
...@@ -392,32 +392,13 @@ static const UCHAR SiS310_TVPhaseIncr2[3][2][4] = ...@@ -392,32 +392,13 @@ static const UCHAR SiS310_TVPhaseIncr2[3][2][4] =
} }
}; };
static const UCHAR SiS661_TVPhase[] = {
0x21,0xED,0xBA,0x08,
0x2A,0x05,0xE3,0x00,
0x21,0xE4,0x2E,0x9B,
0x21,0xF4,0x3E,0xBA,
0x1E,0x8B,0xA2,0xA7,
0x1E,0x83,0x0A,0xE0,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x21,0xF0,0x7B,0xD6,
0x2A,0x09,0x86,0xE9,
0x21,0xE6,0xEF,0xA4,
0x21,0xF6,0x94,0x46,
0x1E,0x8B,0xA2,0xA7,
0x1E,0x83,0x0A,0xE0,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00
};
/**************************************************************/ /**************************************************************/
/* CUSTOM TIMING DATA --------------------------------------- */ /* CUSTOM TIMING DATA --------------------------------------- */
/**************************************************************/ /**************************************************************/
/* Inventec / Compaq Presario 3045US, 3017 */ /* Inventec / Compaq Presario 3045US, 3017 */
static const SiS_LCDDataStruct SiS310_ExtCompaq1280x1024Data[] = static const struct SiS_LCDData SiS310_ExtCompaq1280x1024Data[] =
{ {
{ 211, 60,1024, 501,1688,1066}, { 211, 60,1024, 501,1688,1066},
{ 211, 60,1024, 508,1688,1066}, { 211, 60,1024, 508,1688,1066},
...@@ -431,7 +412,7 @@ static const SiS_LCDDataStruct SiS310_ExtCompaq1280x1024Data[] = ...@@ -431,7 +412,7 @@ static const SiS_LCDDataStruct SiS310_ExtCompaq1280x1024Data[] =
/* Asus A2xxxH _2 */ /* Asus A2xxxH _2 */
static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Asus1024x768_3[] = static const struct SiS_Part2PortTbl SiS310_CRT2Part2_Asus1024x768_3[] =
{ {
{{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x2c,0x13,0x9a,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x2c,0x13,0x9a,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* OS depending defines * OS depending defines
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -55,8 +55,11 @@ ...@@ -55,8 +55,11 @@
#define _SIS_OSDEF_H_ #define _SIS_OSDEF_H_
/* The choices are: */ /* The choices are: */
#define LINUX_KERNEL /* Linux kernel framebuffer */ #define SIS_LINUX_KERNEL /* Linux kernel framebuffer */
/* #define LINUX_XF86 */ /* XFree86/X.org */ #undef SIS_XORG_XF86 /* XFree86/X.org */
#undef SIS_LINUX_KERNEL_24
#undef SIS_LINUX_KERNEL_26
#ifdef OutPortByte #ifdef OutPortByte
#undef OutPortByte #undef OutPortByte
...@@ -86,8 +89,9 @@ ...@@ -86,8 +89,9 @@
/* LINUX KERNEL */ /* LINUX KERNEL */
/**********************************************************************/ /**********************************************************************/
#ifdef LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
#include <linux/config.h> #include <linux/config.h>
#include <linux/version.h>
#ifdef CONFIG_FB_SIS_300 #ifdef CONFIG_FB_SIS_300
#define SIS300 #define SIS300
...@@ -97,6 +101,12 @@ ...@@ -97,6 +101,12 @@
#define SIS315H #define SIS315H
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#define SIS_LINUX_KERNEL_26
#else
#define SIS_LINUX_KERNEL_24
#endif
#if !defined(SIS300) && !defined(SIS315H) #if !defined(SIS300) && !defined(SIS315H)
#warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set #warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set
#warning sisfb will not work! #warning sisfb will not work!
...@@ -109,13 +119,15 @@ ...@@ -109,13 +119,15 @@
#define InPortWord(p) inw((SISIOADDRESS)(p)) #define InPortWord(p) inw((SISIOADDRESS)(p))
#define InPortLong(p) inl((SISIOADDRESS)(p)) #define InPortLong(p) inl((SISIOADDRESS)(p))
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize) #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
#endif
#endif /* LINUX_KERNEL */
/**********************************************************************/ /**********************************************************************/
/* XFree86/X.org */ /* XFree86/X.org */
/**********************************************************************/ /**********************************************************************/
#ifdef LINUX_XF86 #ifdef SIS_XORG_XF86
#define SIS300 #define SIS300
#define SIS315H #define SIS315H
...@@ -126,6 +138,7 @@ ...@@ -126,6 +138,7 @@
#define InPortWord(p) inSISREGW((IOADDRESS)(p)) #define InPortWord(p) inSISREGW((IOADDRESS)(p))
#define InPortLong(p) inSISREGL((IOADDRESS)(p)) #define InPortLong(p) inSISREGL((IOADDRESS)(p))
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize) #define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#endif
#endif /* XF86 */
#endif /* _OSDEF_H_ */ #endif /* _OSDEF_H_ */
/* /*
* SiS 300/630/730/540/315/550/[M]650/651/[M]661[FM]X/740/[M]741[GX]/330/[M]760[GX] * SiS 300/540/630[S]/730[S],
* SiS 315[E|PRO]/550/[M]65x/[M]661[F|M]X/740/[M]741[GX]/330/[M]76x[GX],
* XGI V3XT/V5/V8, Z7
* frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3 * frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3
* *
* Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria. * Copyright (C) 2001-2005 Thomas Winischhofer, Vienna, Austria.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -19,8 +21,8 @@ ...@@ -19,8 +21,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifndef _SIS_H #ifndef _SIS_H_
#define _SIS_H #define _SIS_H_
#include <linux/config.h> #include <linux/config.h>
#include <linux/version.h> #include <linux/version.h>
...@@ -36,25 +38,36 @@ ...@@ -36,25 +38,36 @@
#include "vstruct.h" #include "vstruct.h"
#define VER_MAJOR 1 #define VER_MAJOR 1
#define VER_MINOR 7 #define VER_MINOR 8
#define VER_LEVEL 17 #define VER_LEVEL 9
#undef SIS_CONFIG_COMPAT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#include <linux/spinlock.h> #include <linux/spinlock.h>
#define SIS_PCI_GET_CLASS(a, b) pci_get_class(a, b)
#define SIS_PCI_GET_DEVICE(a,b,c) pci_get_device(a,b,c)
#define SIS_PCI_GET_SLOT(a,b) pci_get_slot(a,b)
#define SIS_PCI_PUT_DEVICE(a) pci_dev_put(a)
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,10)
#include <linux/ioctl32.h> #include <linux/ioctl32.h>
#define SIS_CONFIG_COMPAT #define SIS_OLD_CONFIG_COMPAT
#endif #else
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19) #include <linux/smp_lock.h>
#ifdef __x86_64__ #define SIS_NEW_CONFIG_COMPAT
/* Shouldn't we check for CONFIG_IA32_EMULATION here? */ #endif
#endif /* CONFIG_COMPAT */
#else /* 2.4 */
#define SIS_PCI_GET_CLASS(a, b) pci_find_class(a, b)
#define SIS_PCI_GET_DEVICE(a,b,c) pci_find_device(a,b,c)
#define SIS_PCI_GET_SLOT(a,b) pci_find_slot(a,b)
#define SIS_PCI_PUT_DEVICE(a)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19)
#ifdef __x86_64__ /* Shouldn't we check for CONFIG_IA32_EMULATION here? */
#include <asm/ioctl32.h> #include <asm/ioctl32.h>
#define SIS_CONFIG_COMPAT #define SIS_OLD_CONFIG_COMPAT
#endif #endif
#endif #endif
#endif /* 2.4 */
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
#define SIS_IOTYPE1 void __iomem #define SIS_IOTYPE1 void __iomem
#define SIS_IOTYPE2 __iomem #define SIS_IOTYPE2 __iomem
...@@ -108,16 +121,35 @@ ...@@ -108,16 +121,35 @@
#ifndef PCI_DEVICE_ID_SI_760 #ifndef PCI_DEVICE_ID_SI_760
#define PCI_DEVICE_ID_SI_760 0x0760 #define PCI_DEVICE_ID_SI_760 0x0760
#endif #endif
#ifndef PCI_DEVICE_ID_SI_761
#define PCI_DEVICE_ID_SI_761 0x0761
#endif
#ifndef PCI_VENDOR_ID_XGI
#define PCI_VENDOR_ID_XGI 0x18ca
#endif
#ifndef PCI_DEVICE_ID_XGI_20
#define PCI_DEVICE_ID_XGI_20 0x0020
#endif
#ifndef PCI_DEVICE_ID_XGI_40
#define PCI_DEVICE_ID_XGI_40 0x0040
#endif
/* To be included in fb.h */ /* To be included in fb.h */
#ifndef FB_ACCEL_SIS_GLAMOUR_2 #ifndef FB_ACCEL_SIS_GLAMOUR_2
#define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 65x, 740, 661, 741 */ #define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 65x, 740, 661, 741 */
#endif #endif
#ifndef FB_ACCEL_SIS_XABRE #ifndef FB_ACCEL_SIS_XABRE
#define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre"), 760 */ #define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre"), 76x */
#endif
#ifndef FB_ACCEL_XGI_VOLARI_V
#define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari Vx (V3XT, V5, V8) */
#endif
#ifndef FB_ACCEL_XGI_VOLARI_Z
#define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */
#endif #endif
#define MAX_ROM_SCAN 0x10000
/* ivideo->caps */ /* ivideo->caps */
#define HW_CURSOR_CAP 0x80 #define HW_CURSOR_CAP 0x80
...@@ -127,13 +159,14 @@ ...@@ -127,13 +159,14 @@
#define MMIO_CMD_QUEUE_CAP 0x08 #define MMIO_CMD_QUEUE_CAP 0x08
/* For 300 series */ /* For 300 series */
#define TURBO_QUEUE_AREA_SIZE 0x80000 /* 512K */ #define TURBO_QUEUE_AREA_SIZE (512 * 1024) /* 512K */
#define HW_CURSOR_AREA_SIZE_300 0x1000 /* 4K */ #define HW_CURSOR_AREA_SIZE_300 4096 /* 4K */
/* For 315/Xabre series */ /* For 315/Xabre series */
#define COMMAND_QUEUE_AREA_SIZE 0x80000 /* 512K */ #define COMMAND_QUEUE_AREA_SIZE (512 * 1024) /* 512K */
#define COMMAND_QUEUE_AREA_SIZE_Z7 (128 * 1024) /* 128k for XGI Z7 */
#define HW_CURSOR_AREA_SIZE_315 16384 /* 16K */
#define COMMAND_QUEUE_THRESHOLD 0x1F #define COMMAND_QUEUE_THRESHOLD 0x1F
#define HW_CURSOR_AREA_SIZE_315 0x4000 /* 16K */
#define SIS_OH_ALLOC_SIZE 4000 #define SIS_OH_ALLOC_SIZE 4000
#define SENTINEL 0x7fffffff #define SENTINEL 0x7fffffff
...@@ -170,6 +203,9 @@ ...@@ -170,6 +203,9 @@
#define SISMISCW ivideo->SiS_Pr.SiS_P3c2 #define SISMISCW ivideo->SiS_Pr.SiS_P3c2
#define SISINPSTAT (ivideo->SiS_Pr.RelIO + 0x2a) #define SISINPSTAT (ivideo->SiS_Pr.RelIO + 0x2a)
#define SISPEL ivideo->SiS_Pr.SiS_P3c6 #define SISPEL ivideo->SiS_Pr.SiS_P3c6
#define SISVGAENABLE (ivideo->SiS_Pr.RelIO + 0x13)
#define SISVID (ivideo->SiS_Pr.RelIO + 0x02 - 0x30)
#define SISCAP (ivideo->SiS_Pr.RelIO + 0x00 - 0x30)
#define IND_SIS_PASSWORD 0x05 /* SRs */ #define IND_SIS_PASSWORD 0x05 /* SRs */
#define IND_SIS_COLOR_MODE 0x06 #define IND_SIS_COLOR_MODE 0x06
...@@ -202,7 +238,7 @@ ...@@ -202,7 +238,7 @@
#define SIS_MEM_MAP_IO_ENABLE 0x01 /* SR20 */ #define SIS_MEM_MAP_IO_ENABLE 0x01 /* SR20 */
#define SIS_PCI_ADDR_ENABLE 0x80 #define SIS_PCI_ADDR_ENABLE 0x80
#define SIS_AGP_CMDQUEUE_ENABLE 0x80 /* 315/330 series SR26 */ #define SIS_AGP_CMDQUEUE_ENABLE 0x80 /* 315/330/340 series SR26 */
#define SIS_VRAM_CMDQUEUE_ENABLE 0x40 #define SIS_VRAM_CMDQUEUE_ENABLE 0x40
#define SIS_MMIO_CMD_ENABLE 0x20 #define SIS_MMIO_CMD_ENABLE 0x20
#define SIS_CMD_QUEUE_SIZE_512k 0x00 #define SIS_CMD_QUEUE_SIZE_512k 0x00
...@@ -212,6 +248,9 @@ ...@@ -212,6 +248,9 @@
#define SIS_CMD_QUEUE_RESET 0x01 #define SIS_CMD_QUEUE_RESET 0x01
#define SIS_CMD_AUTO_CORR 0x02 #define SIS_CMD_AUTO_CORR 0x02
#define SIS_CMD_QUEUE_SIZE_Z7_64k 0x00 /* XGI Z7 */
#define SIS_CMD_QUEUE_SIZE_Z7_128k 0x04
#define SIS_SIMULTANEOUS_VIEW_ENABLE 0x01 /* CR30 */ #define SIS_SIMULTANEOUS_VIEW_ENABLE 0x01 /* CR30 */
#define SIS_MODE_SELECT_CRT2 0x02 #define SIS_MODE_SELECT_CRT2 0x02
#define SIS_VB_OUTPUT_COMPOSITE 0x04 #define SIS_VB_OUTPUT_COMPOSITE 0x04
...@@ -246,8 +285,66 @@ ...@@ -246,8 +285,66 @@
#define SIS_AGP_2X 0x20 /* CR48 */ #define SIS_AGP_2X 0x20 /* CR48 */
#define HW_DEVICE_EXTENSION SIS_HW_INFO /* vbflags, private entries (others in sisfb.h) */
#define PHW_DEVICE_EXTENSION PSIS_HW_INFO #define VB_CONEXANT 0x00000800 /* 661 series only */
#define VB_TRUMPION VB_CONEXANT /* 300 series only */
#define VB_302ELV 0x00004000
#define VB_301 0x00100000 /* Video bridge type */
#define VB_301B 0x00200000
#define VB_302B 0x00400000
#define VB_30xBDH 0x00800000 /* 30xB DH version (w/o LCD support) */
#define VB_LVDS 0x01000000
#define VB_CHRONTEL 0x02000000
#define VB_301LV 0x04000000
#define VB_302LV 0x08000000
#define VB_301C 0x10000000
#define VB_SISBRIDGE (VB_301|VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV|VB_302ELV)
#define VB_VIDEOBRIDGE (VB_SISBRIDGE | VB_LVDS | VB_CHRONTEL | VB_CONEXANT)
/* vbflags2 (static stuff only!) */
#define VB2_SISUMC 0x00000001
#define VB2_301 0x00000002 /* Video bridge type */
#define VB2_301B 0x00000004
#define VB2_301C 0x00000008
#define VB2_307T 0x00000010
#define VB2_302B 0x00000800
#define VB2_301LV 0x00001000
#define VB2_302LV 0x00002000
#define VB2_302ELV 0x00004000
#define VB2_307LV 0x00008000
#define VB2_30xBDH 0x08000000 /* 30xB DH version (w/o LCD support) */
#define VB2_CONEXANT 0x10000000
#define VB2_TRUMPION 0x20000000
#define VB2_LVDS 0x40000000
#define VB2_CHRONTEL 0x80000000
#define VB2_SISLVDSBRIDGE (VB2_301LV | VB2_302LV | VB2_302ELV | VB2_307LV)
#define VB2_SISTMDSBRIDGE (VB2_301 | VB2_301B | VB2_301C | VB2_302B | VB2_307T)
#define VB2_SISBRIDGE (VB2_SISLVDSBRIDGE | VB2_SISTMDSBRIDGE)
#define VB2_SISTMDSLCDABRIDGE (VB2_301C | VB2_307T)
#define VB2_SISLCDABRIDGE (VB2_SISTMDSLCDABRIDGE | VB2_301LV | VB2_302LV | VB2_302ELV | VB2_307LV)
#define VB2_SISHIVISIONBRIDGE (VB2_301 | VB2_301B | VB2_302B)
#define VB2_SISYPBPRBRIDGE (VB2_301C | VB2_307T | VB2_SISLVDSBRIDGE)
#define VB2_SISYPBPRARBRIDGE (VB2_301C | VB2_307T | VB2_307LV)
#define VB2_SISTAP4SCALER (VB2_301C | VB2_307T | VB2_302ELV | VB2_307LV)
#define VB2_SISTVBRIDGE (VB2_SISHIVISIONBRIDGE | VB2_SISYPBPRBRIDGE)
#define VB2_SISVGA2BRIDGE (VB2_301 | VB2_301B | VB2_301C | VB2_302B | VB2_307T)
#define VB2_VIDEOBRIDGE (VB2_SISBRIDGE | VB2_LVDS | VB2_CHRONTEL | VB2_CONEXANT)
#define VB2_30xB (VB2_301B | VB2_301C | VB2_302B | VB2_307T)
#define VB2_30xBLV (VB2_30xB | VB2_SISLVDSBRIDGE)
#define VB2_30xC (VB2_301C | VB2_307T)
#define VB2_30xCLV (VB2_301C | VB2_307T | VB2_302ELV| VB2_307LV)
#define VB2_SISEMIBRIDGE (VB2_302LV | VB2_302ELV | VB2_307LV)
#define VB2_LCD162MHZBRIDGE (VB2_301C | VB2_307T)
#define VB2_LCDOVER1280BRIDGE (VB2_301C | VB2_307T | VB2_302LV | VB2_302ELV | VB2_307LV)
#define VB2_LCDOVER1600BRIDGE (VB2_307T | VB2_307LV)
#define VB2_RAMDAC202MHZBRIDGE (VB2_301C | VB2_307T)
/* I/O port access macros */ /* I/O port access macros */
#define inSISREG(base) inb(base) #define inSISREG(base) inb(base)
...@@ -257,13 +354,13 @@ ...@@ -257,13 +354,13 @@
#define orSISREG(base,val) \ #define orSISREG(base,val) \
do { \ do { \
u8 __Temp = inSISREG(base); \ u8 __Temp = inSISREG(base); \
outSISREG(base, __Temp | (val)); \ outSISREG(base, __Temp | (val));\
} while (0) } while (0)
#define andSISREG(base,val) \ #define andSISREG(base,val) \
do { \ do { \
u8 __Temp = inSISREG(base); \ u8 __Temp = inSISREG(base); \
outSISREG(base, __Temp & (val)); \ outSISREG(base, __Temp & (val));\
} while (0) } while (0)
#define inSISIDXREG(base,idx,var) \ #define inSISIDXREG(base,idx,var) \
...@@ -347,18 +444,19 @@ enum _SIS_LCD_TYPE { ...@@ -347,18 +444,19 @@ enum _SIS_LCD_TYPE {
LCD_1600x1200, LCD_1600x1200,
LCD_1920x1440, LCD_1920x1440,
LCD_2048x1536, LCD_2048x1536,
LCD_320x480, /* FSTN */ LCD_320x240, /* FSTN */
LCD_1400x1050, LCD_1400x1050,
LCD_1152x864, LCD_1152x864,
LCD_1152x768, LCD_1152x768,
LCD_1280x768, LCD_1280x768,
LCD_1024x600, LCD_1024x600,
LCD_640x480_2, /* DSTN */ LCD_320x240_2, /* DSTN */
LCD_640x480_3, /* DSTN */ LCD_320x240_3, /* DSTN */
LCD_848x480, LCD_848x480,
LCD_1280x800, LCD_1280x800,
LCD_1680x1050, LCD_1680x1050,
LCD_1280x720, LCD_1280x720,
LCD_1280x854,
LCD_CUSTOM, LCD_CUSTOM,
LCD_UNKNOWN LCD_UNKNOWN
}; };
...@@ -368,17 +466,36 @@ enum _SIS_CMDTYPE { ...@@ -368,17 +466,36 @@ enum _SIS_CMDTYPE {
AGP_CMD_QUEUE, AGP_CMD_QUEUE,
VM_CMD_QUEUE, VM_CMD_QUEUE,
}; };
typedef unsigned int SIS_CMDTYPE;
struct SIS_OH {
struct SIS_OH *poh_next;
struct SIS_OH *poh_prev;
u32 offset;
u32 size;
};
struct SIS_OHALLOC {
struct SIS_OHALLOC *poha_next;
struct SIS_OH aoh[1];
};
struct SIS_HEAP {
struct SIS_OH oh_free;
struct SIS_OH oh_used;
struct SIS_OH *poh_freelist;
struct SIS_OHALLOC *poha_chain;
u32 max_freesize;
struct sis_video_info *vinfo;
};
/* Our "par" */ /* Our "par" */
struct sis_video_info { struct sis_video_info {
int cardnumber; int cardnumber;
struct fb_info *memyselfandi; struct fb_info *memyselfandi;
SIS_HW_INFO sishw_ext; struct SiS_Private SiS_Pr;
SiS_Private SiS_Pr;
sisfb_info sisfbinfo; /* For ioctl SISFB_GET_INFO */ struct sisfb_info sisfbinfo; /* For ioctl SISFB_GET_INFO */
struct fb_var_screeninfo default_var; struct fb_var_screeninfo default_var;
...@@ -413,10 +530,12 @@ struct sis_video_info { ...@@ -413,10 +530,12 @@ struct sis_video_info {
BOOLEAN datavalid; BOOLEAN datavalid;
} sisfb_thismonitor; } sisfb_thismonitor;
int chip_id; unsigned short chip_id; /* PCI ID of chip */
unsigned short chip_vendor; /* PCI ID of vendor */
char myid[40]; char myid[40];
struct pci_dev *nbridge; struct pci_dev *nbridge;
struct pci_dev *lpcdev;
int mni; /* Mode number index */ int mni; /* Mode number index */
...@@ -430,6 +549,10 @@ struct sis_video_info { ...@@ -430,6 +549,10 @@ struct sis_video_info {
unsigned long mmio_base; unsigned long mmio_base;
unsigned long vga_base; unsigned long vga_base;
unsigned long video_offset;
unsigned long UMAsize, LFBsize;
SIS_IOTYPE1 *video_vbase; SIS_IOTYPE1 *video_vbase;
SIS_IOTYPE1 *mmio_vbase; SIS_IOTYPE1 *mmio_vbase;
...@@ -455,7 +578,6 @@ struct sis_video_info { ...@@ -455,7 +578,6 @@ struct sis_video_info {
int sisfb_fstn; int sisfb_fstn;
int sisfb_tvplug; int sisfb_tvplug;
int sisfb_tvstd; int sisfb_tvstd;
int sisfb_filter;
int sisfb_nocrt2rate; int sisfb_nocrt2rate;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
int sisfb_inverse; int sisfb_inverse;
...@@ -466,10 +588,8 @@ struct sis_video_info { ...@@ -466,10 +588,8 @@ struct sis_video_info {
SIS_IOTYPE1 *sisfb_heap_end; /* address */ SIS_IOTYPE1 *sisfb_heap_end; /* address */
u32 sisfb_heap_size; u32 sisfb_heap_size;
int havenoheap; int havenoheap;
#if 0
SIS_HEAP sisfb_heap;
#endif
struct SIS_HEAP sisfb_heap; /* This card's vram heap */
int video_bpp; int video_bpp;
int video_cmap_len; int video_cmap_len;
...@@ -479,6 +599,7 @@ struct sis_video_info { ...@@ -479,6 +599,7 @@ struct sis_video_info {
unsigned int chip; unsigned int chip;
u8 revision_id; u8 revision_id;
int sisvga_enabled; /* PCI device was enabled */
int video_linelength; /* real pitch */ int video_linelength; /* real pitch */
int scrnpitchCRT1; /* pitch regarding interlace */ int scrnpitchCRT1; /* pitch regarding interlace */
...@@ -486,7 +607,8 @@ struct sis_video_info { ...@@ -486,7 +607,8 @@ struct sis_video_info {
u16 DstColor; /* For 2d acceleration */ u16 DstColor; /* For 2d acceleration */
u32 SiS310_AccelDepth; u32 SiS310_AccelDepth;
u32 CommandReg; u32 CommandReg;
int cmdqueuelength; int cmdqueuelength; /* Current (for accel) */
u32 cmdQueueSize; /* Total size in KB */
spinlock_t lockaccel; /* Do not use outside of kernel! */ spinlock_t lockaccel; /* Do not use outside of kernel! */
...@@ -495,16 +617,19 @@ struct sis_video_info { ...@@ -495,16 +617,19 @@ struct sis_video_info {
unsigned int pcifunc; unsigned int pcifunc;
int accel; int accel;
int engineok;
u16 subsysvendor; u16 subsysvendor;
u16 subsysdevice; u16 subsysdevice;
u32 vbflags; /* Replacing deprecated stuff from above */ u32 vbflags; /* Replacing deprecated stuff from above */
u32 currentvbflags; u32 currentvbflags;
u32 vbflags2;
int lcdxres, lcdyres; int lcdxres, lcdyres;
int lcddefmodeidx, tvdefmodeidx, defmodeidx; int lcddefmodeidx, tvdefmodeidx, defmodeidx;
u32 CRT2LCDType; /* defined in "SIS_LCD_TYPE" */ u32 CRT2LCDType; /* defined in "SIS_LCD_TYPE" */
u32 curFSTN, curDSTN;
int current_bpp; int current_bpp;
int current_width; int current_width;
...@@ -515,6 +640,8 @@ struct sis_video_info { ...@@ -515,6 +640,8 @@ struct sis_video_info {
__u32 current_pixclock; __u32 current_pixclock;
int current_refresh_rate; int current_refresh_rate;
unsigned int current_base;
u8 mode_no; u8 mode_no;
u8 rate_idx; u8 rate_idx;
int modechanged; int modechanged;
...@@ -525,8 +652,12 @@ struct sis_video_info { ...@@ -525,8 +652,12 @@ struct sis_video_info {
#endif #endif
int newrom; int newrom;
int haveXGIROM;
int registered; int registered;
int warncount; int warncount;
#ifdef SIS_OLD_CONFIG_COMPAT
int ioctl32registered;
#endif
int sisvga_engine; int sisvga_engine;
int hwcursor_size; int hwcursor_size;
...@@ -546,28 +677,17 @@ struct sis_video_info { ...@@ -546,28 +677,17 @@ struct sis_video_info {
u8 sisfblocked; u8 sisfblocked;
struct sisfb_info sisfb_infoblock;
struct sisfb_cmd sisfb_command;
u32 sisfb_id;
u8 sisfb_can_post;
u8 sisfb_card_posted;
u8 sisfb_was_boot_device;
struct sis_video_info *next; struct sis_video_info *next;
}; };
typedef struct _SIS_OH {
struct _SIS_OH *poh_next;
struct _SIS_OH *poh_prev;
u32 offset;
u32 size;
} SIS_OH;
typedef struct _SIS_OHALLOC {
struct _SIS_OHALLOC *poha_next;
SIS_OH aoh[1];
} SIS_OHALLOC;
typedef struct _SIS_HEAP {
SIS_OH oh_free;
SIS_OH oh_used;
SIS_OH *poh_freelist;
SIS_OHALLOC *poha_chain;
u32 max_freesize;
struct sis_video_info *vinfo;
} SIS_HEAP;
#endif #endif
/* /*
* SiS 300/630/730/540/315/550/65x/74x/330/760 frame buffer driver * SiS 300/540/630[S]/730[S],
* for Linux kernels 2.4.x and 2.6.x * SiS 315[E|PRO]/550/[M]650/651/[M]661[F|M]X/740/[M]741[GX]/330/[M]760[GX],
* XGI V3XT/V5/V8, Z7
* frame buffer driver for Linux kernels >= 2.4.14 and >=2.6.3
* *
* 2D acceleration part * 2D acceleration part
* *
...@@ -19,7 +21,7 @@ ...@@ -19,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
* *
* Based on the XFree86/X.org driver which is * Based on the XFree86/X.org driver which is
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* Author: Thomas Winischhofer <thomas@winischhofer.net> * Author: Thomas Winischhofer <thomas@winischhofer.net>
* (see http://www.winischhofer.net/ * (see http://www.winischhofer.net/
...@@ -30,13 +32,11 @@ ...@@ -30,13 +32,11 @@
#include <linux/version.h> #include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/fb.h> #include <linux/fb.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include <linux/console.h> #include <linux/console.h>
#include <linux/selection.h> #endif
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/capability.h>
#include <linux/fs.h>
#include <linux/types.h> #include <linux/types.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -188,7 +188,7 @@ SiS300SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w ...@@ -188,7 +188,7 @@ SiS300SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w
} }
#endif #endif
/* 315/330 series ------------------------------------------------- */ /* 315/330/340 series ---------------------------------------------- */
#ifdef CONFIG_FB_SIS_315 #ifdef CONFIG_FB_SIS_315
static void static void
...@@ -202,7 +202,7 @@ SiS310SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int rop, int tra ...@@ -202,7 +202,7 @@ SiS310SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int rop, int tra
{ {
SiS310SetupDSTColorDepth(ivideo->DstColor); SiS310SetupDSTColorDepth(ivideo->DstColor);
SiS310SetupSRCPitch(ivideo->video_linelength) SiS310SetupSRCPitch(ivideo->video_linelength)
SiS310SetupDSTRect(ivideo->video_linelength, 0xffff) SiS310SetupDSTRect(ivideo->video_linelength, 0x0fff)
if(trans_color != -1) { if(trans_color != -1) {
SiS310SetupROP(0x0A) SiS310SetupROP(0x0A)
SiS310SetupSRCTrans(trans_color) SiS310SetupSRCTrans(trans_color)
...@@ -213,7 +213,7 @@ SiS310SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int rop, int tra ...@@ -213,7 +213,7 @@ SiS310SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int rop, int tra
/* SiSSetupCMDFlag(BITBLT | SRCVIDEO) */ /* SiSSetupCMDFlag(BITBLT | SRCVIDEO) */
} }
SiS310SetupCMDFlag(ivideo->SiS310_AccelDepth) SiS310SetupCMDFlag(ivideo->SiS310_AccelDepth)
/* The 315 series is smart enough to know the direction */ /* The chip is smart enough to know the direction */
} }
static void static void
...@@ -252,6 +252,9 @@ SiS310SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int ...@@ -252,6 +252,9 @@ SiS310SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int
} }
} }
srcbase += ivideo->video_offset;
dstbase += ivideo->video_offset;
SiS310SetupSRCBase(srcbase); SiS310SetupSRCBase(srcbase);
SiS310SetupDSTBase(dstbase); SiS310SetupDSTBase(dstbase);
SiS310SetupRect(width, height) SiS310SetupRect(width, height)
...@@ -264,7 +267,7 @@ static void ...@@ -264,7 +267,7 @@ static void
SiS310SetupForSolidFill(struct sis_video_info *ivideo, u32 color, int rop) SiS310SetupForSolidFill(struct sis_video_info *ivideo, u32 color, int rop)
{ {
SiS310SetupPATFG(color) SiS310SetupPATFG(color)
SiS310SetupDSTRect(ivideo->video_linelength, 0xffff) SiS310SetupDSTRect(ivideo->video_linelength, 0x0fff)
SiS310SetupDSTColorDepth(ivideo->DstColor); SiS310SetupDSTColorDepth(ivideo->DstColor);
SiS310SetupROP(sisPatALUConv[rop]) SiS310SetupROP(sisPatALUConv[rop])
SiS310SetupCMDFlag(PATFG | ivideo->SiS310_AccelDepth) SiS310SetupCMDFlag(PATFG | ivideo->SiS310_AccelDepth)
...@@ -279,6 +282,7 @@ SiS310SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w ...@@ -279,6 +282,7 @@ SiS310SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w
dstbase = ivideo->video_linelength * y; dstbase = ivideo->video_linelength * y;
y = 0; y = 0;
} }
dstbase += ivideo->video_offset;
SiS310SetupDSTBase(dstbase) SiS310SetupDSTBase(dstbase)
SiS310SetupDSTXY(x,y) SiS310SetupDSTXY(x,y)
SiS310SetupRect(w,h) SiS310SetupRect(w,h)
...@@ -296,7 +300,7 @@ int sisfb_initaccel(struct sis_video_info *ivideo) ...@@ -296,7 +300,7 @@ int sisfb_initaccel(struct sis_video_info *ivideo)
#ifdef SISFB_USE_SPINLOCKS #ifdef SISFB_USE_SPINLOCKS
spin_lock_init(&ivideo->lockaccel); spin_lock_init(&ivideo->lockaccel);
#endif #endif
return(0); return 0;
} }
void sisfb_syncaccel(struct sis_video_info *ivideo) void sisfb_syncaccel(struct sis_video_info *ivideo)
...@@ -319,19 +323,13 @@ int fbcon_sis_sync(struct fb_info *info) ...@@ -319,19 +323,13 @@ int fbcon_sis_sync(struct fb_info *info)
struct sis_video_info *ivideo = (struct sis_video_info *)info->par; struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
CRITFLAGS CRITFLAGS
if(!ivideo->accel) if((!ivideo->accel) || (!ivideo->engineok))
return 0; return 0;
if(ivideo->sisvga_engine == SIS_300_VGA) { CRITBEGIN
#ifdef CONFIG_FB_SIS_300 sisfb_syncaccel(ivideo);
SiS300Sync(ivideo);
#endif
} else {
#ifdef CONFIG_FB_SIS_315
SiS310Sync(ivideo);
#endif
}
CRITEND CRITEND
return 0; return 0;
} }
...@@ -344,18 +342,16 @@ void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -344,18 +342,16 @@ void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
int width, height; int width, height;
CRITFLAGS CRITFLAGS
if(info->state != FBINFO_STATE_RUNNING) { if(info->state != FBINFO_STATE_RUNNING)
return; return;
}
if(!ivideo->accel) { if((!ivideo->accel) || (!ivideo->engineok)) {
cfb_fillrect(info, rect); cfb_fillrect(info, rect);
return; return;
} }
if(!rect->width || !rect->height || rect->dx >= vxres || rect->dy >= vyres) { if(!rect->width || !rect->height || rect->dx >= vxres || rect->dy >= vyres)
return; return;
}
/* Clipping */ /* Clipping */
width = ((rect->dx + rect->width) > vxres) ? (vxres - rect->dx) : rect->width; width = ((rect->dx + rect->width) > vxres) ? (vxres - rect->dx) : rect->width;
...@@ -375,7 +371,6 @@ void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -375,7 +371,6 @@ void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
SiS300SetupForSolidFill(ivideo, col, myrops[rect->rop]); SiS300SetupForSolidFill(ivideo, col, myrops[rect->rop]);
SiS300SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height); SiS300SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height);
CRITEND CRITEND
SiS300Sync(ivideo);
#endif #endif
} else { } else {
#ifdef CONFIG_FB_SIS_315 #ifdef CONFIG_FB_SIS_315
...@@ -383,10 +378,10 @@ void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -383,10 +378,10 @@ void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
SiS310SetupForSolidFill(ivideo, col, myrops[rect->rop]); SiS310SetupForSolidFill(ivideo, col, myrops[rect->rop]);
SiS310SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height); SiS310SubsequentSolidFillRect(ivideo, rect->dx, rect->dy, width, height);
CRITEND CRITEND
SiS310Sync(ivideo);
#endif #endif
} }
sisfb_syncaccel(ivideo);
} }
void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area) void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area)
...@@ -398,20 +393,18 @@ void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area) ...@@ -398,20 +393,18 @@ void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area)
int height = area->height; int height = area->height;
CRITFLAGS CRITFLAGS
if(info->state != FBINFO_STATE_RUNNING) { if(info->state != FBINFO_STATE_RUNNING)
return; return;
}
if(!ivideo->accel) { if((!ivideo->accel) || (!ivideo->engineok)) {
cfb_copyarea(info, area); cfb_copyarea(info, area);
return; return;
} }
if(!width || !height || if(!width || !height ||
area->sx >= vxres || area->sy >= vyres || area->sx >= vxres || area->sy >= vyres ||
area->dx >= vxres || area->dy >= vyres) { area->dx >= vxres || area->dy >= vyres)
return; return;
}
/* Clipping */ /* Clipping */
if((area->sx + width) > vxres) width = vxres - area->sx; if((area->sx + width) > vxres) width = vxres - area->sx;
...@@ -430,248 +423,28 @@ void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area) ...@@ -430,248 +423,28 @@ void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area)
CRITBEGIN CRITBEGIN
SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1); SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1);
SiS300SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy, area->dx, area->dy, SiS300SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy,
width, height); area->dx, area->dy, width, height);
CRITEND CRITEND
SiS300Sync(ivideo);
#endif #endif
} else { } else {
#ifdef CONFIG_FB_SIS_315 #ifdef CONFIG_FB_SIS_315
CRITBEGIN CRITBEGIN
SiS310SetupForScreenToScreenCopy(ivideo, 3, -1); SiS310SetupForScreenToScreenCopy(ivideo, 3, -1);
SiS310SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy, area->dx, area->dy, SiS310SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy,
width, height); area->dx, area->dy, width, height);
CRITEND CRITEND
SiS310Sync(ivideo);
#endif
}
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) /* -------------- 2.4 --------------- */
void fbcon_sis_bmove(struct display *p, int srcy, int srcx,
int dsty, int dstx, int height, int width)
{
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
CRITFLAGS
if(!ivideo->accel) {
switch(ivideo->video_bpp) {
case 8:
#ifdef FBCON_HAS_CFB8
fbcon_cfb8_bmove(p, srcy, srcx, dsty, dstx, height, width);
#endif #endif
break;
case 16:
#ifdef FBCON_HAS_CFB16
fbcon_cfb16_bmove(p, srcy, srcx, dsty, dstx, height, width);
#endif
break;
case 32:
#ifdef FBCON_HAS_CFB32
fbcon_cfb32_bmove(p, srcy, srcx, dsty, dstx, height, width);
#endif
break;
}
return;
} }
srcx *= fontwidth(p); sisfb_syncaccel(ivideo);
srcy *= fontheight(p);
dstx *= fontwidth(p);
dsty *= fontheight(p);
width *= fontwidth(p);
height *= fontheight(p);
if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300
int xdir, ydir;
if(srcx < dstx) xdir = 0;
else xdir = 1;
if(srcy < dsty) ydir = 0;
else ydir = 1;
CRITBEGIN
SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1);
SiS300SubsequentScreenToScreenCopy(ivideo, srcx, srcy, dstx, dsty, width, height);
CRITEND
SiS300Sync(ivideo);
#endif
} else {
#ifdef CONFIG_FB_SIS_315
CRITBEGIN
SiS310SetupForScreenToScreenCopy(ivideo, 3, -1);
SiS310SubsequentScreenToScreenCopy(ivideo, srcx, srcy, dstx, dsty, width, height);
CRITEND
SiS310Sync(ivideo);
#endif
}
} }
static void fbcon_sis_clear(struct vc_data *conp, struct display *p,
int srcy, int srcx, int height, int width, int color)
{
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
CRITFLAGS
srcx *= fontwidth(p);
srcy *= fontheight(p);
width *= fontwidth(p);
height *= fontheight(p);
if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300
CRITBEGIN
SiS300SetupForSolidFill(ivideo, color, 3);
SiS300SubsequentSolidFillRect(ivideo, srcx, srcy, width, height);
CRITEND
SiS300Sync(ivideo);
#endif
} else {
#ifdef CONFIG_FB_SIS_315
CRITBEGIN
SiS310SetupForSolidFill(ivideo, color, 3);
SiS310SubsequentSolidFillRect(ivideo, srcx, srcy, width, height);
CRITEND
SiS310Sync(ivideo);
#endif #endif
}
}
void fbcon_sis_clear8(struct vc_data *conp, struct display *p,
int srcy, int srcx, int height, int width)
{
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
u32 bgx;
if(!ivideo->accel) {
#ifdef FBCON_HAS_CFB8
fbcon_cfb8_clear(conp, p, srcy, srcx, height, width);
#endif
return;
}
bgx = attr_bgcol_ec(p, conp);
fbcon_sis_clear(conp, p, srcy, srcx, height, width, bgx);
}
void fbcon_sis_clear16(struct vc_data *conp, struct display *p,
int srcy, int srcx, int height, int width)
{
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
u32 bgx;
if(!ivideo->accel) {
#ifdef FBCON_HAS_CFB16
fbcon_cfb16_clear(conp, p, srcy, srcx, height, width);
#endif
return;
}
bgx = ((u_int16_t*)p->dispsw_data)[attr_bgcol_ec(p, conp)];
fbcon_sis_clear(conp, p, srcy, srcx, height, width, bgx);
}
void fbcon_sis_clear32(struct vc_data *conp, struct display *p,
int srcy, int srcx, int height, int width)
{
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
u32 bgx;
if(!ivideo->accel) {
#ifdef FBCON_HAS_CFB32
fbcon_cfb32_clear(conp, p, srcy, srcx, height, width);
#endif
return;
}
bgx = ((u_int32_t*)p->dispsw_data)[attr_bgcol_ec(p, conp)];
fbcon_sis_clear(conp, p, srcy, srcx, height, width, bgx);
}
void fbcon_sis_revc(struct display *p, int srcx, int srcy) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) /* -------------- 2.4 --------------- */
{
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par;
CRITFLAGS
if(!ivideo->accel) {
switch(ivideo->video_bpp) {
case 16:
#ifdef FBCON_HAS_CFB16
fbcon_cfb16_revc(p, srcx, srcy);
#endif
break;
case 32:
#ifdef FBCON_HAS_CFB32
fbcon_cfb32_revc(p, srcx, srcy);
#endif
break;
}
return;
}
srcx *= fontwidth(p);
srcy *= fontheight(p);
if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300
CRITBEGIN
SiS300SetupForSolidFill(ivideo, 0, 0x0a);
SiS300SubsequentSolidFillRect(ivideo, srcx, srcy, fontwidth(p), fontheight(p));
CRITEND
SiS300Sync(ivideo);
#endif
} else {
#ifdef CONFIG_FB_SIS_315
CRITBEGIN
SiS310SetupForSolidFill(ivideo, 0, 0x0a);
SiS310SubsequentSolidFillRect(ivideo, srcx, srcy, fontwidth(p), fontheight(p));
CRITEND
SiS310Sync(ivideo);
#endif
}
}
#ifdef FBCON_HAS_CFB8 #include "sisfb_accel_2_4.h"
struct display_switch fbcon_sis8 = {
.setup = fbcon_cfb8_setup,
.bmove = fbcon_sis_bmove,
.clear = fbcon_sis_clear8,
.putc = fbcon_cfb8_putc,
.putcs = fbcon_cfb8_putcs,
.revc = fbcon_cfb8_revc,
.clear_margins = fbcon_cfb8_clear_margins,
.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
};
#endif
#ifdef FBCON_HAS_CFB16
struct display_switch fbcon_sis16 = {
.setup = fbcon_cfb16_setup,
.bmove = fbcon_sis_bmove,
.clear = fbcon_sis_clear16,
.putc = fbcon_cfb16_putc,
.putcs = fbcon_cfb16_putcs,
.revc = fbcon_sis_revc,
.clear_margins = fbcon_cfb16_clear_margins,
.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
};
#endif
#ifdef FBCON_HAS_CFB32
struct display_switch fbcon_sis32 = {
.setup = fbcon_cfb32_setup,
.bmove = fbcon_sis_bmove,
.clear = fbcon_sis_clear32,
.putc = fbcon_cfb32_putc,
.putcs = fbcon_cfb32_putcs,
.revc = fbcon_sis_revc,
.clear_margins = fbcon_cfb32_clear_margins,
.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
};
#endif
#endif /* KERNEL VERSION */ #endif /* KERNEL VERSION */
......
/* /*
* SiS 300/630/730/540/315/550/650/740 frame buffer driver * SiS 300/540/630[S]/730[S],
* for Linux kernels 2.4.x and 2.5.x * SiS 315[E|PRO]/550/[M]650/651/[M]661[F|M]X/740/[M]741[GX]/330/[M]760[GX],
* XGI V3XT/V5/V8, Z7
* frame buffer driver for Linux kernels >= 2.4.14 and >=2.6.3
* *
* 2D acceleration part * 2D acceleration part
* *
...@@ -281,6 +283,8 @@ ...@@ -281,6 +283,8 @@
#define SiS310Idle \ #define SiS310Idle \
{ \ { \
while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \ while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \ while( (MMIO_IN16(ivideo->mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; \
CmdQueLen = 0; \ CmdQueLen = 0; \
...@@ -402,6 +406,7 @@ void fbcon_sis_clear32(struct vc_data *conp, struct display *p, int srcy, ...@@ -402,6 +406,7 @@ void fbcon_sis_clear32(struct vc_data *conp, struct display *p, int srcy,
int srcx, int height, int width); int srcx, int height, int width);
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34)
int fbcon_sis_sync(struct fb_info *info);
void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect); void fbcon_sis_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area); void fbcon_sis_copyarea(struct fb_info *info, const struct fb_copyarea *area);
#endif #endif
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* /*
* SiS 300/305/540/630(S)/730(S) * SiS 300/305/540/630(S)/730(S),
* SiS 315(H/PRO)/55x/(M)65x/(M)661(F/M)X/740/741(GX)/330/(M)760 * SiS 315[E|PRO]/550/[M]65x/[M]66x[F|M|G]X/[M]74x[GX]/330/[M]76x[GX],
* XGI V3XT/V5/V8, Z7
* frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3 * frame buffer driver for Linux kernels >=2.4.14 and >=2.6.3
* *
* Copyright (C) 2001-2004 Thomas Winischhofer, Vienna, Austria. * Copyright (C) 2001-2005 Thomas Winischhofer, Vienna, Austria.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -23,13 +24,9 @@ ...@@ -23,13 +24,9 @@
#ifndef _SISFB_MAIN #ifndef _SISFB_MAIN
#define _SISFB_MAIN #define _SISFB_MAIN
#include <linux/spinlock.h>
#include "vstruct.h" #include "vstruct.h"
#include "sis.h" #include "sis.h"
#define MODE_INDEX_NONE 0 /* index for mode=none */
/* Fbcon stuff */ /* Fbcon stuff */
static struct fb_var_screeninfo my_default_var = { static struct fb_var_screeninfo my_default_var = {
.xres = 0, .xres = 0,
...@@ -60,6 +57,8 @@ static struct fb_var_screeninfo my_default_var = { ...@@ -60,6 +57,8 @@ static struct fb_var_screeninfo my_default_var = {
.vmode = FB_VMODE_NONINTERLACED, .vmode = FB_VMODE_NONINTERLACED,
}; };
#define MODE_INDEX_NONE 0 /* index for mode=none */
/* Boot-time parameters */ /* Boot-time parameters */
static int sisfb_off = 0; static int sisfb_off = 0;
static int sisfb_parm_mem = 0; static int sisfb_parm_mem = 0;
...@@ -93,7 +92,6 @@ static int sisfb_tvplug = -1; /* Tv plug type (for overriding autodetection) */ ...@@ -93,7 +92,6 @@ static int sisfb_tvplug = -1; /* Tv plug type (for overriding autodetection) */
static int sisfb_tvstd = -1; static int sisfb_tvstd = -1;
static int sisfb_tvxposoffset = 0; static int sisfb_tvxposoffset = 0;
static int sisfb_tvyposoffset = 0; static int sisfb_tvyposoffset = 0;
static int sisfb_filter = -1;
static int sisfb_nocrt2rate = 0; static int sisfb_nocrt2rate = 0;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
static int sisfb_inverse = 0; static int sisfb_inverse = 0;
...@@ -123,6 +121,8 @@ static struct sisfb_chip_info { ...@@ -123,6 +121,8 @@ static struct sisfb_chip_info {
{ SIS_650, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 650" }, { SIS_650, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 650" },
{ SIS_330, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 330" }, { SIS_330, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 330" },
{ SIS_660, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 660" }, { SIS_660, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "SiS 660" },
{ XGI_20, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI Z7" },
{ XGI_40, SIS_315_VGA, 1, HW_CURSOR_AREA_SIZE_315 * 4, SIS_CRT2_WENABLE_315, "XGI V3XT/V5/V8" },
}; };
static struct pci_device_id __devinitdata sisfb_pci_table[] = { static struct pci_device_id __devinitdata sisfb_pci_table[] = {
...@@ -139,6 +139,8 @@ static struct pci_device_id __devinitdata sisfb_pci_table[] = { ...@@ -139,6 +139,8 @@ static struct pci_device_id __devinitdata sisfb_pci_table[] = {
{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7}, { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_650_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7},
{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8}, { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8},
{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9}, { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_660_VGA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9},
{ PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_20, PCI_ANY_ID, PCI_ANY_ID, 0, 0,10},
{ PCI_VENDOR_ID_XGI,PCI_DEVICE_ID_XGI_40, PCI_ANY_ID, PCI_ANY_ID, 0, 0,11},
#endif #endif
{ 0 } { 0 }
}; };
...@@ -147,13 +149,12 @@ MODULE_DEVICE_TABLE(pci, sisfb_pci_table); ...@@ -147,13 +149,12 @@ MODULE_DEVICE_TABLE(pci, sisfb_pci_table);
static struct sis_video_info *card_list = NULL; static struct sis_video_info *card_list = NULL;
/* TODO: This is not handled card-wise because the DRM /* The memory heap is now handled card-wise, by using
does not refer to a unique fb when calling sis_alloc sis_malloc_new/sis_free_new. However, the DRM does
or sis_free. Therefore, this is handled globally for not do this yet. Until it does, we keep a "global"
now (hoping that nobody is crazy enough to run two heap which is actually the first card's one.
SiS cards at the same time).
*/ */
static SIS_HEAP sisfb_heap; static struct SIS_HEAP *sisfb_heap;
#define MD_SIS300 1 #define MD_SIS300 1
#define MD_SIS315 2 #define MD_SIS315 2
...@@ -181,8 +182,10 @@ static const struct _sisbios_mode { ...@@ -181,8 +182,10 @@ static const struct _sisbios_mode {
{"320x240x16", {0x56,0x56}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15, MD_SIS300|MD_SIS315}, {"320x240x16", {0x56,0x56}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15, MD_SIS300|MD_SIS315},
{"320x240x24", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15, MD_SIS300|MD_SIS315}, {"320x240x24", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15, MD_SIS300|MD_SIS315},
{"320x240x32", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15, MD_SIS300|MD_SIS315}, {"320x240x32", {0x53,0x53}, 0x0000, 0x0000, 320, 240, 32, 1, 40, 15, MD_SIS300|MD_SIS315},
{"320x240x8", {0x5a,0x5a}, 0x0132, 0x0000, 320, 480, 8, 1, 40, 30, MD_SIS315}, /* FSTN */ #define MODE_FSTN_8 9
/*10*/ {"320x240x16", {0x5b,0x5b}, 0x0135, 0x0000, 320, 480, 16, 1, 40, 30, MD_SIS315}, /* FSTN */ #define MODE_FSTN_16 10
{"320x240x8", {0x5a,0x5a}, 0x0132, 0x0000, 320, 240, 8, 1, 40, 15, MD_SIS315}, /* FSTN */
/*10*/ {"320x240x16", {0x5b,0x5b}, 0x0135, 0x0000, 320, 240, 16, 1, 40, 15, MD_SIS315}, /* FSTN */
{"400x300x8", {0x51,0x51}, 0x0133, 0x0000, 400, 300, 8, 1, 50, 18, MD_SIS300|MD_SIS315}, {"400x300x8", {0x51,0x51}, 0x0133, 0x0000, 400, 300, 8, 1, 50, 18, MD_SIS300|MD_SIS315},
{"400x300x16", {0x57,0x57}, 0x0136, 0x0000, 400, 300, 16, 1, 50, 18, MD_SIS300|MD_SIS315}, {"400x300x16", {0x57,0x57}, 0x0136, 0x0000, 400, 300, 16, 1, 50, 18, MD_SIS300|MD_SIS315},
{"400x300x24", {0x54,0x54}, 0x0000, 0x0000, 400, 300, 32, 1, 50, 18, MD_SIS300|MD_SIS315}, {"400x300x24", {0x54,0x54}, 0x0000, 0x0000, 400, 300, 32, 1, 50, 18, MD_SIS300|MD_SIS315},
...@@ -223,10 +226,12 @@ static const struct _sisbios_mode { ...@@ -223,10 +226,12 @@ static const struct _sisbios_mode {
{"800x600x24", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37, MD_SIS300|MD_SIS315}, {"800x600x24", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37, MD_SIS300|MD_SIS315},
{"800x600x32", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37, MD_SIS300|MD_SIS315}, {"800x600x32", {0x63,0x63}, 0x013b, 0x0115, 800, 600, 32, 2, 100, 37, MD_SIS300|MD_SIS315},
{"848x480x8", {0x39,0x39}, 0x0000, 0x0000, 848, 480, 8, 2, 106, 30, MD_SIS300|MD_SIS315}, {"848x480x8", {0x39,0x39}, 0x0000, 0x0000, 848, 480, 8, 2, 106, 30, MD_SIS300|MD_SIS315},
#define DEFAULT_MODE_848 48
{"848x480x16", {0x3b,0x3b}, 0x0000, 0x0000, 848, 480, 16, 2, 106, 30, MD_SIS300|MD_SIS315}, {"848x480x16", {0x3b,0x3b}, 0x0000, 0x0000, 848, 480, 16, 2, 106, 30, MD_SIS300|MD_SIS315},
{"848x480x24", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30, MD_SIS300|MD_SIS315}, {"848x480x24", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30, MD_SIS300|MD_SIS315},
/*50*/ {"848x480x32", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30, MD_SIS300|MD_SIS315}, /*50*/ {"848x480x32", {0x3e,0x3e}, 0x0000, 0x0000, 848, 480, 32, 2, 106, 30, MD_SIS300|MD_SIS315},
{"856x480x8", {0x3f,0x3f}, 0x0000, 0x0000, 856, 480, 8, 2, 107, 30, MD_SIS300|MD_SIS315}, {"856x480x8", {0x3f,0x3f}, 0x0000, 0x0000, 856, 480, 8, 2, 107, 30, MD_SIS300|MD_SIS315},
#define DEFAULT_MODE_856 52
{"856x480x16", {0x42,0x42}, 0x0000, 0x0000, 856, 480, 16, 2, 107, 30, MD_SIS300|MD_SIS315}, {"856x480x16", {0x42,0x42}, 0x0000, 0x0000, 856, 480, 16, 2, 107, 30, MD_SIS300|MD_SIS315},
{"856x480x24", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30, MD_SIS300|MD_SIS315}, {"856x480x24", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30, MD_SIS300|MD_SIS315},
{"856x480x32", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30, MD_SIS300|MD_SIS315}, {"856x480x32", {0x45,0x45}, 0x0000, 0x0000, 856, 480, 32, 2, 107, 30, MD_SIS300|MD_SIS315},
...@@ -270,42 +275,47 @@ static const struct _sisbios_mode { ...@@ -270,42 +275,47 @@ static const struct _sisbios_mode {
{"1280x800x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 800, 16, 1, 160, 50, MD_SIS315}, {"1280x800x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 800, 16, 1, 160, 50, MD_SIS315},
{"1280x800x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50, MD_SIS315}, {"1280x800x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50, MD_SIS315},
{"1280x800x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50, MD_SIS315}, {"1280x800x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 800, 32, 1, 160, 50, MD_SIS315},
{"1280x854x8", {0x14,0x14}, 0x0000, 0x0000, 1280, 854, 8, 1, 160, 53, MD_SIS315},
{"1280x854x16", {0x15,0x15}, 0x0000, 0x0000, 1280, 854, 16, 1, 160, 53, MD_SIS315},
{"1280x854x24", {0x16,0x16}, 0x0000, 0x0000, 1280, 854, 32, 1, 160, 53, MD_SIS315},
{"1280x854x32", {0x16,0x16}, 0x0000, 0x0000, 1280, 854, 32, 1, 160, 53, MD_SIS315},
{"1280x960x8", {0x7c,0x7c}, 0x0000, 0x0000, 1280, 960, 8, 1, 160, 60, MD_SIS300|MD_SIS315}, {"1280x960x8", {0x7c,0x7c}, 0x0000, 0x0000, 1280, 960, 8, 1, 160, 60, MD_SIS300|MD_SIS315},
{"1280x960x16", {0x7d,0x7d}, 0x0000, 0x0000, 1280, 960, 16, 1, 160, 60, MD_SIS300|MD_SIS315}, /*100*/ {"1280x960x16", {0x7d,0x7d}, 0x0000, 0x0000, 1280, 960, 16, 1, 160, 60, MD_SIS300|MD_SIS315},
{"1280x960x24", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60, MD_SIS300|MD_SIS315}, {"1280x960x24", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
{"1280x960x32", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60, MD_SIS300|MD_SIS315}, {"1280x960x32", {0x7e,0x7e}, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60, MD_SIS300|MD_SIS315},
{"1280x1024x8", {0x3a,0x3a}, 0x0107, 0x0107, 1280, 1024, 8, 2, 160, 64, MD_SIS300|MD_SIS315}, {"1280x1024x8", {0x3a,0x3a}, 0x0107, 0x0107, 1280, 1024, 8, 2, 160, 64, MD_SIS300|MD_SIS315},
/*100*/ {"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315}, {"1280x1024x16", {0x4d,0x4d}, 0x011a, 0x011a, 1280, 1024, 16, 2, 160, 64, MD_SIS300|MD_SIS315},
{"1280x1024x24", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315}, {"1280x1024x24", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
{"1280x1024x32", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315}, {"1280x1024x32", {0x65,0x65}, 0x013d, 0x011b, 1280, 1024, 32, 2, 160, 64, MD_SIS300|MD_SIS315},
{"1360x768x8", {0x48,0x48}, 0x0000, 0x0000, 1360, 768, 8, 1, 170, 48, MD_SIS300|MD_SIS315}, {"1360x768x8", {0x48,0x48}, 0x0000, 0x0000, 1360, 768, 8, 1, 170, 48, MD_SIS300|MD_SIS315},
{"1360x768x16", {0x4b,0x4b}, 0x0000, 0x0000, 1360, 768, 16, 1, 170, 48, MD_SIS300|MD_SIS315}, {"1360x768x16", {0x4b,0x4b}, 0x0000, 0x0000, 1360, 768, 16, 1, 170, 48, MD_SIS300|MD_SIS315},
{"1360x768x24", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48, MD_SIS300|MD_SIS315}, {"1360x768x24", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
{"1360x768x32", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48, MD_SIS300|MD_SIS315}, /*110*/ {"1360x768x32", {0x4e,0x4e}, 0x0000, 0x0000, 1360, 768, 32, 1, 170, 48, MD_SIS300|MD_SIS315},
{"1360x1024x8", {0x67,0x67}, 0x0000, 0x0000, 1360, 1024, 8, 1, 170, 64, MD_SIS300 }, {"1360x1024x8", {0x67,0x67}, 0x0000, 0x0000, 1360, 1024, 8, 1, 170, 64, MD_SIS300 },
#define DEFAULT_MODE_1360 112
{"1360x1024x16", {0x6f,0x6f}, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64, MD_SIS300 }, {"1360x1024x16", {0x6f,0x6f}, 0x0000, 0x0000, 1360, 1024, 16, 1, 170, 64, MD_SIS300 },
{"1360x1024x24", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300 }, {"1360x1024x24", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300 },
/*110*/ {"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300 }, {"1360x1024x32", {0x72,0x72}, 0x0000, 0x0000, 1360, 1024, 32, 1, 170, 64, MD_SIS300 },
{"1400x1050x8", {0x26,0x26}, 0x0000, 0x0000, 1400, 1050, 8, 1, 175, 65, MD_SIS315}, {"1400x1050x8", {0x26,0x26}, 0x0000, 0x0000, 1400, 1050, 8, 1, 175, 65, MD_SIS315},
{"1400x1050x16", {0x27,0x27}, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65, MD_SIS315}, {"1400x1050x16", {0x27,0x27}, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65, MD_SIS315},
{"1400x1050x24", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65, MD_SIS315}, {"1400x1050x24", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65, MD_SIS315},
{"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65, MD_SIS315}, {"1400x1050x32", {0x28,0x28}, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65, MD_SIS315},
{"1600x1200x8", {0x3c,0x3c}, 0x0130, 0x011c, 1600, 1200, 8, 1, 200, 75, MD_SIS300|MD_SIS315}, {"1600x1200x8", {0x3c,0x3c}, 0x0130, 0x011c, 1600, 1200, 8, 1, 200, 75, MD_SIS300|MD_SIS315},
{"1600x1200x16", {0x3d,0x3d}, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75, MD_SIS300|MD_SIS315}, /*120*/ {"1600x1200x16", {0x3d,0x3d}, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75, MD_SIS300|MD_SIS315},
{"1600x1200x24", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315}, {"1600x1200x24", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
{"1600x1200x32", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315}, {"1600x1200x32", {0x66,0x66}, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75, MD_SIS300|MD_SIS315},
{"1680x1050x8", {0x17,0x17}, 0x0000, 0x0000, 1680, 1050, 8, 1, 210, 65, MD_SIS315}, {"1680x1050x8", {0x17,0x17}, 0x0000, 0x0000, 1680, 1050, 8, 1, 210, 65, MD_SIS315},
/*120*/ {"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65, MD_SIS315}, {"1680x1050x16", {0x18,0x18}, 0x0000, 0x0000, 1680, 1050, 16, 1, 210, 65, MD_SIS315},
{"1680x1050x24", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65, MD_SIS315}, {"1680x1050x24", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65, MD_SIS315},
{"1680x1050x32", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65, MD_SIS315}, {"1680x1050x32", {0x19,0x19}, 0x0000, 0x0000, 1680, 1050, 32, 1, 210, 65, MD_SIS315},
{"1920x1080x8", {0x2c,0x2c}, 0x0000, 0x0000, 1920, 1080, 8, 1, 240, 67, MD_SIS315}, {"1920x1080x8", {0x2c,0x2c}, 0x0000, 0x0000, 1920, 1080, 8, 1, 240, 67, MD_SIS315},
{"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67, MD_SIS315}, {"1920x1080x16", {0x2d,0x2d}, 0x0000, 0x0000, 1920, 1080, 16, 1, 240, 67, MD_SIS315},
{"1920x1080x24", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67, MD_SIS315}, {"1920x1080x24", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67, MD_SIS315},
{"1920x1080x32", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67, MD_SIS315}, /*130*/ {"1920x1080x32", {0x73,0x73}, 0x0000, 0x0000, 1920, 1080, 32, 1, 240, 67, MD_SIS315},
{"1920x1440x8", {0x68,0x68}, 0x013f, 0x0000, 1920, 1440, 8, 1, 240, 75, MD_SIS300|MD_SIS315}, {"1920x1440x8", {0x68,0x68}, 0x013f, 0x0000, 1920, 1440, 8, 1, 240, 75, MD_SIS300|MD_SIS315},
{"1920x1440x16", {0x69,0x69}, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75, MD_SIS300|MD_SIS315}, {"1920x1440x16", {0x69,0x69}, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75, MD_SIS300|MD_SIS315},
{"1920x1440x24", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315}, {"1920x1440x24", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
/*130*/ {"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315}, {"1920x1440x32", {0x6b,0x6b}, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75, MD_SIS300|MD_SIS315},
{"2048x1536x8", {0x6c,0x6c}, 0x0000, 0x0000, 2048, 1536, 8, 1, 256, 96, MD_SIS315}, {"2048x1536x8", {0x6c,0x6c}, 0x0000, 0x0000, 2048, 1536, 8, 1, 256, 96, MD_SIS315},
{"2048x1536x16", {0x6d,0x6d}, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96, MD_SIS315}, {"2048x1536x16", {0x6d,0x6d}, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96, MD_SIS315},
{"2048x1536x24", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96, MD_SIS315}, {"2048x1536x24", {0x6e,0x6e}, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96, MD_SIS315},
...@@ -313,13 +323,13 @@ static const struct _sisbios_mode { ...@@ -313,13 +323,13 @@ static const struct _sisbios_mode {
{"\0", {0x00,0x00}, 0, 0, 0, 0, 0, 0, 0} {"\0", {0x00,0x00}, 0, 0, 0, 0, 0, 0, 0}
}; };
#define SIS_LCD_NUMBER 17 #define SIS_LCD_NUMBER 18
static const struct _sis_lcd_data { static struct _sis_lcd_data {
u32 lcdtype; u32 lcdtype;
u16 xres; u16 xres;
u16 yres; u16 yres;
u8 default_mode_idx; u8 default_mode_idx;
} sis_lcd_data[] = { } sis_lcd_data[] __devinitdata = {
{ LCD_640x480, 640, 480, 23 }, { LCD_640x480, 640, 480, 23 },
{ LCD_800x600, 800, 600, 43 }, { LCD_800x600, 800, 600, 43 },
{ LCD_1024x600, 1024, 600, 67 }, { LCD_1024x600, 1024, 600, 67 },
...@@ -329,34 +339,38 @@ static const struct _sis_lcd_data { ...@@ -329,34 +339,38 @@ static const struct _sis_lcd_data {
{ LCD_1280x720, 1280, 720, 83 }, { LCD_1280x720, 1280, 720, 83 },
{ LCD_1280x768, 1280, 768, 87 }, { LCD_1280x768, 1280, 768, 87 },
{ LCD_1280x800, 1280, 800, 91 }, { LCD_1280x800, 1280, 800, 91 },
{ LCD_1280x960, 1280, 960, 95 }, { LCD_1280x854, 1280, 854, 95 },
{ LCD_1280x1024, 1280, 1024, 99 }, { LCD_1280x960, 1280, 960, 99 },
{ LCD_1400x1050, 1400, 1050, 111 }, { LCD_1280x1024, 1280, 1024, 103 },
{ LCD_1680x1050, 1680, 1050, 119 }, { LCD_1400x1050, 1400, 1050, 115 },
{ LCD_1600x1200, 1600, 1200, 115 }, { LCD_1680x1050, 1680, 1050, 123 },
{ LCD_640x480_2, 640, 480, 23 }, { LCD_1600x1200, 1600, 1200, 119 },
{ LCD_640x480_3, 640, 480, 23 }, { LCD_320x240_2, 320, 240, 9 },
{ LCD_320x480, 320, 480, 9 }, { LCD_320x240_3, 320, 240, 9 },
{ LCD_320x240, 320, 240, 9 },
}; };
/* CR36 evaluation */ /* CR36 evaluation */
static const USHORT sis300paneltype[] = static unsigned short sis300paneltype[] __devinitdata = {
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768, LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768,
LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN,
LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN }; LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN, LCD_UNKNOWN
};
static const USHORT sis310paneltype[] = static unsigned short sis310paneltype[] __devinitdata = {
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
LCD_640x480_2, LCD_640x480_3, LCD_UNKNOWN, LCD_UNKNOWN }; LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN
};
static const USHORT sis661paneltype[] = static unsigned short sis661paneltype[] __devinitdata = {
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
LCD_1280x800, LCD_1680x1050, LCD_1280x720, LCD_UNKNOWN }; LCD_1280x800, LCD_1680x1050, LCD_1280x720, LCD_UNKNOWN
};
#define FL_550_DSTN 0x01 #define FL_550_DSTN 0x01
#define FL_550_FSTN 0x02 #define FL_550_FSTN 0x02
...@@ -413,7 +427,6 @@ static const struct _sis_vrate { ...@@ -413,7 +427,6 @@ static const struct _sis_vrate {
} sisfb_vrate[] = { } sisfb_vrate[] = {
{1, 320, 200, 70, TRUE}, {1, 320, 200, 70, TRUE},
{1, 320, 240, 60, TRUE}, {1, 320, 240, 60, TRUE},
{1, 320, 480, 60, TRUE},
{1, 400, 300, 60, TRUE}, {1, 400, 300, 60, TRUE},
{1, 512, 384, 60, TRUE}, {1, 512, 384, 60, TRUE},
{1, 640, 400, 72, TRUE}, {1, 640, 400, 72, TRUE},
...@@ -437,10 +450,11 @@ static const struct _sis_vrate { ...@@ -437,10 +450,11 @@ static const struct _sis_vrate {
{4, 1024, 768, 75, FALSE}, {5, 1024, 768, 85, TRUE}, {6, 1024, 768, 100, TRUE}, {4, 1024, 768, 75, FALSE}, {5, 1024, 768, 85, TRUE}, {6, 1024, 768, 100, TRUE},
{7, 1024, 768, 120, TRUE}, {7, 1024, 768, 120, TRUE},
{1, 1152, 768, 60, TRUE}, {1, 1152, 768, 60, TRUE},
{1, 1152, 864, 60, TRUE}, {1, 1152, 864, 75, TRUE}, {2, 1152, 864, 84, TRUE}, {1, 1152, 864, 60, TRUE}, {2, 1152, 864, 75, TRUE}, {3, 1152, 864, 84, TRUE},
{1, 1280, 720, 60, TRUE}, {2, 1280, 720, 75, TRUE}, {3, 1280, 720, 85, TRUE}, {1, 1280, 720, 60, TRUE}, {2, 1280, 720, 75, TRUE}, {3, 1280, 720, 85, TRUE},
{1, 1280, 768, 60, TRUE}, {1, 1280, 768, 60, TRUE},
{1, 1280, 800, 60, TRUE}, {1, 1280, 800, 60, TRUE},
{1, 1280, 854, 60, TRUE},
{1, 1280, 960, 60, TRUE}, {2, 1280, 960, 85, TRUE}, {1, 1280, 960, 60, TRUE}, {2, 1280, 960, 85, TRUE},
{1, 1280, 1024, 43, TRUE}, {2, 1280, 1024, 60, TRUE}, {3, 1280, 1024, 75, TRUE}, {1, 1280, 1024, 43, TRUE}, {2, 1280, 1024, 60, TRUE}, {3, 1280, 1024, 75, TRUE},
{4, 1280, 1024, 85, TRUE}, {4, 1280, 1024, 85, TRUE},
...@@ -459,12 +473,12 @@ static const struct _sis_vrate { ...@@ -459,12 +473,12 @@ static const struct _sis_vrate {
{0, 0, 0, 0, FALSE} {0, 0, 0, 0, FALSE}
}; };
static const struct _sisfbddcsmodes { static struct _sisfbddcsmodes {
u32 mask; u32 mask;
u16 h; u16 h;
u16 v; u16 v;
u32 d; u32 d;
} sisfb_ddcsmodes[] = { } sisfb_ddcsmodes[] __devinitdata = {
{ 0x10000, 67, 75, 108000}, { 0x10000, 67, 75, 108000},
{ 0x08000, 48, 72, 50000}, { 0x08000, 48, 72, 50000},
{ 0x04000, 46, 75, 49500}, { 0x04000, 46, 75, 49500},
...@@ -480,13 +494,13 @@ static const struct _sisfbddcsmodes { ...@@ -480,13 +494,13 @@ static const struct _sisfbddcsmodes {
{ 0x00001, 38, 60, 40000} { 0x00001, 38, 60, 40000}
}; };
static const struct _sisfbddcfmodes { static struct _sisfbddcfmodes {
u16 x; u16 x;
u16 y; u16 y;
u16 v; u16 v;
u16 h; u16 h;
u32 d; u32 d;
} sisfb_ddcfmodes[] = { } sisfb_ddcfmodes[] __devinitdata = {
{ 1280, 1024, 85, 92, 157500}, { 1280, 1024, 85, 92, 157500},
{ 1600, 1200, 60, 75, 162000}, { 1600, 1200, 60, 75, 162000},
{ 1600, 1200, 65, 82, 175500}, { 1600, 1200, 65, 82, 175500},
...@@ -643,6 +657,13 @@ static struct _customttable { ...@@ -643,6 +657,13 @@ static struct _customttable {
0, 0, 0, 0,
"Generic", "LVDS/Parallel 848x480", CUT_PANEL848, "PANEL848x480" "Generic", "LVDS/Parallel 848x480", CUT_PANEL848, "PANEL848x480"
}, },
{ 4322, "", "", /* never autodetected */
0,
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0, 0,
"Generic", "LVDS/Parallel 856x480", CUT_PANEL856, "PANEL856x480"
},
{ 0, "", "", { 0, "", "",
0, 0,
{ 0, 0, 0, 0 }, { 0, 0, 0, 0 },
...@@ -652,155 +673,6 @@ static struct _customttable { ...@@ -652,155 +673,6 @@ static struct _customttable {
} }
}; };
static const struct _sis_TV_filter {
u8 filter[9][4];
} sis_TV_filter[] = {
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_0 */
{0x00,0xE0,0x10,0x60},
{0x00,0xEE,0x10,0x44},
{0x00,0xF4,0x10,0x38},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0x00,0x00,0x10,0x20},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_1 */
{0x00,0xE0,0x10,0x60},
{0x00,0xEE,0x10,0x44},
{0x00,0xF4,0x10,0x38},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0x00,0x00,0x10,0x20},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_2 */
{0xF5,0xEE,0x1B,0x44},
{0xF8,0xF4,0x18,0x38},
{0xEB,0x04,0x25,0x18},
{0xF1,0x05,0x1F,0x16},
{0xF6,0x06,0x1A,0x14},
{0xFA,0x06,0x16,0x14},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_3 */
{0xF1,0x04,0x1F,0x18},
{0xEE,0x0D,0x22,0x06},
{0xF7,0x06,0x19,0x14},
{0xF4,0x0B,0x1C,0x0A},
{0xFA,0x07,0x16,0x12},
{0xF9,0x0A,0x17,0x0C},
{0x00,0x07,0x10,0x12},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_4 - 320 */
{0x00,0xE0,0x10,0x60},
{0x00,0xEE,0x10,0x44},
{0x00,0xF4,0x10,0x38},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0x00,0x00,0x10,0x20},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_5 - 640 */
{0xF5,0xEE,0x1B,0x44},
{0xF8,0xF4,0x18,0x38},
{0xEB,0x04,0x25,0x18},
{0xF1,0x05,0x1F,0x16},
{0xF6,0x06,0x1A,0x14},
{0xFA,0x06,0x16,0x14},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_6 - 720 */
{0xEB,0x04,0x25,0x18},
{0xE7,0x0E,0x29,0x04},
{0xEE,0x0C,0x22,0x08},
{0xF6,0x0B,0x1A,0x0A},
{0xF9,0x0A,0x17,0x0C},
{0xFC,0x0A,0x14,0x0C},
{0x00,0x08,0x10,0x10},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* NTSCFilter_7 - 800 */
{0xEC,0x02,0x24,0x1C},
{0xF2,0x04,0x1E,0x18},
{0xEB,0x15,0x25,0xF6},
{0xF4,0x10,0x1C,0x00},
{0xF8,0x0F,0x18,0x02},
{0x00,0x04,0x10,0x18},
{0x01,0x06,0x0F,0x14},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_0 */
{0x00,0xE0,0x10,0x60},
{0x00,0xEE,0x10,0x44},
{0x00,0xF4,0x10,0x38},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0x00,0x00,0x10,0x20},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_1 */
{0x00,0xE0,0x10,0x60},
{0x00,0xEE,0x10,0x44},
{0x00,0xF4,0x10,0x38},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0x00,0x00,0x10,0x20},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_2 */
{0xF5,0xEE,0x1B,0x44},
{0xF8,0xF4,0x18,0x38},
{0xF1,0xF7,0x01,0x32},
{0xF5,0xFB,0x1B,0x2A},
{0xF9,0xFF,0x17,0x22},
{0xFB,0x01,0x15,0x1E},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_3 */
{0xF5,0xFB,0x1B,0x2A},
{0xEE,0xFE,0x22,0x24},
{0xF3,0x00,0x1D,0x20},
{0xF9,0x03,0x17,0x1A},
{0xFB,0x02,0x14,0x1E},
{0xFB,0x04,0x15,0x18},
{0x00,0x06,0x10,0x14},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_4 - 320 */
{0x00,0xE0,0x10,0x60},
{0x00,0xEE,0x10,0x44},
{0x00,0xF4,0x10,0x38},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0x00,0x00,0x10,0x20},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_5 - 640 */
{0xF5,0xEE,0x1B,0x44},
{0xF8,0xF4,0x18,0x38},
{0xF1,0xF7,0x1F,0x32},
{0xF5,0xFB,0x1B,0x2A},
{0xF9,0xFF,0x17,0x22},
{0xFB,0x01,0x15,0x1E},
{0x00,0x04,0x10,0x18},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_6 - 720 */
{0xF5,0xEE,0x1B,0x2A},
{0xEE,0xFE,0x22,0x24},
{0xF3,0x00,0x1D,0x20},
{0xF9,0x03,0x17,0x1A},
{0xFB,0x02,0x14,0x1E},
{0xFB,0x04,0x15,0x18},
{0x00,0x06,0x10,0x14},
{0xFF,0xFF,0xFF,0xFF} }},
{ {{0x00,0x00,0x00,0x40}, /* PALFilter_7 - 800 */
{0xF5,0xEE,0x1B,0x44},
{0xF8,0xF4,0x18,0x38},
{0xFC,0xFB,0x14,0x2A},
{0xEB,0x05,0x25,0x16},
{0xF1,0x05,0x1F,0x16},
{0xFA,0x07,0x16,0x12},
{0x00,0x07,0x10,0x12},
{0xFF,0xFF,0xFF,0xFF} }}
};
/* ---------------------- Prototypes ------------------------- */ /* ---------------------- Prototypes ------------------------- */
/* Interface used by the world */ /* Interface used by the world */
...@@ -811,7 +683,6 @@ SISINITSTATIC int sisfb_setup(char *options); ...@@ -811,7 +683,6 @@ SISINITSTATIC int sisfb_setup(char *options);
/* Interface to the low level console driver */ /* Interface to the low level console driver */
SISINITSTATIC int sisfb_init(void); SISINITSTATIC int sisfb_init(void);
/* fbdev routines */ /* fbdev routines */
static int sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, static int sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,
struct fb_info *info); struct fb_info *info);
...@@ -893,63 +764,78 @@ static void sisfb_detect_VB_connect(struct sis_video_info *ivideo); ...@@ -893,63 +764,78 @@ static void sisfb_detect_VB_connect(struct sis_video_info *ivideo);
static void sisfb_get_VB_type(struct sis_video_info *ivideo); static void sisfb_get_VB_type(struct sis_video_info *ivideo);
static void sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val); static void sisfb_set_TVxposoffset(struct sis_video_info *ivideo, int val);
static void sisfb_set_TVyposoffset(struct sis_video_info *ivideo, int val); static void sisfb_set_TVyposoffset(struct sis_video_info *ivideo, int val);
#ifdef CONFIG_FB_SIS_300
unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg, unsigned int val);
unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
#endif
#ifdef CONFIG_FB_SIS_315
void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg, unsigned char val);
unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
#endif
/* SiS-specific exported functions */ /* SiS-specific exported functions */
void sis_malloc(struct sis_memreq *req); void sis_malloc(struct sis_memreq *req);
void sis_malloc_new(struct pci_dev *pdev, struct sis_memreq *req);
void sis_free(u32 base); void sis_free(u32 base);
void sis_free_new(struct pci_dev *pdev, u32 base);
/* Internal heap routines */ /* Internal heap routines */
static int sisfb_heap_init(struct sis_video_info *ivideo); static int sisfb_heap_init(struct sis_video_info *ivideo);
static SIS_OH *sisfb_poh_new_node(void); static struct SIS_OH * sisfb_poh_new_node(struct SIS_HEAP *memheap);
static SIS_OH *sisfb_poh_allocate(u32 size); static struct SIS_OH * sisfb_poh_allocate(struct SIS_HEAP *memheap, u32 size);
static void sisfb_delete_node(SIS_OH *poh); static void sisfb_delete_node(struct SIS_OH *poh);
static void sisfb_insert_node(SIS_OH *pohList, SIS_OH *poh); static void sisfb_insert_node(struct SIS_OH *pohList, struct SIS_OH *poh);
static SIS_OH *sisfb_poh_free(u32 base); static struct SIS_OH * sisfb_poh_free(struct SIS_HEAP *memheap, u32 base);
static void sisfb_free_node(SIS_OH *poh); static void sisfb_free_node(struct SIS_HEAP *memheap, struct SIS_OH *poh);
/* Sensing routines */
static void SiS_Sense30x(struct sis_video_info *ivideo);
static void SiS_SenseCh(struct sis_video_info *ivideo);
/* Routines from init.c/init301.c */ /* Routines from init.c/init301.c */
extern USHORT SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth, extern unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
BOOLEAN FSTN, USHORT CustomT, int LCDwith, int LCDheight); int VDisplay, int Depth, BOOLEAN FSTN, unsigned short CustomT,
extern USHORT SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth); int LCDwith, int LCDheight, unsigned int VBFlags2);
extern USHORT SiS_GetModeID_VGA2(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int Depth); extern unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
int VDisplay, int Depth, unsigned int VBFlags2);
extern void SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); extern unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,
extern BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo, USHORT ModeNo); int VDisplay, int Depth, unsigned int VBFlags2);
extern void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable); extern void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
extern void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable); extern BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
extern void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
extern BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); extern void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
extern BOOLEAN sisfb_gettotalfrommode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension, extern BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
unsigned char modeno, int *htotal, int *vtotal, unsigned char rateindex);
extern BOOLEAN sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno,
int *htotal, int *vtotal, unsigned char rateindex);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
extern int sisfb_mode_rate_to_dclock(SiS_Private *SiS_Pr, extern int sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr,
PSIS_HW_INFO HwDeviceExtension,
unsigned char modeno, unsigned char rateindex); unsigned char modeno, unsigned char rateindex);
extern int sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension, extern int sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
unsigned char modeno, unsigned char rateindex, unsigned char rateindex, struct fb_var_screeninfo *var);
struct fb_var_screeninfo *var); #endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
extern void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);
#endif #endif
/* Chrontel TV, DDC and DPMS functions */ /* Chrontel TV, DDC and DPMS functions */
extern USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempbx); extern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg);
extern void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempbx); extern void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
extern USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx); extern unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg);
extern void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempbx); extern void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
extern void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh); extern void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
extern void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime); unsigned char myor, unsigned char myand);
extern void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo); extern void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
extern USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine, extern void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
USHORT adaptnum, USHORT DDCdatatype, unsigned char *buffer); extern unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine,
extern USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr); unsigned short adaptnum, unsigned short DDCdatatype, unsigned char *buffer,
extern void SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo); unsigned int VBFlags2);
extern void SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr); extern unsigned short SiS_ReadDDC1Bit(struct SiS_Private *SiS_Pr);
extern void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo); #ifdef CONFIG_FB_SIS_315
extern void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceInfo); extern void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);
extern void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
#endif
extern void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
extern void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
#endif #endif
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* General type definitions for universal mode switching modules * General type definitions for universal mode switching modules
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,11 +50,10 @@ ...@@ -50,11 +50,10 @@
* *
*/ */
#ifndef _VGATYPES_ #ifndef _VGATYPES_H_
#define _VGATYPES_ #define _VGATYPES_H_
#ifdef LINUX_KERNEL /* We don't want the X driver to depend on kernel source */ #ifdef SIS_LINUX_KERNEL
#include <linux/ioctl.h>
#include <linux/version.h> #include <linux/version.h>
#endif #endif
...@@ -66,41 +65,13 @@ ...@@ -66,41 +65,13 @@
#define TRUE 1 #define TRUE 1
#endif #endif
#ifndef NULL
#define NULL 0
#endif
#ifndef CHAR
typedef char CHAR;
#endif
#ifndef SHORT
typedef short SHORT;
#endif
#ifndef LONG
typedef long LONG;
#endif
#ifndef UCHAR
typedef unsigned char UCHAR;
#endif
#ifndef USHORT
typedef unsigned short USHORT;
#endif
#ifndef ULONG
typedef unsigned long ULONG;
#endif
#ifndef BOOLEAN #ifndef BOOLEAN
typedef unsigned char BOOLEAN; typedef unsigned int BOOLEAN;
#endif #endif
#define SISIOMEMTYPE #define SISIOMEMTYPE
#ifdef LINUX_KERNEL #ifdef SIS_LINUX_KERNEL
typedef unsigned long SISIOADDRESS; typedef unsigned long SISIOADDRESS;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
#include <linux/types.h> /* Need __iomem */ #include <linux/types.h> /* Need __iomem */
...@@ -109,7 +80,7 @@ typedef unsigned long SISIOADDRESS; ...@@ -109,7 +80,7 @@ typedef unsigned long SISIOADDRESS;
#endif #endif
#endif #endif
#ifdef LINUX_XF86 #ifdef SIS_XORG_XF86
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0) #if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0)
typedef unsigned long IOADDRESS; typedef unsigned long IOADDRESS;
typedef unsigned long SISIOADDRESS; typedef unsigned long SISIOADDRESS;
...@@ -118,7 +89,7 @@ typedef IOADDRESS SISIOADDRESS; ...@@ -118,7 +89,7 @@ typedef IOADDRESS SISIOADDRESS;
#endif #endif
#endif #endif
enum _SIS_CHIP_TYPE { typedef enum _SIS_CHIP_TYPE {
SIS_VGALegacy = 0, SIS_VGALegacy = 0,
SIS_530, SIS_530,
SIS_OLD, SIS_OLD,
...@@ -128,115 +99,27 @@ enum _SIS_CHIP_TYPE { ...@@ -128,115 +99,27 @@ enum _SIS_CHIP_TYPE {
SIS_540, SIS_540,
SIS_315H, /* SiS 310 */ SIS_315H, /* SiS 310 */
SIS_315, SIS_315,
SIS_315PRO, SIS_315PRO, /* SiS 325 */
SIS_550, SIS_550,
SIS_650, SIS_650,
SIS_740, SIS_740,
SIS_330, SIS_330,
SIS_661, SIS_661,
SIS_741, SIS_741,
SIS_660, SIS_670,
SIS_660 = 35,
SIS_760, SIS_760,
SIS_761, SIS_761,
SIS_340, SIS_762,
SIS_770,
SIS_340 = 55,
SIS_341,
SIS_342,
XGI_20 = 75,
XGI_40,
MAX_SIS_CHIP MAX_SIS_CHIP
}; } SIS_CHIP_TYPE;
#ifndef SIS_HW_INFO
typedef struct _SIS_HW_INFO SIS_HW_INFO, *PSIS_HW_INFO;
struct _SIS_HW_INFO
{
#ifdef LINUX_XF86
PCITAG PciTag; /* PCI Tag */
#endif
UCHAR *pjVirtualRomBase; /* ROM image */
BOOLEAN UseROM; /* Use the ROM image if provided */
#ifdef LINUX_KERNEL
UCHAR SISIOMEMTYPE *pjVideoMemoryAddress;
/* base virtual memory address */
/* of Linear VGA memory */
ULONG ulVideoMemorySize; /* size, in bytes, of the memory on the board */
#endif
SISIOADDRESS ulIOAddress; /* base I/O address of VGA ports (0x3B0; relocated) */
UCHAR jChipType; /* Used to Identify SiS Graphics Chip */
/* defined in the enum "SIS_CHIP_TYPE" (above or sisfb.h) */
UCHAR jChipRevision; /* Used to Identify SiS Graphics Chip Revision */
BOOLEAN bIntegratedMMEnabled;/* supporting integration MM enable */
};
#endif
/* Addtional IOCTLs for communication sisfb <> X driver */
/* If changing this, sisfb.h must also be changed (for sisfb) */
#ifdef LINUX_XF86 /* We don't want the X driver to depend on the kernel source */
/* ioctl for identifying and giving some info (esp. memory heap start) */
#define SISFB_GET_INFO_SIZE 0x8004f300
#define SISFB_GET_INFO 0x8000f301 /* Must be patched with result from ..._SIZE at D[29:16] */
/* deprecated ioctl number (for older versions of sisfb) */
#define SISFB_GET_INFO_OLD 0x80046ef8
/* ioctls for tv parameters (position) */
#define SISFB_SET_TVPOSOFFSET 0x4004f304
/* lock sisfb from register access */
#define SISFB_SET_LOCK 0x4004f306
/* Structure argument for SISFB_GET_INFO ioctl */
typedef struct _SISFB_INFO sisfb_info, *psisfb_info;
struct _SISFB_INFO {
CARD32 sisfb_id; /* for identifying sisfb */
#ifndef SISFB_ID
#define SISFB_ID 0x53495346 /* Identify myself with 'SISF' */
#endif
CARD32 chip_id; /* PCI ID of detected chip */
CARD32 memory; /* video memory in KB which sisfb manages */
CARD32 heapstart; /* heap start (= sisfb "mem" argument) in KB */
CARD8 fbvidmode; /* current sisfb mode */
CARD8 sisfb_version;
CARD8 sisfb_revision;
CARD8 sisfb_patchlevel;
CARD8 sisfb_caps; /* sisfb's capabilities */
CARD32 sisfb_tqlen; /* turbo queue length (in KB) */
CARD32 sisfb_pcibus; /* The card's PCI ID */
CARD32 sisfb_pcislot;
CARD32 sisfb_pcifunc;
CARD8 sisfb_lcdpdc;
CARD8 sisfb_lcda;
CARD32 sisfb_vbflags;
CARD32 sisfb_currentvbflags;
CARD32 sisfb_scalelcd;
CARD32 sisfb_specialtiming;
CARD8 sisfb_haveemi;
CARD8 sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
CARD8 sisfb_haveemilcd;
CARD8 sisfb_lcdpdca;
CARD16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */
CARD8 reserved[208]; /* for future use */
};
#endif
#endif #endif
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* /*
* General structure definitions for universal mode switching modules * General structure definitions for universal mode switching modules
* *
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
* *
* If distributed as part of the Linux kernel, the following license terms * If distributed as part of the Linux kernel, the following license terms
* apply: * apply:
...@@ -50,180 +50,159 @@ ...@@ -50,180 +50,159 @@
* *
*/ */
#ifndef _VSTRUCT_ #ifndef _VSTRUCT_H_
#define _VSTRUCT_ #define _VSTRUCT_H_
typedef struct _SiS_PanelDelayTblStruct struct SiS_PanelDelayTbl {
{ unsigned char timer[2];
UCHAR timer[2]; };
} SiS_PanelDelayTblStruct;
struct SiS_LCDData {
typedef struct _SiS_LCDDataStruct unsigned short RVBHCMAX;
{ unsigned short RVBHCFACT;
USHORT RVBHCMAX; unsigned short VGAHT;
USHORT RVBHCFACT; unsigned short VGAVT;
USHORT VGAHT; unsigned short LCDHT;
USHORT VGAVT; unsigned short LCDVT;
USHORT LCDHT; };
USHORT LCDVT;
} SiS_LCDDataStruct; struct SiS_TVData {
unsigned short RVBHCMAX;
typedef struct _SiS_TVDataStruct unsigned short RVBHCFACT;
{ unsigned short VGAHT;
USHORT RVBHCMAX; unsigned short VGAVT;
USHORT RVBHCFACT; unsigned short TVHDE;
USHORT VGAHT; unsigned short TVVDE;
USHORT VGAVT; unsigned short RVBHRS;
USHORT TVHDE; unsigned char FlickerMode;
USHORT TVVDE; unsigned short HALFRVBHRS;
USHORT RVBHRS; unsigned short RVBHRS2;
UCHAR FlickerMode; unsigned char RY1COE;
USHORT HALFRVBHRS; unsigned char RY2COE;
UCHAR RY1COE; unsigned char RY3COE;
UCHAR RY2COE; unsigned char RY4COE;
UCHAR RY3COE; };
UCHAR RY4COE;
} SiS_TVDataStruct; struct SiS_LVDSData {
unsigned short VGAHT;
typedef struct _SiS_LVDSDataStruct unsigned short VGAVT;
{ unsigned short LCDHT;
USHORT VGAHT; unsigned short LCDVT;
USHORT VGAVT; };
USHORT LCDHT;
USHORT LCDVT; struct SiS_LVDSDes {
} SiS_LVDSDataStruct; unsigned short LCDHDES;
unsigned short LCDVDES;
typedef struct _SiS_LVDSDesStruct };
{
USHORT LCDHDES; struct SiS_LVDSCRT1Data {
USHORT LCDVDES; unsigned char CR[15];
} SiS_LVDSDesStruct; };
typedef struct _SiS_LVDSCRT1DataStruct struct SiS_CHTVRegData {
{ unsigned char Reg[16];
UCHAR CR[15]; };
} SiS_LVDSCRT1DataStruct;
struct SiS_St {
typedef struct _SiS_LCDACRT1DataStruct unsigned char St_ModeID;
{ unsigned short St_ModeFlag;
UCHAR CR[17]; unsigned char St_StTableIndex;
} SiS_LCDACRT1DataStruct; unsigned char St_CRT2CRTC;
unsigned char St_ResInfo;
typedef struct _SiS_CHTVRegDataStruct unsigned char VB_StTVFlickerIndex;
{ unsigned char VB_StTVEdgeIndex;
UCHAR Reg[16]; unsigned char VB_StTVYFilterIndex;
} SiS_CHTVRegDataStruct; unsigned char St_PDC;
};
typedef struct _SiS_StStruct
{ struct SiS_VBMode {
UCHAR St_ModeID; unsigned char ModeID;
USHORT St_ModeFlag; unsigned char VB_TVDelayIndex;
UCHAR St_StTableIndex; unsigned char VB_TVFlickerIndex;
UCHAR St_CRT2CRTC; unsigned char VB_TVPhaseIndex;
UCHAR St_ResInfo; unsigned char VB_TVYFilterIndex;
UCHAR VB_StTVFlickerIndex; unsigned char VB_LCDDelayIndex;
UCHAR VB_StTVEdgeIndex; unsigned char _VB_LCDHIndex;
UCHAR VB_StTVYFilterIndex; unsigned char _VB_LCDVIndex;
UCHAR St_PDC; };
} SiS_StStruct;
struct SiS_StandTable_S {
typedef struct _SiS_VBModeStruct unsigned char CRT_COLS;
{ unsigned char ROWS;
UCHAR ModeID; unsigned char CHAR_HEIGHT;
UCHAR VB_TVDelayIndex; unsigned short CRT_LEN;
UCHAR VB_TVFlickerIndex; unsigned char SR[4];
UCHAR VB_TVPhaseIndex; unsigned char MISC;
UCHAR VB_TVYFilterIndex; unsigned char CRTC[0x19];
UCHAR VB_LCDDelayIndex; unsigned char ATTR[0x14];
UCHAR _VB_LCDHIndex; unsigned char GRC[9];
UCHAR _VB_LCDVIndex; };
} SiS_VBModeStruct;
struct SiS_Ext {
typedef struct _SiS_StandTableStruct unsigned char Ext_ModeID;
{ unsigned short Ext_ModeFlag;
UCHAR CRT_COLS; unsigned short Ext_VESAID;
UCHAR ROWS; unsigned char Ext_RESINFO;
UCHAR CHAR_HEIGHT; unsigned char VB_ExtTVFlickerIndex;
USHORT CRT_LEN; unsigned char VB_ExtTVEdgeIndex;
UCHAR SR[4]; unsigned char VB_ExtTVYFilterIndex;
UCHAR MISC; unsigned char VB_ExtTVYFilterIndexROM661;
UCHAR CRTC[0x19]; unsigned char REFindex;
UCHAR ATTR[0x14]; char ROMMODEIDX661;
UCHAR GRC[9]; };
} SiS_StandTableStruct;
struct SiS_Ext2 {
typedef struct _SiS_ExtStruct unsigned short Ext_InfoFlag;
{ unsigned char Ext_CRT1CRTC;
UCHAR Ext_ModeID; unsigned char Ext_CRTVCLK;
USHORT Ext_ModeFlag; unsigned char Ext_CRT2CRTC;
USHORT Ext_VESAID; unsigned char Ext_CRT2CRTC_NS;
UCHAR Ext_RESINFO; unsigned char ModeID;
UCHAR VB_ExtTVFlickerIndex; unsigned short XRes;
UCHAR VB_ExtTVEdgeIndex; unsigned short YRes;
UCHAR VB_ExtTVYFilterIndex; unsigned char Ext_PDC;
UCHAR VB_ExtTVYFilterIndexROM661; unsigned char Ext_FakeCRT2CRTC;
UCHAR REFindex; unsigned char Ext_FakeCRT2Clk;
CHAR ROMMODEIDX661; unsigned char Ext_CRT1CRTC_NORM;
} SiS_ExtStruct; unsigned char Ext_CRTVCLK_NORM;
unsigned char Ext_CRT1CRTC_WIDE;
typedef struct _SiS_Ext2Struct unsigned char Ext_CRTVCLK_WIDE;
{ };
USHORT Ext_InfoFlag;
UCHAR Ext_CRT1CRTC; struct SiS_Part2PortTbl {
UCHAR Ext_CRTVCLK; unsigned char CR[12];
UCHAR Ext_CRT2CRTC; };
UCHAR Ext_CRT2CRTC_NS;
UCHAR ModeID; struct SiS_CRT1Table {
USHORT XRes; unsigned char CR[17];
USHORT YRes; };
UCHAR Ext_PDC;
} SiS_Ext2Struct; struct SiS_MCLKData {
unsigned char SR28,SR29,SR2A;
typedef struct _SiS_Part2PortTblStruct unsigned short CLOCK;
{ };
UCHAR CR[12];
} SiS_Part2PortTblStruct; struct SiS_VCLKData {
unsigned char SR2B,SR2C;
typedef struct _SiS_CRT1TableStruct unsigned short CLOCK;
{ };
UCHAR CR[17];
} SiS_CRT1TableStruct; struct SiS_VBVCLKData {
unsigned char Part4_A,Part4_B;
typedef struct _SiS_MCLKDataStruct unsigned short CLOCK;
{ };
UCHAR SR28,SR29,SR2A;
USHORT CLOCK; struct SiS_StResInfo_S {
} SiS_MCLKDataStruct; unsigned short HTotal;
unsigned short VTotal;
typedef struct _SiS_VCLKDataStruct };
{
UCHAR SR2B,SR2C; struct SiS_ModeResInfo_S {
USHORT CLOCK; unsigned short HTotal;
} SiS_VCLKDataStruct; unsigned short VTotal;
unsigned char XChar;
typedef struct _SiS_VBVCLKDataStruct unsigned char YChar;
{ };
UCHAR Part4_A,Part4_B;
USHORT CLOCK;
} SiS_VBVCLKDataStruct;
typedef struct _SiS_StResInfoStruct
{
USHORT HTotal;
USHORT VTotal;
} SiS_StResInfoStruct;
typedef struct _SiS_ModeResInfoStruct
{
USHORT HTotal;
USHORT VTotal;
UCHAR XChar;
UCHAR YChar;
} SiS_ModeResInfoStruct;
typedef UCHAR DRAM4Type[4];
/* Defines for SiS_CustomT */ /* Defines for SiS_CustomT */
/* Never change these for sisfb compatibility */ /* Never change these for sisfb compatibility */
...@@ -246,10 +225,30 @@ typedef UCHAR DRAM4Type[4]; ...@@ -246,10 +225,30 @@ typedef UCHAR DRAM4Type[4];
#define CUT_COMPAL1400_2 16 #define CUT_COMPAL1400_2 16
#define CUT_ASUSA2H_1 17 #define CUT_ASUSA2H_1 17
#define CUT_ASUSA2H_2 18 #define CUT_ASUSA2H_2 18
#define CUT_UNKNOWNLCD 19
#define CUT_AOP8060 20
#define CUT_PANEL856 21
typedef struct _SiS_Private struct SiS_Private
{ {
#ifdef LINUX_KERNEL unsigned char ChipType;
unsigned char ChipRevision;
#ifdef SIS_XORG_XF86
PCITAG PciTag;
#endif
#ifdef SIS_LINUX_KERNEL
void *ivideo;
#endif
unsigned char *VirtualRomBase;
BOOLEAN UseROM;
#ifdef SIS_LINUX_KERNEL
unsigned char SISIOMEMTYPE *VideoMemoryAddress;
unsigned int VideoMemorySize;
#endif
SISIOADDRESS IOAddress;
SISIOADDRESS IOAddress2; /* For dual chip XGI volari */
#ifdef SIS_LINUX_KERNEL
SISIOADDRESS RelIO; SISIOADDRESS RelIO;
#endif #endif
SISIOADDRESS SiS_P3c4; SISIOADDRESS SiS_P3c4;
...@@ -263,6 +262,7 @@ typedef struct _SiS_Private ...@@ -263,6 +262,7 @@ typedef struct _SiS_Private
SISIOADDRESS SiS_P3c8; SISIOADDRESS SiS_P3c8;
SISIOADDRESS SiS_P3c9; SISIOADDRESS SiS_P3c9;
SISIOADDRESS SiS_P3cb; SISIOADDRESS SiS_P3cb;
SISIOADDRESS SiS_P3cc;
SISIOADDRESS SiS_P3cd; SISIOADDRESS SiS_P3cd;
SISIOADDRESS SiS_P3da; SISIOADDRESS SiS_P3da;
SISIOADDRESS SiS_Part1Port; SISIOADDRESS SiS_Part1Port;
...@@ -272,394 +272,281 @@ typedef struct _SiS_Private ...@@ -272,394 +272,281 @@ typedef struct _SiS_Private
SISIOADDRESS SiS_Part5Port; SISIOADDRESS SiS_Part5Port;
SISIOADDRESS SiS_VidCapt; SISIOADDRESS SiS_VidCapt;
SISIOADDRESS SiS_VidPlay; SISIOADDRESS SiS_VidPlay;
USHORT SiS_IF_DEF_LVDS; unsigned short SiS_IF_DEF_LVDS;
USHORT SiS_IF_DEF_CH70xx; unsigned short SiS_IF_DEF_CH70xx;
USHORT SiS_IF_DEF_CONEX; unsigned short SiS_IF_DEF_CONEX;
USHORT SiS_IF_DEF_TRUMPION; unsigned short SiS_IF_DEF_TRUMPION;
USHORT SiS_IF_DEF_DSTN; unsigned short SiS_IF_DEF_DSTN;
USHORT SiS_IF_DEF_FSTN; unsigned short SiS_IF_DEF_FSTN;
USHORT SiS_SysFlags; unsigned short SiS_SysFlags;
UCHAR SiS_VGAINFO; unsigned char SiS_VGAINFO;
#ifdef LINUX_XF86 #ifdef SIS_XORG_XF86
USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4; unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
#endif #endif
BOOLEAN SiS_UseROM; BOOLEAN SiS_UseROM;
BOOLEAN SiS_ROMNew; BOOLEAN SiS_ROMNew;
BOOLEAN SiS_XGIROM;
BOOLEAN SiS_NeedRomModeData; BOOLEAN SiS_NeedRomModeData;
BOOLEAN PanelSelfDetected; BOOLEAN PanelSelfDetected;
BOOLEAN DDCPortMixup;
int SiS_CHOverScan; int SiS_CHOverScan;
BOOLEAN SiS_CHSOverScan; BOOLEAN SiS_CHSOverScan;
BOOLEAN SiS_ChSW; BOOLEAN SiS_ChSW;
BOOLEAN SiS_UseLCDA; BOOLEAN SiS_UseLCDA;
int SiS_UseOEM; int SiS_UseOEM;
ULONG SiS_CustomT; unsigned int SiS_CustomT;
USHORT SiS_Backup70xx; int SiS_UseWide, SiS_UseWideCRT2;
int SiS_TVBlue;
unsigned short SiS_Backup70xx;
BOOLEAN HaveEMI; BOOLEAN HaveEMI;
BOOLEAN HaveEMILCD; BOOLEAN HaveEMILCD;
BOOLEAN OverruleEMI; BOOLEAN OverruleEMI;
UCHAR EMI_30,EMI_31,EMI_32,EMI_33; unsigned char EMI_30,EMI_31,EMI_32,EMI_33;
USHORT SiS_EMIOffset; unsigned short SiS_EMIOffset;
SHORT PDC, PDCA; unsigned short SiS_PWDOffset;
UCHAR SiS_MyCR63; short PDC, PDCA;
USHORT SiS_CRT1Mode; unsigned char SiS_MyCR63;
USHORT SiS_flag_clearbuffer; unsigned short SiS_CRT1Mode;
unsigned short SiS_flag_clearbuffer;
int SiS_RAMType; int SiS_RAMType;
UCHAR SiS_ChannelAB; unsigned char SiS_ChannelAB;
UCHAR SiS_DataBusWidth; unsigned char SiS_DataBusWidth;
USHORT SiS_ModeType; unsigned short SiS_ModeType;
USHORT SiS_VBInfo; unsigned short SiS_VBInfo;
USHORT SiS_TVMode; unsigned short SiS_TVMode;
USHORT SiS_LCDResInfo; unsigned short SiS_LCDResInfo;
USHORT SiS_LCDTypeInfo; unsigned short SiS_LCDTypeInfo;
USHORT SiS_LCDInfo; unsigned short SiS_LCDInfo;
USHORT SiS_LCDInfo661; unsigned short SiS_LCDInfo661;
USHORT SiS_VBType; unsigned short SiS_VBType;
USHORT SiS_VBExtInfo; unsigned short SiS_VBExtInfo;
USHORT SiS_YPbPr; unsigned short SiS_YPbPr;
USHORT SiS_SelectCRT2Rate; unsigned short SiS_SelectCRT2Rate;
USHORT SiS_SetFlag; unsigned short SiS_SetFlag;
USHORT SiS_RVBHCFACT; unsigned short SiS_RVBHCFACT;
USHORT SiS_RVBHCMAX; unsigned short SiS_RVBHCMAX;
USHORT SiS_RVBHRS; unsigned short SiS_RVBHRS;
USHORT SiS_VGAVT; unsigned short SiS_RVBHRS2;
USHORT SiS_VGAHT; unsigned short SiS_VGAVT;
USHORT SiS_VT; unsigned short SiS_VGAHT;
USHORT SiS_HT; unsigned short SiS_VT;
USHORT SiS_VGAVDE; unsigned short SiS_HT;
USHORT SiS_VGAHDE; unsigned short SiS_VGAVDE;
USHORT SiS_VDE; unsigned short SiS_VGAHDE;
USHORT SiS_HDE; unsigned short SiS_VDE;
USHORT SiS_NewFlickerMode; unsigned short SiS_HDE;
USHORT SiS_RY1COE; unsigned short SiS_NewFlickerMode;
USHORT SiS_RY2COE; unsigned short SiS_RY1COE;
USHORT SiS_RY3COE; unsigned short SiS_RY2COE;
USHORT SiS_RY4COE; unsigned short SiS_RY3COE;
USHORT SiS_LCDHDES; unsigned short SiS_RY4COE;
USHORT SiS_LCDVDES; unsigned short SiS_LCDHDES;
USHORT SiS_DDC_Port; unsigned short SiS_LCDVDES;
USHORT SiS_DDC_Index; unsigned short SiS_DDC_Port;
USHORT SiS_DDC_Data; unsigned short SiS_DDC_Index;
USHORT SiS_DDC_NData; unsigned short SiS_DDC_Data;
USHORT SiS_DDC_Clk; unsigned short SiS_DDC_NData;
USHORT SiS_DDC_NClk; unsigned short SiS_DDC_Clk;
USHORT SiS_DDC_DeviceAddr; unsigned short SiS_DDC_NClk;
USHORT SiS_DDC_ReadAddr; unsigned short SiS_DDC_DeviceAddr;
USHORT SiS_DDC_SecAddr; unsigned short SiS_DDC_ReadAddr;
USHORT SiS_ChrontelInit; unsigned short SiS_DDC_SecAddr;
unsigned short SiS_ChrontelInit;
BOOLEAN SiS_SensibleSR11; BOOLEAN SiS_SensibleSR11;
USHORT SiS661LCD2TableSize; unsigned short SiS661LCD2TableSize;
USHORT SiS_PanelMinLVDS; unsigned short SiS_PanelMinLVDS;
USHORT SiS_PanelMin301; unsigned short SiS_PanelMin301;
const SiS_StStruct *SiS_SModeIDTable; const struct SiS_St *SiS_SModeIDTable;
const SiS_StandTableStruct *SiS_StandTable; const struct SiS_StandTable_S *SiS_StandTable;
const SiS_ExtStruct *SiS_EModeIDTable; const struct SiS_Ext *SiS_EModeIDTable;
const SiS_Ext2Struct *SiS_RefIndex; const struct SiS_Ext2 *SiS_RefIndex;
const SiS_VBModeStruct *SiS_VBModeIDTable; const struct SiS_VBMode *SiS_VBModeIDTable;
const SiS_CRT1TableStruct *SiS_CRT1Table; const struct SiS_CRT1Table *SiS_CRT1Table;
const SiS_MCLKDataStruct *SiS_MCLKData_0; const struct SiS_MCLKData *SiS_MCLKData_0;
const SiS_MCLKDataStruct *SiS_MCLKData_1; const struct SiS_MCLKData *SiS_MCLKData_1;
SiS_VCLKDataStruct *SiS_VCLKData; struct SiS_VCLKData *SiS_VCLKData;
SiS_VBVCLKDataStruct *SiS_VBVCLKData; struct SiS_VBVCLKData *SiS_VBVCLKData;
const SiS_StResInfoStruct *SiS_StResInfo; const struct SiS_StResInfo_S *SiS_StResInfo;
const SiS_ModeResInfoStruct *SiS_ModeResInfo; const struct SiS_ModeResInfo_S *SiS_ModeResInfo;
const UCHAR *pSiS_OutputSelect; const unsigned char *pSiS_OutputSelect;
const UCHAR *pSiS_SoftSetting; const unsigned char *pSiS_SoftSetting;
const DRAM4Type *SiS_SR15; /* pointer : point to array */ const unsigned char *SiS_SR15;
#ifdef LINUX_KERNEL
UCHAR *pSiS_SR07;
const DRAM4Type *SiS_CR40; /* pointer : point to array */
UCHAR *SiS_CR49;
UCHAR *SiS_SR25;
UCHAR *pSiS_SR1F;
UCHAR *pSiS_SR21;
UCHAR *pSiS_SR22;
UCHAR *pSiS_SR23;
UCHAR *pSiS_SR24;
UCHAR *pSiS_SR31;
UCHAR *pSiS_SR32;
UCHAR *pSiS_SR33;
UCHAR *pSiS_CRT2Data_1_2;
UCHAR *pSiS_CRT2Data_4_D;
UCHAR *pSiS_CRT2Data_4_E;
UCHAR *pSiS_CRT2Data_4_10;
const USHORT *pSiS_RGBSenseData;
const USHORT *pSiS_VideoSenseData;
const USHORT *pSiS_YCSenseData;
const USHORT *pSiS_RGBSenseData2;
const USHORT *pSiS_VideoSenseData2;
const USHORT *pSiS_YCSenseData2;
#endif
const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl; const struct SiS_PanelDelayTbl *SiS_PanelDelayTbl;
const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS; const struct SiS_PanelDelayTbl *SiS_PanelDelayTblLVDS;
/* SiS bridge */ /* SiS bridge */
const UCHAR *SiS_NTSCPhase; const struct SiS_LCDData *SiS_ExtLCD1024x768Data;
const UCHAR *SiS_PALPhase; const struct SiS_LCDData *SiS_St2LCD1024x768Data;
const UCHAR *SiS_NTSCPhase2; const struct SiS_LCDData *SiS_LCD1280x720Data;
const UCHAR *SiS_PALPhase2; const struct SiS_LCDData *SiS_StLCD1280x768_2Data;
const UCHAR *SiS_PALMPhase; const struct SiS_LCDData *SiS_ExtLCD1280x768_2Data;
const UCHAR *SiS_PALNPhase; const struct SiS_LCDData *SiS_LCD1280x800Data;
const UCHAR *SiS_PALMPhase2; const struct SiS_LCDData *SiS_LCD1280x800_2Data;
const UCHAR *SiS_PALNPhase2; const struct SiS_LCDData *SiS_LCD1280x854Data;
const UCHAR *SiS_SpecialPhase; const struct SiS_LCDData *SiS_LCD1280x960Data;
const UCHAR *SiS_SpecialPhaseM; const struct SiS_LCDData *SiS_ExtLCD1280x1024Data;
const UCHAR *SiS_SpecialPhaseJ; const struct SiS_LCDData *SiS_St2LCD1280x1024Data;
const SiS_LCDDataStruct *SiS_ExtLCD1024x768Data; const struct SiS_LCDData *SiS_StLCD1400x1050Data;
const SiS_LCDDataStruct *SiS_St2LCD1024x768Data; const struct SiS_LCDData *SiS_ExtLCD1400x1050Data;
const SiS_LCDDataStruct *SiS_LCD1280x720Data; const struct SiS_LCDData *SiS_StLCD1600x1200Data;
const SiS_LCDDataStruct *SiS_StLCD1280x768_2Data; const struct SiS_LCDData *SiS_ExtLCD1600x1200Data;
const SiS_LCDDataStruct *SiS_ExtLCD1280x768_2Data; const struct SiS_LCDData *SiS_LCD1680x1050Data;
const SiS_LCDDataStruct *SiS_LCD1280x800Data; const struct SiS_LCDData *SiS_NoScaleData;
const SiS_LCDDataStruct *SiS_LCD1280x800_2Data; const struct SiS_TVData *SiS_StPALData;
const SiS_LCDDataStruct *SiS_LCD1280x960Data; const struct SiS_TVData *SiS_ExtPALData;
const SiS_LCDDataStruct *SiS_ExtLCD1280x1024Data; const struct SiS_TVData *SiS_StNTSCData;
const SiS_LCDDataStruct *SiS_St2LCD1280x1024Data; const struct SiS_TVData *SiS_ExtNTSCData;
const SiS_LCDDataStruct *SiS_StLCD1400x1050Data; const struct SiS_TVData *SiS_St1HiTVData;
const SiS_LCDDataStruct *SiS_ExtLCD1400x1050Data; const struct SiS_TVData *SiS_St2HiTVData;
const SiS_LCDDataStruct *SiS_StLCD1600x1200Data; const struct SiS_TVData *SiS_ExtHiTVData;
const SiS_LCDDataStruct *SiS_ExtLCD1600x1200Data; const struct SiS_TVData *SiS_St525iData;
const SiS_LCDDataStruct *SiS_LCD1680x1050Data; const struct SiS_TVData *SiS_St525pData;
const SiS_LCDDataStruct *SiS_NoScaleData; const struct SiS_TVData *SiS_St750pData;
const SiS_TVDataStruct *SiS_StPALData; const struct SiS_TVData *SiS_Ext525iData;
const SiS_TVDataStruct *SiS_ExtPALData; const struct SiS_TVData *SiS_Ext525pData;
const SiS_TVDataStruct *SiS_StNTSCData; const struct SiS_TVData *SiS_Ext750pData;
const SiS_TVDataStruct *SiS_ExtNTSCData; const unsigned char *SiS_NTSCTiming;
const SiS_TVDataStruct *SiS_St1HiTVData; const unsigned char *SiS_PALTiming;
const SiS_TVDataStruct *SiS_St2HiTVData; const unsigned char *SiS_HiTVExtTiming;
const SiS_TVDataStruct *SiS_ExtHiTVData; const unsigned char *SiS_HiTVSt1Timing;
const SiS_TVDataStruct *SiS_St525iData; const unsigned char *SiS_HiTVSt2Timing;
const SiS_TVDataStruct *SiS_St525pData; const unsigned char *SiS_HiTVGroup3Data;
const SiS_TVDataStruct *SiS_St750pData; const unsigned char *SiS_HiTVGroup3Simu;
const SiS_TVDataStruct *SiS_Ext525iData;
const SiS_TVDataStruct *SiS_Ext525pData;
const SiS_TVDataStruct *SiS_Ext750pData;
const UCHAR *SiS_NTSCTiming;
const UCHAR *SiS_PALTiming;
const UCHAR *SiS_HiTVExtTiming;
const UCHAR *SiS_HiTVSt1Timing;
const UCHAR *SiS_HiTVSt2Timing;
const UCHAR *SiS_HiTVGroup3Data;
const UCHAR *SiS_HiTVGroup3Simu;
#if 0 #if 0
const UCHAR *SiS_HiTVTextTiming; const unsigned char *SiS_HiTVTextTiming;
const UCHAR *SiS_HiTVGroup3Text; const unsigned char *SiS_HiTVGroup3Text;
#endif #endif
const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_1; const struct SiS_Part2PortTbl *SiS_CRT2Part2_1024x768_1;
const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_1; const struct SiS_Part2PortTbl *SiS_CRT2Part2_1024x768_2;
const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_2; const struct SiS_Part2PortTbl *SiS_CRT2Part2_1024x768_3;
const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_2;
const SiS_Part2PortTblStruct *SiS_CRT2Part2_1024x768_3;
const SiS_Part2PortTblStruct *SiS_CRT2Part2_1280x1024_3;
/* LVDS, Chrontel */ /* LVDS, Chrontel */
const SiS_LVDSDataStruct *SiS_LVDS800x600Data_1; const struct SiS_LVDSData *SiS_LVDS320x240Data_1;
const SiS_LVDSDataStruct *SiS_LVDS800x600Data_2; const struct SiS_LVDSData *SiS_LVDS320x240Data_2;
const SiS_LVDSDataStruct *SiS_LVDS1024x768Data_1; const struct SiS_LVDSData *SiS_LVDS640x480Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1024x768Data_2; const struct SiS_LVDSData *SiS_LVDS800x600Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1280x1024Data_1; const struct SiS_LVDSData *SiS_LVDS1024x600Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1280x1024Data_2; const struct SiS_LVDSData *SiS_LVDS1024x768Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1280x960Data_1; const struct SiS_LVDSData *SiS_LVDSBARCO1366Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1280x960Data_2; const struct SiS_LVDSData *SiS_LVDSBARCO1366Data_2;
const SiS_LVDSDataStruct *SiS_LVDS1400x1050Data_1; const struct SiS_LVDSData *SiS_LVDSBARCO1024Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1400x1050Data_2; const struct SiS_LVDSData *SiS_LVDS848x480Data_1;
const SiS_LVDSDataStruct *SiS_LVDS1600x1200Data_1; const struct SiS_LVDSData *SiS_LVDS848x480Data_2;
const SiS_LVDSDataStruct *SiS_LVDS1600x1200Data_2; const struct SiS_LVDSData *SiS_CHTVUNTSCData;
const SiS_LVDSDataStruct *SiS_LVDS1280x768Data_1; const struct SiS_LVDSData *SiS_CHTVONTSCData;
const SiS_LVDSDataStruct *SiS_LVDS1280x768Data_2; const struct SiS_LVDSData *SiS_CHTVUPALData;
const SiS_LVDSDataStruct *SiS_LVDS1024x600Data_1; const struct SiS_LVDSData *SiS_CHTVOPALData;
const SiS_LVDSDataStruct *SiS_LVDS1024x600Data_2; const struct SiS_LVDSData *SiS_CHTVUPALMData;
const SiS_LVDSDataStruct *SiS_LVDS1152x768Data_1; const struct SiS_LVDSData *SiS_CHTVOPALMData;
const SiS_LVDSDataStruct *SiS_LVDS1152x768Data_2; const struct SiS_LVDSData *SiS_CHTVUPALNData;
const SiS_LVDSDataStruct *SiS_LVDS640x480Data_1; const struct SiS_LVDSData *SiS_CHTVOPALNData;
const SiS_LVDSDataStruct *SiS_LVDS640x480Data_2; const struct SiS_LVDSData *SiS_CHTVSOPALData;
const SiS_LVDSDataStruct *SiS_LVDS320x480Data_1;
const SiS_LVDSDataStruct *SiS_LVDSXXXxXXXData_1; const struct SiS_LVDSDes *SiS_PanelType04_1a;
const SiS_LVDSDataStruct *SiS_LVDSBARCO1366Data_1; const struct SiS_LVDSDes *SiS_PanelType04_2a;
const SiS_LVDSDataStruct *SiS_LVDSBARCO1366Data_2; const struct SiS_LVDSDes *SiS_PanelType04_1b;
const SiS_LVDSDataStruct *SiS_LVDSBARCO1024Data_1; const struct SiS_LVDSDes *SiS_PanelType04_2b;
const SiS_LVDSDataStruct *SiS_LVDSBARCO1024Data_2;
const SiS_LVDSDataStruct *SiS_LVDS848x480Data_1; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_1;
const SiS_LVDSDataStruct *SiS_LVDS848x480Data_2; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_2;
const SiS_LVDSDataStruct *SiS_CHTVUNTSCData; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_2_H;
const SiS_LVDSDataStruct *SiS_CHTVONTSCData; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_3;
const SiS_LVDSDataStruct *SiS_CHTVUPALData; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1320x240_3_H;
const SiS_LVDSDataStruct *SiS_CHTVOPALData; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1640x480_1;
const SiS_LVDSDataStruct *SiS_CHTVUPALMData; const struct SiS_LVDSCRT1Data *SiS_LVDSCRT1640x480_1_H;
const SiS_LVDSDataStruct *SiS_CHTVOPALMData; const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1UNTSC;
const SiS_LVDSDataStruct *SiS_CHTVUPALNData; const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1ONTSC;
const SiS_LVDSDataStruct *SiS_CHTVOPALNData; const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1UPAL;
const SiS_LVDSDataStruct *SiS_CHTVSOPALData; const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1OPAL;
const struct SiS_LVDSCRT1Data *SiS_CHTVCRT1SOPAL;
const SiS_LVDSDesStruct *SiS_PanelType00_1;
const SiS_LVDSDesStruct *SiS_PanelType01_1; const struct SiS_CHTVRegData *SiS_CHTVReg_UNTSC;
const SiS_LVDSDesStruct *SiS_PanelType02_1; const struct SiS_CHTVRegData *SiS_CHTVReg_ONTSC;
const SiS_LVDSDesStruct *SiS_PanelType03_1; const struct SiS_CHTVRegData *SiS_CHTVReg_UPAL;
const SiS_LVDSDesStruct *SiS_PanelType04_1; const struct SiS_CHTVRegData *SiS_CHTVReg_OPAL;
const SiS_LVDSDesStruct *SiS_PanelType05_1; const struct SiS_CHTVRegData *SiS_CHTVReg_UPALM;
const SiS_LVDSDesStruct *SiS_PanelType06_1; const struct SiS_CHTVRegData *SiS_CHTVReg_OPALM;
const SiS_LVDSDesStruct *SiS_PanelType07_1; const struct SiS_CHTVRegData *SiS_CHTVReg_UPALN;
const SiS_LVDSDesStruct *SiS_PanelType08_1; const struct SiS_CHTVRegData *SiS_CHTVReg_OPALN;
const SiS_LVDSDesStruct *SiS_PanelType09_1; const struct SiS_CHTVRegData *SiS_CHTVReg_SOPAL;
const SiS_LVDSDesStruct *SiS_PanelType0a_1;
const SiS_LVDSDesStruct *SiS_PanelType0b_1; const unsigned char *SiS_CHTVVCLKUNTSC;
const SiS_LVDSDesStruct *SiS_PanelType0c_1; const unsigned char *SiS_CHTVVCLKONTSC;
const SiS_LVDSDesStruct *SiS_PanelType0d_1; const unsigned char *SiS_CHTVVCLKUPAL;
const SiS_LVDSDesStruct *SiS_PanelType0e_1; const unsigned char *SiS_CHTVVCLKOPAL;
const SiS_LVDSDesStruct *SiS_PanelType0f_1; const unsigned char *SiS_CHTVVCLKUPALM;
const SiS_LVDSDesStruct *SiS_PanelTypeNS_1; const unsigned char *SiS_CHTVVCLKOPALM;
const SiS_LVDSDesStruct *SiS_PanelType00_2; const unsigned char *SiS_CHTVVCLKUPALN;
const SiS_LVDSDesStruct *SiS_PanelType01_2; const unsigned char *SiS_CHTVVCLKOPALN;
const SiS_LVDSDesStruct *SiS_PanelType02_2; const unsigned char *SiS_CHTVVCLKSOPAL;
const SiS_LVDSDesStruct *SiS_PanelType03_2;
const SiS_LVDSDesStruct *SiS_PanelType04_2; unsigned short PanelXRes, PanelHT;
const SiS_LVDSDesStruct *SiS_PanelType05_2; unsigned short PanelYRes, PanelVT;
const SiS_LVDSDesStruct *SiS_PanelType06_2; unsigned short PanelHRS, PanelHRE;
const SiS_LVDSDesStruct *SiS_PanelType07_2; unsigned short PanelVRS, PanelVRE;
const SiS_LVDSDesStruct *SiS_PanelType08_2; unsigned short PanelVCLKIdx300;
const SiS_LVDSDesStruct *SiS_PanelType09_2; unsigned short PanelVCLKIdx315;
const SiS_LVDSDesStruct *SiS_PanelType0a_2; BOOLEAN Alternate1600x1200;
const SiS_LVDSDesStruct *SiS_PanelType0b_2;
const SiS_LVDSDesStruct *SiS_PanelType0c_2;
const SiS_LVDSDesStruct *SiS_PanelType0d_2;
const SiS_LVDSDesStruct *SiS_PanelType0e_2;
const SiS_LVDSDesStruct *SiS_PanelType0f_2;
const SiS_LVDSDesStruct *SiS_PanelTypeNS_2;
const SiS_LVDSDesStruct *SiS_CHTVUNTSCDesData;
const SiS_LVDSDesStruct *SiS_CHTVONTSCDesData;
const SiS_LVDSDesStruct *SiS_CHTVUPALDesData;
const SiS_LVDSDesStruct *SiS_CHTVOPALDesData;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1320x480_1;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UNTSC;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1ONTSC;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UPAL;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1OPAL;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1SOPAL;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_UNTSC;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_ONTSC;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPAL;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPAL;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALM;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALM;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPALN;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPALN;
const SiS_CHTVRegDataStruct *SiS_CHTVReg_SOPAL;
const UCHAR *SiS_CHTVVCLKUNTSC;
const UCHAR *SiS_CHTVVCLKONTSC;
const UCHAR *SiS_CHTVVCLKUPAL;
const UCHAR *SiS_CHTVVCLKOPAL;
const UCHAR *SiS_CHTVVCLKUPALM;
const UCHAR *SiS_CHTVVCLKOPALM;
const UCHAR *SiS_CHTVVCLKUPALN;
const UCHAR *SiS_CHTVVCLKOPALN;
const UCHAR *SiS_CHTVVCLKSOPAL;
USHORT PanelXRes, PanelHT;
USHORT PanelYRes, PanelVT;
USHORT PanelHRS, PanelHRE;
USHORT PanelVRS, PanelVRE;
USHORT PanelVCLKIdx300;
USHORT PanelVCLKIdx315;
BOOLEAN UseCustomMode; BOOLEAN UseCustomMode;
BOOLEAN CRT1UsesCustomMode; BOOLEAN CRT1UsesCustomMode;
USHORT CHDisplay; unsigned short CHDisplay;
USHORT CHSyncStart; unsigned short CHSyncStart;
USHORT CHSyncEnd; unsigned short CHSyncEnd;
USHORT CHTotal; unsigned short CHTotal;
USHORT CHBlankStart; unsigned short CHBlankStart;
USHORT CHBlankEnd; unsigned short CHBlankEnd;
USHORT CVDisplay; unsigned short CVDisplay;
USHORT CVSyncStart; unsigned short CVSyncStart;
USHORT CVSyncEnd; unsigned short CVSyncEnd;
USHORT CVTotal; unsigned short CVTotal;
USHORT CVBlankStart; unsigned short CVBlankStart;
USHORT CVBlankEnd; unsigned short CVBlankEnd;
ULONG CDClock; unsigned int CDClock;
ULONG CFlags; unsigned int CFlags;
UCHAR CCRT1CRTC[17]; unsigned char CCRT1CRTC[17];
UCHAR CSR2B; unsigned char CSR2B;
UCHAR CSR2C; unsigned char CSR2C;
USHORT CSRClock; unsigned short CSRClock;
USHORT CSRClock_CRT1; unsigned short CSRClock_CRT1;
USHORT CModeFlag; unsigned short CModeFlag;
USHORT CModeFlag_CRT1; unsigned short CModeFlag_CRT1;
USHORT CInfoFlag; unsigned short CInfoFlag;
int LVDSHL; int LVDSHL;
BOOLEAN Backup; BOOLEAN Backup;
UCHAR Backup_Mode; unsigned char Backup_Mode;
UCHAR Backup_14; unsigned char Backup_14;
UCHAR Backup_15; unsigned char Backup_15;
UCHAR Backup_16; unsigned char Backup_16;
UCHAR Backup_17; unsigned char Backup_17;
UCHAR Backup_18; unsigned char Backup_18;
UCHAR Backup_19; unsigned char Backup_19;
UCHAR Backup_1a; unsigned char Backup_1a;
UCHAR Backup_1b; unsigned char Backup_1b;
UCHAR Backup_1c; unsigned char Backup_1c;
UCHAR Backup_1d; unsigned char Backup_1d;
unsigned char Init_P4_0E;
int UsePanelScaler; int UsePanelScaler;
int CenterScreen; int CenterScreen;
USHORT CP_Vendor, CP_Product; unsigned short CP_Vendor, CP_Product;
BOOLEAN CP_HaveCustomData; BOOLEAN CP_HaveCustomData;
int CP_PreferredX, CP_PreferredY, CP_PreferredIndex; int CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
int CP_MaxX, CP_MaxY, CP_MaxClock; int CP_MaxX, CP_MaxY, CP_MaxClock;
UCHAR CP_PrefSR2B, CP_PrefSR2C; unsigned char CP_PrefSR2B, CP_PrefSR2C;
USHORT CP_PrefClock; unsigned short CP_PrefClock;
BOOLEAN CP_Supports64048075; BOOLEAN CP_Supports64048075;
int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */ int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
int CP_HTotal[7], CP_VTotal[7]; int CP_HTotal[7], CP_VTotal[7];
...@@ -670,7 +557,7 @@ typedef struct _SiS_Private ...@@ -670,7 +557,7 @@ typedef struct _SiS_Private
int CP_Clock[7]; int CP_Clock[7];
BOOLEAN CP_DataValid[7]; BOOLEAN CP_DataValid[7];
BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7]; BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
} SiS_Private; };
#endif #endif
...@@ -107,6 +107,8 @@ ...@@ -107,6 +107,8 @@
#define FB_ACCEL_NV_20 44 /* nVidia Arch 20 */ #define FB_ACCEL_NV_20 44 /* nVidia Arch 20 */
#define FB_ACCEL_NV_30 45 /* nVidia Arch 30 */ #define FB_ACCEL_NV_30 45 /* nVidia Arch 30 */
#define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */ #define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */
#define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */
#define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */
#define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */
#define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */
#define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */
......
/* /*
* Copyright (C) 2001-2004 by Thomas Winischhofer, Vienna, Austria. * sisfb.h - definitions for the SiS framebuffer driver
*
* Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -16,8 +18,8 @@ ...@@ -16,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifndef _LINUX_SISFB #ifndef _LINUX_SISFB_H_
#define _LINUX_SISFB #define _LINUX_SISFB_H_
#include <asm/ioctl.h> #include <asm/ioctl.h>
#include <asm/types.h> #include <asm/types.h>
...@@ -26,10 +28,10 @@ ...@@ -26,10 +28,10 @@
/* PUBLIC */ /* PUBLIC */
/**********************************************/ /**********************************************/
/* vbflags */ /* vbflags, public (others in sis.h) */
#define CRT2_DEFAULT 0x00000001 #define CRT2_DEFAULT 0x00000001
#define CRT2_LCD 0x00000002 /* TW: Never change the order of the CRT2_XXX entries */ #define CRT2_LCD 0x00000002
#define CRT2_TV 0x00000004 /* (see SISCycleCRT2Type()) */ #define CRT2_TV 0x00000004
#define CRT2_VGA 0x00000008 #define CRT2_VGA 0x00000008
#define TV_NTSC 0x00000010 #define TV_NTSC 0x00000010
#define TV_PAL 0x00000020 #define TV_PAL 0x00000020
...@@ -38,27 +40,15 @@ ...@@ -38,27 +40,15 @@
#define TV_AVIDEO 0x00000100 #define TV_AVIDEO 0x00000100
#define TV_SVIDEO 0x00000200 #define TV_SVIDEO 0x00000200
#define TV_SCART 0x00000400 #define TV_SCART 0x00000400
#define VB_CONEXANT 0x00000800 /* 661 series only */
#define VB_TRUMPION VB_CONEXANT /* 300 series only */
#define TV_PALM 0x00001000 #define TV_PALM 0x00001000
#define TV_PALN 0x00002000 #define TV_PALN 0x00002000
#define TV_NTSCJ 0x00001000 #define TV_NTSCJ 0x00001000
#define VB_302ELV 0x00004000
#define TV_CHSCART 0x00008000 #define TV_CHSCART 0x00008000
#define TV_CHYPBPR525I 0x00010000 #define TV_CHYPBPR525I 0x00010000
#define CRT1_VGA 0x00000000 #define CRT1_VGA 0x00000000
#define CRT1_LCDA 0x00020000 #define CRT1_LCDA 0x00020000
#define VGA2_CONNECTED 0x00040000 #define VGA2_CONNECTED 0x00040000
#define VB_DISPTYPE_CRT1 0x00080000 /* CRT1 connected and used */ #define VB_DISPTYPE_CRT1 0x00080000 /* CRT1 connected and used */
#define VB_301 0x00100000 /* Video bridge type */
#define VB_301B 0x00200000
#define VB_302B 0x00400000
#define VB_30xBDH 0x00800000 /* 30xB DH version (w/o LCD support) */
#define VB_LVDS 0x01000000
#define VB_CHRONTEL 0x02000000
#define VB_301LV 0x04000000
#define VB_302LV 0x08000000
#define VB_301C 0x10000000
#define VB_SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */ #define VB_SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */
#define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */ #define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */
#define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */ #define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */
...@@ -75,10 +65,6 @@ ...@@ -75,10 +65,6 @@
#define TV_YPBPR1080I TV_PALN #define TV_YPBPR1080I TV_PALN
#define TV_YPBPRALL (TV_YPBPR525I | TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I) #define TV_YPBPRALL (TV_YPBPR525I | TV_YPBPR525P | TV_YPBPR750P | TV_YPBPR1080I)
#define VB_SISBRIDGE (VB_301|VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV|VB_302ELV)
#define VB_SISTVBRIDGE (VB_301|VB_301B|VB_301C|VB_302B|VB_301LV|VB_302LV)
#define VB_VIDEOBRIDGE (VB_SISBRIDGE | VB_LVDS | VB_CHRONTEL | VB_CONEXANT)
#define VB_DISPTYPE_DISP2 CRT2_ENABLE #define VB_DISPTYPE_DISP2 CRT2_ENABLE
#define VB_DISPTYPE_CRT2 CRT2_ENABLE #define VB_DISPTYPE_CRT2 CRT2_ENABLE
#define VB_DISPTYPE_DISP1 VB_DISPTYPE_CRT1 #define VB_DISPTYPE_DISP1 VB_DISPTYPE_CRT1
...@@ -88,16 +74,14 @@ ...@@ -88,16 +74,14 @@
#define VB_DISPLAY_MODE (SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE) #define VB_DISPLAY_MODE (SINGLE_MODE | MIRROR_MODE | DUALVIEW_MODE)
/* Structure argument for SISFB_GET_INFO ioctl */ /* Structure argument for SISFB_GET_INFO ioctl */
typedef struct _SISFB_INFO sisfb_info, *psisfb_info; struct sisfb_info {
struct _SISFB_INFO {
__u32 sisfb_id; /* for identifying sisfb */ __u32 sisfb_id; /* for identifying sisfb */
#ifndef SISFB_ID #ifndef SISFB_ID
#define SISFB_ID 0x53495346 /* Identify myself with 'SISF' */ #define SISFB_ID 0x53495346 /* Identify myself with 'SISF' */
#endif #endif
__u32 chip_id; /* PCI-ID of detected chip */ __u32 chip_id; /* PCI-ID of detected chip */
__u32 memory; /* video memory in KB which sisfb manages */ __u32 memory; /* total video memory in KB */
__u32 heapstart; /* heap start (= sisfb "mem" argument) in KB */ __u32 heapstart; /* heap start offset in KB */
__u8 fbvidmode; /* current sisfb mode */ __u8 fbvidmode; /* current sisfb mode */
__u8 sisfb_version; __u8 sisfb_version;
...@@ -130,7 +114,41 @@ struct _SISFB_INFO { ...@@ -130,7 +114,41 @@ struct _SISFB_INFO {
__u16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */ __u16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */
__u8 reserved[208]; /* for future use */ __u32 sisfb_heapsize; /* heap size (in KB) */
__u32 sisfb_videooffset; /* Offset of viewport in video memory (in bytes) */
__u32 sisfb_curfstn; /* currently running FSTN/DSTN mode */
__u32 sisfb_curdstn;
__u16 sisfb_pci_vendor; /* PCI vendor (SiS or XGI) */
__u32 sisfb_vbflags2; /* ivideo->vbflags2 */
__u8 sisfb_can_post; /* sisfb can POST this card */
__u8 sisfb_card_posted; /* card is POSTED */
__u8 sisfb_was_boot_device; /* This card was the boot video device (ie is primary) */
__u8 reserved[183]; /* for future use */
};
#define SISFB_CMD_GETVBFLAGS 0x55AA0001 /* no arg; result[1] = vbflags */
#define SISFB_CMD_SWITCHCRT1 0x55AA0010 /* arg[0]: 99 = query, 0 = off, 1 = on */
/* more to come */
#define SISFB_CMD_ERR_OK 0x80000000 /* command succeeded */
#define SISFB_CMD_ERR_LOCKED 0x80000001 /* sisfb is locked */
#define SISFB_CMD_ERR_EARLY 0x80000002 /* request before sisfb took over gfx system */
#define SISFB_CMD_ERR_NOVB 0x80000003 /* No video bridge */
#define SISFB_CMD_ERR_NOCRT2 0x80000004 /* can't change CRT1 status, CRT2 disabled */
/* more to come */
#define SISFB_CMD_ERR_UNKNOWN 0x8000ffff /* Unknown command */
#define SISFB_CMD_ERR_OTHER 0x80010000 /* Other error */
/* Argument for SISFB_CMD ioctl */
struct sisfb_cmd {
__u32 sisfb_cmd;
__u32 sisfb_arg[16];
__u32 sisfb_result[4];
}; };
/* Addtional IOCTLs for communication sisfb <> X driver */ /* Addtional IOCTLs for communication sisfb <> X driver */
...@@ -138,7 +156,7 @@ struct _SISFB_INFO { ...@@ -138,7 +156,7 @@ struct _SISFB_INFO {
/* ioctl for identifying and giving some info (esp. memory heap start) */ /* ioctl for identifying and giving some info (esp. memory heap start) */
#define SISFB_GET_INFO_SIZE _IOR(0xF3,0x00,__u32) #define SISFB_GET_INFO_SIZE _IOR(0xF3,0x00,__u32)
#define SISFB_GET_INFO _IOR(0xF3,0x01,struct _SISFB_INFO) #define SISFB_GET_INFO _IOR(0xF3,0x01,struct sisfb_info)
/* ioctrl to get current vertical retrace status */ /* ioctrl to get current vertical retrace status */
#define SISFB_GET_VBRSTATUS _IOR(0xF3,0x02,__u32) #define SISFB_GET_VBRSTATUS _IOR(0xF3,0x02,__u32)
...@@ -151,14 +169,15 @@ struct _SISFB_INFO { ...@@ -151,14 +169,15 @@ struct _SISFB_INFO {
#define SISFB_GET_TVPOSOFFSET _IOR(0xF3,0x04,__u32) #define SISFB_GET_TVPOSOFFSET _IOR(0xF3,0x04,__u32)
#define SISFB_SET_TVPOSOFFSET _IOW(0xF3,0x04,__u32) #define SISFB_SET_TVPOSOFFSET _IOW(0xF3,0x04,__u32)
/* ioctl for internal sisfb commands (sisfbctrl) */
#define SISFB_COMMAND _IOWR(0xF3,0x05,struct sisfb_cmd)
/* ioctl for locking sisfb (no register access during lock) */ /* ioctl for locking sisfb (no register access during lock) */
/* As of now, only used to avoid register access during /* As of now, only used to avoid register access during
* the ioctls listed above. * the ioctls listed above.
*/ */
#define SISFB_SET_LOCK _IOW(0xF3,0x06,__u32) #define SISFB_SET_LOCK _IOW(0xF3,0x06,__u32)
/* more to come soon */
/* ioctls 0xF3 up to 0x3F reserved for sisfb */ /* ioctls 0xF3 up to 0x3F reserved for sisfb */
/****************************************************************/ /****************************************************************/
...@@ -187,12 +206,19 @@ struct sis_memreq { ...@@ -187,12 +206,19 @@ struct sis_memreq {
/**********************************************/ /**********************************************/
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/pci.h>
#define UNKNOWN_VGA 0 #define UNKNOWN_VGA 0
#define SIS_300_VGA 1 #define SIS_300_VGA 1
#define SIS_315_VGA 2 #define SIS_315_VGA 2
#define SISFB_HAVE_MALLOC_NEW
extern void sis_malloc(struct sis_memreq *req); extern void sis_malloc(struct sis_memreq *req);
extern void sis_malloc_new(struct pci_dev *pdev, struct sis_memreq *req);
extern void sis_free(u32 base); extern void sis_free(u32 base);
extern void sis_free_new(struct pci_dev *pdev, u32 base);
#endif #endif
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment