patch-2.4.21 linux-2.4.21/drivers/video/sis/oem310.h

Next file: linux-2.4.21/drivers/video/sis/osdef.h
Previous file: linux-2.4.21/drivers/video/sis/oem300.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/video/sis/oem310.h linux-2.4.21/drivers/video/sis/oem310.h
@@ -1,9 +1,7 @@
 
-/* OEM Data for 310/325 series */
+/* OEM Data for 310/325/330 series */
 
-const UCHAR SiS310_CRT2DelayCompensation1 = 0x04; /* 301A */
-
-const UCHAR SiS310_LCDDelayCompensation1[] =
+const UCHAR SiS310_LCDDelayCompensation_301[] =	    	/* 301 */
 {
 		 0x00,0x00,0x00,    /*   800x600 */
 		 0x0b,0x0b,0x0b,    /*  1024x768 */
@@ -22,72 +20,162 @@
 		 0x00,0x00,0x00
 };
 
-const UCHAR SiS310_TVDelayCompensation1[] =
+/* This is contained in 650+301B BIOSes, but it is wrong - so we don't use it */
+UCHAR SiS310_LCDDelayCompensation_650301B[] =	   	/* 30xB,LV */
+{
+		 0x01,0x01,0x01,    /*   800x600 */
+		 0x01,0x01,0x01,    /*  1024x768 */
+		 0x01,0x01,0x01,    /* 1280x1024 */
+                 0x01,0x01,0x01,    /*   640x480 (unknown) */
+		 0x01,0x01,0x01,    /*  1024x600 (unknown) */
+		 0x01,0x01,0x01,    /*  1152x864 (unknown) */
+		 0x01,0x01,0x01,    /*  1280x960 (guessed) */
+		 0x01,0x01,0x01,    /*  1152x768 (unknown) */
+		 0x01,0x01,0x01,    /* 1400x1050 */
+		 0x01,0x01,0x01,    /*  1280x768  (guessed) */
+		 0x01,0x01,0x01,    /* 1600x1200 */
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02
+};
+
+/* This data is correct, so we use it instead of the table above */
+UCHAR SiS310_LCDDelayCompensation_3xx301B[] =	   	/* 30xB,LV */
+{
+		 0x01,0x01,0x01,    /*   800x600 */
+		 0x0C,0x0C,0x0C,    /*  1024x768 */
+		 0x0C,0x0C,0x0C,    /* 1280x1024 */
+                 0x08,0x08,0x08,    /*   640x480 */
+		 0x0C,0x0C,0x0C,    /*  1024x600 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1152x864 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1280x960 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1152x768 (guessed) */
+		 0x0C,0x0C,0x0C,    /* 1400x1050 (guessed) */
+		 0x0C,0x0C,0x0C,    /*  1280x768 (guessed) */
+		 0x0C,0x0C,0x0C,    /* 1600x1200 (guessed) */
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02,
+		 0x02,0x02,0x02
+};
+
+const UCHAR SiS310_LCDDelayCompensation_LVDS650[] =   	/* LVDS */
+{
+                 0x00,0x00,0x00,    /*   800x600 */
+		 0x00,0x00,0x00,    /*  1024x768 */
+		 0x00,0x00,0x00,    /* 1280x1024 */
+		 0x00,0x00,0x00,    /*   640x480 (unknown) */
+		 0x00,0x00,0x00,    /*  1024x600 (unknown) */
+		 0x00,0x00,0x00,    /*  1152x864 (unknown) */
+		 0x00,0x00,0x00,    /*  1280x960 (guessed) */
+		 0x00,0x00,0x00,    /*  1152x768 (unknown) */
+		 0x00,0x00,0x00,    /* 1400x1050 */
+		 0x00,0x00,0x00,    /*  1280x768  (guessed) */
+		 0x00,0x00,0x00,    /* 1600x1200 */
+		 0x00,0x00,0x00,
+		 0x00,0x00,0x00,
+		 0x00,0x00,0x00,
+		 0x00,0x00,0x00
+};
+
+const UCHAR SiS310_LCDDelayCompensation_LVDS740[] =   	/* LVDS */
+{
+                 0x03,0x03,0x03,    /*   800x600 */
+		 0x03,0x03,0x03,    /*  1024x768 */
+		 0x03,0x03,0x03,    /* 1280x1024 */
+		 0x03,0x03,0x03,    /*   640x480 (unknown) */
+		 0x03,0x03,0x03,    /*  1024x600 (unknown) */
+		 0x03,0x03,0x03,    /*  1152x864 (unknown) */
+		 0x03,0x03,0x03,    /*  1280x960 (guessed) */
+		 0x03,0x03,0x03,    /*  1152x768 (unknown) */
+		 0x03,0x03,0x03,    /* 1400x1050 */
+		 0x03,0x03,0x03,    /*  1280x768  (guessed) */
+		 0x03,0x03,0x03,    /* 1600x1200 */
+		 0x00,0x00,0x00,
+		 0x00,0x00,0x00,
+		 0x00,0x00,0x00,
+		 0x00,0x00,0x00
+};
+
+const UCHAR SiS310_LCDDelayCompensation_651301LV[] =	  /* M650/651 301LV */
+{
+                 0x33,0x33,0x33,    /*   800x600 (guessed) */
+		 0x33,0x33,0x33,    /*  1024x768 */
+		 0x33,0x33,0x33,    /* 1280x1024 */
+		 0x33,0x33,0x33,    /*   640x480 (unknown) */
+		 0x33,0x33,0x33,    /*  1024x600 (unknown) */
+		 0x33,0x33,0x33,    /*  1152x864 (unknown) */
+		 0x33,0x33,0x33,    /*  1280x960 (guessed) */
+		 0x33,0x33,0x33,    /*  1152x768 (unknown) */
+		 0x33,0x33,0x33,    /* 1400x1050 */
+		 0x33,0x33,0x33,    /*  1280x768  (guessed) */
+		 0x33,0x33,0x33,    /* 1600x1200 */
+		 0x33,0x33,0x33,
+		 0x33,0x33,0x33,
+		 0x33,0x33,0x33,
+		 0x33,0x33,0x33
+};
+
+const UCHAR SiS310_LCDDelayCompensation_651302LV[] =	   /* M650/651 302LV */
+{
+                 0x33,0x33,0x33,    /*   800x600 (guessed) */
+		 0x33,0x33,0x33,    /*  1024x768 */
+		 0x33,0x33,0x33,    /* 1280x1024 */
+		 0x33,0x33,0x33,    /*   640x480 (unknown) */
+		 0x33,0x33,0x33,    /*  1024x600 (unknown) */
+		 0x33,0x33,0x33,    /*  1152x864 (unknown) */
+		 0x33,0x33,0x33,    /*  1280x960 (guessed) */
+		 0x33,0x33,0x33,    /*  1152x768 (unknown) */
+		 0x33,0x33,0x33,    /* 1400x1050 */
+		 0x33,0x33,0x33,    /*  1280x768  (guessed) */
+		 0x33,0x33,0x33,    /* 1600x1200 */
+		 0x33,0x33,0x33,
+		 0x33,0x33,0x33,
+		 0x33,0x33,0x33,
+		 0x33,0x33,0x33
+};
+
+const UCHAR SiS310_TVDelayCompensation_301[] = 		/* 301 */
+{
+		 0x02,0x02,    /* NTSC Enhanced, Standard */
+                 0x02,0x02,    /* PAL */
+		 0x08,0x0b     /* HiVision */
+};
+
+const UCHAR SiS310_TVDelayCompensation_301B[] =		/* 30xB, 30xLV */
+{
+		 0x03,0x03,
+		 0x03,0x03,
+		 0x03,0x03
+};
+
+const UCHAR SiS310_TVDelayCompensation_740301B[] =	/* 740 + 30xB (30xLV?) */
+{
+		 0x05,0x05,
+		 0x05,0x05,
+		 0x05,0x05
+};
+
+const UCHAR SiS310_TVDelayCompensation_LVDS[] =		/* LVDS */
+{
+		 0x0a,0x0a,
+		 0x0a,0x0a,
+		 0x0a,0x0a
+};
+
+const UCHAR SiS310_TVDelayCompensation_651301LV[] =	/* M650, 651, 301LV */
 {
-		  0x02,0x02,    /* NTSC Enhanced, Standard */
-                  0x02,0x02,    /* PAL */
-		  0x08,0x0b     /* HiVision */
-};
-
-const UCHAR SiS310_CRT2DelayCompensation2 = 0x00;   /* TW: From 650/301LV BIOS; was 0x0C; */      /* 301B */
-
-UCHAR SiS310_LCDDelayCompensation2[] =
-{
-		  0x01,0x01,0x01,    /*   800x600 */
-		  0x01,0x01,0x01,    /*  1024x768 */
-		  0x01,0x01,0x01,    /* 1280x1024 */
-                  0x01,0x01,0x01,    /*   640x480 (unknown) */
-		  0x01,0x01,0x01,    /*  1024x600 (unknown) */
-		  0x01,0x01,0x01,    /*  1152x864 (unknown) */
-		  0x01,0x01,0x01,    /*  1280x960 (guessed) */
-		  0x01,0x01,0x01,    /*  1152x768 (unknown) */
-		  0x01,0x01,0x01,    /* 1400x1050 */
-		  0x08,0x08,0x08,    /*  1280x768  (guessed) */
-		  0x01,0x01,0x01,    /* 1600x1200 */
-		  0x02,0x02,0x02,
-		  0x02,0x02,0x02,
-		  0x02,0x02,0x02,
-		  0x02,0x02,0x02
-};
-
-const UCHAR SiS310_TVDelayCompensation2[] =
-{
-		  0x03,0x03,        /* TW: From 650/301LVx 1.10.6s BIOS */
-		  0x03,0x03,
-		  0x03,0x03
-#if 0
-		  0x03,0x03,        /* NTSC Enhanced, Standard */
-                  0x03,0x03,        /* PAL */
-		  0x08,0x0b         /* HiVision */
-#endif
-};
-
-const UCHAR SiS310_CRT2DelayCompensation3 = 0x00;   /* LVDS */
-
-const UCHAR SiS310_LCDDelayCompensation3[] =
-{
-                   0x00,0x00,0x00,    /*   800x600 */
-		   0x00,0x00,0x00,    /*  1024x768 */
-		   0x00,0x00,0x00,    /* 1280x1024 */
-		   0x00,0x00,0x00,    /*   640x480 (unknown) */
-		   0x00,0x00,0x00,    /*  1024x600 (unknown) */
-		   0x00,0x00,0x00,    /*  1152x864 (unknown) */
-		   0x00,0x00,0x00,    /*  1280x960 (guessed) */
-		   0x00,0x00,0x00,    /*  1152x768 (unknown) */
-		   0x00,0x00,0x00,    /* 1400x1050 */
-		   0x00,0x00,0x00,    /*  1280x768  (guessed) */
-		   0x00,0x00,0x00,    /* 1600x1200 */
-		   0x00,0x00,0x00,
-		   0x00,0x00,0x00,
-		   0x00,0x00,0x00,
-		   0x00,0x00,0x00
-};
-
-const UCHAR SiS310_TVDelayCompensation3[] =
-{
-		   0x0a,0x0a,
-		   0x0a,0x0a,
-		   0x0a,0x0a
+		 0x33,0x33,
+		 0x33,0x33,
+		 0x33,0x33
+};
+
+const UCHAR SiS310_TVDelayCompensation_651302LV[] =	/* M650, 651, 302LV */
+{
+		 0x33,0x33,
+		 0x33,0x33,
+		 0x33,0x33
 };
 
 const UCHAR SiS310_TVAntiFlick1[3][2] =
@@ -152,7 +240,7 @@
 	{0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
  },
  {
-	{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
+	{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},   
 	{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
 	{0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
 	{0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
@@ -174,7 +262,7 @@
  }
 };
 
-const UCHAR SiS310_PALMFilter[17][4] =
+const UCHAR SiS310_PALMFilter[16][4] =
 {
 	{0x00,0xf4,0x10,0x38},
 	{0x00,0xf4,0x10,0x38},
@@ -191,11 +279,10 @@
 	{0xeb,0x04,0x25,0x18},
 	{0xeb,0x04,0x25,0x18},
 	{0xeb,0x04,0x25,0x18},
-	{0xeb,0x04,0x25,0x18},
-	{0xff,0xff,0xff,0xff}
+	{0xeb,0x04,0x25,0x18}
 };
 
-const UCHAR SiS310_PALNFilter[17][4] =
+const UCHAR SiS310_PALNFilter[16][4] =
 {
 	{0x00,0xf4,0x10,0x38},
 	{0x00,0xf4,0x10,0x38},
@@ -212,8 +299,7 @@
 	{0xeb,0x04,0x25,0x18},
 	{0xeb,0x04,0x25,0x18},
 	{0xeb,0x04,0x25,0x18},
-	{0xeb,0x04,0x25,0x18},
-	{0xff,0xff,0xff,0xff}
+	{0xeb,0x04,0x25,0x18}
 };
 
 
@@ -243,7 +329,7 @@
 	{0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
 };
 
-const UCHAR SiS310_TVPhaseIncr1[3][2][4]=
+const UCHAR SiS310_TVPhaseIncr1[3][2][4] =
 {
  {
 	{0x21,0xed,0xba,0x08},
@@ -259,15 +345,15 @@
  }
 };
 
-const UCHAR SiS310_TVPhaseIncr2[3][2][4]=
+const UCHAR SiS310_TVPhaseIncr2[3][2][4] =
 {
  {
-	{0x1e,0x8b,0xda,0xa7},   /* {0x21,0xF1,0x37,0x56}, - new (1.10.6s) */
-	{0x1e,0x8b,0xda,0xa7}    /* {0x21,0xF1,0x37,0x56} */
+	{0x21,0xf0,0x7b,0xd6},   /* 1.10.7w;  1.10.6s: {0x1e,0x8b,0xda,0xa7},   old: {0x21,0xF1,0x37,0x56} */
+	{0x21,0xf0,0x7b,0xd6}    /* 1.10.7w;  1.10.6s: {0x1e,0x8b,0xda,0xa7}    old: {0x21,0xF1,0x37,0x56} */
  },
  {
-	{0x2a,0x0a,0x41,0xe9},   /* {0x2a,0x09,0x86,0xe9}, */
-	{0x2a,0x0a,0x41,0xe9}    /* {0x2a,0x09,0x86,0xe9} */
+	{0x2a,0x0a,0x41,0xe9},   /* 1.10.7w, 1.10.6s. old: {0x2a,0x09,0x86,0xe9}, */
+	{0x2a,0x0a,0x41,0xe9}    /* 1.10.7w, 1.10.6s. old: {0x2a,0x09,0x86,0xe9}  */
  },
  {
 	{0x2a,0x05,0xd3,0x00},

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)