310vtbl.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:129k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* Register settings for SiS 310/325 series */
  2. typedef struct _SiS310_StStruct
  3. {
  4. UCHAR St_ModeID;
  5. USHORT St_ModeFlag;
  6. UCHAR St_StTableIndex;
  7. UCHAR St_CRT2CRTC;
  8. UCHAR St_ResInfo;
  9. UCHAR VB_StTVFlickerIndex;
  10. UCHAR VB_StTVEdgeIndex;
  11. UCHAR VB_StTVYFilterIndex;
  12. } SiS310_StStruct;
  13. static const SiS310_StStruct SiS310_SModeIDTable[]=
  14. {
  15. {0x01,0x9208,0x01,0x00,0x00,0x00,0x01,0x00},
  16. {0x01,0x1210,0x14,0x01,0x01,0x00,0x01,0x00},
  17. {0x01,0x1010,0x17,0x02,0x02,0x00,0x01,0x01},
  18. {0x03,0x8208,0x03,0x00,0x00,0x00,0x01,0x02},
  19. {0x03,0x0210,0x16,0x01,0x01,0x00,0x01,0x02},
  20. {0x03,0x0010,0x18,0x02,0x02,0x00,0x01,0x03},
  21. {0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x04},
  22. {0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x05},
  23. {0x07,0x0000,0x07,0x03,0x03,0x00,0x01,0x03},
  24. {0x07,0x0000,0x19,0x02,0x02,0x00,0x01,0x03},
  25. {0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x04},
  26. {0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x05},
  27. {0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x05},
  28. {0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x05},
  29. {0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x05},
  30. {0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x05},
  31. {0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x04},
  32. {0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x05},
  33. {0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x05},
  34. {0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00}
  35. };
  36. typedef struct _SiS310_StandTableStruct
  37. {
  38. UCHAR CRT_COLS;
  39. UCHAR ROWS;
  40. UCHAR CHAR_HEIGHT;
  41. USHORT CRT_LEN;
  42. UCHAR SR[4];
  43. UCHAR MISC;
  44. UCHAR CRTC[0x19];
  45. UCHAR ATTR[0x14];
  46. UCHAR GRC[9];
  47. } SiS310_StandTableStruct;
  48. static const SiS310_StandTableStruct SiS310_StandTable[]=
  49. {
  50. /* MD_0_200 */
  51.  {
  52.   0x28,0x18,0x08,0x0800,
  53.   {0x09,0x03,0x00,0x02},
  54.   0x63,
  55.   {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  56.    0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  57.    0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
  58.    0xff},
  59.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  60.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  61.    0x08,0x00,0x0f,0x00},
  62.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  63.    0xff}
  64.  },
  65. /* MD_1_200 */
  66.  {
  67.   0x28,0x18,0x08,0x0800,
  68.   {0x09,0x03,0x00,0x02},
  69.   0x63,
  70.   {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  71.    0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  72.    0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
  73.    0xff},
  74.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  75.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  76.    0x08,0x00,0x0f,0x00},
  77.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  78.    0xff}
  79.  },
  80. /* MD_2_200 */
  81.  {
  82.   0x50,0x18,0x08,0x1000,
  83.   {0x01,0x03,0x00,0x02},
  84.   0x63,
  85.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  86.    0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  87.    0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
  88.    0xff},
  89.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  90.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  91.    0x08,0x00,0x0f,0x00},
  92.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  93.    0xff}
  94.  },
  95. /* MD_3_200 */
  96.  {
  97.   0x50,0x18,0x08,0x1000,
  98.   {0x01,0x03,0x00,0x02},
  99.   0x63,
  100.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  101.    0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  102.    0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
  103.    0xff},
  104.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  105.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  106.    0x08,0x00,0x0f,0x00},
  107.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  108.    0xff}
  109.  },
  110. /* MD_4 */
  111.  {
  112.   0x28,0x18,0x08,0x4000,
  113.   {0x09,0x03,0x00,0x02},
  114.   0x63,
  115.   {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
  116.    0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
  117.    0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
  118.    0xff},
  119.   {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
  120.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  121.    0x01,0x00,0x03,0x00},
  122.   {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
  123.    0xff}
  124.  },
  125. /* MD_5 */
  126.  {
  127.   0x28,0x18,0x08,0x4000,
  128.   {0x09,0x03,0x00,0x02},
  129.   0x63,
  130.   {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
  131.    0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
  132.    0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
  133.    0xff},
  134.   {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
  135.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  136.    0x01,0x00,0x03,0x00},
  137.   {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
  138.    0xff}
  139.  },
  140. /* MD_6 */
  141.  {
  142.   0x50,0x18,0x08,0x4000,
  143.   {0x01,0x01,0x00,0x06},
  144.   0x63,
  145.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  146.    0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
  147.    0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xc2,
  148.    0xff},
  149.   {0x00,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
  150.    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
  151.    0x01,0x00,0x01,0x00},
  152.   {0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,
  153.    0xff}
  154.  },
  155. /* MD_7 */
  156.  {
  157.   0x50,0x18,0x0e,0x1000,
  158.   {0x00,0x03,0x00,0x03},
  159.   0xa6,
  160.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  161.    0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  162.    0x83,0x85,0x5d,0x28,0x0d,0x63,0xba,0xa3,
  163.    0xff},
  164.   {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
  165.    0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
  166.    0x0e,0x00,0x0f,0x08},
  167.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
  168.    0xff}
  169.  },
  170. /* MDA_DAC */
  171.  {
  172.   0x00,0x00,0x00,0x0000,
  173.   {0x00,0x00,0x00,0x15},
  174.   0x15,
  175.   {0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  176.    0x15,0x15,0x15,0x15,0x15,0x15,0x3f,0x3f,
  177.    0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x00,0x00,
  178.    0x00},
  179.   {0x00,0x00,0x00,0x00,0x00,0x15,0x15,0x15,
  180.    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  181.    0x15,0x15,0x15,0x15},
  182.   {0x15,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
  183.    0x3f}
  184.  },
  185. /* CGA_DAC */
  186.  {
  187.   0x00,0x10,0x04,0x0114,
  188.   {0x11,0x09,0x15,0x00},
  189.   0x10,
  190.   {0x04,0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,
  191.    0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x2a,0x3a,
  192.    0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x10,
  193.    0x04},
  194.   {0x14,0x01,0x11,0x09,0x15,0x00,0x10,0x04,
  195.    0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,0x2e,
  196.    0x3e,0x2b,0x3b,0x2f},
  197.   {0x3f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
  198.    0x3f}
  199.  },
  200. /* EGA_DAC */
  201.  {
  202.   0x00,0x10,0x04,0x0114,
  203.   {0x11,0x05,0x15,0x20},
  204.   0x30,
  205.   {0x24,0x34,0x21,0x31,0x25,0x35,0x08,0x18,
  206.    0x0c,0x1c,0x09,0x19,0x0d,0x1d,0x28,0x38,
  207.    0x2c,0x3c,0x29,0x39,0x2d,0x3d,0x02,0x12,
  208.    0x06},
  209.   {0x16,0x03,0x13,0x07,0x17,0x22,0x32,0x26,
  210.    0x36,0x23,0x33,0x27,0x37,0x0a,0x1a,0x0e,
  211.    0x1e,0x0b,0x1b,0x0f},
  212.   {0x1f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
  213.    0x3f}
  214.  },
  215. /* VGA_DAC */
  216.  {
  217.   0x00,0x10,0x04,0x0114,
  218.   {0x11,0x09,0x15,0x2a},
  219.   0x3a,
  220.   {0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x05,
  221.    0x08,0x0b,0x0e,0x11,0x14,0x18,0x1c,0x20,
  222.    0x24,0x28,0x2d,0x32,0x38,0x3f,0x00,0x10,
  223.    0x1f},
  224.   {0x2f,0x3f,0x1f,0x27,0x2f,0x37,0x3f,0x2d,
  225.    0x31,0x36,0x3a,0x3f,0x00,0x07,0x0e,0x15,
  226.    0x1c,0x0e,0x11,0x15},
  227.   {0x18,0x1c,0x14,0x16,0x18,0x1a,0x1c,0x00,
  228.    0x04}
  229.  },
  230.  {
  231.   0x08,0x0c,0x10,0x0a08,
  232.   {0x0c,0x0e,0x10,0x0b},
  233.   0x0c,
  234.   {0x0d,0x0f,0x10,0x10,0x01,0x08,0x00,0x00,
  235.    0x00,0x00,0x01,0x00,0x02,0x02,0x01,0x00,
  236.    0x04,0x04,0x01,0x00,0x05,0x02,0x05,0x00,
  237.    0x06},
  238.   {0x01,0x06,0x05,0x06,0x00,0x08,0x01,0x08,
  239.    0x00,0x07,0x02,0x07,0x06,0x07,0x00,0x00,
  240.    0x00,0x00,0x00,0x00},
  241.   {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  242.    0x00}
  243.  },
  244. /* MD_D */
  245.  {
  246.   0x28,0x18,0x08,0x2000,
  247.   {0x09,0x0f,0x00,0x06},
  248.   0x63,
  249.   {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
  250.    0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
  251.    0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xe3,
  252.    0xff},
  253.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  254.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  255.    0x01,0x00,0x0f,0x00},
  256.   {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  257.    0xff}
  258.  },
  259. /* MD_E */
  260.  {
  261.   0x50,0x18,0x08,0x4000,
  262.   {0x01,0x0f,0x00,0x06},
  263.   0x63,
  264.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  265.    0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
  266.    0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xe3,
  267.    0xff},
  268.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  269.    0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  270.    0x01,0x00,0x0f,0x00},
  271.   {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  272.    0xff}
  273.  },
  274. /* ExtVGATable */
  275.  {
  276.   0x00,0x00,0x00,0x0000,
  277.   {0x01,0x0f,0x00,0x0e},
  278.   0x23,
  279.   {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
  280.    0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  281.    0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
  282.    0xff},
  283.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  284.    0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
  285.    0x01,0x00,0x00,0x00},
  286.   {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
  287.    0xff}
  288.  },
  289. /* ROM_SAVEPTR */
  290.  {
  291.   0x9f,0x3b,0x00,0x00c0,
  292.   {0x00,0x00,0x00,0x00},
  293.   0x00,
  294.   {0x00,0x00,0x00,0x00,0x00,0x00,0xbb,0x3f,
  295.    0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
  296.    0x00,0x00,0x1a,0x00,0xac,0x3e,0x00,0xc0,
  297.    0x00},
  298.   {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  299.    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  300.    0x00,0x00,0x00,0x00},
  301.   {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  302.    0x00}
  303.  },
  304. /* MD_F */
  305.  {
  306.   0x50,0x18,0x0e,0x8000,
  307.   {0x01,0x0f,0x00,0x06},
  308.   0xa2,
  309.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  310.    0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  311.    0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3,
  312.    0xff},
  313.   {0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,
  314.    0x00,0x08,0x00,0x00,0x00,0x18,0x00,0x00,
  315.    0x0b,0x00,0x05,0x00},
  316.   {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,
  317.    0xff}
  318.  },
  319. /* MD_10 */
  320.  {
  321.   0x50,0x18,0x0e,0x8000,
  322.   {0x01,0x0f,0x00,0x06},
  323.   0xa3,
  324.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  325.    0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  326.    0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3,
  327.    0xff},
  328.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  329.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  330.    0x01,0x00,0x0f,0x00},
  331.   {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  332.    0xff}
  333.  },
  334. /* MD_0_350 */
  335.  {
  336.   0x28,0x18,0x0e,0x0800,
  337.   {0x09,0x03,0x00,0x02},
  338.   0xa3,
  339.   {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f,
  340.    0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  341.    0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
  342.    0xff},
  343.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  344.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  345.    0x08,0x00,0x0f,0x00},
  346.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  347.    0xff}
  348.  },
  349. /* MD_1_350 */
  350.  {
  351.   0x28,0x18,0x0e,0x0800,
  352.   {0x09,0x03,0x00,0x02},
  353.   0xa3,
  354.   {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  355.    0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  356.    0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
  357.    0xff},
  358.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  359.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  360.    0x08,0x00,0x0f,0x00},
  361.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  362.    0xff}
  363.  },
  364. /* MD_2_350 */
  365.  {
  366.   0x50,0x18,0x0e,0x1000,
  367.   {0x01,0x03,0x00,0x02},
  368.   0xa3,
  369.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  370.    0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  371.    0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
  372.    0xff},
  373.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  374.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  375.    0x08,0x00,0x0f,0x00},
  376.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  377.    0xff}
  378.  },
  379. /* MD_3_350 */
  380.  {
  381.   0x50,0x18,0x0e,0x1000,
  382.   {0x01,0x03,0x00,0x02},
  383.   0xa3,
  384.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  385.    0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  386.    0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
  387.    0xff},
  388.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  389.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  390.    0x08,0x00,0x0f,0x00},
  391.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  392.    0xff}
  393.  },
  394. /* MD_0_1_400 */
  395.  {
  396.   0x28,0x18,0x10,0x0800,
  397.   {0x08,0x03,0x00,0x02},
  398.   0x67,
  399.   {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f,
  400.    0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
  401.    0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
  402.    0xff},
  403.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  404.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  405.    0x0c,0x00,0x0f,0x08},
  406.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  407.    0xff}
  408.  },
  409. /* MD_2_3_400 */
  410.  {
  411.   0x50,0x18,0x10,0x1000,
  412.   {0x00,0x03,0x00,0x02},
  413.   0x67,
  414.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  415.    0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
  416.    0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
  417.    0xff},
  418.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  419.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  420.    0x0c,0x00,0x0f,0x08},
  421.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  422.    0xff}
  423.  },
  424. /* MD_7_400 */
  425.  {
  426.   0x50,0x18,0x10,0x1000,
  427.   {0x00,0x03,0x00,0x02},
  428.   0x66,
  429.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  430.    0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
  431.    0x9c,0x8e,0x8f,0x28,0x0f,0x96,0xb9,0xa3,
  432.    0xff},
  433.   {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
  434.    0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
  435.    0x0e,0x00,0x0f,0x08},
  436.   {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
  437.    0xff}
  438.  },
  439. /* MD_11 */
  440.  {
  441.   0x50,0x1d,0x10,0xa000,
  442.   {0x01,0x0f,0x00,0x06},
  443.   0xe3,
  444.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
  445.    0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  446.    0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xc3,
  447.    0xff},
  448.   {0x00,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
  449.    0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
  450.    0x01,0x00,0x0f,0x00},
  451.   {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,
  452.    0xff}
  453.  },
  454. /* ExtEGATable */
  455.  {
  456.   0x50,0x1d,0x10,0xa000,
  457.   {0x01,0x0f,0x00,0x06},
  458.   0xe3,
  459.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
  460.    0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  461.    0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xe3,
  462.    0xff},
  463.   {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  464.    0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  465.    0x01,0x00,0x0f,0x00},
  466.   {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  467.    0xff}
  468.  },
  469. /* MD_13 */
  470.  {
  471.   0x28,0x18,0x08,0x2000,
  472.   {0x01,0x0f,0x00,0x0e},
  473.   0x63,
  474.   {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  475.    0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,
  476.    0x9c,0x8e,0x8f,0x28,0x40,0x96,0xb9,0xa3,
  477.    0xff},
  478.   {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  479.    0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
  480.    0x41,0x00,0x0f,0x00},
  481.   {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
  482.    0xff}
  483.  }
  484. };
  485. typedef struct _SiS310_ExtStruct
  486. {
  487. UCHAR Ext_ModeID;
  488. USHORT Ext_ModeFlag;
  489. USHORT Ext_ModeInfo;
  490. USHORT Ext_Point;    /* TW: Address of table entry in (older) BIOS image */
  491. USHORT Ext_VESAID;
  492. UCHAR Ext_VESAMEMSize;
  493. UCHAR Ext_RESINFO;
  494. UCHAR VB_ExtTVFlickerIndex;
  495. UCHAR VB_ExtTVEdgeIndex;
  496. UCHAR VB_ExtTVYFilterIndex;
  497. UCHAR REFindex;
  498. } SiS310_ExtStruct;
  499. /* TW: Checked with 650/LVDS and 650/301LVx 1.10.6s */
  500. static const SiS310_ExtStruct  SiS310_EModeIDTable[]=
  501. {
  502. {0x6a,0x2212,0x0407,0x3a81,0x0102,0x08,0x07,0x00,0x00,0x07,0x00},          /* 800x600x? */
  503. {0x2e,0x0a1b,0x0306,0x3a57,0x0101,0x08,0x06,0x00,0x00,0x05,0x08},          /* 640x480x8 */
  504. /* {0x2e,0x021b,0x0306,0x3a57,0x0101,0x08,0x06,0x00,0x00,0x05,0x08},    */    /* 640x480x8 - 650/LVDS BIOS (no CRt2Mode) */
  505. {0x2f,0x0a1b,0x0305,0x3a50,0x0100,0x08,0x05,0x00,0x00,0x05,0x10},          /* 640x400x8 */
  506. /* {0x2f,0x021b,0x0305,0x3a50,0x0100,0x08,0x05,0x00,0x00,0x05,0x10},    */    /* 640x400x8 - 650/LVDS BIOS (no CRt2Mode) */
  507. {0x30,0x2a1b,0x0407,0x3a81,0x0103,0x08,0x07,0x00,0x00,0x07,0x00},          /* 800x600x8 */
  508. /* {0x30,0x221b,0x0407,0x3a81,0x0103,0x08,0x07,0x00,0x00,0x07,0x00},    */    /* 800x600x8 - 650/LVDS BIOS (no CRt2Mode) */
  509. /*      {0x31,0x0a1b,0x030d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x11},    */    /* 720x480x8 */
  510.         {0x31,0x0a1b,0x0a0d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x11},          /* 720x480x8 BIOS (301/LVDS) */
  511. {0x32,0x0a1b,0x0a0e,0x3b8c,0x0000,0x08,0x0e,0x00,0x00,0x06,0x12},          /* 720x576x8 */
  512. {0x33,0x0a1d,0x0a0d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x11},          /* 720x480x16 */
  513. {0x34,0x2a1d,0x0a0e,0x3b8c,0x0000,0x08,0x0e,0x00,0x00,0x06,0x12},          /* 720x576x16 */
  514. {0x35,0x0a1f,0x0a0d,0x3b85,0x0000,0x08,0x0d,0x00,0x00,0x06,0x11},          /* 720x480x32 */
  515. {0x36,0x2a1f,0x0a0e,0x3b8c,0x0000,0x08,0x0e,0x00,0x00,0x06,0x12},          /* 720x576x32 */
  516. {0x37,0x0212,0x0508,0x3aab,0x0104,0x08,0x08,0x00,0x00,0x00,0x13},          /* 1024x768x? */
  517. {0x38,0x0a1b,0x0508,0x3aab,0x0105,0x08,0x08,0x00,0x00,0x00,0x13},          /* 1024x768x8 */
  518. /* {0x38,0x021b,0x0508,0x3aab,0x0105,0x08,0x08,0x00,0x00,0x00,0x13},    */    /* 1024x768x8 - 650/LVDS BIOS (no CRt2Mode)  */
  519. {0x3a,0x0e3b,0x0609,0x3adc,0x0107,0x08,0x09,0x00,0x00,0x00,0x1a},          /* 1280x1024x8 */
  520. /* {0x3a,0x063b,0x0609,0x3adc,0x0107,0x08,0x09,0x00,0x00,0x00,0x1a},    */    /* 1280x1024x8 - 650/LVDS BIOS*/
  521. {0x3c,0x0e3b,0x070a,0x3af2,0x0130,0x08,0x0a,0x00,0x00,0x00,0x1e},          /* 1600x1200x8 */
  522. /* {0x3c,0x063b,0x070a,0x3af2,0x0130,0x08,0x0a,0x00,0x00,0x00,0x1e},    */    /* 1600x1200x8 - 650/LVDS BIOS */
  523. {0x3d,0x067d,0x070a,0x3af2,0x0131,0x08,0x0a,0x00,0x00,0x00,0x1e},          /* 1600x1200x16 - 650/301LVx - no CRT2Mode? */
  524. {0x40,0x9a1c,0x0000,0x3a34,0x010d,0x08,0x00,0x00,0x00,0x04,0x25},
  525. {0x41,0x9a1d,0x0000,0x3a34,0x010e,0x08,0x00,0x00,0x00,0x04,0x25},
  526. {0x43,0x0a1c,0x0306,0x3a57,0x0110,0x08,0x06,0x00,0x00,0x05,0x08},
  527. {0x44,0x0a1d,0x0306,0x3a57,0x0111,0x08,0x06,0x00,0x00,0x05,0x08},          /* 640x480x16 */
  528. {0x46,0x2a1c,0x0407,0x3a81,0x0113,0x08,0x07,0x00,0x00,0x07,0x00},
  529. {0x47,0x2a1d,0x0407,0x3a81,0x0114,0x08,0x07,0x00,0x00,0x07,0x00},          /* 800x600x16 */
  530. {0x49,0x0a3c,0x0508,0x3aab,0x0116,0x08,0x08,0x00,0x00,0x00,0x13},
  531. {0x4a,0x0a3d,0x0508,0x3aab,0x0117,0x08,0x08,0x00,0x00,0x00,0x13},          /* 1024x768x16 */
  532. {0x4c,0x0e7c,0x0609,0x3adc,0x0119,0x08,0x09,0x00,0x00,0x00,0x1a},
  533. {0x4d,0x0e7d,0x0609,0x3adc,0x011a,0x08,0x09,0x00,0x00,0x00,0x1a},          /* 1280x1024x16 */
  534. {0x50,0x9a1b,0x0001,0x3a3b,0x0132,0x08,0x01,0x00,0x00,0x04,0x26},
  535. /* {0x50,0x921b,0x0001,0x3a3b,0x0132,0x08,0x01,0x00,0x00,0x04,0x26},     */   /* 650/LVDS BIOS */
  536. {0x51,0xba1b,0x0103,0x3a42,0x0133,0x08,0x03,0x00,0x00,0x07,0x27},
  537. /* {0x52,0x9a1b,0x0204,0x3a49,0x0134,0x08,0x04,0x00,0x00,0x00,0x28},  */
  538.    {0x52,0xba1b,0x0204,0x3a49,0x0134,0x08,0x04,0x00,0x00,0x00,0x28},          /* 650/301 BIOS */
  539. /* {0x52,0xb21b,0x0204,0x3a49,0x0134,0x08,0x04,0x00,0x00,0x00,0x28},     */   /* 650/LVDS BIOS (no CRT2Mode) */
  540. {0x56,0x9a1d,0x0001,0x3a3b,0x0135,0x08,0x01,0x00,0x00,0x04,0x26},
  541. {0x57,0xba1d,0x0103,0x3a42,0x0136,0x08,0x03,0x00,0x00,0x07,0x27},
  542. /* {0x58,0x9a1d,0x0204,0x3a49,0x0137,0x08,0x04,0x00,0x00,0x00,0x28},  */
  543.   {0x58,0xba1d,0x0204,0x3a49,0x0137,0x08,0x04,0x00,0x00,0x00,0x28},          /* BIOS (301+LVDS) */
  544. {0x59,0x9a1b,0x0000,0x3a34,0x0138,0x08,0x00,0x00,0x00,0x04,0x25},
  545. /* {0x59,0x921b,0x0000,0x3a34,0x0138,0x08,0x00,0x00,0x00,0x04,0x25},     */   /* 650/LVDS BIOS (no CRT2Mode) */
  546. {0x5A,0x021b,0x0014,0x3b83,0x0138,0x08,0x01,0x00,0x00,0x04,0x3f},          /* 320x480x8 fstn add new mode*/
  547. {0x5B,0x0a1d,0x0014,0x3b83,0x0135,0x08,0x01,0x00,0x00,0x04,0x3f},          /* 320x480x16 fstn add new mode*/
  548. {0x5c,0xba1f,0x0204,0x3a49,0x0000,0x08,0x04,0x00,0x00,0x00,0x28},          /* TW: inserted 512x384x32 */
  549. {0x5d,0x0a1d,0x0305,0x3a50,0x0139,0x08,0x05,0x00,0x00,0x07,0x10},
  550. {0x62,0x0a3f,0x0306,0x3a57,0x013a,0x08,0x06,0x00,0x00,0x05,0x08},          /* 640x480x32 */
  551. {0x63,0x2a3f,0x0407,0x3a81,0x013b,0x08,0x07,0x00,0x00,0x07,0x00},          /* 800x600x32 */
  552. {0x64,0x0a7f,0x0508,0x3aab,0x013c,0x08,0x08,0x00,0x00,0x00,0x13},          /* 1024x768x32 */
  553. {0x65,0x0eff,0x0609,0x3adc,0x013d,0x08,0x09,0x00,0x00,0x00,0x1a},          /* 1280x1024x32 */
  554. {0x66,0x06ff,0x070a,0x3af2,0x013e,0x08,0x0a,0x00,0x00,0x00,0x1e},          /* 1600x1200x32 */
  555. {0x68,0x067b,0x080b,0x3b17,0x013f,0x08,0x0b,0x00,0x00,0x00,0x29},          /* 1920x1440x8 */
  556. {0x69,0x06fd,0x080b,0x3b17,0x0140,0x08,0x0b,0x00,0x00,0x00,0x29},          /* 1920x1440x16 */
  557. {0x6b,0x07ff,0x080b,0x3b17,0x0141,0x10,0x0b,0x00,0x00,0x00,0x29},          /* 1920x1440x32 */
  558. {0x6c,0x067b,0x090c,0x3b37,0x0000,0x08,0x0c,0x00,0x00,0x00,0x2f},          /* 2048x1536x8 */
  559. {0x6d,0x06fd,0x090c,0x3b37,0x0000,0x10,0x0c,0x00,0x00,0x00,0x2f},          /* 2048x1536x16 */
  560. {0x6e,0x07ff,0x090c,0x3b37,0x0000,0x10,0x0c,0x00,0x00,0x00,0x2f},          /* 2048x1536x32 */
  561. {0x70,0x2a1b,0x0410,0x3b52,0x0000,0x08,0x10,0x00,0x00,0x07,0x34},          /* 800x480x8 */
  562. {0x71,0x0a1b,0x0511,0x3b63,0x0000,0x08,0x11,0x00,0x00,0x00,0x37},          /* 1024x576x8 */
  563. {0x74,0x0a1d,0x0511,0x3b63,0x0000,0x08,0x11,0x00,0x00,0x00,0x37},          /* 1024x576x16 */
  564. {0x75,0x0a3d,0x0612,0x3b74,0x0000,0x08,0x12,0x00,0x00,0x00,0x3a},    /* 1280x720x16 */
  565. {0x76,0x2a1f,0x0410,0x3b52,0x0000,0x08,0x10,0x00,0x00,0x07,0x34},          /* 800x480x32 */
  566. {0x77,0x0a1f,0x0511,0x3b63,0x0000,0x08,0x11,0x00,0x00,0x00,0x37},    /* 1024x576x32 */
  567. {0x78,0x0a3f,0x0612,0x3b74,0x0000,0x08,0x12,0x00,0x00,0x00,0x3a},    /* 1280x720x32 */
  568. {0x79,0x0a3b,0x0612,0x3b74,0x0000,0x08,0x12,0x00,0x00,0x00,0x3a},    /* 1280x720x8 */
  569. {0x7a,0x2a1d,0x0410,0x3b52,0x0000,0x08,0x10,0x00,0x00,0x07,0x34},          /* 800x480x16 */
  570. {0x7c,0x0e3b,0x060f,0x3ad0,0x0000,0x08,0x0f,0x00,0x00,0x00,0x3d},          /* 1280x960x8 - TW */
  571. {0x7d,0x0e7d,0x060f,0x3ad0,0x0000,0x08,0x0f,0x00,0x00,0x00,0x3d},          /* 1280x960x16 - TW */
  572. {0x7e,0x0eff,0x060f,0x3ad0,0x0000,0x08,0x0f,0x00,0x00,0x00,0x3d},          /* 1280x960x32 - TW */
  573.         /* TW: 650/LVDS BIOS new modes */
  574. /* {0x23,0x063b,0x0614,0x36f7,0x0000,0x08,0x14,0x00,0x00,0x00,0x40},  */      /* 1280x768x8 - 650/LVDS BIOS */
  575. {0x23,0x0e3b,0x0614,0x36f7,0x0000,0x08,0x14,0x00,0x00,0x00,0x40},          /* 1280x768x8 */
  576. {0x24,0x0e7d,0x0614,0x36f7,0x0000,0x08,0x14,0x00,0x00,0x00,0x40},          /* 1280x768x16 */
  577. {0x25,0x0eff,0x0614,0x36f7,0x0000,0x08,0x14,0x00,0x00,0x00,0x40},          /* 1280x768x32 */
  578. {0x26,0x0e3b,0x0c15,0x36fe,0x0000,0x08,0x15,0x00,0x00,0x00,0x41},          /* 1400x1050x8 */
  579. /* {0x26,0x063b,0x0c15,0x36fe,0x0000,0x08,0x15,0x00,0x00,0x00,0x41},    */    /* 1400x1050x8 - 650/LVDS BIOS */
  580. {0x27,0x0e7d,0x0c15,0x36fe,0x0000,0x08,0x15,0x00,0x00,0x00,0x41},          /* 1400x1050x16 */
  581. {0x28,0x0eff,0x0c15,0x36fe,0x0000,0x08,0x15,0x00,0x00,0x00,0x41},          /* 1400x1050x32*/
  582. {0xff,0x0000,0x0000,0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00}
  583. };
  584. typedef struct _SiS310_Ext2Struct
  585. {
  586. USHORT Ext_InfoFlag;
  587. UCHAR Ext_CRT1CRTC;
  588. UCHAR Ext_CRTVCLK;
  589. UCHAR Ext_CRT2CRTC;
  590. UCHAR  ModeID;
  591. USHORT XRes;
  592. USHORT YRes;
  593. USHORT ROM_OFFSET;
  594. } SiS310_Ext2Struct;
  595. static const SiS310_Ext2Struct SiS310_RefIndex[]=
  596. {
  597. /* {0x005f,0x0d,0x03,0x05,0x6a, 800, 600,0x3a81},    0x0 - TW: Patch for Chrontel 7019  */
  598. {0x085f,0x0d,0x03,0x05,0x6a, 800, 600,0x3a81}, /* 0x0 */
  599. {0x0467,0x0e,0x04,0x05,0x6a, 800, 600,0x3a86}, /* 0x1 */
  600. {0x0067,0x0f,0x08,0x48,0x6a, 800, 600,0x3a8b}, /* 0x2 */
  601. {0x0067,0x10,0x07,0x8b,0x6a, 800, 600,0x3a90}, /* 0x3 */
  602. {0x0147,0x11,0x0a,0x00,0x6a, 800, 600,0x3a95}, /* 0x4 */
  603. {0x4147,0x12,0x0d,0x00,0x6a, 800, 600,0x3a9a}, /* 0x5 */
  604. {0x4047,0x13,0x13,0x00,0x6a, 800, 600,0x3a9f}, /* 0x6 */
  605. {0x4047,0x14,0x1c,0x00,0x6a, 800, 600,0x3aa4}, /* 0x7 */
  606. /* {0xc05f,0x05,0x00,0x04,0x2e, 640, 480,0x3a57},    0x8 - TW: Patch for Chrontel 7019  */
  607. {0xc85f,0x05,0x00,0x04,0x2e, 640, 480,0x3a57}, /* 0x8 */
  608. {0xc067,0x06,0x02,0x04,0x2e, 640, 480,0x3a5c}, /* 0x9 */
  609. {0xc067,0x07,0x02,0x47,0x2e, 640, 480,0x3a61}, /* 0xa */
  610. {0xc067,0x08,0x03,0x8a,0x2e, 640, 480,0x3a66}, /* 0xb */
  611. {0x4047,0x09,0x05,0x00,0x2e, 640, 480,0x3a6b}, /* 0xc */
  612. {0x4047,0x0a,0x09,0x00,0x2e, 640, 480,0x3a70}, /* 0xd */
  613. {0x4047,0x0b,0x0e,0x00,0x2e, 640, 480,0x3a75}, /* 0xe */
  614. {0xc047,0x0c,0x15,0x00,0x2e, 640, 480,0x3a7a}, /* 0xf */
  615. {0x407f,0x04,0x00,0x00,0x2f, 640, 400,0x3a50}, /* 0x10 */
  616. {0xc00f,0x3c,0x01,0x06,0x31, 720, 480,0x3b85}, /* 0x11 */
  617. {0x000f,0x3d,0x03,0x06,0x32, 720, 576,0x3b8c}, /* 0x12 */
  618. {0x0187,0x15,0x06,0x00,0x37,1024, 768,0x3aab}, /* 0x13 */
  619. {0xc877,0x16,0x0b,0x06,0x37,1024, 768,0x3ab0}, /* 0x14 301b TV1024x768*/
  620. {0xc067,0x17,0x0f,0x49,0x37,1024, 768,0x3ab5}, /* 0x15 */
  621. {0x0267,0x18,0x11,0x00,0x37,1024, 768,0x3aba}, /* 0x16 */
  622. {0x0047,0x19,0x16,0x8c,0x37,1024, 768,0x3abf}, /* 0x17 */
  623. {0x4047,0x1a,0x1b,0x00,0x37,1024, 768,0x3ac4}, /* 0x18 */
  624. {0x4047,0x1b,0x1f,0x00,0x37,1024, 768,0x3ac9}, /* 0x19 */
  625. {0x0387,0x1c,0x11,0x00,0x3a,1280,1024,0x3adc}, /* 0x1a */
  626. {0x0077,0x1d,0x19,0x07,0x3a,1280,1024,0x3ae1}, /* 0x1b */
  627. {0x0047,0x1e,0x1e,0x00,0x3a,1280,1024,0x3ae6}, /* 0x1c */
  628. {0x0007,0x1f,0x20,0x00,0x3a,1280,1024,0x3aeb}, /* 0x1d */
  629. {0x0007,0x20,0x21,0x00,0x3c,1600,1200,0x3af2}, /* 0x1e */
  630. {0x0007,0x21,0x22,0x00,0x3c,1600,1200,0x3af7}, /* 0x1f */
  631. {0x0007,0x22,0x23,0x00,0x3c,1600,1200,0x3afc}, /* 0x20 */
  632. {0x0007,0x23,0x25,0x00,0x3c,1600,1200,0x3b01}, /* 0x21 */
  633. {0x0007,0x24,0x26,0x00,0x3c,1600,1200,0x3b06}, /* 0x22 */
  634. {0x0007,0x25,0x2c,0x00,0x3c,1600,1200,0x3b0b}, /* 0x23 */
  635. {0x0007,0x26,0x34,0x00,0x3c,1600,1200,0x3b10}, /* 0x24 */
  636. {0x407f,0x00,0x00,0x00,0x40, 320, 200,0x3a34}, /* 0x25 */
  637. {0xc07f,0x01,0x00,0x04,0x50, 320, 240,0x3a3b}, /* 0x26 */
  638. {0x007f,0x02,0x04,0x05,0x51, 400, 300,0x3a42}, /* 0x27 */
  639. {0xc077,0x03,0x0b,0x06,0x52, 512, 384,0x3a49}, /* 0x28 */
  640. {0x8007,0x27,0x27,0x00,0x68,1920,1440,0x3b17}, /* 0x29 */
  641. {0x4007,0x28,0x29,0x00,0x68,1920,1440,0x3b1c}, /* 0x2a */
  642. {0x4007,0x29,0x2e,0x00,0x68,1920,1440,0x3b21}, /* 0x2b */
  643. {0x4007,0x2a,0x30,0x00,0x68,1920,1440,0x3b26}, /* 0x2c */
  644. {0x4007,0x2b,0x35,0x00,0x68,1920,1440,0x3b2b}, /* 0x2d */
  645. {0x4005,0x2c,0x39,0x00,0x68,1920,1440,0x3b30}, /* 0x2e */
  646. {0x4007,0x2d,0x2b,0x00,0x6c,2048,1536,0x3b37}, /* 0x2f */
  647. {0x4007,0x2e,0x31,0x00,0x6c,2048,1536,0x3b3c}, /* 0x30 */
  648. {0x4007,0x2f,0x33,0x00,0x6c,2048,1536,0x3b41}, /* 0x31 */
  649. {0x4007,0x30,0x37,0x00,0x6c,2048,1536,0x3b46}, /* 0x32 */
  650. {0x4005,0x31,0x38,0x00,0x6c,2048,1536,0x3b4b}, /* 0x33 */
  651. {0x0057,0x32,0x40,0x08,0x70, 800, 480,0x3b52}, /* 0x34 */
  652. {0x0047,0x33,0x07,0x08,0x70, 800, 480,0x3b57}, /* 0x35 */
  653. {0x0047,0x34,0x0a,0x08,0x70, 800, 480,0x3b5c}, /* 0x36 */
  654. {0x0057,0x35,0x0b,0x09,0x71,1024, 576,0x3b63}, /* 0x37 */
  655. {0x0047,0x36,0x11,0x09,0x71,1024, 576,0x3b68}, /* 0x38 */
  656. {0x0047,0x37,0x16,0x09,0x71,1024, 576,0x3b6d}, /* 0x39 */
  657. {0x0057,0x38,0x19,0x0a,0x75,1280, 720,0x3b74}, /* 0x3a */
  658. {0x0047,0x39,0x1e,0x0a,0x75,1280, 720,0x3b79}, /* 0x3b */
  659. {0x0047,0x3a,0x20,0x0a,0x75,1280, 720,0x3b7e}, /* 0x3c */
  660. {0x0027,0x3b,0x19,0x08,0x7c,1280, 960,0x3ad0}, /* 0x3d */
  661. {0x0027,0x3b,0x19,0x08,0x7c,1280, 960,0x3ad5}, /* 0x3e */
  662. {0xc07f,0x01,0x00,0x06,0x5a, 320, 480,0x3b83}, /* 0x3f */    /* FSTN mode */
  663.         {0x0077,0x42,0x12,0x07,0x23,1280, 768,0x0000}, /* 0x40 */    /* TW: 650/LVDS/301LVx new mode */
  664. {0x0067,0x43,0x4d,0x08,0x26,1400,1050,0x0000}, /* 0x41 */    /* TW: 650/LVDS/301LVx new mode */
  665. {0xffff,0x00,0x00,0x00,0x00,0000,0000,0x0000}
  666. };
  667. typedef struct _SiS310_CRT1TableStruct
  668. {
  669.   UCHAR CR[17];
  670. } SiS310_CRT1TableStruct;
  671. static const SiS310_CRT1TableStruct SiS310_CRT1Table[]=
  672. {
  673.  {{0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f,
  674.    0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x00,
  675.    0x00}}, /* 0x0 */
  676.  {{0x2d,0x27,0x28,0x90,0x2c,0x80,0x0b,0x3e,
  677.    0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x00,
  678.    0x00}}, /* 0x1 */
  679.  {{0x3d,0x31,0x31,0x81,0x37,0x1f,0x72,0xf0,
  680.    0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x05,
  681.    0x01}}, /* 0x2 */
  682.  {{0x4f,0x3f,0x3f,0x93,0x45,0x0d,0x24,0xf5,
  683.    0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x01,
  684.    0x01}}, /* 0x3 */
  685.  {{0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  686.    0x9c,0x8e,0x8f,0x96,0xb9,0x30,0x00,0x05,
  687.    0x00}}, /* 0x4 */
  688.  {{0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e,
  689.    0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
  690.    0x00}}, /* 0x5 */
  691.  {{0x63,0x4f,0x50,0x86,0x56,0x9b,0x06,0x3e,
  692.    0xe8,0x8b,0xdf,0xe7,0xff,0x10,0x00,0x01,
  693.    0x00}}, /* 0x6 */
  694.  {{0x64,0x4f,0x4f,0x88,0x55,0x9d,0xf2,0x1f,
  695.    0xe0,0x83,0xdf,0xdf,0xf3,0x10,0x00,0x01,
  696.    0x00}}, /* 0x7 */
  697.  {{0x63,0x4f,0x4f,0x87,0x5a,0x81,0xfb,0x1f,
  698.    0xe0,0x83,0xdf,0xdf,0xfc,0x10,0x00,0x05,
  699.    0x00}}, /* 0x8 */
  700.  {{0x65,0x4f,0x4f,0x89,0x58,0x80,0xfb,0x1f,
  701.    0xe0,0x83,0xdf,0xdf,0xfc,0x00,0x00,0x05,
  702.    0x61}}, /* 0x9 */
  703.  {{0x65,0x4f,0x4f,0x89,0x58,0x80,0x01,0x3e,
  704.    0xe0,0x83,0xdf,0xdf,0x02,0x00,0x00,0x05,
  705.    0x61}}, /* 0xa */
  706.  {{0x67,0x4f,0x4f,0x8b,0x58,0x81,0x0d,0x3e,
  707.    0xe0,0x83,0xdf,0xdf,0x0e,0x10,0x00,0x05,
  708.    0x61}}, /* 0xb */
  709.  {{0x65,0x4f,0x4f,0x89,0x57,0x9f,0xfb,0x1f,
  710.    0xe6,0x8a,0xe5,0xe5,0xfc,0x00,0x00,0x01,
  711.    0x00}}, /* 0xc */
  712.  {{0x7b,0x63,0x63,0x9f,0x6a,0x93,0x6f,0xf0,
  713.    0x58,0x8a,0x57,0x57,0x70,0x20,0x00,0x05,
  714.    0x01}}, /* 0xd */
  715.  {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  716.    0x58,0x8c,0x57,0x57,0x73,0x20,0x00,0x06,
  717.    0x01}}, /* 0xe */
  718.  {{0x7d,0x63,0x63,0x81,0x6e,0x1d,0x98,0xf0,
  719.    0x7c,0x82,0x57,0x57,0x99,0x00,0x00,0x06,
  720.    0x01}}, /* 0xf */
  721.  {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xf0,
  722.    0x58,0x8b,0x57,0x57,0x70,0x20,0x00,0x06,
  723.    0x01}}, /* 0x10 */
  724.  {{0x7e,0x63,0x63,0x82,0x6b,0x13,0x75,0xf0,
  725.    0x58,0x8b,0x57,0x57,0x76,0x20,0x00,0x06,
  726.    0x01}}, /* 0x11 */
  727.  {{0x81,0x63,0x63,0x85,0x6d,0x18,0x7a,0xf0,
  728.    0x58,0x8b,0x57,0x57,0x7b,0x20,0x00,0x06,
  729.    0x61}}, /* 0x12 */
  730.  {{0x83,0x63,0x63,0x87,0x6e,0x19,0x81,0xf0,
  731.    0x58,0x8b,0x57,0x57,0x82,0x20,0x00,0x06,
  732.    0x61}}, /* 0x13 */
  733.  {{0x85,0x63,0x63,0x89,0x6f,0x1a,0x91,0xf0,
  734.    0x58,0x8b,0x57,0x57,0x92,0x20,0x00,0x06,
  735.    0x61}}, /* 0x14 */
  736.  {{0x99,0x7f,0x7f,0x9d,0x84,0x1a,0x96,0x1f,
  737.    0x7f,0x83,0x7f,0x7f,0x97,0x10,0x00,0x02,
  738.    0x00}}, /* 0x15 */
  739.  {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
  740.    0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
  741.    0x01}}, /* 0x16 */
  742.  {{0xa1,0x7f,0x7f,0x85,0x86,0x97,0x24,0xf5,
  743.    0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
  744.    0x01}}, /* 0x17 */
  745.  {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf5,
  746.    0x00,0x83,0xff,0xff,0x1f,0x10,0x00,0x02,
  747.    0x01}}, /* 0x18 */
  748.  {{0xa7,0x7f,0x7f,0x8b,0x89,0x95,0x26,0xf5,
  749.    0x00,0x83,0xff,0xff,0x27,0x10,0x00,0x02,
  750.    0x01}}, /* 0x19 */
  751.  {{0xa9,0x7f,0x7f,0x8d,0x8c,0x9a,0x2c,0xf5,
  752.    0x00,0x83,0xff,0xff,0x2d,0x14,0x00,0x02,
  753.    0x62}}, /* 0x1a */
  754.  {{0xab,0x7f,0x7f,0x8f,0x8d,0x9b,0x35,0xf5,
  755.    0x00,0x83,0xff,0xff,0x36,0x14,0x00,0x02,
  756.    0x62}}, /* 0x1b */
  757.  {{0xcf,0x9f,0x9f,0x93,0xb2,0x01,0x14,0xba,
  758.    0x00,0x83,0xff,0xff,0x15,0x00,0x00,0x03,
  759.    0x00}}, /* 0x1c */
  760.  {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0x5a,
  761.    0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07,
  762.    0x01}}, /* 0x1d */
  763.  {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0x5a,
  764.    0x00,0x83,0xff,0xff,0x29,0x09,0x00,0x07,
  765.    0x01}}, /* 0x1e */
  766.  {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0x5a,
  767.    0x00,0x83,0xff,0xff,0x2f,0x09,0x00,0x07,
  768.    0x01}}, /* 0x1f */
  769.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  770.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  771.    0x00}}, /* 0x20 */
  772.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  773.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  774.    0x00}}, /* 0x21 @ 4084 */
  775.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  776.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  777.    0x00}}, /* 0x22 */
  778.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  779.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  780.    0x00}}, /* 0x23 */
  781.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  782.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  783.    0x00}}, /* 0x24 */
  784.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  785.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  786.    0x00}}, /* 0x25 */
  787.  {{0x09,0xc7,0xc7,0x8d,0xd3,0x0b,0xe0,0x10,
  788.    0xb0,0x83,0xaf,0xaf,0xe1,0x2f,0x01,0x04,
  789.    0x00}}, /* 0x26 */
  790.  {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
  791.    0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
  792.    0x00}}, /* 0x27 */
  793.  {{0x43,0xef,0xef,0x87,0x06,0x00,0xd4,0x1f,
  794.    0xa0,0x83,0x9f,0x9f,0xd5,0x1f,0x41,0x05,
  795.    0x63}}, /* 0x28 */
  796.  {{0x45,0xef,0xef,0x89,0x07,0x01,0xd9,0x1f,
  797.    0xa0,0x83,0x9f,0x9f,0xda,0x1f,0x41,0x05,
  798.    0x63}}, /* 0x29 */
  799.  {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
  800.    0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
  801.    0x00}}, /* 0x2a */
  802.  {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
  803.    0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
  804.    0x00}}, /* 0x2b */
  805.  {{0x40,0xef,0xef,0x84,0x03,0x1d,0xda,0x1f,
  806.    0xa0,0x83,0x9f,0x9f,0xdb,0x1f,0x41,0x01,
  807.    0x00}}, /* 0x2c */
  808.  {{0x59,0xff,0xff,0x9d,0x17,0x13,0x33,0xba,
  809.    0x00,0x83,0xff,0xff,0x34,0x0f,0x41,0x05,
  810.    0x44}}, /* 0x2d */
  811.  {{0x5b,0xff,0xff,0x9f,0x18,0x14,0x38,0xba,
  812.    0x00,0x83,0xff,0xff,0x39,0x0f,0x41,0x05,
  813.    0x44}}, /* 0x2e */
  814.  {{0x5b,0xff,0xff,0x9f,0x18,0x14,0x3d,0xba,
  815.    0x00,0x83,0xff,0xff,0x3e,0x0f,0x41,0x05,
  816.    0x44}}, /* 0x2f */
  817.  {{0x5d,0xff,0xff,0x81,0x19,0x95,0x41,0xba,
  818.    0x00,0x84,0xff,0xff,0x42,0x0f,0x41,0x05,
  819.    0x44}}, /* 0x30 */
  820.  {{0x55,0xff,0xff,0x99,0x0d,0x0c,0x3e,0xba,
  821.    0x00,0x84,0xff,0xff,0x3f,0x0f,0x41,0x05,
  822.    0x00}}, /* 0x31 */
  823.  {{0x7f,0x63,0x63,0x83,0x6c,0x1c,0x72,0xba,
  824.    0x27,0x8b,0xdf,0xdf,0x73,0x00,0x00,0x06,
  825.    0x01}}, /* 0x32 */
  826.  {{0x7f,0x63,0x63,0x83,0x69,0x13,0x6f,0xba,
  827.    0x26,0x89,0xdf,0xdf,0x6f,0x00,0x00,0x06,
  828.    0x01}}, /* 0x33 */
  829.  {{0x7f,0x63,0x63,0x82,0x6b,0x13,0x75,0xba,
  830.    0x29,0x8c,0xdf,0xdf,0x75,0x00,0x00,0x06,
  831.    0x01}}, /* 0x34 */
  832.  {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf1,
  833.    0xaf,0x85,0x3f,0x3f,0x25,0x30,0x00,0x02,
  834.    0x01}}, /* 0x35 */
  835.  {{0x9f,0x7f,0x7f,0x83,0x85,0x91,0x1e,0xf1,
  836.    0xad,0x81,0x3f,0x3f,0x1f,0x30,0x00,0x02,
  837.    0x01}}, /* 0x36 */
  838.  {{0xa7,0x7f,0x7f,0x88,0x89,0x15,0x26,0xf1,
  839.    0xb1,0x85,0x3f,0x3f,0x27,0x30,0x00,0x02,
  840.    0x01}}, /* 0x37 */
  841.  {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x28,0xc4,
  842.    0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
  843.    0x01}}, /* 0x38 */
  844.  {{0xce,0x9f,0x9f,0x92,0xa5,0x17,0x28,0xd4,
  845.    0x7a,0x8e,0xcf,0xcf,0x29,0x21,0x00,0x07,
  846.    0x01}}, /* 0x39 */
  847.  {{0xd3,0x9f,0x9f,0x97,0xab,0x1f,0x2e,0xd4,
  848.    0x7d,0x81,0xcf,0xcf,0x2f,0x21,0x00,0x07,
  849.    0x01}}, /* 0x3a */
  850.  {{0xdc,0x9f,0x9f,0x00,0xab,0x19,0xe6,0xef,
  851.    0xc0,0xc3,0xbf,0xbf,0xe7,0x10,0x00,0x07,
  852.    0x01}}, /* 0x3b */
  853.  {{0x6b,0x59,0x59,0x8f,0x5e,0x8c,0x0b,0x3e,
  854.    0xe9,0x8b,0xdf,0xe7,0x04,0x00,0x00,0x05,
  855.    0x00}}, /* 0x3c */
  856.  {{0x7b,0x59,0x63,0x9f,0x6a,0x93,0x6f,0xf0,
  857.    0x58,0x8a,0x3f,0x57,0x70,0x20,0x00,0x05,
  858.    0x01}}, /* 0x3d */
  859.  {{0x86,0x6a,0x6a,0x8a,0x74,0x06,0x8c,0x15,
  860.    0x4f,0x83,0xef,0xef,0x8d,0x30,0x00,0x02,
  861.    0x00}}, /* 0x3e */
  862.  {{0x81,0x6a,0x6a,0x85,0x70,0x00,0x0f,0x3e,
  863.    0xeb,0x8e,0xdf,0xdf,0x10,0x00,0x00,0x02,
  864.    0x00}}, /* 0x3f */
  865.  /* TW: New from 650/LVDS BIOS */
  866.  {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x1e,0xf1,
  867.    0xae,0x85,0x57,0x57,0x1f,0x30,0x00,0x02,
  868.    0x01}},  /* 0x40 */
  869.  {{0xa3,0x7f,0x7f,0x87,0x86,0x97,0x24,0xf5,
  870.    0x02,0x88,0xff,0xff,0x25,0x10,0x00,0x02,
  871.    0x01}},  /* 0x41 */
  872.  {{0xce,0x9f,0x9f,0x92,0xa9,0x17,0x20,0xf5,
  873.    0x03,0x88,0xff,0xff,0x21,0x10,0x00,0x07,
  874.    0x01}},  /* 0x42 */
  875.  {{0xe6,0xae,0xae,0x8a,0xbd,0x90,0x3d,0x10,
  876.    0x1a,0x8d,0x19,0x19,0x3e,0x2f,0x00,0x03,
  877.    0x00}}   /* 0x43 */
  878. };
  879. typedef struct _SiS310_MCLKDataStruct
  880. {
  881. UCHAR SR28,SR29,SR2A;
  882. USHORT CLOCK;
  883. } SiS310_MCLKDataStruct;
  884. static const SiS310_MCLKDataStruct SiS310_MCLKData_0_315[] =
  885. {
  886. { 0x3b,0x22,0x01,143},   /* TW: Was { 0x5c,0x23,0x01,166}, */
  887. { 0x5c,0x23,0x01,166},
  888. { 0x5c,0x23,0x01,166},
  889. { 0x5c,0x23,0x01,166},
  890. { 0x5c,0x23,0x01,166},
  891. { 0x5c,0x23,0x01,166},
  892. { 0x5c,0x23,0x01,166},
  893. { 0x5c,0x23,0x01,166}
  894. };
  895. static const SiS310_MCLKDataStruct SiS310_MCLKData_0_650[] = /* @ 0x54 */
  896. {
  897. { 0x5a,0x64,0x82, 66},
  898. { 0xb3,0x45,0x82, 83},
  899. { 0x37,0x61,0x82,100},
  900. { 0x37,0x22,0x82,133},
  901. { 0x37,0x61,0x82,100},
  902. { 0x37,0x22,0x82,133},
  903. { 0x37,0x22,0x82,133},
  904. { 0x37,0x22,0x82,133}
  905. };
  906. static const SiS310_MCLKDataStruct SiS310_MCLKData_1[] = /* @ 0x155 */
  907. {
  908.         { 0x29,0x21,0x82,150},
  909. { 0x5c,0x23,0x82,166},
  910. { 0x65,0x23,0x82,183},
  911. { 0x37,0x21,0x82,200},
  912. { 0x37,0x22,0x82,133},
  913. { 0x37,0x22,0x82,133},
  914. { 0x37,0x22,0x82,133},
  915. { 0x37,0x22,0x82,133}
  916. };
  917. typedef struct _SiS310_ECLKDataStruct
  918. {
  919.   UCHAR SR2E,SR2F,SR30;
  920.   USHORT CLOCK;
  921. } SiS310_ECLKDataStruct;
  922. static const SiS310_ECLKDataStruct SiS310_ECLKData[]=
  923. {
  924. { 0x5c,0x23,0x01,166},
  925. { 0x5c,0x23,0x01,166},
  926. { 0x5c,0x23,0x01,166},
  927. { 0x5c,0x23,0x01,166}
  928. };
  929. typedef struct _SiS310_VCLKDataStruct
  930. {
  931. UCHAR SR2B,SR2C;
  932. USHORT CLOCK;
  933. } SiS310_VCLKDataStruct;
  934. static const SiS310_VCLKDataStruct SiS310_VCLKData[]=
  935. {
  936. { 0x1b,0xe1, 25}, /* 0x0 */   /* 650/LVDS BIOS: @ 0x5647 */
  937. { 0x4e,0xe4, 28}, /* 0x1 */
  938. { 0x57,0xe4, 31}, /* 0x2 */
  939. { 0xc3,0xc8, 36}, /* 0x3 */
  940. { 0x42,0xe2, 40}, /* 0x4 */
  941. { 0xfe,0xcd, 43}, /* 0x5 */
  942. { 0x5d,0xc4, 44}, /* 0x6 */
  943. { 0x52,0xe2, 49}, /* 0x7 */
  944. { 0x53,0xe2, 50}, /* 0x8 */
  945. { 0x74,0x67, 52}, /* 0x9 */
  946. { 0x6d,0x66, 56}, /* 0xa */
  947. { 0x5a,0x64, 65}, /* 0xb */   /* TW: was 6c c3 - WRONG */
  948. { 0x46,0x44, 67}, /* 0xc */
  949. { 0xb1,0x46, 68}, /* 0xd */
  950. { 0xd3,0x4a, 72}, /* 0xe */
  951. { 0x29,0x61, 75}, /* 0xf */
  952. { 0x6e,0x46, 76}, /* 0x10 */
  953. { 0x2b,0x61, 78}, /* 0x11 */
  954. { 0x31,0x42, 79}, /* 0x12 */
  955. { 0xab,0x44, 83}, /* 0x13 */
  956. { 0x46,0x25, 84}, /* 0x14 */
  957. { 0x78,0x29, 86}, /* 0x15 */
  958. { 0x62,0x44, 94}, /* 0x16 */
  959. { 0x2b,0x41,104}, /* 0x17 */
  960. { 0x3a,0x23,105}, /* 0x18 */
  961. { 0x70,0x44,108}, /* 0x19 */
  962. { 0x3c,0x23,109}, /* 0x1a */
  963. { 0x5e,0x43,113}, /* 0x1b */
  964. { 0xbc,0x44,116}, /* 0x1c */
  965. { 0xe0,0x46,132}, /* 0x1d */
  966. { 0x54,0x42,135}, /* 0x1e */
  967. { 0xea,0x2a,139}, /* 0x1f */
  968. { 0x41,0x22,157}, /* 0x20 */
  969. { 0x70,0x24,162}, /* 0x21 */
  970. { 0x30,0x21,175}, /* 0x22 */
  971. { 0x4e,0x22,189}, /* 0x23 */
  972. { 0xde,0x26,194}, /* 0x24 */
  973. { 0x62,0x06,202}, /* 0x25 */
  974. { 0x3f,0x03,229}, /* 0x26 */
  975. { 0xb8,0x06,234}, /* 0x27 */
  976. { 0x34,0x02,253}, /* 0x28 */
  977. { 0x58,0x04,255}, /* 0x29 */
  978. { 0x24,0x01,265}, /* 0x2a */
  979. { 0x9b,0x02,267}, /* 0x2b */
  980. { 0x70,0x05,270}, /* 0x2c */
  981. { 0x25,0x01,272}, /* 0x2d */
  982. { 0x9c,0x02,277}, /* 0x2e */
  983. { 0x27,0x01,286}, /* 0x2f */
  984. { 0x3c,0x02,291}, /* 0x30 */
  985. { 0xef,0x0a,292}, /* 0x31 */
  986. { 0xf6,0x0a,310}, /* 0x32 */
  987. { 0x95,0x01,315}, /* 0x33 */
  988. { 0xf0,0x09,324}, /* 0x34 */
  989. { 0xfe,0x0a,331}, /* 0x35 */
  990. { 0xf3,0x09,332}, /* 0x36 */
  991. { 0xea,0x08,340}, /* 0x37 */
  992. { 0xe8,0x07,376}, /* 0x38 */
  993. { 0xde,0x06,389}, /* 0x39 */
  994. { 0x52,0x2a, 54}, /* 0x3a */
  995. { 0x52,0x6a, 27}, /* 0x3b */
  996. { 0x62,0x24, 70}, /* 0x3c */
  997. { 0x62,0x64, 70}, /* 0x3d */
  998. { 0xa8,0x4c, 30}, /* 0x3e */
  999. { 0x20,0x26, 33}, /* 0x3f */
  1000. { 0x31,0xc2, 39}, /* 0x40 */
  1001. /* TW: 650/LVDS BIOS @ 0x574b new: */
  1002. { 0x60,0x36, 30}, /* 0x41 */  /* Chrontel */
  1003. { 0x40,0x4a, 28}, /* 0x42 */  /* Chrontel */
  1004. { 0x9f,0x46, 44}, /* 0x43 */  /* Chrontel */
  1005. { 0x97,0x2c, 26}, /* 0x44 */
  1006. { 0x44,0xe4, 25}, /* 0x45 */  /* Chrontel */
  1007. { 0x7e,0x32, 47}, /* 0x46 */  /* Chrontel */
  1008. { 0x8a,0x24, 31}, /* 0x47 */  /* Chrontel */
  1009. { 0x97,0x2c, 26}, /* 0x48 */  /* Chrontel */
  1010. { 0xce,0x3c, 39}, /* 0x49 */
  1011. { 0x52,0x4a, 36}, /* 0x4a */  /* Chrontel */
  1012. { 0x34,0x61, 95}, /* 0x4b */
  1013. { 0x78,0x27,108}, /* 0x4c - was 102 */  /* TW: Last entry in 650/301 BIOS */
  1014. { 0x66,0x43,123}, /* 0x4d */  /* Modes 0x26-0x28 (1400x1050) */
  1015. { 0x41,0x4e, 21}, /* 0x4e */
  1016. { 0xa1,0x4a, 29}, /* 0x4f */  /* Chrontel */
  1017. { 0x19,0x42, 42}, /* 0x50 */
  1018. { 0x54,0x46, 58}, /* 0x51 */  /* Chrontel */
  1019. { 0x25,0x42, 61}, /* 0x52 */
  1020. { 0x44,0x44, 66}, /* 0x53 */  /* Chrontel */
  1021. { 0x3a,0x62, 70}  /* 0x54 */  /* Chrontel */
  1022. };
  1023. typedef struct _SiS310_VBVCLKDataStruct
  1024. {
  1025. UCHAR Part4_A,Part4_B;
  1026. USHORT CLOCK;
  1027. } SiS310_VBVCLKDataStruct;
  1028. static const SiS310_VBVCLKDataStruct SiS310_VBVCLKData[]=
  1029. {
  1030. { 0x1b,0xe1, 25}, /* 0x0 */   /* 650/LVDS BIOS: @ 0x579c */
  1031. { 0x4e,0xe4, 28}, /* 0x1 */
  1032. { 0x57,0xe4, 31}, /* 0x2 */
  1033. { 0xc3,0xc8, 36}, /* 0x3 */
  1034. { 0x42,0x47, 40}, /* 0x4 */
  1035. { 0xfe,0xcd, 43}, /* 0x5 */
  1036. { 0x5d,0xc4, 44}, /* 0x6 */
  1037. { 0x52,0x47, 49}, /* 0x7 */
  1038. { 0x53,0x47, 50}, /* 0x8 */
  1039. { 0x74,0x67, 52}, /* 0x9 */
  1040. { 0x6d,0x66, 56}, /* 0xa */
  1041. { 0x35,0x62, 65}, /* 0xb */  /* Was 0x5a,0x64 - 650/LVDS+301 bios: 35,62  */
  1042. { 0x46,0x44, 67}, /* 0xc */
  1043. { 0xb1,0x46, 68}, /* 0xd */
  1044. { 0xd3,0x4a, 72}, /* 0xe */
  1045. { 0x29,0x61, 75}, /* 0xf */
  1046. { 0x6d,0x46, 75}, /* 0x10 */
  1047. { 0x41,0x43, 78}, /* 0x11 */
  1048. { 0x31,0x42, 79}, /* 0x12 */
  1049. { 0xab,0x44, 83}, /* 0x13 */
  1050. { 0x46,0x25, 84}, /* 0x14 */
  1051. { 0x78,0x29, 86}, /* 0x15 */
  1052. { 0x62,0x44, 94}, /* 0x16 */
  1053. { 0x2b,0x22,104}, /* 0x17 */
  1054. { 0x49,0x24,105}, /* 0x18 */
  1055. { 0xf8,0x2f,108}, /* 0x19 */
  1056. { 0x3c,0x23,109}, /* 0x1a */
  1057. { 0x5e,0x43,113}, /* 0x1b */
  1058. { 0xbc,0x44,116}, /* 0x1c */
  1059. { 0xe0,0x46,132}, /* 0x1d */
  1060. { 0xd4,0x28,135}, /* 0x1e */
  1061. { 0xea,0x2a,139}, /* 0x1f */
  1062. { 0x41,0x22,157}, /* 0x20 */
  1063. { 0x70,0x24,162}, /* 0x21 */
  1064. { 0x30,0x21,175}, /* 0x22 */
  1065. { 0x4e,0x22,189}, /* 0x23 */
  1066. { 0xde,0x26,194}, /* 0x24 */
  1067. { 0x70,0x07,202}, /* 0x25 */
  1068. { 0x3f,0x03,229}, /* 0x26 */
  1069. { 0xb8,0x06,234}, /* 0x27 */
  1070. { 0x34,0x02,253}, /* 0x28 */
  1071. { 0x58,0x04,255}, /* 0x29 */
  1072. { 0x24,0x01,265}, /* 0x2a */
  1073. { 0x9b,0x02,267}, /* 0x2b */
  1074. { 0x70,0x05,270}, /* 0x2c */
  1075. { 0x25,0x01,272}, /* 0x2d */
  1076. { 0x9c,0x02,277}, /* 0x2e */
  1077. { 0x27,0x01,286}, /* 0x2f */
  1078. { 0x3c,0x02,291}, /* 0x30 */
  1079. { 0xef,0x0a,292}, /* 0x31 */
  1080. { 0xf6,0x0a,310}, /* 0x32 */
  1081. { 0x95,0x01,315}, /* 0x33 */
  1082. { 0xf0,0x09,324}, /* 0x34 */
  1083. { 0xfe,0x0a,331}, /* 0x35 */
  1084. { 0xf3,0x09,332}, /* 0x36 */
  1085. { 0xea,0x08,340}, /* 0x37 */
  1086. { 0xe8,0x07,376}, /* 0x38 */
  1087. { 0xde,0x06,389}, /* 0x39 */
  1088. { 0x52,0x2a, 54}, /* 0x3a */
  1089. { 0x52,0x6a, 27}, /* 0x3b */
  1090. { 0x62,0x24, 70}, /* 0x3c */
  1091. { 0x62,0x64, 70}, /* 0x3d */
  1092. { 0xa8,0x4c, 30}, /* 0x3e */
  1093. { 0x20,0x26, 33}, /* 0x3f */
  1094. { 0x31,0xc2, 39}, /* 0x40 */
  1095. /* TW: 650/LVDS+301 BIOS (@ 0x58a0 in LVDS) new: */
  1096. { 0x2e,0x48, 25}, /* 0x41 */
  1097. { 0x24,0x46, 25}, /* 0x42 */
  1098. { 0x26,0x64, 28}, /* 0x43 */
  1099. { 0x37,0x64, 40}, /* 0x44 */
  1100. { 0xa1,0x42,108}, /* 0x45 */
  1101. { 0x37,0x61,100}, /* 0x46 */
  1102. { 0x78,0x27,108}  /* 0x47 */
  1103. /* --- 0x58bc --- */
  1104. };
  1105. static const UCHAR SiS310_ScreenOffset[]=
  1106.          { 0x14,0x19,0x20,0x28,0x32,0x40,
  1107.            0x50,0x64,0x78,0x80,0x2d,0x35,0x57};  /* TW: Added 1400x1050 offset */
  1108. typedef struct _SiS310_StResInfoStruct
  1109. {
  1110. USHORT HTotal;
  1111. USHORT VTotal;
  1112. } SiS310_StResInfoStruct;
  1113. static const SiS310_StResInfoStruct SiS310_StResInfo[]=
  1114. {
  1115. { 640,400},
  1116. { 640,350},
  1117. { 720,400},
  1118. { 720,350},
  1119. { 640,480}
  1120. };
  1121. typedef struct _SiS310_ModeResInfoStruct
  1122. {
  1123. USHORT HTotal;
  1124. USHORT VTotal;
  1125. UCHAR  XChar;
  1126. UCHAR  YChar;
  1127. } SiS310_ModeResInfoStruct;
  1128. static const SiS310_ModeResInfoStruct SiS310_ModeResInfo[]=
  1129. {
  1130. {  320, 200, 8, 8},   /* 0x00 */
  1131. {  320, 240, 8, 8},   /* 0x01 */
  1132. {  320, 400, 8, 8},   /* 0x02 */
  1133. {  400, 300, 8, 8},   /* 0x03 */
  1134. {  512, 384, 8, 8},   /* 0x04 */
  1135. {  640, 400, 8,16},   /* 0x05 */
  1136. {  640, 480, 8,16},   /* 0x06 */
  1137. {  800, 600, 8,16},   /* 0x07 */
  1138. { 1024, 768, 8,16},   /* 0x08 */
  1139. { 1280,1024, 8,16},   /* 0x09 */
  1140. { 1600,1200, 8,16},   /* 0x0a */
  1141. { 1920,1440, 8,16},   /* 0x0b */
  1142. { 2048,1536, 8,16},   /* 0x0c */
  1143. {  720, 480, 8,16},   /* 0x0d */
  1144. {  720, 576, 8,16},   /* 0x0e */
  1145. { 1280, 960, 8,16},   /* 0x0f */
  1146. {  800, 480, 8,16},   /* 0x10 */
  1147. { 1024, 576, 8,16},   /* 0x11 */
  1148. { 1280, 720, 8,16},   /* 0x12 */
  1149. {  856, 480, 8,16},   /* 0x13 19; TW: New */
  1150. { 1280, 768, 8,16},   /* 0x14 20; TW: New */
  1151. { 1400,1050, 8,16}    /* 0x15 21; TW: New */
  1152. };
  1153. static const UCHAR SiS310_OutputSelect = 0x40;
  1154. static const UCHAR SiS310_SoftSetting  = 0x30;   /* TW: RAM setting */
  1155. static const UCHAR SiS310_SR15[8][4]={
  1156. {0x00,0x04,0x60,0x60},
  1157. {0x0f,0x0f,0x0f,0x0f},
  1158. {0xba,0xba,0xba,0xba},
  1159. {0xa9,0xa9,0xac,0xac},
  1160. {0xa0,0xa0,0xa0,0xa8},
  1161. {0x00,0x00,0x02,0x02},
  1162.   {0x30,0x30,0x40,0x40},
  1163. {0x00,0xa5,0xfb,0xf6}
  1164. };
  1165. #ifndef LINUX_XF86
  1166. static UCHAR SiS310_SR07 = 0x18;
  1167. static const UCHAR SiS310_CR40[5][4]={
  1168. {0x77,0x77,0x33,0x33},
  1169. {0x77,0x77,0x33,0x33},
  1170. {0x00,0x00,0x00,0x00},
  1171. {0x5b,0x5b,0x03,0x03},
  1172. {0x00,0x00,0xf0,0xf8}
  1173. };
  1174. static UCHAR SiS310_CR49[] = {0xaa,0x88};
  1175. static UCHAR SiS310_SR1F = 0x00;
  1176. static UCHAR SiS310_SR21 = 0xa5;
  1177. static UCHAR SiS310_SR22 = 0xfb;
  1178. static UCHAR SiS310_SR23 = 0xf6;
  1179. static UCHAR SiS310_SR24 = 0x0d;
  1180. static UCHAR SiS310_SR25[] = {0x33,0x3};
  1181. static UCHAR SiS310_SR31 = 0x00;
  1182. static UCHAR SiS310_SR32 = 0x11;
  1183. static UCHAR SiS310_SR33 = 0x00;
  1184. static UCHAR SiS310_CRT2Data_1_2  = 0x00;
  1185. static UCHAR SiS310_CRT2Data_4_D  = 0x00;
  1186. static UCHAR SiS310_CRT2Data_4_E  = 0x00;
  1187. static UCHAR SiS310_CRT2Data_4_10 = 0x80;
  1188. static const USHORT SiS310_RGBSenseData    = 0xd1;
  1189. static const USHORT SiS310_VideoSenseData  = 0xb9;
  1190. static const USHORT SiS310_YCSenseData     = 0xb3;
  1191. static const USHORT SiS310_RGBSenseData2   = 0x0190;     /*301b*/
  1192. static const USHORT SiS310_VideoSenseData2 = 0x0174;
  1193. static const USHORT SiS310_YCSenseData2    = 0x016b;
  1194. #endif
  1195. static const UCHAR SiS310_NTSCPhase[]    = {0x21,0xed,0xba,0x08};  /* TW: Was {0x21,0xed,0x8a,0x08}; */
  1196. static const UCHAR SiS310_PALPhase[]     = {0x2a,0x05,0xe3,0x00};  /* TW: Was {0x2a,0x05,0xd3,0x00}; */
  1197. static const UCHAR SiS310_PALMPhase[]    = {0x21,0xE4,0x2E,0x9B};  /* TW: palm*/
  1198. static const UCHAR SiS310_PALNPhase[]    = {0x21,0xF4,0x3E,0xBA};  /* TW: paln*/
  1199. static const UCHAR SiS310_NTSCPhase2[]   = {0x21,0xF0,0x7B,0xD6};
  1200. static const UCHAR SiS310_PALPhase2[]    = {0x2a,0x09,0x86,0xe9};
  1201. static const UCHAR SiS310_PALMPhase2[]   = {0x21,0xE6,0xEF,0xA4};  /* TW: palm 301b*/
  1202. static const UCHAR SiS310_PALNPhase2[]   = {0x21,0xF6,0x94,0x46};  /* TW: paln 301b*/
  1203. static const UCHAR SiS310_SpecialPhase[] = {0x1e,0x8c,0x5c,0x7a};
  1204. typedef struct _SiS310_LCDDataStruct
  1205. {
  1206. USHORT RVBHCMAX;
  1207. USHORT RVBHCFACT;
  1208. USHORT VGAHT;
  1209. USHORT VGAVT;
  1210. USHORT LCDHT;
  1211. USHORT LCDVT;
  1212. } SiS310_LCDDataStruct;
  1213. static const SiS310_LCDDataStruct  SiS310_StLCD1024x768Data[]=
  1214. {
  1215. {   62,  25, 800, 546,1344, 806},
  1216. {   32,  15, 930, 546,1344, 806},
  1217. {   32,  15, 930, 546,1344, 806},
  1218. {  104,  45, 945, 496,1344, 806},
  1219. {   62,  25, 800, 546,1344, 806},
  1220. {   31,  18,1008, 624,1344, 806},
  1221. {    1,   1,1344, 806,1344, 806}
  1222. };
  1223. static const SiS310_LCDDataStruct  SiS310_ExtLCD1024x768Data[] =   /* TW: Checked */
  1224. {
  1225. {   12,   5, 896, 512,1344, 806},
  1226. {   12,   5, 896, 510,1344, 806},
  1227. {   32,  15,1008, 505,1344, 806},
  1228. {   32,  15,1008, 514,1344, 806},
  1229. {   12,   5, 896, 500,1344, 806},
  1230. {   42,  25,1024, 625,1344, 806},
  1231. {    1,   1,1344, 806,1344, 806},
  1232. {   12,   5, 896, 500,1344, 806},
  1233. {   42,  25,1024, 625,1344, 806},
  1234. {    1,   1,1344, 806,1344, 806},
  1235. {   12,   5, 896, 500,1344, 806},
  1236. {   42,  25,1024, 625,1344, 806},
  1237. {    1,   1,1344, 806,1344, 806}
  1238. };
  1239. static const SiS310_LCDDataStruct  SiS310_St2LCD1024x768Data[] =  /* TW: Checked */
  1240. {
  1241. {   62,  25, 800, 546,1344, 806},
  1242. {   32,  15, 930, 546,1344, 806},
  1243. /* {   32,  15, 930, 546,1344, 806},   */
  1244.         {   62,  25, 800, 546,1344, 806},    /* TW: Different in 650/301LV BIOS */
  1245. {  104,  45, 945, 496,1344, 806},
  1246. {   62,  25, 800, 546,1344, 806},
  1247. {   31,  18,1008, 624,1344, 806},
  1248. {    1,   1,1344, 806,1344, 806}
  1249. };
  1250. static const SiS310_LCDDataStruct  SiS310_StLCD1280x1024Data[] =
  1251. {
  1252. {   22,   5, 800, 510,1650,1088},
  1253. {   22,   5, 800, 510,1650,1088},
  1254. {  176,  45, 900, 510,1650,1088},
  1255. {  176,  45, 900, 510,1650,1088},
  1256. {   22,   5, 800, 510,1650,1088},
  1257. {   13,   5,1024, 675,1560,1152},
  1258. {   16,   9,1266, 804,1688,1072},
  1259. {    1,   1,1688,1066,1688,1066}
  1260. };
  1261. static const SiS310_LCDDataStruct  SiS310_ExtLCD1280x1024Data[] =  /* TW: Checked */
  1262. {
  1263. {  211,  60,1024, 501,1688,1066},
  1264. {  211,  60,1024, 508,1688,1066},
  1265. {  211,  60,1024, 501,1688,1066},
  1266. {  211,  60,1024, 508,1688,1066},
  1267. {  211,  60,1024, 500,1688,1066},
  1268. {  211,  75,1024, 625,1688,1066},
  1269. {  211, 120,1280, 798,1688,1066},
  1270. {    1,   1,1688,1066,1688,1066}
  1271. };
  1272. static const SiS310_LCDDataStruct  SiS310_St2LCD1280x1024Data[] =
  1273. {
  1274. {   22,   5, 800, 510,1650,1088},
  1275. {   22,   5, 800, 510,1650,1088},
  1276. {  176,  45, 900, 510,1650,1088},
  1277. {  176,  45, 900, 510,1650,1088},
  1278. {   22,   5, 800, 510,1650,1088},
  1279. {   13,   5,1024, 675,1560,1152},
  1280. {   16,   9,1266, 804,1688,1072},
  1281. {    1,   1,1688,1066,1688,1066}
  1282. };
  1283. static const SiS310_LCDDataStruct  SiS310_NoScaleData1024x768[] =  /* TW: Checked */
  1284. {
  1285.         {    1,   1,1344, 806,1344, 806},
  1286. {    1,   1,1344, 806,1344, 806},
  1287. {    1,   1,1344, 806,1344, 806},
  1288. {    1,   1,1344, 806,1344, 806},
  1289. {    1,   1,1344, 806,1344, 806},
  1290. {    1,   1,1344, 806,1344, 806},
  1291. {    1,   1,1344, 806,1344, 806},
  1292. {    1,   1,1344, 806,1344, 806}
  1293. #if 0
  1294. {    1,   1, 800, 449, 800, 449},
  1295. {    1,   1, 800, 449, 800, 449},
  1296. {    1,   1, 900, 449, 900, 449},
  1297. {    1,   1, 900, 449, 900, 449},
  1298. {    1,   1, 800, 525, 800, 525},
  1299. {    1,   1,1056, 628,1056, 628},
  1300. {    1,   1,1344, 806,1344, 806},
  1301. {    1,   1,1688,1066,1688,1066}
  1302. #endif
  1303. };
  1304. static const SiS310_LCDDataStruct  SiS310_NoScaleData1280x1024[] =  /* TW: New; Checked */
  1305. {
  1306.         {    1,   1,1688,1066,1688,1066},
  1307. {    1,   1,1688,1066,1688,1066},
  1308. {    1,   1,1688,1066,1688,1066},
  1309. {    1,   1,1688,1066,1688,1066},
  1310. {    1,   1,1688,1066,1688,1066},
  1311. {    1,   1,1688,1066,1688,1066},
  1312. {    1,   1,1688,1066,1688,1066},
  1313. {    1,   1,1688,1066,1688,1066}
  1314. };
  1315. static const SiS310_LCDDataStruct  SiS310_LCD1280x960Data[] =
  1316. {
  1317. {    9,   2, 800, 500,1800,1000},
  1318. {    9,   2, 800, 500,1800,1000},
  1319. {    4,   1, 900, 500,1800,1000},
  1320. {    4,   1, 900, 500,1800,1000},
  1321. {    9,   2, 800, 500,1800,1000},
  1322. {   30,  11,1056, 625,1800,1000},
  1323. {    5,   3,1350, 800,1800,1000},
  1324. {    1,   1,1576,1050,1576,1050},
  1325. {    1,   1,1800,1000,1800,1000}
  1326. };
  1327. static const SiS310_LCDDataStruct  SiS310_ExtLCD1400x1050Data[] =  /* TW: New */
  1328. {  /* TODO */
  1329. {    0,   0,   0,   0,   0,   0},
  1330. {    0,   0,   0,   0,   0,   0},
  1331. {    0,   0,   0,   0,   0,   0},
  1332. {    0,   0,   0,   0,   0,   0},
  1333. {    0,   0,   0,   0,   0,   0},
  1334. {    0,   0,   0,   0,   0,   0},
  1335. {    0,   0,   0,   0,   0,   0},
  1336. {    0,   0,   0,   0,   0,   0},
  1337. {    0,   0,   0,   0,   0,   0},
  1338. {    0,   0,   0,   0,   0,   0}
  1339. };
  1340. static const SiS310_LCDDataStruct  SiS310_ExtLCD1600x1200Data[] =  /* TW: New */
  1341. {  /* TODO */
  1342. {    0,   0,   0,   0,   0,   0},
  1343. {    0,   0,   0,   0,   0,   0},
  1344. {    0,   0,   0,   0,   0,   0},
  1345. {    0,   0,   0,   0,   0,   0},
  1346. {    0,   0,   0,   0,   0,   0},
  1347. {    0,   0,   0,   0,   0,   0},
  1348. {    0,   0,   0,   0,   0,   0},
  1349. {    0,   0,   0,   0,   0,   0},
  1350. {    0,   0,   0,   0,   0,   0},
  1351. {    0,   0,   0,   0,   0,   0}
  1352. };
  1353. static const SiS310_LCDDataStruct  SiS310_StLCD1400x1050Data[] =  /* TW: New */
  1354. {  /* TODO */
  1355. {    0,   0,   0,   0,   0,   0},
  1356. {    0,   0,   0,   0,   0,   0},
  1357. {    0,   0,   0,   0,   0,   0},
  1358. {    0,   0,   0,   0,   0,   0},
  1359. {    0,   0,   0,   0,   0,   0},
  1360. {    0,   0,   0,   0,   0,   0},
  1361. {    0,   0,   0,   0,   0,   0},
  1362. {    0,   0,   0,   0,   0,   0},
  1363. {    0,   0,   0,   0,   0,   0},
  1364. {    0,   0,   0,   0,   0,   0}
  1365. };
  1366. static const SiS310_LCDDataStruct  SiS310_StLCD1600x1200Data[] =  /* TW: New */
  1367. {  /* TODO */
  1368. {    0,   0,   0,   0,   0,   0},
  1369. {    0,   0,   0,   0,   0,   0},
  1370. {    0,   0,   0,   0,   0,   0},
  1371. {    0,   0,   0,   0,   0,   0},
  1372. {    0,   0,   0,   0,   0,   0},
  1373. {    0,   0,   0,   0,   0,   0},
  1374. {    0,   0,   0,   0,   0,   0},
  1375. {    0,   0,   0,   0,   0,   0},
  1376. {    0,   0,   0,   0,   0,   0},
  1377. {    0,   0,   0,   0,   0,   0}
  1378. };
  1379. static const SiS310_LCDDataStruct  SiS310_NoScaleData1400x1050[] =  /* TW: New */
  1380. {  /* TODO */
  1381. {    0,   0,   0,   0,   0,   0},
  1382. {    0,   0,   0,   0,   0,   0},
  1383. {    0,   0,   0,   0,   0,   0},
  1384. {    0,   0,   0,   0,   0,   0},
  1385. {    0,   0,   0,   0,   0,   0},
  1386. {    0,   0,   0,   0,   0,   0},
  1387. {    0,   0,   0,   0,   0,   0},
  1388. {    0,   0,   0,   0,   0,   0},
  1389. {    0,   0,   0,   0,   0,   0},
  1390. {    0,   0,   0,   0,   0,   0}
  1391. };
  1392. static const SiS310_LCDDataStruct  SiS310_NoScaleData1600x1200[] =  /* TW: New */
  1393. {  /* TODO */
  1394. {    0,   0,   0,   0,   0,   0},
  1395. {    0,   0,   0,   0,   0,   0},
  1396. {    0,   0,   0,   0,   0,   0},
  1397. {    0,   0,   0,   0,   0,   0},
  1398. {    0,   0,   0,   0,   0,   0},
  1399. {    0,   0,   0,   0,   0,   0},
  1400. {    0,   0,   0,   0,   0,   0},
  1401. {    0,   0,   0,   0,   0,   0},
  1402. {    0,   0,   0,   0,   0,   0},
  1403. {    0,   0,   0,   0,   0,   0}
  1404. };
  1405. typedef struct _SiS310_TVDataStruct
  1406. {
  1407. USHORT RVBHCMAX;
  1408. USHORT RVBHCFACT;
  1409. USHORT VGAHT;
  1410. USHORT VGAVT;
  1411. USHORT TVHDE;
  1412. USHORT TVVDE;
  1413. USHORT RVBHRS;
  1414. UCHAR FlickerMode;
  1415. USHORT HALFRVBHRS;
  1416. UCHAR RY1COE;
  1417. UCHAR RY2COE;
  1418. UCHAR RY3COE;
  1419. UCHAR RY4COE;
  1420. } SiS310_TVDataStruct;
  1421. static const SiS310_TVDataStruct  SiS310_StPALData[]=
  1422. {
  1423.  {    1,   1, 864, 525,1270, 400, 100,   0, 760,0xf4,0xff,0x1c,0x22},
  1424.  {    1,   1, 864, 525,1270, 350, 100,   0, 760,0xf4,0xff,0x1c,0x22},
  1425.  {    1,   1, 864, 525,1270, 400,   0,   0, 720,0xf1,0x04,0x1f,0x18},
  1426.  {    1,   1, 864, 525,1270, 350,   0,   0, 720,0xf4,0x0b,0x1c,0x0a},
  1427.  {    1,   1, 864, 525,1270, 480,  50,   0, 760,0xf4,0xff,0x1c,0x22},
  1428.  {    1,   1, 864, 525,1270, 600,  50,   0,   0,0xf4,0xff,0x1c,0x22}
  1429. };
  1430. static const SiS310_TVDataStruct  SiS310_ExtPALData[]=
  1431. {
  1432.  {   27,  10, 848, 448,1270, 530,  50,   0,  50,0xf4,0xff,0x1c,0x22},
  1433.  {  108,  35, 848, 398,1270, 530,  50,   0,  50,0xf4,0xff,0x1c,0x22},
  1434.  {   12,   5, 954, 448,1270, 530,  50,   0,  50,0xf1,0x04,0x1f,0x18},
  1435.  {    9,   4, 960, 463,1644, 438,  50,   0,  50,0xf4,0x0b,0x1c,0x0a},
  1436.  {    9,   4, 848, 528,1270, 530,   0,   0,  50,0xf5,0xfb,0x1b,0x2a},
  1437.  {   36,  25,1060, 648,1316, 530, 438,   0, 438,0xeb,0x05,0x25,0x16},  /* 800x600 */
  1438.  {    3,   2,1080, 619,1270, 540, 438,   0, 438,0xf3,0x00,0x1d,0x20},
  1439.  {    1,   1,1170, 821,1270, 520, 686,   0, 686,0xF3,0x00,0x1D,0x20}     /*301b*/
  1440. };
  1441. static const SiS310_TVDataStruct  SiS310_StNTSCData[]=
  1442. {
  1443.  {    1,   1, 858, 525,1270, 400,  50,   0, 760,0xf1,0x04,0x1f,0x18},
  1444.  {    1,   1, 858, 525,1270, 350,  50,   0, 640,0xf1,0x04,0x1f,0x18},
  1445.  {    1,   1, 858, 525,1270, 400,   0,   0, 720,0xf1,0x04,0x1f,0x18},
  1446.  {    1,   1, 858, 525,1270, 350,   0,   0, 720,0xf4,0x0b,0x1c,0x0a},
  1447.  {    1,   1, 858, 525,1270, 480,   0,   0, 760,0xf1,0x04,0x1f,0x18}
  1448. };
  1449. static const SiS310_TVDataStruct  SiS310_ExtNTSCData[]=
  1450. {
  1451.  {  143,  65, 858, 443,1270, 440, 171,   0, 171,0xf1,0x04,0x1f,0x18},
  1452.  {   88,  35, 858, 393,1270, 440, 171,   0, 171,0xf1,0x04,0x1f,0x18},
  1453.  {  143,  70, 924, 443,1270, 440,  92,   0,  92,0xf1,0x04,0x1f,0x18},
  1454.  {  143,  70, 924, 393,1270, 440,  92,   0,  92,0xf4,0x0b,0x1c,0x0a},
  1455.  {  143,  76, 836, 523,1270, 440, 224,   0,   0,0xf1,0x05,0x1f,0x16},
  1456.  {  143, 120,1056, 643,1270, 440,   0, 128,   0,0xf4,0x10,0x1c,0x00},  /* 800x600 */
  1457.  {    2,   1, 858, 503,1270, 480,   0, 128,   0,0xee,0x0c,0x22,0x08},
  1458.  {   65,  64,1056, 791,1270, 480, 638,   0,   0,0xEE,0x0C,0x22,0x08} /*301b*/     
  1459. };
  1460. /* TW: These tables will need data ! */
  1461. static const SiS310_TVDataStruct  SiS310_St1HiTVData[]=
  1462. {
  1463.     {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
  1464. };
  1465. static const SiS310_TVDataStruct  SiS310_St2HiTVData[]=
  1466. {
  1467. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
  1468. };
  1469. static const SiS310_TVDataStruct  SiS310_ExtHiTVData[]=
  1470. {
  1471. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
  1472. };
  1473. static const UCHAR SiS310_NTSCTiming[] = {   /* TW: New (checked 1.09, 1.10.6s) */
  1474. 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
  1475. 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
  1476. 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
  1477. 0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17,
  1478. 0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02,
  1479. 0x03,0x0a,0x65,0x9d,0x08,0x92,0x8f,0x40,
  1480. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x50,
  1481. 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
  1482. };
  1483. static const UCHAR SiS310_PALTiming[] = {   /* TW: New (checked 1.09, 1.10.6s) */
  1484. 0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70,
  1485. 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d,
  1486. 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b,
  1487. 0x70,0x50,0x00,0x9b,0x00,0xd9,0x5d,0x17,
  1488. 0x7d,0x05,0x45,0x00,0x00,0xe8,0x00,0x02,
  1489. 0x0d,0x00,0x68,0xb0,0x0b,0x92,0x8f,0x40,
  1490. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x63,
  1491. 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00
  1492. };
  1493. #ifdef oldHV
  1494. static const UCHAR SiS310_HiTVExtTiming[] = {   /* TW: New */
  1495.         0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
  1496. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  1497. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  1498. 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
  1499. 0x2a,0xde,0x2a,0x44,0x40,0x2a,0x44,0x40,
  1500. 0x8e,0x8e,0x82,0x07,0x0b,0x92,0x0f,0x40,
  1501. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x3d,
  1502. 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
  1503. };
  1504. static const UCHAR SiS310_HiTVSt1Timing[] = {   /* TW: New */
  1505.         0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
  1506. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  1507. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  1508. 0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03,
  1509. 0x11,0x15,0x11,0xcf,0x10,0x11,0xcf,0x10,
  1510. 0x35,0x35,0x3b,0x69,0x1d,0x92,0x0f,0x40,
  1511. 0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x86,
  1512. 0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00
  1513. };
  1514. static const UCHAR SiS310_HiTVSt2Timing[] = {   /* TW: New */
  1515.         0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
  1516. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  1517. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  1518. 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
  1519. 0x2a,0xde,0x2a,0x44,0x40,0x2a,0x44,0x40,
  1520. 0x8e,0x8e,0x82,0x07,0x0b,0x92,0x0f,0x40,
  1521. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x3d,
  1522. 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
  1523. };
  1524. static const UCHAR SiS310_HiTVTextTiming[] = {   /* TW: New */
  1525.         0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
  1526. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  1527. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  1528. 0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03,
  1529. 0x14,0x78,0x14,0x08,0x20,0x14,0x08,0x20,
  1530. 0xc8,0xc8,0x3b,0xd2,0x26,0x92,0x0f,0x40,
  1531.         0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x96,
  1532. 0x72,0x5c,0x11,0x00,0xfc,0xff,0x32,0x00
  1533. };
  1534. static const UCHAR SiS310_HiTVGroup3Data[] = {   /* TW: New */
  1535.         0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f,
  1536. 0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6,
  1537. 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
  1538. 0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44,
  1539. 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
  1540. 0x4f,0x7f,0x03,0xa8,0x7d,0x20,0x1a,0xa9,
  1541. 0x14,0x05,0x03,0x7e,0x64,0x31,0x14,0x75,
  1542. 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
  1543. };
  1544. static const UCHAR SiS310_HiTVGroup3Simu[] = {   /* TW: New */
  1545.         0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95,
  1546. 0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6,
  1547. 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
  1548. 0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11,
  1549. 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
  1550. 0x67,0x36,0x01,0x47,0x0e,0x10,0xbe,0xb4,
  1551. 0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
  1552. 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
  1553. };
  1554. static const UCHAR SiS310_HiTVGroup3Text[] = {   /* TW: New */
  1555.         0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7,
  1556. 0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6,
  1557. 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
  1558. 0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22,
  1559. 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
  1560. 0x93,0x3c,0x01,0x50,0x2f,0x10,0xf4,0xca,
  1561. 0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
  1562. 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
  1563. };
  1564. #endif
  1565. typedef struct _SiS310_PanelDelayTblStruct
  1566. {
  1567.   UCHAR timer[2];
  1568. } SiS310_PanelDelayTblStruct;
  1569. static const SiS310_PanelDelayTblStruct SiS310_PanelDelayTbl[]=  /* TW: New */
  1570. {
  1571.         {{0x10,0x40}}, /* TW: from 650/301LVx 1.10.6s BIOS */
  1572. {{0x10,0x40}},
  1573. {{0x10,0x40}},
  1574. {{0x10,0x40}},
  1575. {{0x10,0x40}},
  1576. {{0x10,0x40}},
  1577. {{0x10,0x40}},
  1578. {{0x10,0x40}},
  1579. {{0x10,0x40}},
  1580. {{0x10,0x40}},
  1581. {{0x10,0x40}},
  1582. {{0x10,0x40}},
  1583. {{0x10,0x40}},
  1584. {{0x10,0x40}},
  1585. {{0x10,0x40}},
  1586. {{0x10,0x40}}
  1587. #if 0
  1588. {{0x28,0xc8}}, /* TW: from 650/301LV BIOS */
  1589. {{0x28,0xc8}},
  1590. {{0x28,0xc8}},
  1591. {{0x28,0xc8}},
  1592. {{0x28,0xc8}},
  1593. {{0x28,0xc8}},
  1594. {{0x28,0xc8}},
  1595. {{0x28,0xc8}},
  1596. {{0x28,0xc8}},
  1597. {{0x28,0xc8}},
  1598. {{0x28,0xc8}},
  1599. {{0x28,0xc8}},
  1600. {{0x28,0xc8}},
  1601. {{0x28,0xc8}},
  1602. {{0x28,0xc8}},
  1603. {{0x28,0xc8}}
  1604. #endif
  1605. };
  1606. static const SiS310_PanelDelayTblStruct SiS310_PanelDelayTblLVDS[]=
  1607. {
  1608. {{0x28,0xc8}},
  1609. {{0x28,0xc8}},
  1610. {{0x28,0xc8}},
  1611. {{0x28,0xc8}},
  1612. {{0x28,0xc8}},
  1613. {{0x28,0xc8}},
  1614. {{0x28,0xc8}},
  1615. {{0x28,0xc8}},
  1616. {{0x28,0xc8}},
  1617. {{0x28,0xc8}},
  1618. {{0x28,0xc8}},
  1619. {{0x28,0xc8}},
  1620. {{0x28,0xc8}},
  1621. {{0x28,0xc8}},
  1622. {{0x28,0xc8}},
  1623. {{0x28,0xc8}}
  1624. };
  1625. typedef struct _SiS310_LVDSDataStruct
  1626. {
  1627. USHORT VGAHT;
  1628. USHORT VGAVT;
  1629. USHORT LCDHT;
  1630. USHORT LCDVT;
  1631. } SiS310_LVDSDataStruct;
  1632. static const SiS310_LVDSDataStruct  SiS310_LVDS320x480Data_1[]=
  1633. {
  1634. {848, 433,400, 525},
  1635. {848, 389,400, 525},
  1636. {848, 433,400, 525},
  1637. {848, 389,400, 525},
  1638. {848, 518,400, 525},
  1639. {1056,628,400, 525},
  1640. {400, 525,400, 525},
  1641. {800, 449,1000, 644},
  1642. {800, 525,1000, 635}
  1643. };
  1644. static const SiS310_LVDSDataStruct  SiS310_LVDS800x600Data_1[]=   /* TW: New */
  1645. {
  1646. {848, 433,1060, 629},
  1647. {848, 389,1060, 629},
  1648. {848, 433,1060, 629},
  1649. {848, 389,1060, 629},
  1650. {848, 518,1060, 629},
  1651. {1056, 628,1056, 628},
  1652. {1056, 628,1056, 628},
  1653. {800, 449,1000, 644},
  1654. {800, 525,1000, 635}
  1655. };
  1656. static const SiS310_LVDSDataStruct  SiS310_LVDS800x600Data_2[]=   /* TW: New */
  1657. {
  1658. {1056, 628,1056, 628},
  1659. {1056, 628,1056, 628},
  1660. {1056, 628,1056, 628},
  1661. {1056, 628,1056, 628},
  1662. {1056, 628,1056, 628},
  1663. {1056, 628,1056, 628},
  1664. {1056, 628,1056, 628},
  1665. {800, 449,1000, 644},
  1666. {800, 525,1000, 635}
  1667. };
  1668. static const SiS310_LVDSDataStruct  SiS310_LVDS1024x768Data_1[]=   /* TW: New */
  1669. {
  1670. {840, 438,1344, 806},
  1671. {840, 409,1344, 806},
  1672. {840, 438,1344, 806},
  1673. {840, 409,1344, 806},
  1674. {840, 518,1344, 806},    /* 640x480 */
  1675. {1050, 638,1344, 806},   /* 800x600 */
  1676. {1344, 806,1344, 806},   /* 1024x768 */
  1677. {800, 449,1280, 801},
  1678. {800, 525,1280, 813}
  1679. };
  1680. static const SiS310_LVDSDataStruct  SiS310_LVDS1024x768Data_2[]=   /* TW: New */
  1681. {
  1682. {1344, 806,1344, 806},
  1683. {1344, 806,1344, 806},
  1684. {1344, 806,1344, 806},
  1685. {1344, 806,1344, 806},
  1686. {1344, 806,1344, 806},
  1687. {1344, 806,1344, 806},
  1688. {1344, 806,1344, 806},
  1689. {800, 449,1280, 801},
  1690. {800, 525,1280, 813}
  1691. };
  1692. static const SiS310_LVDSDataStruct  SiS310_LVDS1280x1024Data_1[]=   /* TW: New */
  1693. {
  1694. {840, 438,1344, 806},
  1695. {840, 409,1344, 806},
  1696. {840, 438,1344, 806},
  1697. {840, 409,1344, 806},
  1698. {840, 518,1344, 806},
  1699. {1050, 638,1344, 806},
  1700. {1344, 806,1344, 806},
  1701. {800, 449,1280, 801},
  1702. {800, 525,1280, 813}
  1703. };
  1704. static const SiS310_LVDSDataStruct  SiS310_LVDS1280x1024Data_2[]=   /* TW: New */
  1705. {
  1706. {1344, 806,1344, 806},
  1707. {1344, 806,1344, 806},
  1708. {1344, 806,1344, 806},
  1709. {1344, 806,1344, 806},
  1710. {1344, 806,1344, 806},
  1711. {1344, 806,1344, 806},
  1712. {1344, 806,1344, 806},
  1713. {800, 449,1280, 801},
  1714. {800, 525,1280, 813}
  1715. };
  1716. static const SiS310_LVDSDataStruct  SiS310_LVDS1400x1050Data_1[]=   /* TW: New */
  1717. {
  1718.         {928, 416, 1688, 1066},
  1719. {928, 366, 1688, 1066},
  1720. {928, 416, 1688, 1066},
  1721. {928, 366, 1688, 1066},
  1722. {928, 496, 1688, 1066},
  1723. {1088, 616, 1688, 1066},
  1724. {1312, 784, 1688, 1066},
  1725. {1568, 1040, 1688, 1066},
  1726. {1688, 1066, 1688, 1066}
  1727. };
  1728. static const SiS310_LVDSDataStruct  SiS310_LVDS1400x1050Data_2[]=   /* TW: New */
  1729. {
  1730.         {1688,1066, 1688,1066},
  1731. {1688,1066, 1688,1066},
  1732. {1688,1066, 1688,1066},
  1733. {1688,1066, 1688,1066},
  1734. {1688,1066, 1688,1066},
  1735. {1688,1066, 1688,1066},
  1736. {1688,1066, 1688,1066},
  1737. {1688,1066, 1688,1066},
  1738. {1688,1066, 1688,1066},
  1739. };
  1740. /* TW: New: - from 300 series */
  1741. static const SiS310_LVDSDataStruct  SiS310_LVDS1024x600Data_1[]=
  1742. {
  1743. {840, 604,1344, 800},
  1744. {840, 560,1344, 800},
  1745. {840, 604,1344, 800},
  1746. {840, 560,1344, 800},
  1747. {840, 689,1344, 800},
  1748. {1050, 800,1344, 800},
  1749. {1344, 800,1344, 800},
  1750. {800, 449,1280, 801},
  1751. {800, 525,1280, 813}
  1752. };
  1753. /* TW: New: - from 300 series */
  1754. static const SiS310_LVDSDataStruct  SiS310_LVDS1024x600Data_2[]=
  1755. {
  1756. {1344, 800,1344, 800},
  1757. {1344, 800,1344, 800},
  1758. {1344, 800,1344, 800},
  1759. {1344, 800,1344, 800},
  1760. {1344, 800,1344, 800},
  1761. {1344, 800,1344, 800},
  1762. {1344, 800,1344, 800},
  1763. {800, 449,1280, 801},
  1764. {800, 525,1280, 813}
  1765. };
  1766. /* TW: New: - from 300 series */
  1767. static const SiS310_LVDSDataStruct  SiS310_LVDS1152x768Data_1[]=
  1768. {
  1769. {840, 438,1344, 806},
  1770. {840, 409,1344, 806},
  1771. {840, 438,1344, 806},
  1772. {840, 409,1344, 806},
  1773. {840, 518,1344, 806},
  1774. {1050, 638,1344, 806},
  1775. {1344, 806,1344, 806},
  1776. {800, 449,1280, 801},
  1777. {800, 525,1280, 813}
  1778. };
  1779. /* TW: New: - from 300 series */
  1780. static const SiS310_LVDSDataStruct  SiS310_LVDS1152x768Data_2[]=
  1781. {
  1782. {1344, 806,1344, 806},
  1783. {1344, 806,1344, 806},
  1784. {1344, 806,1344, 806},
  1785. {1344, 806,1344, 806},
  1786. {1344, 806,1344, 806},
  1787. {1344, 806,1344, 806},
  1788. {1344, 806,1344, 806},
  1789. {800, 449,1280, 801},
  1790. {800, 525,1280, 813}
  1791. };
  1792. /* TW: New in 650/LVDS BIOS - pass 1:1 data */
  1793. static const SiS310_LVDSDataStruct  SiS310_LVDSXXXxXXXData_1[]=   /* TW: New */
  1794. {
  1795.         { 800, 449, 800, 449},
  1796. { 800, 449, 800, 449},
  1797. { 900, 449, 900, 449},
  1798. { 900, 449, 900, 449},
  1799. { 800, 525, 800, 525},
  1800. {1056, 628,1056, 628},
  1801. {1344, 806,1344, 806},
  1802. {1688, 806,1688, 806}
  1803. };
  1804. static const SiS310_LVDSDataStruct  SiS310_LVDS640x480Data_1[]=   /* TW: New */
  1805. {
  1806. {800, 449, 800, 449},
  1807. {800, 449, 800, 449},
  1808. {800, 449, 800, 449},
  1809. {800, 449, 800, 449},
  1810. {800, 525, 800, 525},
  1811. {1056, 628,1056, 628},
  1812. {1056, 628,1056, 628},
  1813. {1056, 628,1056, 628},
  1814. {1056, 628,1056, 628}
  1815. };
  1816. static const SiS310_LVDSDataStruct  SiS310_LVDS1280x960Data_1[]=   /* TW: New */
  1817. {
  1818. {840, 438,1344, 806},
  1819. {840, 409,1344, 806},
  1820. {840, 438,1344, 806},
  1821. {840, 409,1344, 806},
  1822. {840, 518,1344, 806},
  1823. {1050, 638,1344, 806},
  1824. {1344, 806,1344, 806},
  1825. {800, 449,1280, 801},
  1826. {800, 525,1280, 813}
  1827. };
  1828. static const SiS310_LVDSDataStruct  SiS310_LVDS1280x960Data_2[]=   /* TW: New */
  1829. {
  1830. {1344, 806,1344, 806},
  1831. {1344, 806,1344, 806},
  1832. {1344, 806,1344, 806},
  1833. {1344, 806,1344, 806},
  1834. {1344, 806,1344, 806},
  1835. {1344, 806,1344, 806},
  1836. {1344, 806,1344, 806},
  1837. {800, 449,1280, 801},
  1838. {800, 525,1280, 813}
  1839. };
  1840. static const SiS310_LVDSDataStruct  SiS310_LCDA1400x1050Data_1[]=   /* TW: New */
  1841. { /* TW: Might be temporary (invalid) data */
  1842.         {928, 416, 1688, 1066},
  1843. {928, 366, 1688, 1066},
  1844. {1008, 416, 1688, 1066},
  1845. {1008, 366, 1688, 1066},
  1846. {1200, 530, 1688, 1066},
  1847. {1088, 616, 1688, 1066},
  1848. {1312, 784, 1688, 1066},
  1849. {1568, 1040, 1688, 1066},
  1850. {1688, 1066, 1688, 1066}
  1851. };
  1852. static const SiS310_LVDSDataStruct  SiS310_LCDA1400x1050Data_2[]=   /* TW: New */
  1853. { /* TW: Temporary data. Not valid */
  1854. {1344, 806,1344, 806},
  1855. {1344, 806,1344, 806},
  1856. {1344, 806,1344, 806},
  1857. {1344, 806,1344, 806},
  1858. {1344, 806,1344, 806},
  1859. {1344, 806,1344, 806},
  1860. {1344, 806,1344, 806},
  1861. {800, 449,1280, 801},
  1862. {800, 525,1280, 813}
  1863. };
  1864. static const SiS310_LVDSDataStruct  SiS310_LCDA1600x1200Data_1[]=   /* TW: New */
  1865. { /* TW: Temporary data. Not valid */
  1866. {1344, 806,1344, 806},
  1867. {1344, 806,1344, 806},
  1868. {1344, 806,1344, 806},
  1869. {1344, 806,1344, 806},
  1870. {1344, 806,1344, 806},
  1871. {1344, 806,1344, 806},
  1872. {1344, 806,1344, 806},
  1873. {800, 449,1280, 801},
  1874. {800, 525,1280, 813}
  1875. };
  1876. static const SiS310_LVDSDataStruct  SiS310_LCDA1600x1200Data_2[]=   /* TW: New */
  1877. { /* TW: Temporary data. Not valid */
  1878. {0, 0, 0, 0},
  1879. {0, 0, 0, 0},
  1880. {0, 0, 0, 0},
  1881. {0, 0, 0, 0},
  1882. {0, 0, 0, 0},
  1883. {0, 0, 0, 0},
  1884. {0, 0, 0, 0},
  1885. {0, 0, 0, 0},
  1886. {0, 0, 0, 0},
  1887. {0, 0, 0, 0},
  1888. {0, 0, 0, 0},
  1889. {0, 0, 0, 0}
  1890. };
  1891. static const SiS310_LVDSDataStruct  SiS310_CHTVUNTSCData[]=   /* TW: New */
  1892. {
  1893. { 840, 600, 840, 600},
  1894. { 840, 600, 840, 600},
  1895. { 840, 600, 840, 600},
  1896. { 840, 600, 840, 600},
  1897. { 784, 600, 784, 600},
  1898. {1064, 750,1064, 750},
  1899.         {1160, 945,1160, 945}           /* TW: For Ch7019 1024 */
  1900. };
  1901. static const SiS310_LVDSDataStruct  SiS310_CHTVONTSCData[]=   /* TW: New */
  1902. {
  1903. { 840, 525, 840, 525},
  1904. { 840, 525, 840, 525},
  1905. { 840, 525, 840, 525},
  1906. { 840, 525, 840, 525},
  1907. { 784, 525, 784, 525},
  1908. {1040, 700,1040, 700},
  1909.         {1160, 840,1160, 840}           /* TW: For Ch7019 1024 */
  1910. };
  1911. static const SiS310_LVDSDataStruct  SiS310_CHTVUPALData[]=   /* TW: New */
  1912. {
  1913. {1008, 625,1008, 625},
  1914. {1008, 625,1008, 625},
  1915. {1008, 625,1008, 625},
  1916. {1008, 625,1008, 625},
  1917. { 840, 625, 840, 625},
  1918. { 960, 750, 960, 750},
  1919. {1400,1000,1400,1000}    /*  TW: For Ch7019 1024 */
  1920. };
  1921. static const SiS310_LVDSDataStruct  SiS310_CHTVOPALData[]=   /* TW: New */
  1922. {
  1923. {1008, 625,1008, 625},
  1924. {1008, 625,1008, 625},
  1925. {1008, 625,1008, 625},
  1926. {1008, 625,1008, 625},
  1927. { 840, 625, 840, 625},
  1928. { 944, 625, 944, 625},
  1929.         {1400, 875,1400, 875}        /*  TW: For Ch7019 1024 */
  1930. };
  1931. typedef struct _SiS310_LVDSDesStruct
  1932. {
  1933. USHORT LCDHDES;
  1934. USHORT LCDVDES;
  1935. } SiS310_LVDSDesStruct;
  1936. /* TW: PanelType arrays taken from 650/LVDS BIOS 1.10.0 */
  1937. static const SiS310_LVDSDesStruct  SiS310_PanelType00_1[]=   /* TW: New */
  1938. {
  1939. { 0, 0},
  1940. { 0, 0},
  1941. { 0, 0},
  1942. { 0, 0},
  1943. { 0, 0},
  1944. { 0, 0},
  1945. { 0, 0},
  1946. { 0, 0},
  1947. { 0, 0}
  1948. };
  1949. static const SiS310_LVDSDesStruct  SiS310_PanelType01_1[]=   /* TW: New */
  1950. {
  1951. { 0, 0},
  1952. { 0, 0},
  1953. { 0, 0},
  1954. { 0, 0},
  1955. { 0, 0},
  1956. { 0, 0},
  1957. { 0, 805},
  1958. { 0, 0},
  1959. { 0, 0}
  1960. };
  1961. static const SiS310_LVDSDesStruct  SiS310_PanelType02_1[]=   /* TW: New */
  1962. {
  1963. { 0, 0},
  1964. { 0, 0},
  1965. { 0, 0},
  1966. { 0, 0},
  1967. { 0, 0},
  1968. { 0, 0},
  1969. { 0, 0},
  1970. { 0, 1065},
  1971. { 0, 0},
  1972. { 0, 0}
  1973. };
  1974. static const SiS310_LVDSDesStruct  SiS310_PanelType03_1[]=   /* TW: New */
  1975. {
  1976. { 0, 0},
  1977. { 0, 0},
  1978. { 0, 0},
  1979. { 0, 0},
  1980. { 0, 0},
  1981. { 0, 0},
  1982. { 0, 0},
  1983. { 0, 0},
  1984. { 0, 0}
  1985. };
  1986. static const SiS310_LVDSDesStruct  SiS310_PanelType04_1[]=   /* TW: New */
  1987. {
  1988. {1343, 798},
  1989. {1343, 794},
  1990. {1343, 798},
  1991. {1343, 794},
  1992. {1343,   0},
  1993. {1343,   0},
  1994. { 0, 805},
  1995. { 0, 794},
  1996. { 0,   0}
  1997. };
  1998. static const SiS310_LVDSDesStruct  SiS310_PanelType05_1[]=   /* TW: New */
  1999. {
  2000. {1343, 798},
  2001. {1343, 794},
  2002. {1343, 798},
  2003. {1343, 794},
  2004. {1343,   0},
  2005. {1343,   0},
  2006. { 0, 805},
  2007. { 0, 794},
  2008. { 0,   0}
  2009. };
  2010. static const SiS310_LVDSDesStruct  SiS310_PanelType06_1[]=   /* TW: New */
  2011. {
  2012. {1343, 798},
  2013. {1343, 794},
  2014. {1343, 798},
  2015. {1343, 794},
  2016. {1343,   0},
  2017. {1343,   0},
  2018. { 0, 805},
  2019. { 0, 794},
  2020. { 0,   0}
  2021. };
  2022. static const SiS310_LVDSDesStruct  SiS310_PanelType07_1[]=   /* TW: New */
  2023. {
  2024. {1343, 798},
  2025. {1343, 794},
  2026. {1343, 798},
  2027. {1343, 794},
  2028. {1343,   0},
  2029. {1343,   0},
  2030. { 0, 805},
  2031. { 0, 794},
  2032. { 0,   0}
  2033. };
  2034. static const SiS310_LVDSDesStruct  SiS310_PanelType08_1[]=   /* TW: New */
  2035. {
  2036. { 0, 0},
  2037. { 0, 0},
  2038. { 0, 0},
  2039. { 0, 0},
  2040. { 0, 0},
  2041. { 0, 0},
  2042. { 0, 0},
  2043. { 0, 0},
  2044. { 0, 0},
  2045. { 0, 0},
  2046. { 0, 0}
  2047. };
  2048. static const SiS310_LVDSDesStruct  SiS310_PanelType09_1[]=   /* TW: New */
  2049. {
  2050. { 0, 448},
  2051. { 0, 448},
  2052. { 0, 448},
  2053. { 0, 448},
  2054. { 0, 524},
  2055. { 0, 627},
  2056. { 0, 805},
  2057. { 0, 805},
  2058. };