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},
...@@ -110,7 +86,7 @@ static const SiS_ExtStruct SiS300_EModeIDTable[] = ...@@ -110,7 +86,7 @@ static const SiS_ExtStruct SiS300_EModeIDTable[] =
{0x59,0x921b,0x0138,SIS_RI_320x200, 0x00,0x00,0x00,0x00,0x23,-1}, /* 320x200x8 */ {0x59,0x921b,0x0138,SIS_RI_320x200, 0x00,0x00,0x00,0x00,0x23,-1}, /* 320x200x8 */
{0x5c,0x921f,0x0000,SIS_RI_512x384, 0x00,0x00,0x00,0x00,0x26,-1}, /* 512x384x32 */ {0x5c,0x921f,0x0000,SIS_RI_512x384, 0x00,0x00,0x00,0x00,0x26,-1}, /* 512x384x32 */
{0x5d,0x021d,0x0139,SIS_RI_640x400, 0x00,0x00,0x00,0x00,0x10,-1}, /* 640x400x16 */ {0x5d,0x021d,0x0139,SIS_RI_640x400, 0x00,0x00,0x00,0x00,0x10,-1}, /* 640x400x16 */
{0x5e,0x021f,0x0000,SIS_RI_640x400, 0x00,0x00,0x00,0x00,0x10,-1}, /* 640x400x32 */ {0x5e,0x021f,0x0000,SIS_RI_640x400, 0x00,0x00,0x00,0x00,0x10,-1}, /* 640x400x32 */
{0x62,0x0a3f,0x013a,SIS_RI_640x480, 0x00,0x00,0x00,0x00,0x08,-1}, {0x62,0x0a3f,0x013a,SIS_RI_640x480, 0x00,0x00,0x00,0x00,0x08,-1},
{0x63,0x2a3f,0x013b,SIS_RI_800x600, 0x00,0x00,0x00,0x00,0x00,-1}, /* 800x600x32 */ {0x63,0x2a3f,0x013b,SIS_RI_800x600, 0x00,0x00,0x00,0x00,0x00,-1}, /* 800x600x32 */
{0x64,0x0a7f,0x013c,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-1}, {0x64,0x0a7f,0x013c,SIS_RI_1024x768, 0x00,0x00,0x00,0x00,0x13,-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,53 +704,116 @@ static const SiS_LCDDataStruct SiS300_ExtLCD1280x1024Data[] = ...@@ -813,53 +704,116 @@ 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}},
{{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}}, {{0x21,0x12,0xbf,0xe4,0xc0,0x21,0x45,0x09,0x00,0xa9,0x09,0x04}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}}, {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
{{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}}, {{0x22,0x13,0xfe,0x25,0xff,0x21,0x45,0x0a,0x00,0xa9,0x0d,0x04}},
{{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}},
{{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}},
{{0x28,0x13,0xe7,0x0b,0xe8,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}, {{0x28,0x13,0xe7,0x0b,0xe8,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{0x38,0x18,0x16,0x00,0x00,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}, {{0x38,0x18,0x16,0x00,0x00,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{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[] =
{
{{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[] = static const struct SiS_Part2PortTbl SiS300_CRT2Part2_1024x768_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}}
}; };
/**************************************************************/ /**************************************************************/
/* 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,37 +50,13 @@ ...@@ -50,37 +50,13 @@
* *
*/ */
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 */
{0x2f,0x0a1b,0x0100,SIS_RI_640x400, 0x00,0x00,0x05,0x05,0x10, 0}, /* 640x400x8 */ {0x2f,0x0a1b,0x0100,SIS_RI_640x400, 0x00,0x00,0x05,0x05,0x10, 0}, /* 640x400x8 */
{0x30,0x2a1b,0x0103,SIS_RI_800x600, 0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x8 */ {0x30,0x2a1b,0x0103,SIS_RI_800x600, 0x00,0x00,0x07,0x06,0x00, 3}, /* 800x600x8 */
{0x31,0x4a1b,0x0000,SIS_RI_720x480, 0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x8 */ {0x31,0x4a1b,0x0000,SIS_RI_720x480, 0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x8 */
{0x32,0x4a1b,0x0000,SIS_RI_720x576, 0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x8 */ {0x32,0x4a1b,0x0000,SIS_RI_720x576, 0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x8 */
{0x33,0x4a1d,0x0000,SIS_RI_720x480, 0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x16 */ {0x33,0x4a1d,0x0000,SIS_RI_720x480, 0x00,0x00,0x06,0x06,0x11,-1}, /* 720x480x16 */
{0x34,0x6a1d,0x0000,SIS_RI_720x576, 0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x16 */ {0x34,0x6a1d,0x0000,SIS_RI_720x576, 0x00,0x00,0x06,0x06,0x12,-1}, /* 720x576x16 */
...@@ -103,10 +79,10 @@ static const SiS_ExtStruct SiS310_EModeIDTable[]= ...@@ -103,10 +79,10 @@ static const SiS_ExtStruct SiS310_EModeIDTable[]=
{0x4d,0x0e7d,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a, 8}, /* 1280x1024x16 */ {0x4d,0x0e7d,0x011a,SIS_RI_1280x1024,0x00,0x00,0x00,0x00,0x1a, 8}, /* 1280x1024x16 */
{0x50,0x9a1b,0x0132,SIS_RI_320x240, 0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x8 */ {0x50,0x9a1b,0x0132,SIS_RI_320x240, 0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x8 */
{0x51,0xba1b,0x0133,SIS_RI_400x300, 0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x8 */ {0x51,0xba1b,0x0133,SIS_RI_400x300, 0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x8 */
{0x52,0xba1b,0x0134,SIS_RI_512x384, 0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x8 */ {0x52,0xba1b,0x0134,SIS_RI_512x384, 0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x8 */
{0x56,0x9a1d,0x0135,SIS_RI_320x240, 0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x16 */ {0x56,0x9a1d,0x0135,SIS_RI_320x240, 0x00,0x00,0x04,0x04,0x26, 2}, /* 320x240x16 */
{0x57,0xba1d,0x0136,SIS_RI_400x300, 0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x16 */ {0x57,0xba1d,0x0136,SIS_RI_400x300, 0x00,0x00,0x07,0x07,0x27, 3}, /* 400x300x16 */
{0x58,0xba1d,0x0137,SIS_RI_512x384, 0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x16 */ {0x58,0xba1d,0x0137,SIS_RI_512x384, 0x00,0x00,0x00,0x00,0x28, 4}, /* 512x384x16 */
{0x59,0x9a1b,0x0138,SIS_RI_320x200, 0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x8 */ {0x59,0x9a1b,0x0138,SIS_RI_320x200, 0x00,0x00,0x04,0x04,0x25, 0}, /* 320x200x8 */
{0x5a,0x021b,0x0138,SIS_RI_320x240, 0x00,0x00,0x00,0x00,0x3f, 2}, /* 320x240x8 fstn */ {0x5a,0x021b,0x0138,SIS_RI_320x240, 0x00,0x00,0x00,0x00,0x3f, 2}, /* 320x240x8 fstn */
{0x5b,0x0a1d,0x0135,SIS_RI_320x240, 0x00,0x00,0x00,0x00,0x3f, 2}, /* 320x240x16 fstn */ {0x5b,0x0a1d,0x0135,SIS_RI_320x240, 0x00,0x00,0x00,0x00,0x3f, 2}, /* 320x240x16 fstn */
...@@ -139,406 +115,335 @@ static const SiS_ExtStruct SiS310_EModeIDTable[]= ...@@ -139,406 +115,335 @@ 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,
0x00}}, /* 0x0 */ 0x00}}, /* 0x0 */
{{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e, {{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e,
0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00, 0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00,
0x00}}, /* 0x1 */ 0x00}}, /* 0x1 */
{{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0, {{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0,
0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05, 0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05,
0x01}}, /* 0x2 */ 0x01}}, /* 0x2 */
{{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}}, /* 0x3 */ 0x01}}, /* 0x3 */
{{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 */
{{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}}, /* 0x8 */ 0x00}}, /* 0x8 */
{{0x65,0x4f,0x4f,0x89,0x58,0x80,0xfb,0x1f, {{0x65,0x4f,0x4f,0x89,0x58,0x80,0xfb,0x1f,
0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05, /* Corrected VBE */ 0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05, /* Corrected VBE */
0x61}}, /* 0x9 */ 0x61}}, /* 0x9 */
{{0x65,0x4f,0x4f,0x89,0x58,0x80,0x01,0x3e, {{0x65,0x4f,0x4f,0x89,0x58,0x80,0x01,0x3e,
0xe0,0x83,0xdf,0xdf,0x02,0x00,0x00,0x05, 0xe0,0x83,0xdf,0xdf,0x02,0x00,0x00,0x05,
0x61}}, /* 0xa */ 0x61}}, /* 0xa */
{{0x67,0x4f,0x4f,0x8b,0x58,0x81,0x0d,0x3e, {{0x67,0x4f,0x4f,0x8b,0x58,0x81,0x0d,0x3e,
0xe0,0x83,0xdf,0xdf,0x0e,0x00,0x00,0x05, /* Corrected VBE */ 0xe0,0x83,0xdf,0xdf,0x0e,0x00,0x00,0x05, /* Corrected VBE */
0x61}}, /* 0xb */ 0x61}}, /* 0xb */
{{0x65,0x4f,0x4f,0x89,0x57,0x9f,0xfb,0x1f, {{0x65,0x4f,0x4f,0x89,0x57,0x9f,0xfb,0x1f,
0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01, /* Corrected VDE, VBE */ 0xe6,0x8a,0xdf,0xdf,0xfc,0x10,0x00,0x01, /* Corrected VDE, VBE */
0x00}}, /* 0xc */ 0x00}}, /* 0xc */
{{0x7b,0x63,0x63,0x9f,0x6a,0x93,0x6f,0xf0, {{0x7b,0x63,0x63,0x9f,0x6a,0x93,0x6f,0xf0,
0x58,0x8a,0x57,0x57,0x70,0x20,0x00,0x05, 0x58,0x8a,0x57,0x57,0x70,0x20,0x00,0x05,
0x01}}, /* 0xd */ 0x01}}, /* 0xd */
{{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xf0, {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xf0,
0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x06, 0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x06,
0x01}}, /* 0xe */ 0x01}}, /* 0xe */
{{0x7d,0x63,0x63,0x81,0x6e,0x1d,0x98,0xf0, {{0x7d,0x63,0x63,0x81,0x6e,0x1d,0x98,0xf0,
0x7c,0x82,0x57,0x57,0x99,0x00,0x00,0x06, 0x7c,0x82,0x57,0x57,0x99,0x00,0x00,0x06,
0x01}}, /* 0xf */ 0x01}}, /* 0xf */
{{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xf0, {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xf0,
0x58,0x8b,0x57,0x57,0x70,0x20,0x00,0x06, 0x58,0x8b,0x57,0x57,0x70,0x20,0x00,0x06,
0x01}}, /* 0x10 */ 0x01}}, /* 0x10 */
{{0x7e,0x63,0x63,0x82,0x6b,0x13,0x75,0xf0, {{0x7e,0x63,0x63,0x82,0x6b,0x13,0x75,0xf0,
0x58,0x8b,0x57,0x57,0x76,0x20,0x00,0x06, 0x58,0x8b,0x57,0x57,0x76,0x20,0x00,0x06,
0x01}}, /* 0x11 */ 0x01}}, /* 0x11 */
{{0x81,0x63,0x63,0x85,0x6d,0x18,0x7a,0xf0, {{0x81,0x63,0x63,0x85,0x6d,0x18,0x7a,0xf0,
0x58,0x8b,0x57,0x57,0x7b,0x20,0x00,0x06, 0x58,0x8b,0x57,0x57,0x7b,0x20,0x00,0x06,
0x61}}, /* 0x12 */ 0x61}}, /* 0x12 */
{{0x83,0x63,0x63,0x87,0x6e,0x19,0x81,0xf0, {{0x83,0x63,0x63,0x87,0x6e,0x19,0x81,0xf0,
0x58,0x8b,0x57,0x57,0x82,0x20,0x00,0x06, 0x58,0x8b,0x57,0x57,0x82,0x20,0x00,0x06,
0x61}}, /* 0x13 */ 0x61}}, /* 0x13 */
{{0x85,0x63,0x63,0x89,0x6f,0x1a,0x91,0xf0, {{0x85,0x63,0x63,0x89,0x6f,0x1a,0x91,0xf0,
0x58,0x8b,0x57,0x57,0x92,0x20,0x00,0x06, 0x58,0x8b,0x57,0x57,0x92,0x20,0x00,0x06,
0x61}}, /* 0x14 */ 0x61}}, /* 0x14 */
{{0x99,0x7f,0x7f,0x9d,0x84,0x1a,0x96,0x1f, {{0x99,0x7f,0x7f,0x9d,0x84,0x1a,0x96,0x1f,
0x7f,0x83,0x7f,0x7f,0x97,0x10,0x00,0x02, 0x7f,0x83,0x7f,0x7f,0x97,0x10,0x00,0x02,
0x00}}, /* 0x15 */ 0x00}}, /* 0x15 */
{{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5, {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02, 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
0x01}}, /* 0x16 */ 0x01}}, /* 0x16 */
{{0xa1,0x7f,0x7f,0x85,0x86,0x97,0x24,0xf5, {{0xa1,0x7f,0x7f,0x85,0x86,0x97,0x24,0xf5,
0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02, 0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
0x01}}, /* 0x17 */ 0x01}}, /* 0x17 */
{{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf5, {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf5,
0x00,0x83,0xff,0xff,0x1f,0x10,0x00,0x02, 0x00,0x83,0xff,0xff,0x1f,0x10,0x00,0x02,
0x01}}, /* 0x18 */ 0x01}}, /* 0x18 */
{{0xa7,0x7f,0x7f,0x8b,0x89,0x95,0x26,0xf5, {{0xa7,0x7f,0x7f,0x8b,0x89,0x95,0x26,0xf5,
0x00,0x83,0xff,0xff,0x27,0x10,0x00,0x02, 0x00,0x83,0xff,0xff,0x27,0x10,0x00,0x02,
0x01}}, /* 0x19 */ 0x01}}, /* 0x19 */
{{0xa9,0x7f,0x7f,0x8d,0x8c,0x9a,0x2c,0xf5, {{0xa9,0x7f,0x7f,0x8d,0x8c,0x9a,0x2c,0xf5,
0x00,0x83,0xff,0xff,0x2d,0x14,0x00,0x02, 0x00,0x83,0xff,0xff,0x2d,0x14,0x00,0x02,
0x62}}, /* 0x1a */ 0x62}}, /* 0x1a */
{{0xab,0x7f,0x7f,0x8f,0x8d,0x9b,0x35,0xf5, {{0xab,0x7f,0x7f,0x8f,0x8d,0x9b,0x35,0xf5,
0x00,0x83,0xff,0xff,0x36,0x14,0x00,0x02, 0x00,0x83,0xff,0xff,0x36,0x14,0x00,0x02,
0x62}}, /* 0x1b */ 0x62}}, /* 0x1b */
{{0xcf,0x9f,0x9f,0x93,0xb2,0x01,0x14,0xba, {{0xcf,0x9f,0x9f,0x93,0xb2,0x01,0x14,0xba,
0x00,0x83,0xff,0xff,0x15,0x00,0x00,0x03, 0x00,0x83,0xff,0xff,0x15,0x00,0x00,0x03,
0x00}}, /* 0x1c */ 0x00}}, /* 0x1c */
{{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0x5a, {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0x5a,
0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07, 0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07,
0x01}}, /* 0x1d */ 0x01}}, /* 0x1d */
{{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0x5a, {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0x5a,
0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07, 0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07,
0x01}}, /* 0x1e */ 0x01}}, /* 0x1e */
{{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0x5a, {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0x5a,
0x00,0x83,0xff,0xff,0x2f,0x09,0x00,0x07, 0x00,0x83,0xff,0xff,0x2f,0x09,0x00,0x07,
0x01}}, /* 0x1f */ 0x01}}, /* 0x1f */
{{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}}, /* 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 */
{{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}}, /* 0x23 */ 0x00}}, /* 0x23 */
{{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}}, /* 0x24 */ 0x00}}, /* 0x24 */
{{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}}, /* 0x25 */ 0x00}}, /* 0x25 */
{{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}}, /* 0x26 */ 0x00}}, /* 0x26 */
{{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f, {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01, 0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
0x00}}, /* 0x27 */ 0x00}}, /* 0x27 */
{{0x43,0xef,0xef,0x87,0x06,0x00,0xd4,0x1f, {{0x43,0xef,0xef,0x87,0x06,0x00,0xd4,0x1f,
0xa0,0x83,0x9f,0x9f,0xd5,0x1f,0x41,0x05, 0xa0,0x83,0x9f,0x9f,0xd5,0x1f,0x41,0x05,
0x63}}, /* 0x28 */ 0x63}}, /* 0x28 */
{{0x45,0xef,0xef,0x89,0x07,0x01,0xd9,0x1f, {{0x45,0xef,0xef,0x89,0x07,0x01,0xd9,0x1f,
0xa0,0x83,0x9f,0x9f,0xda,0x1f,0x41,0x05, 0xa0,0x83,0x9f,0x9f,0xda,0x1f,0x41,0x05,
0x63}}, /* 0x29 */ 0x63}}, /* 0x29 */
{{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f, {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01, 0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
0x00}}, /* 0x2a */ 0x00}}, /* 0x2a */
{{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f, {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01, 0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
0x00}}, /* 0x2b */ 0x00}}, /* 0x2b */
{{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f, {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01, 0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
0x00}}, /* 0x2c */ 0x00}}, /* 0x2c */
{{0x59,0xff,0xff,0x9d,0x17,0x13,0x33,0xba, {{0x59,0xff,0xff,0x9d,0x17,0x13,0x33,0xba,
0x00,0x83,0xff,0xff,0x34,0x0f,0x41,0x05, 0x00,0x83,0xff,0xff,0x34,0x0f,0x41,0x05,
0x44}}, /* 0x2d */ 0x44}}, /* 0x2d */
{{0x5b,0xff,0xff,0x9f,0x18,0x14,0x38,0xba, {{0x5b,0xff,0xff,0x9f,0x18,0x14,0x38,0xba,
0x00,0x83,0xff,0xff,0x39,0x0f,0x41,0x05, 0x00,0x83,0xff,0xff,0x39,0x0f,0x41,0x05,
0x44}}, /* 0x2e */ 0x44}}, /* 0x2e */
{{0x5b,0xff,0xff,0x9f,0x18,0x14,0x3d,0xba, {{0x5b,0xff,0xff,0x9f,0x18,0x14,0x3d,0xba,
0x00,0x83,0xff,0xff,0x3e,0x0f,0x41,0x05, 0x00,0x83,0xff,0xff,0x3e,0x0f,0x41,0x05,
0x44}}, /* 0x2f */ 0x44}}, /* 0x2f */
{{0x5d,0xff,0xff,0x81,0x19,0x95,0x41,0xba, {{0x5d,0xff,0xff,0x81,0x19,0x95,0x41,0xba,
0x00,0x84,0xff,0xff,0x42,0x0f,0x41,0x05, 0x00,0x84,0xff,0xff,0x42,0x0f,0x41,0x05,
0x44}}, /* 0x30 */ 0x44}}, /* 0x30 */
{{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}}, /* 0x31 */ 0x00}}, /* 0x31 */
{{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xba, {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xba,
0x27,0x8b,0xdf,0xdf,0x73,0x00,0x00,0x06, 0x27,0x8b,0xdf,0xdf,0x73,0x00,0x00,0x06,
0x01}}, /* 0x32 */ 0x01}}, /* 0x32 */
{{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xba, {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xba,
0x26,0x89,0xdf,0xdf,0x6f,0x00,0x00,0x06, 0x26,0x89,0xdf,0xdf,0x6f,0x00,0x00,0x06,
0x01}}, /* 0x33 */ 0x01}}, /* 0x33 */
{{0x7f,0x63,0x63,0x82,0x6b,0x13,0x75,0xba, {{0x7f,0x63,0x63,0x82,0x6b,0x13,0x75,0xba,
0x29,0x8c,0xdf,0xdf,0x75,0x00,0x00,0x06, 0x29,0x8c,0xdf,0xdf,0x75,0x00,0x00,0x06,
0x01}}, /* 0x34 */ 0x01}}, /* 0x34 */
{{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf1, {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf1,
0xaf,0x85,0x3f,0x3f,0x25,0x30,0x00,0x02, 0xaf,0x85,0x3f,0x3f,0x25,0x30,0x00,0x02,
0x01}}, /* 0x35 */ 0x01}}, /* 0x35 */
{{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf1, {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf1,
0xad,0x81,0x3f,0x3f,0x1f,0x30,0x00,0x02, 0xad,0x81,0x3f,0x3f,0x1f,0x30,0x00,0x02,
0x01}}, /* 0x36 */ 0x01}}, /* 0x36 */
{{0xa7,0x7f,0x7f,0x88,0x89,0x95,0x26,0xf1, /* 95 was 15 - illegal HBE! */ {{0xa7,0x7f,0x7f,0x88,0x89,0x95,0x26,0xf1, /* 95 was 15 - illegal HBE! */
0xb1,0x85,0x3f,0x3f,0x27,0x30,0x00,0x02, 0xb1,0x85,0x3f,0x3f,0x27,0x30,0x00,0x02,
0x01}}, /* 0x37 */ 0x01}}, /* 0x37 */
{{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xc4, {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xc4,
0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07, 0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
0x01}}, /* 0x38 */ 0x01}}, /* 0x38 */
{{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xd4, {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xd4,
0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07, 0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
0x01}}, /* 0x39 */ 0x01}}, /* 0x39 */
{{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 */
{{0x81,0x6a,0x6a,0x85,0x70,0x00,0x0f,0x3e, {{0x81,0x6a,0x6a,0x85,0x70,0x00,0x0f,0x3e,
0xeb,0x8e,0xdf,0xdf,0x10,0x00,0x00,0x02, 0xeb,0x8e,0xdf,0xdf,0x10,0x00,0x00,0x02,
0x00}}, /* 0x3f */ 0x00}}, /* 0x3f */
{{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1, {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1,
0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02, 0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02,
0x01}}, /* 0x40 */ 0x01}}, /* 0x40 */
...@@ -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,9 +641,9 @@ static const SiS_MCLKDataStruct SiS310_MCLKData_0_340[] = ...@@ -688,9 +641,9 @@ 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},
{ 0x65,0x23,0x82,183}, { 0x65,0x23,0x82,183},
{ 0x37,0x21,0x82,200}, { 0x37,0x21,0x82,200},
...@@ -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 */
...@@ -805,7 +758,7 @@ static SiS_VCLKDataStruct SiS310_VCLKData[]= ...@@ -805,7 +758,7 @@ static SiS_VCLKDataStruct SiS310_VCLKData[]=
{ 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) */ { 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) */
{ 0x52,0x07,149}, /* 0x59 1280x960-85 */ { 0x52,0x07,149}, /* 0x59 1280x960-85 */
{ 0x56,0x07,156}, /* 0x5a 1400x1050-75 */ { 0x56,0x07,156}, /* 0x5a 1400x1050-75 */
{ 0x70,0x29, 81}, /* 0x5b 1280x768 LCD */ { 0x70,0x29, 81}, /* 0x5b 1280x768 LCD */
{ 0x45,0x25, 83}, /* 0x5c 1280x800 */ { 0x45,0x25, 83}, /* 0x5c 1280x800 */
{ 0x70,0x0a,147}, /* 0x5d 1680x1050 */ { 0x70,0x0a,147}, /* 0x5d 1680x1050 */
{ 0x70,0x24,162}, /* 0x5e 1600x1200 */ { 0x70,0x24,162}, /* 0x5e 1600x1200 */
...@@ -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 */
...@@ -925,7 +881,7 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]= ...@@ -925,7 +881,7 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]=
{ 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) TEMP, UNUSED */ { 0x30,0x23, 88}, /* 0x58 1360x768-62 (is 60Hz!) TEMP, UNUSED */
{ 0x52,0x07,149}, /* 0x59 1280x960-85 */ { 0x52,0x07,149}, /* 0x59 1280x960-85 */
{ 0x56,0x07,156}, /* 0x5a 1400x1050-75 */ { 0x56,0x07,156}, /* 0x5a 1400x1050-75 */
{ 0x70,0x29, 81}, /* 0x5b 1280x768 LCD (TMDS) */ { 0x70,0x29, 81}, /* 0x5b 1280x768 LCD (TMDS) */
{ 0xce,0x1e, 73}, /* 0x5c 1280x800_2 LCD (SiS LVDS) - (CRT1: 45 25 83) */ { 0xce,0x1e, 73}, /* 0x5c 1280x800_2 LCD (SiS LVDS) - (CRT1: 45 25 83) */
{ 0xbe,0x44,121}, /* 0x5d 1680x1050 LCD */ { 0xbe,0x44,121}, /* 0x5d 1680x1050 LCD */
{ 0x70,0x24,162}, /* 0x5e 1600x1200 LCD */ { 0x70,0x24,162}, /* 0x5e 1600x1200 LCD */
...@@ -943,57 +899,33 @@ static SiS_VBVCLKDataStruct SiS310_VBVCLKData[]= ...@@ -943,57 +899,33 @@ 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 */
{ 0x37,0x5a, 10}, /* 0x70 320x200@60 (fake, not actually used) */
{ 0x2b,0xc2, 35}, /* 0x71 768@576@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 (SiS LVDS) LCD */
}; };
static const DRAM4Type SiS310_SR15[8] = { static const unsigned char SiS310_SR15[4 * 8] =
{0x00,0x04,0x60,0x60}, {
{0x0f,0x0f,0x0f,0x0f}, 0x00,0x04,0x60,0x60,
{0xba,0xba,0xba,0xba}, 0x0f,0x0f,0x0f,0x0f,
{0xa9,0xa9,0xac,0xac}, 0xba,0xba,0xba,0xba,
{0xa0,0xa0,0xa0,0xa8}, 0xa9,0xa9,0xac,0xac,
{0x00,0x00,0x02,0x02}, 0xa0,0xa0,0xa0,0xa8,
{0x30,0x30,0x40,0x40}, 0x00,0x00,0x02,0x02,
{0x00,0xa5,0xfb,0xf6} 0x30,0x30,0x40,0x40,
}; 0x00,0xa5,0xfb,0xf6
#ifdef LINUX_KERNEL
static UCHAR SiS310_SR07 = 0x18;
static const DRAM4Type SiS310_CR40[5] = {
{0x77,0x77,0x33,0x33},
{0x77,0x77,0x33,0x33},
{0x00,0x00,0x00,0x00},
{0x5b,0x5b,0x03,0x03},
{0x00,0x00,0xf0,0xf8}
}; };
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}},
{{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,18 +967,18 @@ static const SiS_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]= ...@@ -1035,18 +967,18 @@ 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},
{ 62, 25, 800, 546,1344, 806}, { 62, 25, 800, 546,1344, 806},
{ 104, 45, 945, 496,1344, 806}, { 104, 45, 945, 496,1344, 806},
{ 62, 25, 800, 546,1344, 806}, { 62, 25, 800, 546,1344, 806},
{ 31, 18,1008, 624,1344, 806}, { 31, 18,1008, 624,1344, 806},
{ 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,45 +1013,22 @@ static const SiS_LCDDataStruct SiS310_ExtLCD1280x1024Data[] = ...@@ -1081,45 +1013,22 @@ 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}},
{{0x25,0x12,0xc9,0xdc,0xb6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x25,0x12,0xc9,0xdc,0xb6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{0x38,0x13,0x16,0x0c,0xe6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x38,0x13,0x16,0x0c,0xe6,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x38,0x18,0x16,0x00,0x00,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x38,0x18,0x16,0x00,0x00,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{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},
...@@ -1138,10 +1047,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALData[]= ...@@ -1138,10 +1047,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALData[]=
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{ 840, 625, 840, 625}, { 840, 625, 840, 625},
{ 944, 625, 944, 625}, { 944, 625, 944, 625},
{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},
...@@ -1149,10 +1058,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALMData[]= ...@@ -1149,10 +1058,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVUPALMData[]=
{ 840, 600, 840, 600}, { 840, 600, 840, 600},
{ 784, 600, 784, 600}, { 784, 600, 784, 600},
{1064, 750,1064, 750}, {1064, 750,1064, 750},
{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},
...@@ -1160,10 +1069,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALMData[]= ...@@ -1160,10 +1069,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALMData[]=
{ 840, 525, 840, 525}, { 840, 525, 840, 525},
{ 784, 525, 784, 525}, { 784, 525, 784, 525},
{1040, 700,1040, 700}, {1040, 700,1040, 700},
{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},
...@@ -1182,10 +1091,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALNData[]= ...@@ -1182,10 +1091,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVOPALNData[]=
{1008, 625,1008, 625}, {1008, 625,1008, 625},
{ 840, 625, 840, 625}, { 840, 625, 840, 625},
{ 944, 625, 944, 625}, { 944, 625, 944, 625},
{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,1333 +1105,10 @@ static const SiS_LVDSDataStruct SiS310_CHTVSOPALData[]= /* (super overscan - ...@@ -1196,1333 +1105,10 @@ 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,
0x00 }}, 0x00 }},
...@@ -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,8 +1157,8 @@ static const SiS_LVDSCRT1DataStruct SiS310_CHTVCRT1ONTSC[] = ...@@ -2571,8 +1157,8 @@ 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,
0x00 }}, 0x00 }},
...@@ -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,8 +766,8 @@ static const UCHAR SiS_PALTiming[] = { ...@@ -730,8 +766,8 @@ 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,
0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13, 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
...@@ -741,8 +777,8 @@ static const UCHAR SiS_HiTVExtTiming[] = { ...@@ -741,8 +777,8 @@ 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,
0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03, 0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03,
...@@ -752,8 +788,8 @@ static const UCHAR SiS_HiTVSt1Timing[] = { ...@@ -752,8 +788,8 @@ 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,
0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13, 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
...@@ -764,8 +800,8 @@ static const UCHAR SiS_HiTVSt2Timing[] = { ...@@ -764,8 +800,8 @@ 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,
0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03, 0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03,
...@@ -776,8 +812,8 @@ static const UCHAR SiS_HiTVTextTiming[] = { ...@@ -776,8 +812,8 @@ 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,
0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44, 0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44,
...@@ -787,8 +823,8 @@ static const UCHAR SiS_HiTVGroup3Data[] = { ...@@ -787,8 +823,8 @@ 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,
0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11, 0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11,
...@@ -799,8 +835,8 @@ static const UCHAR SiS_HiTVGroup3Simu[] = { ...@@ -799,8 +835,8 @@ 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,
0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22, 0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22,
...@@ -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} {1056, 628,1056, 628}
}; };
static const SiS_LVDSDataStruct SiS_LVDS800x600Data_2[]= static const struct SiS_LVDSData SiS_LVDS1024x600Data_1[] =
{
{1056, 628,1056, 628}
};
static const SiS_LVDSDataStruct SiS_LVDS1024x768Data_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,
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,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, {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
0x93,0x86,0x8f,0x9f,0x30,0x00,0x05, 0xe9,0x8b,0xdf,0x04,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 #endif
#if 0 /* Product IDs missing */ unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
{ 0x38a3, 3, int VDisplay, int Depth, BOOLEAN FSTN,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, unsigned short CustomT, int LCDwith, int LCDheight,
{ "", "", "", "", "" }, unsigned int VBFlags2);
"NEC PlasmaSync 42PD1/50PD1/50PD2", unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
0, 0, int VDisplay, int Depth, unsigned int VBFlags2);
0, 0, unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,
5, /* DVI entirely unknown */ int VDisplay, int Depth, unsigned int VBFlags2);
{ 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 } void SiS_SetReg(SISIOADDRESS port, unsigned short index, unsigned short data);
}, 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 42PD3", unsigned char SiS_GetRegByte(SISIOADDRESS port);
0, 0, unsigned short SiS_GetRegShort(SISIOADDRESS port);
0, 0, unsigned int SiS_GetRegLong(SISIOADDRESS port);
10, /* DVI entirely unknown */ void SiS_SetRegANDOR(SISIOADDRESS Port, unsigned short Index, unsigned short DataAND,
{ 0|0x40, 1|0xc0, 2|0xc0, 3|0xc0, 4|0xc0, 5|0xc0, 6|0xc0, 7|0x40, 8|0xc0, 9|0xc0, 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, 2,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }, void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
{ "", "", "", "", "" }, void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
"NEC PlasmaSync 42VM3/61XM1", void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
0, 0, #ifndef SIS_LINUX_KERNEL
0, 0, void SiSSetLVDSetc(struct SiS_Private *SiS_Pr);
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, void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
{ 0xa482, 0xa483, 0x0000, 0x0000, 0x0000 }, void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
{ "PX-42VM", "", "", "", "" }, unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
"NEC PlasmaSync 42MP3/42MP4/50MP2/61MP1", unsigned short ModeIdIndex);
0, 0, BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
0, 0, #ifndef SIS_LINUX_KERNEL
11, /* All DVI except 0, 7, 13, 17 */ void SiS_GetVBType(struct SiS_Private *SiS_Pr);
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 7|0x40, 9|0xc0,10|0xc0,11|0xc0,13|0x40,14|0xc0,
17|0x40, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
#if 0 /* Product IDs missing */
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 3300W",
0, 0,
0, 0,
3,
{ 0|0x40, 1|0xc0,18|0xc0, 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 }
},
{ 0x38a3, 1,
{ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"NEC PlasmaSync 4200W",
4, /* DVI entirely unknown */
{ 0|0x40, 1|0xc0, 2|0xc0, 4|0xc0, 0 , 0 , 0 , 0 , 0 , 0 ,
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
{ 0x412f, 2,
{ 0x000c, 0x000b, 0x0000, 0x0000, 0x0000 },
{ "", "", "", "", "" },
"Pioneer 503CMX/PDA-5002",
0, 0,
0, 0,
6, /* DVI unknown */
{ 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); DisplayModePtr mode, BOOLEAN IsCustom);
void SiS_SetRegByte(SISIOADDRESS port, USHORT data); BOOLEAN SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
void SiS_SetRegShort(SISIOADDRESS port, USHORT data); DisplayModePtr mode, BOOLEAN IsCustom);
void SiS_SetRegLong(SISIOADDRESS port, ULONG data); BOOLEAN SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
UCHAR SiS_GetReg(SISIOADDRESS port, USHORT index); DisplayModePtr mode, BOOLEAN IsCustom);
UCHAR SiS_GetRegByte(SISIOADDRESS port); #endif
USHORT SiS_GetRegShort(SISIOADDRESS port); #ifdef SIS_LINUX_KERNEL
ULONG SiS_GetRegLong(SISIOADDRESS port); BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
void SiS_SetRegANDOR(SISIOADDRESS Port, USHORT Index, USHORT DataAND, USHORT DataOR); #endif
void SiS_SetRegAND(SISIOADDRESS Port,USHORT Index, USHORT DataAND); void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
void SiS_SetRegOR(SISIOADDRESS Port,USHORT Index, USHORT DataOR); void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
void SiS_DisplayOn(SiS_Private *SiS_Pr); unsigned short ModeIdIndex);
void SiS_DisplayOff(SiS_Private *SiS_Pr); #ifdef SIS_XORG_XF86
void SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr); void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo); int yres, DisplayModePtr current);
void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable); #endif
void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable); #ifdef SIS_LINUX_KERNEL
BOOLEAN SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex); void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex); int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);
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);
BOOLEAN SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom);
BOOLEAN SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
DisplayModePtr mode, BOOLEAN IsCustom);
int SiSTranslateToVESA(ScrnInfoPtr pScrn, int modenumber);
int SiSTranslateToOldMode(int modenumber);
BOOLEAN SiS_GetPanelID(SiS_Private *SiS_Pr, PSIS_HW_INFO);
USHORT SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int VBFlags);
DisplayModePtr SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes, BOOLEAN isfordvi);
int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct, int *maxx, int *maxy, int *prefx, int *prefy);
void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
#else
BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo);
#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)
...@@ -73,24 +74,37 @@ ...@@ -73,24 +74,37 @@
#define SISGETROMW(x) (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8)) #define SISGETROMW(x) (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8))
/* SiS_VBType */ /* SiS_VBType */
#define VB_SIS301 0x0001 #define VB_SIS301 0x0001
#define VB_SIS301B 0x0002 #define VB_SIS301B 0x0002
#define VB_SIS302B 0x0004 #define VB_SIS302B 0x0004
#define VB_SIS301LV 0x0008 #define VB_SIS301LV 0x0008
#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,25 +245,19 @@ ...@@ -228,25 +245,19 @@
#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)
[3] 1 = PALN (if D0 = 1) [3] 1 = PALN (if D0 = 1)
[4] 1 = Overscan (Chrontel only) [4] 1 = Overscan (Chrontel only)
[7:5] (only if D2 in CR38 is set) [7:5] (only if D2 in CR38 is set)
000 525i 000 525i
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
...@@ -341,7 +353,7 @@ ...@@ -341,7 +353,7 @@
0101 Set Contrast event 0101 Set Contrast event
0110 Set Mute event 0110 Set Mute event
0111 Set Volume Up/Down event 0111 Set Volume Up/Down event
[4] Enable Backlight Control by BIOS/driver [4] Enable Backlight Control by BIOS/driver
(set by driver; set means that the BIOS should (set by driver; set means that the BIOS should
not touch the backlight registers because eg. not touch the backlight registers because eg.
the driver already switched off the backlight) the driver already switched off the backlight)
...@@ -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,11 +334,10 @@ static const UCHAR SiS300_Phase1[8][5][4] = ...@@ -354,11 +334,10 @@ 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},
{0x21,0xed,0x8a,0x08}, {0x21,0xed,0x8a,0x08},
{0x21,0xed,0x8a,0x08}, {0x21,0xed,0x8a,0x08},
{0x21,0xed,0x8a,0x08}, {0x21,0xed,0x8a,0x08},
...@@ -372,42 +351,42 @@ static const UCHAR SiS300_Phase2[8][5][4] = ...@@ -372,42 +351,42 @@ static const UCHAR SiS300_Phase2[8][5][4] =
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
}, },
{ {
{0x21,0xed,0x00,0x08}, {0x21,0xed,0x00,0x08},
{0x21,0xed,0x8a,0x08}, {0x21,0xed,0x8a,0x08},
{0x21,0xed,0x8a,0x08}, {0x21,0xed,0x8a,0x08},
{0x21,0xed,0x8a,0x08}, {0x21,0xed,0x8a,0x08},
{0x21,0xed,0x8a,0x08} {0x21,0xed,0x8a,0x08}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
...@@ -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,142 +693,144 @@ static const UCHAR SiS300_Filter2[10][9][7] = ...@@ -714,142 +693,144 @@ 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 }, {
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe7, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1b, 0x26, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x19, 0x00 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x19, 0x00 }
{ 0x16, 0xcf, 0x00 }, },
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe7, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1b, 0x1e, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x1e, 0x00 },
{ 0x1e, 0x16, 0x00 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x16, 0x00 }
{ 0x16, 0xcf, 0x00 }, },
{ 0x1a, 0xe7, 0x00 }, {
{ 0x1b, 0x26, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x19, 0x00 }, { 0x1c, 0xff, 0x00 },
{ 0, 0, 0 } { 0x1d, 0x1c, 0x00 },
}, { 0x1e, 0x19, 0x00 },
{ { 0, 0, 0 }
{ 0, 0, 0 } },
}, {
{ { 0, 0, 0 }
{ 0x16, 0xcf, 0x00 }, },
{ 0x1a, 0xe7, 0x00 }, {
{ 0x1b, 0x26, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x1e, 0x00 }, { 0x1c, 0xff, 0x00 },
{ 0, 0, 0 } { 0x1d, 0x1c, 0x00 },
}, { 0x1e, 0x1e, 0x00 },
{ { 0, 0, 0 }
{ 0x16, 0xd1, 0x00 }, },
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe7, 0x00 }, { 0x16, 0xd1, 0x00 },
{ 0x1b, 0x11, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x11, 0x00 },
{ 0x1e, 0x26, 0x00 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x26, 0x00 }
{ 0x16, 0xd1, 0x00 }, },
{ 0x1a, 0xe7, 0x00 }, {
{ 0x1b, 0x26, 0x00 }, { 0x16, 0xd1, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x30, 0x00 }, { 0x1c, 0xff, 0x00 },
{ 0, 0, 0 } { 0x1d, 0x1c, 0x00 },
}, { 0x1e, 0x30, 0x00 },
{ { 0, 0, 0 }
{ 0x16, 0x00, 0x00 }, },
{ 0x17, 0xa0, 0x00 }, {
{ 0x1a, 0xa0, 0x00 }, { 0x16, 0x00, 0x00 },
{ 0x1b, 0x2a, 0x00 }, { 0x17, 0xa0, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xa0, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x2a, 0x00 },
{ 0, 0, 0 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0, 0, 0 }
{ 0x16, 0x00, 0x00 }, },
{ 0x17, 0xaa, 0x00 }, {
{ 0x1a, 0xa0, 0x00 }, { 0x16, 0x00, 0x00 },
{ 0x1b, 0x2a, 0x00 }, { 0x17, 0xaa, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xa0, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x2a, 0x00 },
{ 0, 0, 0 } { 0x1c, 0xff, 0x00 },
} { 0x1d, 0x1c, 0x00 },
}, { 0, 0, 0 }
{ }
{ },
{ 0x16, 0xcf, 0x00 }, {
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe7, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1b, 0x26, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x19, 0x00 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x19, 0x00 }
{ 0, 0, 0 } },
}, {
{ { 0, 0, 0 }
{ 0x16, 0xcf, 0x00 }, },
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe7, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1b, 0x26, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x19, 0x00 }, { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x19, 0x00 },
{ 0, 0, 0 } },
}, {
{ { 0, 0, 0 }
{ 0x16, 0xcf, 0x00 }, },
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe7, 0x00 }, { 0x16, 0xcf, 0x00 },
{ 0x1b, 0x26, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe7, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x1e, 0x00 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x1e, 0x00 }
{ 0x16, 0xd1, 0x00 }, },
{ 0x18, 0x00, 0x00 }, {
{ 0x1a, 0xe6, 0x00 }, { 0x16, 0xd1, 0x00 },
{ 0x1b, 0x11, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe6, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x11, 0x00 },
{ 0x1e, 0x26, 0x00 } { 0x1c, 0xff, 0x00 },
}, { 0x1d, 0x1c, 0x00 },
{ { 0x1e, 0x26, 0x00 }
{ 0x18, 0x00, 0x00 }, },
{ 0x1a, 0xe0, 0x00 }, {
{ 0x1b, 0x26, 0x00 }, { 0x18, 0x00, 0x00 },
{ 0x1c, 0xff, 0x00 }, { 0x1a, 0xe0, 0x00 },
{ 0x1d, 0x1c, 0x00 }, { 0x1b, 0x26, 0x00 },
{ 0x1e, 0x30, 0x00 }, { 0x1c, 0xff, 0x00 },
{ 0, 0, 0 } { 0x1d, 0x1c, 0x00 },
}, { 0x1e, 0x30, 0x00 },
{ { 0, 0, 0 }
{ 0, 0, 0 } },
}, {
{ { 0, 0, 0 }
{ 0, 0, 0 } },
} {
} { 0, 0, 0 }
}
}
}; };
......
/* $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,206 +50,206 @@ ...@@ -50,206 +50,206 @@
* *
*/ */
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 */
0x08,0x08,0x08, /* 1280x1024 */ 0x08,0x08,0x08, /* 1280x1024 */
0x00,0x00,0x00, /* 640x480 (unknown) */ 0x00,0x00,0x00, /* 640x480 (unknown) */
0x00,0x00,0x00, /* 1024x600 (unknown) */ 0x00,0x00,0x00, /* 1024x600 (unknown) */
0x00,0x00,0x00, /* 1152x864 (unknown) */ 0x00,0x00,0x00, /* 1152x864 (unknown) */
0x08,0x08,0x08, /* 1280x960 (guessed) */ 0x08,0x08,0x08, /* 1280x960 (guessed) */
0x00,0x00,0x00, /* 1152x768 (unknown) */ 0x00,0x00,0x00, /* 1152x768 (unknown) */
0x08,0x08,0x08, /* 1400x1050 */ 0x08,0x08,0x08, /* 1400x1050 */
0x08,0x08,0x08, /* 1280x768 (guessed) */ 0x08,0x08,0x08, /* 1280x768 (guessed) */
0x00,0x00,0x00, /* 1600x1200 */ 0x00,0x00,0x00, /* 1600x1200 */
0x00,0x00,0x00, /* 320x480 (unknown) */ 0x00,0x00,0x00, /* 320x480 (unknown) */
0x00,0x00,0x00, 0x00,0x00,0x00,
0x00,0x00,0x00, 0x00,0x00,0x00,
0x00,0x00,0x00 0x00,0x00,0x00
}; };
/* 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 */
0x01,0x01,0x01, /* 1280x1024 */ 0x01,0x01,0x01, /* 1280x1024 */
0x01,0x01,0x01, /* 640x480 (unknown) */ 0x01,0x01,0x01, /* 640x480 (unknown) */
0x01,0x01,0x01, /* 1024x600 (unknown) */ 0x01,0x01,0x01, /* 1024x600 (unknown) */
0x01,0x01,0x01, /* 1152x864 (unknown) */ 0x01,0x01,0x01, /* 1152x864 (unknown) */
0x01,0x01,0x01, /* 1280x960 (guessed) */ 0x01,0x01,0x01, /* 1280x960 (guessed) */
0x01,0x01,0x01, /* 1152x768 (unknown) */ 0x01,0x01,0x01, /* 1152x768 (unknown) */
0x01,0x01,0x01, /* 1400x1050 */ 0x01,0x01,0x01, /* 1400x1050 */
0x01,0x01,0x01, /* 1280x768 (guessed) */ 0x01,0x01,0x01, /* 1280x768 (guessed) */
0x01,0x01,0x01, /* 1600x1200 */ 0x01,0x01,0x01, /* 1600x1200 */
0x02,0x02,0x02, 0x02,0x02,0x02,
0x02,0x02,0x02, 0x02,0x02,0x02,
0x02,0x02,0x02, 0x02,0x02,0x02,
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 */
0x33,0x33,0x33, /* 1280x1024 */ 0x33,0x33,0x33, /* 1280x1024 */
0x33,0x33,0x33, /* 640x480 (unknown) */ 0x33,0x33,0x33, /* 640x480 (unknown) */
0x33,0x33,0x33, /* 1024x600 (unknown) */ 0x33,0x33,0x33, /* 1024x600 (unknown) */
0x33,0x33,0x33, /* 1152x864 (unknown) */ 0x33,0x33,0x33, /* 1152x864 (unknown) */
0x33,0x33,0x33, /* 1280x960 (guessed) */ 0x33,0x33,0x33, /* 1280x960 (guessed) */
0x33,0x33,0x33, /* 1152x768 (unknown) */ 0x33,0x33,0x33, /* 1152x768 (unknown) */
0x33,0x33,0x33, /* 1400x1050 */ 0x33,0x33,0x33, /* 1400x1050 */
0x33,0x33,0x33, /* 1280x768 (guessed) */ 0x33,0x33,0x33, /* 1280x768 (guessed) */
0x33,0x33,0x33, /* 1600x1200 */ 0x33,0x33,0x33, /* 1600x1200 */
0x33,0x33,0x33, 0x33,0x33,0x33,
0x33,0x33,0x33, 0x33,0x33,0x33,
0x33,0x33,0x33, 0x33,0x33,0x33,
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 */
0x33,0x33,0x33, /* 1280x1024 */ 0x33,0x33,0x33, /* 1280x1024 */
0x33,0x33,0x33, /* 640x480 (unknown) */ 0x33,0x33,0x33, /* 640x480 (unknown) */
0x33,0x33,0x33, /* 1024x600 (unknown) */ 0x33,0x33,0x33, /* 1024x600 (unknown) */
0x33,0x33,0x33, /* 1152x864 (unknown) */ 0x33,0x33,0x33, /* 1152x864 (unknown) */
0x33,0x33,0x33, /* 1280x960 (guessed) */ 0x33,0x33,0x33, /* 1280x960 (guessed) */
0x33,0x33,0x33, /* 1152x768 (unknown) */ 0x33,0x33,0x33, /* 1152x768 (unknown) */
0x33,0x33,0x33, /* 1400x1050 */ 0x33,0x33,0x33, /* 1400x1050 */
0x33,0x33,0x33, /* 1280x768 (guessed) */ 0x33,0x33,0x33, /* 1280x768 (guessed) */
0x33,0x33,0x33, /* 1600x1200 */ 0x33,0x33,0x33, /* 1600x1200 */
0x33,0x33,0x33, 0x33,0x33,0x33,
0x33,0x33,0x33, 0x33,0x33,0x33,
0x33,0x33,0x33, 0x33,0x33,0x33,
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 */
0x0C,0x0C,0x0C, /* 1280x1024 */ 0x0C,0x0C,0x0C, /* 1280x1024 */
0x08,0x08,0x08, /* 640x480 */ 0x08,0x08,0x08, /* 640x480 */
0x0C,0x0C,0x0C, /* 1024x600 (guessed) */ 0x0C,0x0C,0x0C, /* 1024x600 (guessed) */
0x0C,0x0C,0x0C, /* 1152x864 (guessed) */ 0x0C,0x0C,0x0C, /* 1152x864 (guessed) */
0x0C,0x0C,0x0C, /* 1280x960 (guessed) */ 0x0C,0x0C,0x0C, /* 1280x960 (guessed) */
0x0C,0x0C,0x0C, /* 1152x768 (guessed) */ 0x0C,0x0C,0x0C, /* 1152x768 (guessed) */
0x0C,0x0C,0x0C, /* 1400x1050 (guessed) */ 0x0C,0x0C,0x0C, /* 1400x1050 (guessed) */
0x0C,0x0C,0x0C, /* 1280x768 (guessed) */ 0x0C,0x0C,0x0C, /* 1280x768 (guessed) */
0x0C,0x0C,0x0C, /* 1600x1200 (guessed) */ 0x0C,0x0C,0x0C, /* 1600x1200 (guessed) */
0x02,0x02,0x02, 0x02,0x02,0x02,
0x02,0x02,0x02, 0x02,0x02,0x02,
0x02,0x02,0x02, 0x02,0x02,0x02,
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 */
0x0C,0x0C,0x0C, /* 1280x1024 */ 0x0C,0x0C,0x0C, /* 1280x1024 */
0x08,0x08,0x08, /* 640x480 */ 0x08,0x08,0x08, /* 640x480 */
0x0C,0x0C,0x0C, /* 1024x600 (guessed) */ 0x0C,0x0C,0x0C, /* 1024x600 (guessed) */
0x0C,0x0C,0x0C, /* 1152x864 (guessed) */ 0x0C,0x0C,0x0C, /* 1152x864 (guessed) */
0x0C,0x0C,0x0C, /* 1280x960 (guessed) */ 0x0C,0x0C,0x0C, /* 1280x960 (guessed) */
0x0C,0x0C,0x0C, /* 1152x768 (guessed) */ 0x0C,0x0C,0x0C, /* 1152x768 (guessed) */
0x0C,0x0C,0x0C, /* 1400x1050 (guessed) */ 0x0C,0x0C,0x0C, /* 1400x1050 (guessed) */
0x0C,0x0C,0x0C, /* 1280x768 (guessed) */ 0x0C,0x0C,0x0C, /* 1280x768 (guessed) */
0x0C,0x0C,0x0C, /* 1600x1200 (guessed) */ 0x0C,0x0C,0x0C, /* 1600x1200 (guessed) */
0x02,0x02,0x02, 0x02,0x02,0x02,
0x02,0x02,0x02, 0x02,0x02,0x02,
0x02,0x02,0x02, 0x02,0x02,0x02,
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,
0x00,0x00, 0x00,0x00,
0x44,0x44, 0x44,0x44,
0x44,0x44, 0x44,0x44,
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,
0x00,0x00, 0x00,0x00,
0x44,0x44, 0x44,0x44,
0x44,0x44, 0x44,0x44,
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},
{0x0,0x0}, {0x0,0x0},
{0x0,0x0}, {0x0,0x0},
{0x0,0x0}, {0x0,0x0},
{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},
{0x0,0x0}, {0x0,0x0},
{0x0,0x0}, {0x0,0x0},
{0x0,0x0}, {0x0,0x0},
{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 */
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
...@@ -258,8 +258,8 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] = ...@@ -258,8 +258,8 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] =
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
{0xee,0x0c,0x22,0x08}, {0xee,0x0c,0x22,0x08},
{0xeb,0x15,0x25,0xf6} {0xeb,0x15,0x25,0xf6}
}, },
{ {
{0x00,0xf4,0x10,0x38}, /* PAL */ {0x00,0xf4,0x10,0x38}, /* PAL */
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
{0xf1,0xf7,0x1f,0x32}, {0xf1,0xf7,0x1f,0x32},
...@@ -268,8 +268,8 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] = ...@@ -268,8 +268,8 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] =
{0xf1,0xf7,0x1f,0x32}, {0xf1,0xf7,0x1f,0x32},
{0xf3,0x00,0x1d,0x20}, {0xf3,0x00,0x1d,0x20},
{0xfc,0xfb,0x14,0x2a} {0xfc,0xfb,0x14,0x2a}
}, },
{ {
{0x00,0x00,0x00,0x00}, /* HiVision */ {0x00,0x00,0x00,0x00}, /* HiVision */
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
...@@ -278,9 +278,9 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] = ...@@ -278,9 +278,9 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] =
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
{0xee,0x0c,0x22,0x08} {0xee,0x0c,0x22,0x08}
}, },
{ {
{0x00,0xf4,0x10,0x38}, /* PAL-M */ {0x00,0xf4,0x10,0x38}, /* PAL-M */
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
{0xeb,0x04,0x10,0x18}, {0xeb,0x04,0x10,0x18},
{0xf7,0x06,0x19,0x14}, {0xf7,0x06,0x19,0x14},
...@@ -288,9 +288,9 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] = ...@@ -288,9 +288,9 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] =
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
{0xeb,0x15,0x25,0xf6} {0xeb,0x15,0x25,0xf6}
}, },
{ {
{0x00,0xf4,0x10,0x38}, /* PAL-N */ {0x00,0xf4,0x10,0x38}, /* PAL-N */
{0x00,0xf4,0x10,0x38}, {0x00,0xf4,0x10,0x38},
{0xeb,0x04,0x10,0x18}, {0xeb,0x04,0x10,0x18},
{0xf7,0x06,0x19,0x14}, {0xf7,0x06,0x19,0x14},
...@@ -298,12 +298,12 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] = ...@@ -298,12 +298,12 @@ static const UCHAR SiS310_TVYFilter1[5][8][4] =
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
{0xeb,0x04,0x25,0x18}, {0xeb,0x04,0x25,0x18},
{0xeb,0x15,0x25,0xf6} {0xeb,0x15,0x25,0xf6}
} }
}; };
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 */
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
...@@ -313,8 +313,8 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] = ...@@ -313,8 +313,8 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] =
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0x01,0x01,0xFC,0xF8,0x08,0x26,0x38}, {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
{0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28} {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
}, },
{ {
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL */ {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL */
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
...@@ -324,8 +324,8 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] = ...@@ -324,8 +324,8 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] =
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0x01,0x01,0xFC,0xF8,0x08,0x26,0x38}, {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
{0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28} {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
}, },
{ {
{0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, /* HiVision */ {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, /* HiVision */
{0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
{0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
...@@ -335,9 +335,9 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] = ...@@ -335,9 +335,9 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] =
{0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
{0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
{0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22} {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}
}, },
{ {
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL-M */ {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL-M */
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
...@@ -346,9 +346,9 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] = ...@@ -346,9 +346,9 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] =
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0x01,0x01,0xFC,0xF8,0x08,0x26,0x38}, {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
{0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28} {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
}, },
{ {
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL-N */ {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL-N */
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
...@@ -357,58 +357,39 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] = ...@@ -357,58 +357,39 @@ static const UCHAR SiS310_TVYFilter2[5][9][7] =
{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C}, {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
{0x01,0x01,0xFC,0xF8,0x08,0x26,0x38}, {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
{0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28} {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
} }
}; };
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},
{0x21,0xed,0xba,0x08} {0x21,0xed,0xba,0x08}
}, },
{ {
{0x2a,0x05,0xe3,0x00}, {0x2a,0x05,0xe3,0x00},
{0x2a,0x05,0xe3,0x00} {0x2a,0x05,0xe3,0x00}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
} }
}; };
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},
{0x21,0xf0,0x7b,0xd6} {0x21,0xf0,0x7b,0xd6}
}, },
{ {
{0x2a,0x0a,0x41,0xe9}, {0x2a,0x0a,0x41,0xe9},
{0x2a,0x0a,0x41,0xe9} {0x2a,0x0a,0x41,0xe9}
}, },
{ {
{0x2a,0x05,0xd3,0x00}, {0x2a,0x05,0xd3,0x00},
{0x2a,0x05,0xd3,0x00} {0x2a,0x05,0xd3,0x00}
} }
};
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
}; };
/**************************************************************/ /**************************************************************/
...@@ -417,7 +398,7 @@ static const UCHAR SiS661_TVPhase[] = { ...@@ -417,7 +398,7 @@ static const UCHAR SiS661_TVPhase[] = {
/* 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,17 +412,17 @@ static const SiS_LCDDataStruct SiS310_ExtCompaq1280x1024Data[] = ...@@ -431,17 +412,17 @@ 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}},
{{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{0x38,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}, {{0x38,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x38,0x13,0x16,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}, {{0x38,0x13,0x16,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}}, {{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}} {{0x25,0x13,0xc9,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>
...@@ -35,26 +37,37 @@ ...@@ -35,26 +37,37 @@
#include "vgatypes.h" #include "vgatypes.h"
#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
...@@ -79,228 +92,312 @@ ...@@ -79,228 +92,312 @@
/* To be included in pci_ids.h */ /* To be included in pci_ids.h */
#ifndef PCI_DEVICE_ID_SI_650_VGA #ifndef PCI_DEVICE_ID_SI_650_VGA
#define PCI_DEVICE_ID_SI_650_VGA 0x6325 #define PCI_DEVICE_ID_SI_650_VGA 0x6325
#endif #endif
#ifndef PCI_DEVICE_ID_SI_650 #ifndef PCI_DEVICE_ID_SI_650
#define PCI_DEVICE_ID_SI_650 0x0650 #define PCI_DEVICE_ID_SI_650 0x0650
#endif #endif
#ifndef PCI_DEVICE_ID_SI_651 #ifndef PCI_DEVICE_ID_SI_651
#define PCI_DEVICE_ID_SI_651 0x0651 #define PCI_DEVICE_ID_SI_651 0x0651
#endif #endif
#ifndef PCI_DEVICE_ID_SI_740 #ifndef PCI_DEVICE_ID_SI_740
#define PCI_DEVICE_ID_SI_740 0x0740 #define PCI_DEVICE_ID_SI_740 0x0740
#endif #endif
#ifndef PCI_DEVICE_ID_SI_330 #ifndef PCI_DEVICE_ID_SI_330
#define PCI_DEVICE_ID_SI_330 0x0330 #define PCI_DEVICE_ID_SI_330 0x0330
#endif #endif
#ifndef PCI_DEVICE_ID_SI_660_VGA #ifndef PCI_DEVICE_ID_SI_660_VGA
#define PCI_DEVICE_ID_SI_660_VGA 0x6330 #define PCI_DEVICE_ID_SI_660_VGA 0x6330
#endif #endif
#ifndef PCI_DEVICE_ID_SI_661 #ifndef PCI_DEVICE_ID_SI_661
#define PCI_DEVICE_ID_SI_661 0x0661 #define PCI_DEVICE_ID_SI_661 0x0661
#endif #endif
#ifndef PCI_DEVICE_ID_SI_741 #ifndef PCI_DEVICE_ID_SI_741
#define PCI_DEVICE_ID_SI_741 0x0741 #define PCI_DEVICE_ID_SI_741 0x0741
#endif #endif
#ifndef PCI_DEVICE_ID_SI_660 #ifndef PCI_DEVICE_ID_SI_660
#define PCI_DEVICE_ID_SI_660 0x0660 #define PCI_DEVICE_ID_SI_660 0x0660
#endif #endif
#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
#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 #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
#define TURBO_QUEUE_CAP 0x40 #define TURBO_QUEUE_CAP 0x40
#define AGP_CMD_QUEUE_CAP 0x20 #define AGP_CMD_QUEUE_CAP 0x20
#define VM_CMD_QUEUE_CAP 0x10 #define VM_CMD_QUEUE_CAP 0x10
#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_THRESHOLD 0x1F #define COMMAND_QUEUE_AREA_SIZE_Z7 (128 * 1024) /* 128k for XGI Z7 */
#define HW_CURSOR_AREA_SIZE_315 0x4000 /* 16K */ #define HW_CURSOR_AREA_SIZE_315 16384 /* 16K */
#define COMMAND_QUEUE_THRESHOLD 0x1F
#define SIS_OH_ALLOC_SIZE 4000
#define SENTINEL 0x7fffffff #define SIS_OH_ALLOC_SIZE 4000
#define SENTINEL 0x7fffffff
#define SEQ_ADR 0x14
#define SEQ_DATA 0x15 #define SEQ_ADR 0x14
#define DAC_ADR 0x18 #define SEQ_DATA 0x15
#define DAC_DATA 0x19 #define DAC_ADR 0x18
#define CRTC_ADR 0x24 #define DAC_DATA 0x19
#define CRTC_DATA 0x25 #define CRTC_ADR 0x24
#define DAC2_ADR (0x16-0x30) #define CRTC_DATA 0x25
#define DAC2_DATA (0x17-0x30) #define DAC2_ADR (0x16-0x30)
#define VB_PART1_ADR (0x04-0x30) #define DAC2_DATA (0x17-0x30)
#define VB_PART1_DATA (0x05-0x30) #define VB_PART1_ADR (0x04-0x30)
#define VB_PART2_ADR (0x10-0x30) #define VB_PART1_DATA (0x05-0x30)
#define VB_PART2_DATA (0x11-0x30) #define VB_PART2_ADR (0x10-0x30)
#define VB_PART3_ADR (0x12-0x30) #define VB_PART2_DATA (0x11-0x30)
#define VB_PART3_DATA (0x13-0x30) #define VB_PART3_ADR (0x12-0x30)
#define VB_PART4_ADR (0x14-0x30) #define VB_PART3_DATA (0x13-0x30)
#define VB_PART4_DATA (0x15-0x30) #define VB_PART4_ADR (0x14-0x30)
#define VB_PART4_DATA (0x15-0x30)
#define SISSR ivideo->SiS_Pr.SiS_P3c4
#define SISCR ivideo->SiS_Pr.SiS_P3d4 #define SISSR ivideo->SiS_Pr.SiS_P3c4
#define SISDACA ivideo->SiS_Pr.SiS_P3c8 #define SISCR ivideo->SiS_Pr.SiS_P3d4
#define SISDACD ivideo->SiS_Pr.SiS_P3c9 #define SISDACA ivideo->SiS_Pr.SiS_P3c8
#define SISPART1 ivideo->SiS_Pr.SiS_Part1Port #define SISDACD ivideo->SiS_Pr.SiS_P3c9
#define SISPART2 ivideo->SiS_Pr.SiS_Part2Port #define SISPART1 ivideo->SiS_Pr.SiS_Part1Port
#define SISPART3 ivideo->SiS_Pr.SiS_Part3Port #define SISPART2 ivideo->SiS_Pr.SiS_Part2Port
#define SISPART4 ivideo->SiS_Pr.SiS_Part4Port #define SISPART3 ivideo->SiS_Pr.SiS_Part3Port
#define SISPART5 ivideo->SiS_Pr.SiS_Part5Port #define SISPART4 ivideo->SiS_Pr.SiS_Part4Port
#define SISDAC2A SISPART5 #define SISPART5 ivideo->SiS_Pr.SiS_Part5Port
#define SISDAC2D (SISPART5 + 1) #define SISDAC2A SISPART5
#define SISMISCR (ivideo->SiS_Pr.RelIO + 0x1c) #define SISDAC2D (SISPART5 + 1)
#define SISMISCW ivideo->SiS_Pr.SiS_P3c2 #define SISMISCR (ivideo->SiS_Pr.RelIO + 0x1c)
#define SISINPSTAT (ivideo->SiS_Pr.RelIO + 0x2a) #define SISMISCW ivideo->SiS_Pr.SiS_P3c2
#define SISPEL ivideo->SiS_Pr.SiS_P3c6 #define SISINPSTAT (ivideo->SiS_Pr.RelIO + 0x2a)
#define SISPEL ivideo->SiS_Pr.SiS_P3c6
#define IND_SIS_PASSWORD 0x05 /* SRs */ #define SISVGAENABLE (ivideo->SiS_Pr.RelIO + 0x13)
#define IND_SIS_COLOR_MODE 0x06 #define SISVID (ivideo->SiS_Pr.RelIO + 0x02 - 0x30)
#define IND_SIS_RAMDAC_CONTROL 0x07 #define SISCAP (ivideo->SiS_Pr.RelIO + 0x00 - 0x30)
#define IND_SIS_DRAM_SIZE 0x14
#define IND_SIS_MODULE_ENABLE 0x1E #define IND_SIS_PASSWORD 0x05 /* SRs */
#define IND_SIS_PCI_ADDRESS_SET 0x20 #define IND_SIS_COLOR_MODE 0x06
#define IND_SIS_TURBOQUEUE_ADR 0x26 #define IND_SIS_RAMDAC_CONTROL 0x07
#define IND_SIS_TURBOQUEUE_SET 0x27 #define IND_SIS_DRAM_SIZE 0x14
#define IND_SIS_POWER_ON_TRAP 0x38 #define IND_SIS_MODULE_ENABLE 0x1E
#define IND_SIS_POWER_ON_TRAP2 0x39 #define IND_SIS_PCI_ADDRESS_SET 0x20
#define IND_SIS_CMDQUEUE_SET 0x26 #define IND_SIS_TURBOQUEUE_ADR 0x26
#define IND_SIS_CMDQUEUE_THRESHOLD 0x27 #define IND_SIS_TURBOQUEUE_SET 0x27
#define IND_SIS_POWER_ON_TRAP 0x38
#define IND_SIS_AGP_IO_PAD 0x48 #define IND_SIS_POWER_ON_TRAP2 0x39
#define IND_SIS_CMDQUEUE_SET 0x26
#define SIS_CRT2_WENABLE_300 0x24 /* Part1 */ #define IND_SIS_CMDQUEUE_THRESHOLD 0x27
#define SIS_CRT2_WENABLE_315 0x2F
#define IND_SIS_AGP_IO_PAD 0x48
#define SIS_PASSWORD 0x86 /* SR05 */
#define SIS_CRT2_WENABLE_300 0x24 /* Part1 */
#define SIS_INTERLACED_MODE 0x20 /* SR06 */ #define SIS_CRT2_WENABLE_315 0x2F
#define SIS_8BPP_COLOR_MODE 0x0
#define SIS_15BPP_COLOR_MODE 0x1 #define SIS_PASSWORD 0x86 /* SR05 */
#define SIS_16BPP_COLOR_MODE 0x2
#define SIS_32BPP_COLOR_MODE 0x4 #define SIS_INTERLACED_MODE 0x20 /* SR06 */
#define SIS_8BPP_COLOR_MODE 0x0
#define SIS_ENABLE_2D 0x40 /* SR1E */ #define SIS_15BPP_COLOR_MODE 0x1
#define SIS_16BPP_COLOR_MODE 0x2
#define SIS_MEM_MAP_IO_ENABLE 0x01 /* SR20 */ #define SIS_32BPP_COLOR_MODE 0x4
#define SIS_PCI_ADDR_ENABLE 0x80
#define SIS_ENABLE_2D 0x40 /* SR1E */
#define SIS_AGP_CMDQUEUE_ENABLE 0x80 /* 315/330 series SR26 */
#define SIS_VRAM_CMDQUEUE_ENABLE 0x40 #define SIS_MEM_MAP_IO_ENABLE 0x01 /* SR20 */
#define SIS_MMIO_CMD_ENABLE 0x20 #define SIS_PCI_ADDR_ENABLE 0x80
#define SIS_CMD_QUEUE_SIZE_512k 0x00
#define SIS_CMD_QUEUE_SIZE_1M 0x04 #define SIS_AGP_CMDQUEUE_ENABLE 0x80 /* 315/330/340 series SR26 */
#define SIS_CMD_QUEUE_SIZE_2M 0x08 #define SIS_VRAM_CMDQUEUE_ENABLE 0x40
#define SIS_CMD_QUEUE_SIZE_4M 0x0C #define SIS_MMIO_CMD_ENABLE 0x20
#define SIS_CMD_QUEUE_RESET 0x01 #define SIS_CMD_QUEUE_SIZE_512k 0x00
#define SIS_CMD_AUTO_CORR 0x02 #define SIS_CMD_QUEUE_SIZE_1M 0x04
#define SIS_CMD_QUEUE_SIZE_2M 0x08
#define SIS_SIMULTANEOUS_VIEW_ENABLE 0x01 /* CR30 */ #define SIS_CMD_QUEUE_SIZE_4M 0x0C
#define SIS_MODE_SELECT_CRT2 0x02 #define SIS_CMD_QUEUE_RESET 0x01
#define SIS_VB_OUTPUT_COMPOSITE 0x04 #define SIS_CMD_AUTO_CORR 0x02
#define SIS_VB_OUTPUT_SVIDEO 0x08
#define SIS_VB_OUTPUT_SCART 0x10 #define SIS_CMD_QUEUE_SIZE_Z7_64k 0x00 /* XGI Z7 */
#define SIS_VB_OUTPUT_LCD 0x20 #define SIS_CMD_QUEUE_SIZE_Z7_128k 0x04
#define SIS_VB_OUTPUT_CRT2 0x40
#define SIS_VB_OUTPUT_HIVISION 0x80 #define SIS_SIMULTANEOUS_VIEW_ENABLE 0x01 /* CR30 */
#define SIS_MODE_SELECT_CRT2 0x02
#define SIS_VB_OUTPUT_DISABLE 0x20 /* CR31 */ #define SIS_VB_OUTPUT_COMPOSITE 0x04
#define SIS_DRIVER_MODE 0x40 #define SIS_VB_OUTPUT_SVIDEO 0x08
#define SIS_VB_OUTPUT_SCART 0x10
#define SIS_VB_COMPOSITE 0x01 /* CR32 */ #define SIS_VB_OUTPUT_LCD 0x20
#define SIS_VB_SVIDEO 0x02 #define SIS_VB_OUTPUT_CRT2 0x40
#define SIS_VB_SCART 0x04 #define SIS_VB_OUTPUT_HIVISION 0x80
#define SIS_VB_LCD 0x08
#define SIS_VB_CRT2 0x10 #define SIS_VB_OUTPUT_DISABLE 0x20 /* CR31 */
#define SIS_CRT1 0x20 #define SIS_DRIVER_MODE 0x40
#define SIS_VB_HIVISION 0x40
#define SIS_VB_YPBPR 0x80 #define SIS_VB_COMPOSITE 0x01 /* CR32 */
#define SIS_VB_TV (SIS_VB_COMPOSITE | SIS_VB_SVIDEO | \ #define SIS_VB_SVIDEO 0x02
SIS_VB_SCART | SIS_VB_HIVISION | SIS_VB_YPBPR) #define SIS_VB_SCART 0x04
#define SIS_VB_LCD 0x08
#define SIS_EXTERNAL_CHIP_MASK 0x0E /* CR37 (< SiS 660) */ #define SIS_VB_CRT2 0x10
#define SIS_EXTERNAL_CHIP_SIS301 0x01 /* in CR37 << 1 ! */ #define SIS_CRT1 0x20
#define SIS_EXTERNAL_CHIP_LVDS 0x02 #define SIS_VB_HIVISION 0x40
#define SIS_EXTERNAL_CHIP_TRUMPION 0x03 #define SIS_VB_YPBPR 0x80
#define SIS_EXTERNAL_CHIP_LVDS_CHRONTEL 0x04 #define SIS_VB_TV (SIS_VB_COMPOSITE | SIS_VB_SVIDEO | \
#define SIS_EXTERNAL_CHIP_CHRONTEL 0x05 SIS_VB_SCART | SIS_VB_HIVISION | SIS_VB_YPBPR)
#define SIS310_EXTERNAL_CHIP_LVDS 0x02
#define SIS310_EXTERNAL_CHIP_LVDS_CHRONTEL 0x03 #define SIS_EXTERNAL_CHIP_MASK 0x0E /* CR37 (< SiS 660) */
#define SIS_EXTERNAL_CHIP_SIS301 0x01 /* in CR37 << 1 ! */
#define SIS_AGP_2X 0x20 /* CR48 */ #define SIS_EXTERNAL_CHIP_LVDS 0x02
#define SIS_EXTERNAL_CHIP_TRUMPION 0x03
#define HW_DEVICE_EXTENSION SIS_HW_INFO #define SIS_EXTERNAL_CHIP_LVDS_CHRONTEL 0x04
#define PHW_DEVICE_EXTENSION PSIS_HW_INFO #define SIS_EXTERNAL_CHIP_CHRONTEL 0x05
#define SIS310_EXTERNAL_CHIP_LVDS 0x02
#define SIS310_EXTERNAL_CHIP_LVDS_CHRONTEL 0x03
#define SIS_AGP_2X 0x20 /* CR48 */
/* vbflags, private entries (others in sisfb.h) */
#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)
#define outSISREG(base,val) outb(val,base) #define outSISREG(base,val) outb(val,base)
#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) \
do { \ do { \
outSISREG(base, idx); \ outSISREG(base, idx); \
var = inSISREG((base)+1); \ var = inSISREG((base)+1); \
} while (0) } while (0)
#define outSISIDXREG(base,idx,val) \ #define outSISIDXREG(base,idx,val) \
do { \ do { \
outSISREG(base, idx); \ outSISREG(base, idx); \
outSISREG((base)+1, val); \ outSISREG((base)+1, val); \
} while (0) } while (0)
#define orSISIDXREG(base,idx,val) \ #define orSISIDXREG(base,idx,val) \
do { \ do { \
u8 __Temp; \ u8 __Temp; \
outSISREG(base, idx); \ outSISREG(base, idx); \
__Temp = inSISREG((base)+1) | (val); \ __Temp = inSISREG((base)+1) | (val); \
outSISREG((base)+1, __Temp); \ outSISREG((base)+1, __Temp); \
} while (0) } while (0)
#define andSISIDXREG(base,idx,and) \ #define andSISIDXREG(base,idx,and) \
do { \ do { \
u8 __Temp; \ u8 __Temp; \
outSISREG(base, idx); \ outSISREG(base, idx); \
__Temp = inSISREG((base)+1) & (and); \ __Temp = inSISREG((base)+1) & (and); \
outSISREG((base)+1, __Temp); \ outSISREG((base)+1, __Temp); \
} while (0) } while (0)
#define setSISIDXREG(base,idx,and,or) \ #define setSISIDXREG(base,idx,and,or) \
do { \ do { \
u8 __Temp; \ u8 __Temp; \
outSISREG(base, idx); \ outSISREG(base, idx); \
__Temp = (inSISREG((base)+1) & (and)) | (or); \ __Temp = (inSISREG((base)+1) & (and)) | (or); \
outSISREG((base)+1, __Temp); \ outSISREG((base)+1, __Temp); \
} while (0) } while (0)
/* MMIO access macros */ /* MMIO access macros */
#define MMIO_IN8(base, offset) readb((base+offset)) #define MMIO_IN8(base, offset) readb((base+offset))
...@@ -322,19 +419,19 @@ ...@@ -322,19 +419,19 @@
#define MMIO_QUEUE_READPORT Q_READ_PTR #define MMIO_QUEUE_READPORT Q_READ_PTR
#ifndef FB_BLANK_UNBLANK #ifndef FB_BLANK_UNBLANK
#define FB_BLANK_UNBLANK 0 #define FB_BLANK_UNBLANK 0
#endif #endif
#ifndef FB_BLANK_NORMAL #ifndef FB_BLANK_NORMAL
#define FB_BLANK_NORMAL 1 #define FB_BLANK_NORMAL 1
#endif #endif
#ifndef FB_BLANK_VSYNC_SUSPEND #ifndef FB_BLANK_VSYNC_SUSPEND
#define FB_BLANK_VSYNC_SUSPEND 2 #define FB_BLANK_VSYNC_SUSPEND 2
#endif #endif
#ifndef FB_BLANK_HSYNC_SUSPEND #ifndef FB_BLANK_HSYNC_SUSPEND
#define FB_BLANK_HSYNC_SUSPEND 3 #define FB_BLANK_HSYNC_SUSPEND 3
#endif #endif
#ifndef FB_BLANK_POWERDOWN #ifndef FB_BLANK_POWERDOWN
#define FB_BLANK_POWERDOWN 4 #define FB_BLANK_POWERDOWN 4
#endif #endif
enum _SIS_LCD_TYPE { enum _SIS_LCD_TYPE {
...@@ -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,31 +466,50 @@ enum _SIS_CMDTYPE { ...@@ -368,31 +466,50 @@ 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;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
struct fb_fix_screeninfo sisfb_fix; struct fb_fix_screeninfo sisfb_fix;
u32 pseudo_palette[17]; u32 pseudo_palette[17];
#endif #endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
struct display sis_disp; struct display sis_disp;
struct display_switch sisfb_sw; struct display_switch sisfb_sw;
struct { struct {
u16 red, green, blue, pad; u16 red, green, blue, pad;
} sis_palette[256]; } sis_palette[256];
union { union {
#ifdef FBCON_HAS_CFB16 #ifdef FBCON_HAS_CFB16
u16 cfb16[16]; u16 cfb16[16];
...@@ -400,10 +517,10 @@ struct sis_video_info { ...@@ -400,10 +517,10 @@ struct sis_video_info {
#ifdef FBCON_HAS_CFB32 #ifdef FBCON_HAS_CFB32
u32 cfb32[16]; u32 cfb32[16];
#endif #endif
} sis_fbcon_cmap; } sis_fbcon_cmap;
#endif #endif
struct sisfb_monitor { struct sisfb_monitor {
u16 hmin; u16 hmin;
u16 hmax; u16 hmax;
u16 vmin; u16 vmin;
...@@ -411,163 +528,166 @@ struct sis_video_info { ...@@ -411,163 +528,166 @@ struct sis_video_info {
u32 dclockmax; u32 dclockmax;
u8 feature; u8 feature;
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 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
int currcon; int currcon;
#endif #endif
unsigned long video_size; unsigned long video_size;
unsigned long video_base; unsigned long video_base;
unsigned long mmio_size; unsigned long mmio_size;
unsigned long mmio_base; unsigned long mmio_base;
unsigned long vga_base; unsigned long vga_base;
unsigned long video_offset;
SIS_IOTYPE1 *video_vbase; unsigned long UMAsize, LFBsize;
SIS_IOTYPE1 *mmio_vbase;
unsigned char *bios_abase; SIS_IOTYPE1 *video_vbase;
SIS_IOTYPE1 *mmio_vbase;
int mtrr; unsigned char *bios_abase;
int mtrr;
u32 sisfb_mem; u32 sisfb_mem;
u32 sisfb_parm_mem; u32 sisfb_parm_mem;
int sisfb_accel; int sisfb_accel;
int sisfb_ypan; int sisfb_ypan;
int sisfb_max; int sisfb_max;
int sisfb_userom; int sisfb_userom;
int sisfb_useoem; int sisfb_useoem;
int sisfb_mode_idx; int sisfb_mode_idx;
int sisfb_parm_rate; int sisfb_parm_rate;
int sisfb_crt1off; int sisfb_crt1off;
int sisfb_forcecrt1; int sisfb_forcecrt1;
int sisfb_crt2type; int sisfb_crt2type;
int sisfb_crt2flags; int sisfb_crt2flags;
int sisfb_dstn; int sisfb_dstn;
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;
#endif #endif
u32 heapstart; /* offset */ u32 heapstart; /* offset */
SIS_IOTYPE1 *sisfb_heap_start; /* address */ SIS_IOTYPE1 *sisfb_heap_start; /* address */
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;
int video_width; int video_width;
int video_height; int video_height;
unsigned int refresh_rate; unsigned int refresh_rate;
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 */
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! */
unsigned int pcibus; unsigned int pcibus;
unsigned int pcislot; unsigned int pcislot;
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_width; int current_bpp;
int current_height; int current_width;
int current_htotal; int current_height;
int current_vtotal; int current_htotal;
int current_vtotal;
int current_linelength; int current_linelength;
__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;
unsigned char modeprechange; unsigned char modeprechange;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
u8 sisfb_lastrates[128]; u8 sisfb_lastrates[128];
#endif #endif
int newrom; int newrom;
int registered; int haveXGIROM;
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;
int CRT2_write_enable; int CRT2_write_enable;
u8 caps; u8 caps;
u8 detectedpdc; u8 detectedpdc;
u8 detectedpdca; u8 detectedpdca;
u8 detectedlcda; u8 detectedlcda;
SIS_IOTYPE1 *hwcursor_vbase; SIS_IOTYPE1 *hwcursor_vbase;
int chronteltype; int chronteltype;
int tvxpos, tvypos; int tvxpos, tvypos;
u8 p2_1f,p2_20,p2_2b,p2_42,p2_43,p2_01,p2_02; u8 p2_1f,p2_20,p2_2b,p2_42,p2_43,p2_01,p2_02;
int tvx, tvy; int tvx, tvy;
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
...@@ -223,35 +223,38 @@ SiS310SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int ...@@ -223,35 +223,38 @@ SiS310SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int
u32 srcbase = 0, dstbase = 0; u32 srcbase = 0, dstbase = 0;
int mymin = min(src_y, dst_y); int mymin = min(src_y, dst_y);
int mymax = max(src_y, dst_y); int mymax = max(src_y, dst_y);
/* Although the chip knows the direction to use /* Although the chip knows the direction to use
* if the source and destination areas overlap, * if the source and destination areas overlap,
* that logic fails if we fiddle with the bitmap * that logic fails if we fiddle with the bitmap
* addresses. Therefore, we check if the source * addresses. Therefore, we check if the source
* and destination blitting areas overlap and * and destination blitting areas overlap and
* adapt the bitmap addresses synchronously * adapt the bitmap addresses synchronously
* if the coordinates exceed the valid range. * if the coordinates exceed the valid range.
* The the areas do not overlap, we do our * The the areas do not overlap, we do our
* normal check. * normal check.
*/ */
if((mymax - mymin) < height) { if((mymax - mymin) < height) {
if((src_y >= 2048) || (dst_y >= 2048)) { if((src_y >= 2048) || (dst_y >= 2048)) {
srcbase = ivideo->video_linelength * mymin; srcbase = ivideo->video_linelength * mymin;
dstbase = ivideo->video_linelength * mymin; dstbase = ivideo->video_linelength * mymin;
src_y -= mymin; src_y -= mymin;
dst_y -= mymin; dst_y -= mymin;
} }
} else { } else {
if(src_y >= 2048) { if(src_y >= 2048) {
srcbase = ivideo->video_linelength * src_y; srcbase = ivideo->video_linelength * src_y;
src_y = 0; src_y = 0;
} }
if(dst_y >= 2048) { if(dst_y >= 2048) {
dstbase = ivideo->video_linelength * dst_y; dstbase = ivideo->video_linelength * dst_y;
dst_y = 0; dst_y = 0;
} }
} }
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)
...@@ -294,384 +298,153 @@ SiS310SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w ...@@ -294,384 +298,153 @@ SiS310SubsequentSolidFillRect(struct sis_video_info *ivideo, int x, int y, int w
int sisfb_initaccel(struct sis_video_info *ivideo) 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)
{ {
if(ivideo->sisvga_engine == SIS_300_VGA) { if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300 #ifdef CONFIG_FB_SIS_300
SiS300Sync(ivideo); SiS300Sync(ivideo);
#endif #endif
} else { } else {
#ifdef CONFIG_FB_SIS_315 #ifdef CONFIG_FB_SIS_315
SiS310Sync(ivideo); SiS310Sync(ivideo);
#endif #endif
} }
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* --------------- 2.5 --------------- */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* --------------- 2.5 --------------- */
int fbcon_sis_sync(struct fb_info *info) 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); CRITEND
#endif
} else { return 0;
#ifdef CONFIG_FB_SIS_315
SiS310Sync(ivideo);
#endif
}
CRITEND
return 0;
} }
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)
{ {
struct sis_video_info *ivideo = (struct sis_video_info *)info->par; struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
u32 col = 0; u32 col = 0;
u32 vxres = info->var.xres_virtual; u32 vxres = info->var.xres_virtual;
u32 vyres = info->var.yres_virtual; u32 vyres = info->var.yres_virtual;
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) || (!ivideo->engineok)) {
if(!ivideo->accel) { 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 */
width = ((rect->dx + rect->width) > vxres) ? (vxres - rect->dx) : rect->width;
/* Clipping */ height = ((rect->dy + rect->height) > vyres) ? (vyres - rect->dy) : rect->height;
width = ((rect->dx + rect->width) > vxres) ? (vxres - rect->dx) : rect->width;
height = ((rect->dy + rect->height) > vyres) ? (vyres - rect->dy) : rect->height; switch(info->var.bits_per_pixel) {
switch(info->var.bits_per_pixel) {
case 8: col = rect->color; case 8: col = rect->color;
break; break;
case 16: case 16:
case 32: col = ((u32 *)(info->pseudo_palette))[rect->color]; case 32: col = ((u32 *)(info->pseudo_palette))[rect->color];
break; break;
} }
if(ivideo->sisvga_engine == SIS_300_VGA) { if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300 #ifdef CONFIG_FB_SIS_300
CRITBEGIN CRITBEGIN
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
CRITBEGIN CRITBEGIN
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)
{ {
struct sis_video_info *ivideo = (struct sis_video_info *)info->par; struct sis_video_info *ivideo = (struct sis_video_info *)info->par;
u32 vxres = info->var.xres_virtual; u32 vxres = info->var.xres_virtual;
u32 vyres = info->var.yres_virtual; u32 vyres = info->var.yres_virtual;
int width = area->width; int width = area->width;
int height = area->height; int height = area->height;
CRITFLAGS
if(info->state != FBINFO_STATE_RUNNING) {
return;
}
if(!ivideo->accel) {
cfb_copyarea(info, area);
return;
}
if(!width || !height ||
area->sx >= vxres || area->sy >= vyres ||
area->dx >= vxres || area->dy >= vyres) {
return;
}
/* Clipping */
if((area->sx + width) > vxres) width = vxres - area->sx;
if((area->dx + width) > vxres) width = vxres - area->dx;
if((area->sy + height) > vyres) height = vyres - area->sy;
if((area->dy + height) > vyres) height = vyres - area->dy;
if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300
int xdir, ydir;
if(area->sx < area->dx) xdir = 0;
else xdir = 1;
if(area->sy < area->dy) ydir = 0;
else ydir = 1;
CRITBEGIN
SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1);
SiS300SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy, area->dx, area->dy,
width, height);
CRITEND
SiS300Sync(ivideo);
#endif
} else {
#ifdef CONFIG_FB_SIS_315
CRITBEGIN
SiS310SetupForScreenToScreenCopy(ivideo, 3, -1);
SiS310SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy, area->dx, area->dy,
width, height);
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 CRITFLAGS
if(!ivideo->accel) { if(info->state != FBINFO_STATE_RUNNING)
switch(ivideo->video_bpp) { return;
case 8:
#ifdef FBCON_HAS_CFB8
fbcon_cfb8_bmove(p, srcy, srcx, dsty, dstx, height, width);
#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);
srcy *= fontheight(p);
dstx *= fontwidth(p);
dsty *= fontheight(p);
width *= fontwidth(p);
height *= fontheight(p);
if(ivideo->sisvga_engine == SIS_300_VGA) { if((!ivideo->accel) || (!ivideo->engineok)) {
#ifdef CONFIG_FB_SIS_300 cfb_copyarea(info, area);
int xdir, ydir; return;
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, if(!width || !height ||
int srcy, int srcx, int height, int width, int color) area->sx >= vxres || area->sy >= vyres ||
{ area->dx >= vxres || area->dy >= vyres)
struct sis_video_info *ivideo = (struct sis_video_info *)p->fb_info->par; return;
CRITFLAGS
srcx *= fontwidth(p); /* Clipping */
srcy *= fontheight(p); if((area->sx + width) > vxres) width = vxres - area->sx;
width *= fontwidth(p); if((area->dx + width) > vxres) width = vxres - area->dx;
height *= fontheight(p); if((area->sy + height) > vyres) height = vyres - area->sy;
if((area->dy + height) > vyres) height = vyres - area->dy;
if(ivideo->sisvga_engine == SIS_300_VGA) { if(ivideo->sisvga_engine == SIS_300_VGA) {
#ifdef CONFIG_FB_SIS_300 #ifdef CONFIG_FB_SIS_300
CRITBEGIN int xdir, ydir;
SiS300SetupForSolidFill(ivideo, color, 3);
SiS300SubsequentSolidFillRect(ivideo, srcx, srcy, width, height); if(area->sx < area->dx) xdir = 0;
CRITEND else xdir = 1;
SiS300Sync(ivideo); if(area->sy < area->dy) ydir = 0;
else ydir = 1;
CRITBEGIN
SiS300SetupForScreenToScreenCopy(ivideo, xdir, ydir, 3, -1);
SiS300SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy,
area->dx, area->dy, width, height);
CRITEND
#endif #endif
} else { } else {
#ifdef CONFIG_FB_SIS_315 #ifdef CONFIG_FB_SIS_315
CRITBEGIN CRITBEGIN
SiS310SetupForSolidFill(ivideo, color, 3); SiS310SetupForScreenToScreenCopy(ivideo, 3, -1);
SiS310SubsequentSolidFillRect(ivideo, srcx, srcy, width, height); SiS310SubsequentScreenToScreenCopy(ivideo, area->sx, area->sy,
CRITEND area->dx, area->dy, width, height);
SiS310Sync(ivideo); CRITEND
#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 #endif
return;
} }
bgx = attr_bgcol_ec(p, conp); sisfb_syncaccel(ivideo);
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 #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, #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) /* -------------- 2.4 --------------- */
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)
{
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
* *
...@@ -283,6 +285,8 @@ ...@@ -283,6 +285,8 @@
{ \ { \
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;
...@@ -106,12 +104,12 @@ static int sisfb_videoram = 0; ...@@ -106,12 +104,12 @@ static int sisfb_videoram = 0;
/* List of supported chips */ /* List of supported chips */
static struct sisfb_chip_info { static struct sisfb_chip_info {
int chip; int chip;
int vgaengine; int vgaengine;
int mni; int mni;
int hwcursor_size; int hwcursor_size;
int CRT2_write_enable; int CRT2_write_enable;
const char *chip_name; const char *chip_name;
} sisfb_chip_info[] __devinitdata = { } sisfb_chip_info[] __devinitdata = {
{ SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" }, { SIS_300, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 300/305" },
{ SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" }, { SIS_540, SIS_300_VGA, 0, HW_CURSOR_AREA_SIZE_300 * 2, SIS_CRT2_WENABLE_300, "SiS 540" },
...@@ -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},
...@@ -215,18 +218,20 @@ static const struct _sisbios_mode { ...@@ -215,18 +218,20 @@ static const struct _sisbios_mode {
/*40*/ {"800x480x16", {0x7a,0x7a}, 0x0000, 0x0000, 800, 480, 16, 1, 100, 30, MD_SIS300|MD_SIS315}, /*40*/ {"800x480x16", {0x7a,0x7a}, 0x0000, 0x0000, 800, 480, 16, 1, 100, 30, MD_SIS300|MD_SIS315},
{"800x480x24", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30, MD_SIS300|MD_SIS315}, {"800x480x24", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30, MD_SIS300|MD_SIS315},
{"800x480x32", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30, MD_SIS300|MD_SIS315}, {"800x480x32", {0x76,0x76}, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30, MD_SIS300|MD_SIS315},
#define DEFAULT_MODE 43 /* index for 800x600x8 */ #define DEFAULT_MODE 43 /* index for 800x600x8 */
#define DEFAULT_LCDMODE 43 /* index for 800x600x8 */ #define DEFAULT_LCDMODE 43 /* index for 800x600x8 */
#define DEFAULT_TVMODE 43 /* index for 800x600x8 */ #define DEFAULT_TVMODE 43 /* index for 800x600x8 */
{"800x600x8", {0x30,0x30}, 0x0103, 0x0103, 800, 600, 8, 2, 100, 37, MD_SIS300|MD_SIS315}, {"800x600x8", {0x30,0x30}, 0x0103, 0x0103, 800, 600, 8, 2, 100, 37, MD_SIS300|MD_SIS315},
{"800x600x16", {0x47,0x47}, 0x0114, 0x0114, 800, 600, 16, 2, 100, 37, MD_SIS300|MD_SIS315}, {"800x600x16", {0x47,0x47}, 0x0114, 0x0114, 800, 600, 16, 2, 100, 37, MD_SIS300|MD_SIS315},
{"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[] =
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024, static unsigned short sis310paneltype[] __devinitdata = {
LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
LCD_640x480_2, LCD_640x480_3, LCD_UNKNOWN, LCD_UNKNOWN }; LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
LCD_320x240_2, LCD_320x240_3, LCD_UNKNOWN, LCD_UNKNOWN
static const USHORT sis661paneltype[] = };
{ LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960, static unsigned short sis661paneltype[] __devinitdata = {
LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200, LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
LCD_1280x800, LCD_1680x1050, LCD_1280x720, LCD_UNKNOWN }; LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
LCD_1280x854, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
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,49 +494,49 @@ static const struct _sisfbddcsmodes { ...@@ -480,49 +494,49 @@ 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},
{ 1600, 1200, 70, 88, 189000}, { 1600, 1200, 70, 88, 189000},
{ 1600, 1200, 75, 94, 202500}, { 1600, 1200, 75, 94, 202500},
{ 1600, 1200, 85, 107,229500}, { 1600, 1200, 85, 107,229500},
{ 1920, 1440, 60, 90, 234000}, { 1920, 1440, 60, 90, 234000},
{ 1920, 1440, 75, 113,297000} { 1920, 1440, 75, 113,297000}
}; };
#ifdef CONFIG_FB_SIS_300 #ifdef CONFIG_FB_SIS_300
static struct _chswtable { static struct _chswtable {
u16 subsysVendor; u16 subsysVendor;
u16 subsysCard; u16 subsysCard;
char *vendorName; char *vendorName;
char *cardName; char *cardName;
} mychswtable[] __devinitdata = { } mychswtable[] __devinitdata = {
{ 0x1631, 0x1002, "Mitachi", "0x1002" }, { 0x1631, 0x1002, "Mitachi", "0x1002" },
{ 0x1071, 0x7521, "Mitac" , "7521P" }, { 0x1071, 0x7521, "Mitac" , "7521P" },
{ 0, 0, "" , "" } { 0, 0, "" , "" }
}; };
#endif #endif
static struct _customttable { static struct _customttable {
u16 chipID; u16 chipID;
char *biosversion; char *biosversion;
char *biosdate; char *biosdate;
u32 bioschksum; u32 bioschksum;
u16 biosFootprintAddr[5]; u16 biosFootprintAddr[5];
u8 biosFootprintData[5]; u8 biosFootprintData[5];
u16 pcisubsysvendor; u16 pcisubsysvendor;
u16 pcisubsyscard; u16 pcisubsyscard;
char *vendorName; char *vendorName;
char *cardName; char *cardName;
u32 SpecialID; u32 SpecialID;
char *optionName; char *optionName;
} mycustomttable[] __devinitdata = { } mycustomttable[] __devinitdata = {
{ SIS_630, "2.00.07", "09/27/2002-13:38:25", { SIS_630, "2.00.07", "09/27/2002-13:38:25",
0x3240A8, 0x3240A8,
...@@ -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,145 +683,159 @@ SISINITSTATIC int sisfb_setup(char *options); ...@@ -811,145 +683,159 @@ 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);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
static int sisfb_get_fix(struct fb_fix_screeninfo *fix, static int sisfb_get_fix(struct fb_fix_screeninfo *fix,
int con, int con,
struct fb_info *info); struct fb_info *info);
static int sisfb_get_var(struct fb_var_screeninfo *var, static int sisfb_get_var(struct fb_var_screeninfo *var,
int con, int con,
struct fb_info *info); struct fb_info *info);
static int sisfb_set_var(struct fb_var_screeninfo *var, static int sisfb_set_var(struct fb_var_screeninfo *var,
int con, int con,
struct fb_info *info); struct fb_info *info);
static void sisfb_crtc_to_var(struct sis_video_info *ivideo, static void sisfb_crtc_to_var(struct sis_video_info *ivideo,
struct fb_var_screeninfo *var); struct fb_var_screeninfo *var);
static int sisfb_get_cmap(struct fb_cmap *cmap, static int sisfb_get_cmap(struct fb_cmap *cmap,
int kspc, int kspc,
int con, int con,
struct fb_info *info); struct fb_info *info);
static int sisfb_set_cmap(struct fb_cmap *cmap, static int sisfb_set_cmap(struct fb_cmap *cmap,
int kspc, int kspc,
int con, int con,
struct fb_info *info); struct fb_info *info);
static int sisfb_update_var(int con, static int sisfb_update_var(int con,
struct fb_info *info); struct fb_info *info);
static int sisfb_switch(int con, static int sisfb_switch(int con,
struct fb_info *info); struct fb_info *info);
static void sisfb_blank(int blank, static void sisfb_blank(int blank,
struct fb_info *info); struct fb_info *info);
static void sisfb_set_disp(int con, static void sisfb_set_disp(int con,
struct fb_var_screeninfo *var, struct fb_var_screeninfo *var,
struct fb_info *info); struct fb_info *info);
static int sis_getcolreg(unsigned regno, unsigned *red, unsigned *green, static int sis_getcolreg(unsigned regno, unsigned *red, unsigned *green,
unsigned *blue, unsigned *transp, unsigned *blue, unsigned *transp,
struct fb_info *fb_info); struct fb_info *fb_info);
static void sisfb_do_install_cmap(int con, static void sisfb_do_install_cmap(int con,
struct fb_info *info); struct fb_info *info);
static int sisfb_ioctl(struct inode *inode, struct file *file, static int sisfb_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg, int con, unsigned int cmd, unsigned long arg, int con,
struct fb_info *info); struct fb_info *info);
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
static int sisfb_ioctl(struct inode *inode, struct file *file, static int sisfb_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg, unsigned int cmd, unsigned long arg,
struct fb_info *info); struct fb_info *info);
static int sisfb_set_par(struct fb_info *info); static int sisfb_set_par(struct fb_info *info);
static int sisfb_blank(int blank, static int sisfb_blank(int blank,
struct fb_info *info); struct fb_info *info);
extern void fbcon_sis_fillrect(struct fb_info *info, extern void fbcon_sis_fillrect(struct fb_info *info,
const struct fb_fillrect *rect); const struct fb_fillrect *rect);
extern void fbcon_sis_copyarea(struct fb_info *info, extern void fbcon_sis_copyarea(struct fb_info *info,
const struct fb_copyarea *area); const struct fb_copyarea *area);
extern int fbcon_sis_sync(struct fb_info *info); extern int fbcon_sis_sync(struct fb_info *info);
#endif #endif
/* Internal 2D accelerator functions */ /* Internal 2D accelerator functions */
extern int sisfb_initaccel(struct sis_video_info *ivideo); extern int sisfb_initaccel(struct sis_video_info *ivideo);
extern void sisfb_syncaccel(struct sis_video_info *ivideo); extern void sisfb_syncaccel(struct sis_video_info *ivideo);
/* Internal general routines */ /* Internal general routines */
static void sisfb_search_mode(char *name, BOOLEAN quiet); static void sisfb_search_mode(char *name, BOOLEAN quiet);
static int sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags); static int sisfb_validate_mode(struct sis_video_info *ivideo, int modeindex, u32 vbflags);
static u8 sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate, static u8 sisfb_search_refresh_rate(struct sis_video_info *ivideo, unsigned int rate,
int index); int index);
static int sisfb_setcolreg(unsigned regno, unsigned red, unsigned green, static int sisfb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp, unsigned blue, unsigned transp,
struct fb_info *fb_info); struct fb_info *fb_info);
static int sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, static int sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
struct fb_info *info); struct fb_info *info);
static void sisfb_pre_setmode(struct sis_video_info *ivideo); static void sisfb_pre_setmode(struct sis_video_info *ivideo);
static void sisfb_post_setmode(struct sis_video_info *ivideo); static void sisfb_post_setmode(struct sis_video_info *ivideo);
static BOOLEAN sisfb_CheckVBRetrace(struct sis_video_info *ivideo); static BOOLEAN sisfb_CheckVBRetrace(struct sis_video_info *ivideo);
static BOOLEAN sisfbcheckvretracecrt2(struct sis_video_info *ivideo); static BOOLEAN sisfbcheckvretracecrt2(struct sis_video_info *ivideo);
static BOOLEAN sisfbcheckvretracecrt1(struct sis_video_info *ivideo); static BOOLEAN sisfbcheckvretracecrt1(struct sis_video_info *ivideo);
static BOOLEAN sisfb_bridgeisslave(struct sis_video_info *ivideo); static BOOLEAN sisfb_bridgeisslave(struct sis_video_info *ivideo);
static void sisfb_detect_VB_connect(struct sis_video_info *ivideo); 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_free(u32 base); void sis_malloc_new(struct pci_dev *pdev, struct sis_memreq *req);
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(struct SiS_Private *SiS_Pr, unsigned char modeno,
extern int sisfb_mode_rate_to_ddata(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension, unsigned char rateindex, struct fb_var_screeninfo *var);
unsigned char modeno, unsigned char rateindex, #endif
struct fb_var_screeninfo *var); #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,627 +50,514 @@ ...@@ -50,627 +50,514 @@
* *
*/ */
#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 */
#define CUT_NONE 0 #define CUT_NONE 0
#define CUT_FORCENONE 1 #define CUT_FORCENONE 1
#define CUT_BARCO1366 2 #define CUT_BARCO1366 2
#define CUT_BARCO1024 3 #define CUT_BARCO1024 3
#define CUT_COMPAQ1280 4 #define CUT_COMPAQ1280 4
#define CUT_COMPAQ12802 5 #define CUT_COMPAQ12802 5
#define CUT_PANEL848 6 #define CUT_PANEL848 6
#define CUT_CLEVO1024 7 #define CUT_CLEVO1024 7
#define CUT_CLEVO10242 8 #define CUT_CLEVO10242 8
#define CUT_CLEVO1400 9 #define CUT_CLEVO1400 9
#define CUT_CLEVO14002 10 #define CUT_CLEVO14002 10
#define CUT_UNIWILL1024 11 #define CUT_UNIWILL1024 11
#define CUT_ASUSL3000D 12 #define CUT_ASUSL3000D 12
#define CUT_UNIWILL10242 13 #define CUT_UNIWILL10242 13
#define CUT_ACER1280 14 #define CUT_ACER1280 14
#define CUT_COMPAL1400_1 15 #define CUT_COMPAL1400_1 15
#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
typedef struct _SiS_Private #define CUT_AOP8060 20
#define CUT_PANEL856 21
struct SiS_Private
{ {
#ifdef LINUX_KERNEL unsigned char ChipType;
SISIOADDRESS RelIO; unsigned char ChipRevision;
#ifdef SIS_XORG_XF86
PCITAG PciTag;
#endif #endif
SISIOADDRESS SiS_P3c4; #ifdef SIS_LINUX_KERNEL
SISIOADDRESS SiS_P3d4; void *ivideo;
SISIOADDRESS SiS_P3c0;
SISIOADDRESS SiS_P3ce;
SISIOADDRESS SiS_P3c2;
SISIOADDRESS SiS_P3ca;
SISIOADDRESS SiS_P3c6;
SISIOADDRESS SiS_P3c7;
SISIOADDRESS SiS_P3c8;
SISIOADDRESS SiS_P3c9;
SISIOADDRESS SiS_P3cb;
SISIOADDRESS SiS_P3cd;
SISIOADDRESS SiS_P3da;
SISIOADDRESS SiS_Part1Port;
SISIOADDRESS SiS_Part2Port;
SISIOADDRESS SiS_Part3Port;
SISIOADDRESS SiS_Part4Port;
SISIOADDRESS SiS_Part5Port;
SISIOADDRESS SiS_VidCapt;
SISIOADDRESS SiS_VidPlay;
USHORT SiS_IF_DEF_LVDS;
USHORT SiS_IF_DEF_CH70xx;
USHORT SiS_IF_DEF_CONEX;
USHORT SiS_IF_DEF_TRUMPION;
USHORT SiS_IF_DEF_DSTN;
USHORT SiS_IF_DEF_FSTN;
USHORT SiS_SysFlags;
UCHAR SiS_VGAINFO;
#ifdef LINUX_XF86
USHORT SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
#endif #endif
BOOLEAN SiS_UseROM; unsigned char *VirtualRomBase;
BOOLEAN SiS_ROMNew; BOOLEAN UseROM;
BOOLEAN SiS_NeedRomModeData; #ifdef SIS_LINUX_KERNEL
BOOLEAN PanelSelfDetected; unsigned char SISIOMEMTYPE *VideoMemoryAddress;
int SiS_CHOverScan; unsigned int VideoMemorySize;
BOOLEAN SiS_CHSOverScan;
BOOLEAN SiS_ChSW;
BOOLEAN SiS_UseLCDA;
int SiS_UseOEM;
ULONG SiS_CustomT;
USHORT SiS_Backup70xx;
BOOLEAN HaveEMI;
BOOLEAN HaveEMILCD;
BOOLEAN OverruleEMI;
UCHAR EMI_30,EMI_31,EMI_32,EMI_33;
USHORT SiS_EMIOffset;
SHORT PDC, PDCA;
UCHAR SiS_MyCR63;
USHORT SiS_CRT1Mode;
USHORT SiS_flag_clearbuffer;
int SiS_RAMType;
UCHAR SiS_ChannelAB;
UCHAR SiS_DataBusWidth;
USHORT SiS_ModeType;
USHORT SiS_VBInfo;
USHORT SiS_TVMode;
USHORT SiS_LCDResInfo;
USHORT SiS_LCDTypeInfo;
USHORT SiS_LCDInfo;
USHORT SiS_LCDInfo661;
USHORT SiS_VBType;
USHORT SiS_VBExtInfo;
USHORT SiS_YPbPr;
USHORT SiS_SelectCRT2Rate;
USHORT SiS_SetFlag;
USHORT SiS_RVBHCFACT;
USHORT SiS_RVBHCMAX;
USHORT SiS_RVBHRS;
USHORT SiS_VGAVT;
USHORT SiS_VGAHT;
USHORT SiS_VT;
USHORT SiS_HT;
USHORT SiS_VGAVDE;
USHORT SiS_VGAHDE;
USHORT SiS_VDE;
USHORT SiS_HDE;
USHORT SiS_NewFlickerMode;
USHORT SiS_RY1COE;
USHORT SiS_RY2COE;
USHORT SiS_RY3COE;
USHORT SiS_RY4COE;
USHORT SiS_LCDHDES;
USHORT SiS_LCDVDES;
USHORT SiS_DDC_Port;
USHORT SiS_DDC_Index;
USHORT SiS_DDC_Data;
USHORT SiS_DDC_NData;
USHORT SiS_DDC_Clk;
USHORT SiS_DDC_NClk;
USHORT SiS_DDC_DeviceAddr;
USHORT SiS_DDC_ReadAddr;
USHORT SiS_DDC_SecAddr;
USHORT SiS_ChrontelInit;
BOOLEAN SiS_SensibleSR11;
USHORT SiS661LCD2TableSize;
USHORT SiS_PanelMinLVDS;
USHORT SiS_PanelMin301;
const SiS_StStruct *SiS_SModeIDTable;
const SiS_StandTableStruct *SiS_StandTable;
const SiS_ExtStruct *SiS_EModeIDTable;
const SiS_Ext2Struct *SiS_RefIndex;
const SiS_VBModeStruct *SiS_VBModeIDTable;
const SiS_CRT1TableStruct *SiS_CRT1Table;
const SiS_MCLKDataStruct *SiS_MCLKData_0;
const SiS_MCLKDataStruct *SiS_MCLKData_1;
SiS_VCLKDataStruct *SiS_VCLKData;
SiS_VBVCLKDataStruct *SiS_VBVCLKData;
const SiS_StResInfoStruct *SiS_StResInfo;
const SiS_ModeResInfoStruct *SiS_ModeResInfo;
const UCHAR *pSiS_OutputSelect;
const UCHAR *pSiS_SoftSetting;
const DRAM4Type *SiS_SR15; /* pointer : point to array */
#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 #endif
SISIOADDRESS IOAddress;
SISIOADDRESS IOAddress2; /* For dual chip XGI volari */
const SiS_PanelDelayTblStruct *SiS_PanelDelayTbl; #ifdef SIS_LINUX_KERNEL
const SiS_PanelDelayTblStruct *SiS_PanelDelayTblLVDS; SISIOADDRESS RelIO;
#endif
SISIOADDRESS SiS_P3c4;
SISIOADDRESS SiS_P3d4;
SISIOADDRESS SiS_P3c0;
SISIOADDRESS SiS_P3ce;
SISIOADDRESS SiS_P3c2;
SISIOADDRESS SiS_P3ca;
SISIOADDRESS SiS_P3c6;
SISIOADDRESS SiS_P3c7;
SISIOADDRESS SiS_P3c8;
SISIOADDRESS SiS_P3c9;
SISIOADDRESS SiS_P3cb;
SISIOADDRESS SiS_P3cc;
SISIOADDRESS SiS_P3cd;
SISIOADDRESS SiS_P3da;
SISIOADDRESS SiS_Part1Port;
SISIOADDRESS SiS_Part2Port;
SISIOADDRESS SiS_Part3Port;
SISIOADDRESS SiS_Part4Port;
SISIOADDRESS SiS_Part5Port;
SISIOADDRESS SiS_VidCapt;
SISIOADDRESS SiS_VidPlay;
unsigned short SiS_IF_DEF_LVDS;
unsigned short SiS_IF_DEF_CH70xx;
unsigned short SiS_IF_DEF_CONEX;
unsigned short SiS_IF_DEF_TRUMPION;
unsigned short SiS_IF_DEF_DSTN;
unsigned short SiS_IF_DEF_FSTN;
unsigned short SiS_SysFlags;
unsigned char SiS_VGAINFO;
#ifdef SIS_XORG_XF86
unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
#endif
BOOLEAN SiS_UseROM;
BOOLEAN SiS_ROMNew;
BOOLEAN SiS_XGIROM;
BOOLEAN SiS_NeedRomModeData;
BOOLEAN PanelSelfDetected;
BOOLEAN DDCPortMixup;
int SiS_CHOverScan;
BOOLEAN SiS_CHSOverScan;
BOOLEAN SiS_ChSW;
BOOLEAN SiS_UseLCDA;
int SiS_UseOEM;
unsigned int SiS_CustomT;
int SiS_UseWide, SiS_UseWideCRT2;
int SiS_TVBlue;
unsigned short SiS_Backup70xx;
BOOLEAN HaveEMI;
BOOLEAN HaveEMILCD;
BOOLEAN OverruleEMI;
unsigned char EMI_30,EMI_31,EMI_32,EMI_33;
unsigned short SiS_EMIOffset;
unsigned short SiS_PWDOffset;
short PDC, PDCA;
unsigned char SiS_MyCR63;
unsigned short SiS_CRT1Mode;
unsigned short SiS_flag_clearbuffer;
int SiS_RAMType;
unsigned char SiS_ChannelAB;
unsigned char SiS_DataBusWidth;
unsigned short SiS_ModeType;
unsigned short SiS_VBInfo;
unsigned short SiS_TVMode;
unsigned short SiS_LCDResInfo;
unsigned short SiS_LCDTypeInfo;
unsigned short SiS_LCDInfo;
unsigned short SiS_LCDInfo661;
unsigned short SiS_VBType;
unsigned short SiS_VBExtInfo;
unsigned short SiS_YPbPr;
unsigned short SiS_SelectCRT2Rate;
unsigned short SiS_SetFlag;
unsigned short SiS_RVBHCFACT;
unsigned short SiS_RVBHCMAX;
unsigned short SiS_RVBHRS;
unsigned short SiS_RVBHRS2;
unsigned short SiS_VGAVT;
unsigned short SiS_VGAHT;
unsigned short SiS_VT;
unsigned short SiS_HT;
unsigned short SiS_VGAVDE;
unsigned short SiS_VGAHDE;
unsigned short SiS_VDE;
unsigned short SiS_HDE;
unsigned short SiS_NewFlickerMode;
unsigned short SiS_RY1COE;
unsigned short SiS_RY2COE;
unsigned short SiS_RY3COE;
unsigned short SiS_RY4COE;
unsigned short SiS_LCDHDES;
unsigned short SiS_LCDVDES;
unsigned short SiS_DDC_Port;
unsigned short SiS_DDC_Index;
unsigned short SiS_DDC_Data;
unsigned short SiS_DDC_NData;
unsigned short SiS_DDC_Clk;
unsigned short SiS_DDC_NClk;
unsigned short SiS_DDC_DeviceAddr;
unsigned short SiS_DDC_ReadAddr;
unsigned short SiS_DDC_SecAddr;
unsigned short SiS_ChrontelInit;
BOOLEAN SiS_SensibleSR11;
unsigned short SiS661LCD2TableSize;
unsigned short SiS_PanelMinLVDS;
unsigned short SiS_PanelMin301;
const struct SiS_St *SiS_SModeIDTable;
const struct SiS_StandTable_S *SiS_StandTable;
const struct SiS_Ext *SiS_EModeIDTable;
const struct SiS_Ext2 *SiS_RefIndex;
const struct SiS_VBMode *SiS_VBModeIDTable;
const struct SiS_CRT1Table *SiS_CRT1Table;
const struct SiS_MCLKData *SiS_MCLKData_0;
const struct SiS_MCLKData *SiS_MCLKData_1;
struct SiS_VCLKData *SiS_VCLKData;
struct SiS_VBVCLKData *SiS_VBVCLKData;
const struct SiS_StResInfo_S *SiS_StResInfo;
const struct SiS_ModeResInfo_S *SiS_ModeResInfo;
const unsigned char *pSiS_OutputSelect;
const unsigned char *pSiS_SoftSetting;
const unsigned char *SiS_SR15;
const struct SiS_PanelDelayTbl *SiS_PanelDelayTbl;
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; BOOLEAN UseCustomMode;
const SiS_LVDSDesStruct *SiS_PanelType0d_2; BOOLEAN CRT1UsesCustomMode;
const SiS_LVDSDesStruct *SiS_PanelType0e_2; unsigned short CHDisplay;
const SiS_LVDSDesStruct *SiS_PanelType0f_2; unsigned short CHSyncStart;
const SiS_LVDSDesStruct *SiS_PanelTypeNS_2; unsigned short CHSyncEnd;
const SiS_LVDSDesStruct *SiS_CHTVUNTSCDesData; unsigned short CHTotal;
const SiS_LVDSDesStruct *SiS_CHTVONTSCDesData; unsigned short CHBlankStart;
const SiS_LVDSDesStruct *SiS_CHTVUPALDesData; unsigned short CHBlankEnd;
const SiS_LVDSDesStruct *SiS_CHTVOPALDesData; unsigned short CVDisplay;
unsigned short CVSyncStart;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_1; unsigned short CVSyncEnd;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_1; unsigned short CVTotal;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_1; unsigned short CVBlankStart;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_1; unsigned short CVBlankEnd;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_1; unsigned int CDClock;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_1; unsigned int CFlags;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_1; unsigned char CCRT1CRTC[17];
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_1; unsigned char CSR2B;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_1_H; unsigned char CSR2C;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_1_H; unsigned short CSRClock;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_1_H; unsigned short CSRClock_CRT1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_1_H; unsigned short CModeFlag;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_1_H; unsigned short CModeFlag_CRT1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_1_H; unsigned short CInfoFlag;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_1_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_1_H; int LVDSHL;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_2;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_2; BOOLEAN Backup;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_2; unsigned char Backup_Mode;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_2; unsigned char Backup_14;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_2; unsigned char Backup_15;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_2; unsigned char Backup_16;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_2; unsigned char Backup_17;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2; unsigned char Backup_18;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1800x600_2_H; unsigned char Backup_19;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x768_2_H; unsigned char Backup_1a;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x1024_2_H; unsigned char Backup_1b;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11400x1050_2_H; unsigned char Backup_1c;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11280x768_2_H; unsigned char Backup_1d;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11024x600_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11152x768_2_H; unsigned char Init_P4_0E;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT11600x1200_2_H;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1; int UsePanelScaler;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1XXXxXXX_1_H; int CenterScreen;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_1_H; unsigned short CP_Vendor, CP_Product;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2; BOOLEAN CP_HaveCustomData;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_2_H; int CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3; int CP_MaxX, CP_MaxY, CP_MaxClock;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1640x480_3_H; unsigned char CP_PrefSR2B, CP_PrefSR2C;
const SiS_LVDSCRT1DataStruct *SiS_LVDSCRT1320x480_1; unsigned short CP_PrefClock;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UNTSC; BOOLEAN CP_Supports64048075;
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1ONTSC; int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1UPAL; int CP_HTotal[7], CP_VTotal[7];
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1OPAL; int CP_HSyncStart[7], CP_VSyncStart[7];
const SiS_LVDSCRT1DataStruct *SiS_CHTVCRT1SOPAL; int CP_HSyncEnd[7], CP_VSyncEnd[7];
int CP_HBlankStart[7], CP_VBlankStart[7];
const SiS_CHTVRegDataStruct *SiS_CHTVReg_UNTSC; int CP_HBlankEnd[7], CP_VBlankEnd[7];
const SiS_CHTVRegDataStruct *SiS_CHTVReg_ONTSC; int CP_Clock[7];
const SiS_CHTVRegDataStruct *SiS_CHTVReg_UPAL; BOOLEAN CP_DataValid[7];
const SiS_CHTVRegDataStruct *SiS_CHTVReg_OPAL; BOOLEAN CP_HSync_P[7], CP_VSync_P[7], CP_SyncValid[7];
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 CRT1UsesCustomMode;
USHORT CHDisplay;
USHORT CHSyncStart;
USHORT CHSyncEnd;
USHORT CHTotal;
USHORT CHBlankStart;
USHORT CHBlankEnd;
USHORT CVDisplay;
USHORT CVSyncStart;
USHORT CVSyncEnd;
USHORT CVTotal;
USHORT CVBlankStart;
USHORT CVBlankEnd;
ULONG CDClock;
ULONG CFlags;
UCHAR CCRT1CRTC[17];
UCHAR CSR2B;
UCHAR CSR2C;
USHORT CSRClock;
USHORT CSRClock_CRT1;
USHORT CModeFlag;
USHORT CModeFlag_CRT1;
USHORT CInfoFlag;
int LVDSHL;
BOOLEAN Backup;
UCHAR Backup_Mode;
UCHAR Backup_14;
UCHAR Backup_15;
UCHAR Backup_16;
UCHAR Backup_17;
UCHAR Backup_18;
UCHAR Backup_19;
UCHAR Backup_1a;
UCHAR Backup_1b;
UCHAR Backup_1c;
UCHAR Backup_1d;
int UsePanelScaler;
int CenterScreen;
USHORT CP_Vendor, CP_Product;
BOOLEAN CP_HaveCustomData;
int CP_PreferredX, CP_PreferredY, CP_PreferredIndex;
int CP_MaxX, CP_MaxY, CP_MaxClock;
UCHAR CP_PrefSR2B, CP_PrefSR2C;
USHORT CP_PrefClock;
BOOLEAN CP_Supports64048075;
int CP_HDisplay[7], CP_VDisplay[7]; /* For Custom LCD panel dimensions */
int CP_HTotal[7], CP_VTotal[7];
int CP_HSyncStart[7], CP_VSyncStart[7];
int CP_HSyncEnd[7], CP_VSyncEnd[7];
int CP_HBlankStart[7], CP_VBlankStart[7];
int CP_HBlankEnd[7], CP_VBlankEnd[7];
int CP_Clock[7];
BOOLEAN CP_DataValid[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,47 +28,35 @@ ...@@ -26,47 +28,35 @@
/* 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
#define TV_HIVISION 0x00000040 #define TV_HIVISION 0x00000040
#define TV_YPBPR 0x00000080 #define TV_YPBPR 0x00000080
#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 TV_PALM 0x00001000
#define VB_TRUMPION VB_CONEXANT /* 300 series only */ #define TV_PALN 0x00002000
#define TV_PALM 0x00001000
#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_SINGLE_MODE 0x20000000 /* CRT1 or CRT2; determined by DISPTYPE_CRTx */
#define VB_301B 0x00200000 #define VB_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */
#define VB_302B 0x00400000 #define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */
#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_MIRROR_MODE 0x40000000 /* CRT1 + CRT2 identical (mirror mode) */
#define VB_DUALVIEW_MODE 0x80000000 /* CRT1 + CRT2 independent (dual head mode) */
/* Aliases: */ /* Aliases: */
#define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA) #define CRT2_ENABLE (CRT2_LCD | CRT2_TV | CRT2_VGA)
#define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ) #define TV_STANDARD (TV_NTSC | TV_PAL | TV_PALM | TV_PALN | TV_NTSCJ)
#define TV_INTERFACE (TV_AVIDEO|TV_SVIDEO|TV_SCART|TV_HIVISION|TV_YPBPR|TV_CHSCART|TV_CHYPBPR525I) #define TV_INTERFACE (TV_AVIDEO|TV_SVIDEO|TV_SCART|TV_HIVISION|TV_YPBPR|TV_CHSCART|TV_CHYPBPR525I)
/* Only if TV_YPBPR is set: */ /* Only if TV_YPBPR is set: */
#define TV_YPBPR525I TV_NTSC #define TV_YPBPR525I TV_NTSC
...@@ -75,89 +65,118 @@ ...@@ -75,89 +65,118 @@
#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
#define VB_DISPMODE_SINGLE VB_SINGLE_MODE #define VB_DISPMODE_SINGLE VB_SINGLE_MODE
#define VB_DISPMODE_MIRROR VB_MIRROR_MODE #define VB_DISPMODE_MIRROR VB_MIRROR_MODE
#define VB_DISPMODE_DUAL VB_DUALVIEW_MODE #define VB_DISPMODE_DUAL VB_DUALVIEW_MODE
#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 {
__u32 sisfb_id; /* for identifying sisfb */
struct _SISFB_INFO {
__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;
__u8 sisfb_revision; __u8 sisfb_revision;
__u8 sisfb_patchlevel; __u8 sisfb_patchlevel;
__u8 sisfb_caps; /* sisfb capabilities */ __u8 sisfb_caps; /* sisfb capabilities */
__u32 sisfb_tqlen; /* turbo queue length (in KB) */ __u32 sisfb_tqlen; /* turbo queue length (in KB) */
__u32 sisfb_pcibus; /* The card's PCI ID */ __u32 sisfb_pcibus; /* The card's PCI ID */
__u32 sisfb_pcislot; __u32 sisfb_pcislot;
__u32 sisfb_pcifunc; __u32 sisfb_pcifunc;
__u8 sisfb_lcdpdc; /* PanelDelayCompensation */
__u8 sisfb_lcda; /* Detected status of LCDA for low res/text modes */
__u32 sisfb_vbflags;
__u32 sisfb_currentvbflags;
__u32 sisfb_scalelcd;
__u32 sisfb_specialtiming;
__u8 sisfb_haveemi;
__u8 sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
__u8 sisfb_haveemilcd;
__u8 sisfb_lcdpdc; /* PanelDelayCompensation */ __u8 sisfb_lcdpdca; /* PanelDelayCompensation for LCD-via-CRT1 */
__u8 sisfb_lcda; /* Detected status of LCDA for low res/text modes */ __u16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */
__u32 sisfb_vbflags; __u32 sisfb_heapsize; /* heap size (in KB) */
__u32 sisfb_currentvbflags; __u32 sisfb_videooffset; /* Offset of viewport in video memory (in bytes) */
__u32 sisfb_scalelcd; __u32 sisfb_curfstn; /* currently running FSTN/DSTN mode */
__u32 sisfb_specialtiming; __u32 sisfb_curdstn;
__u8 sisfb_haveemi; __u16 sisfb_pci_vendor; /* PCI vendor (SiS or XGI) */
__u8 sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
__u8 sisfb_haveemilcd;
__u8 sisfb_lcdpdca; /* PanelDelayCompensation for LCD-via-CRT1 */ __u32 sisfb_vbflags2; /* ivideo->vbflags2 */
__u16 sisfb_tvxpos, sisfb_tvypos; /* Warning: Values + 32 ! */ __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[208]; /* for future use */ __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 */
/* If changing this, vgatypes.h must also be changed (for X driver) */ /* If changing this, vgatypes.h must also be changed (for X driver) */
/* 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)
/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */ /* ioctl to enable/disable panning auto-maximize (like nomax parameter) */
#define SISFB_GET_AUTOMAXIMIZE _IOR(0xF3,0x03,__u32) #define SISFB_GET_AUTOMAXIMIZE _IOR(0xF3,0x03,__u32)
#define SISFB_SET_AUTOMAXIMIZE _IOW(0xF3,0x03,__u32) #define SISFB_SET_AUTOMAXIMIZE _IOW(0xF3,0x03,__u32)
/* ioctls to relocate TV output (x=D[31:16], y=D[15:0], + 32)*/ /* ioctls to relocate TV output (x=D[31:16], y=D[15:0], + 32)*/
#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 */
...@@ -165,7 +184,7 @@ struct _SISFB_INFO { ...@@ -165,7 +184,7 @@ struct _SISFB_INFO {
/* The following are deprecated and should not be used anymore: */ /* The following are deprecated and should not be used anymore: */
/****************************************************************/ /****************************************************************/
/* 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_OLD _IOR('n',0xF8,__u32) #define SISFB_GET_INFO_OLD _IOR('n',0xF8,__u32)
/* ioctrl to get current vertical retrace status */ /* ioctrl to get current vertical retrace status */
#define SISFB_GET_VBRSTATUS_OLD _IOR('n',0xF9,__u32) #define SISFB_GET_VBRSTATUS_OLD _IOR('n',0xF9,__u32)
/* ioctl to enable/disable panning auto-maximize (like nomax parameter) */ /* ioctl to enable/disable panning auto-maximize (like nomax parameter) */
...@@ -177,8 +196,8 @@ struct _SISFB_INFO { ...@@ -177,8 +196,8 @@ struct _SISFB_INFO {
/* For fb memory manager (FBIO_ALLOC, FBIO_FREE) */ /* For fb memory manager (FBIO_ALLOC, FBIO_FREE) */
struct sis_memreq { struct sis_memreq {
__u32 offset; __u32 offset;
__u32 size; __u32 size;
}; };
/**********************************************/ /**********************************************/
...@@ -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