init.h 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542
  1. /* $XFree86$ */
  2. /* $XdotOrg$ */
  3. /*
  4. * Data and prototypes for init.c
  5. *
  6. * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
  7. *
  8. * If distributed as part of the Linux kernel, the following license terms
  9. * apply:
  10. *
  11. * * This program is free software; you can redistribute it and/or modify
  12. * * it under the terms of the GNU General Public License as published by
  13. * * the Free Software Foundation; either version 2 of the named License,
  14. * * or any later version.
  15. * *
  16. * * This program is distributed in the hope that it will be useful,
  17. * * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * * GNU General Public License for more details.
  20. * *
  21. * * You should have received a copy of the GNU General Public License
  22. * * along with this program; if not, write to the Free Software
  23. * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
  24. *
  25. * Otherwise, the following license terms apply:
  26. *
  27. * * Redistribution and use in source and binary forms, with or without
  28. * * modification, are permitted provided that the following conditions
  29. * * are met:
  30. * * 1) Redistributions of source code must retain the above copyright
  31. * * notice, this list of conditions and the following disclaimer.
  32. * * 2) Redistributions in binary form must reproduce the above copyright
  33. * * notice, this list of conditions and the following disclaimer in the
  34. * * documentation and/or other materials provided with the distribution.
  35. * * 3) The name of the author may not be used to endorse or promote products
  36. * * derived from this software without specific prior written permission.
  37. * *
  38. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  39. * * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  40. * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  41. * * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  42. * * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  43. * * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  44. * * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  45. * * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  46. * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  47. * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  48. *
  49. * Author: Thomas Winischhofer <thomas@winischhofer.net>
  50. *
  51. */
  52. #ifndef _INIT_H_
  53. #define _INIT_H_
  54. #include "initdef.h"
  55. #include "vgatypes.h"
  56. #include "vstruct.h"
  57. #ifdef SIS_CP
  58. #undef SIS_CP
  59. #endif
  60. #include <linux/types.h>
  61. #include <asm/io.h>
  62. #include <linux/fb.h>
  63. #include "sis.h"
  64. #include <video/sisfb.h>
  65. /* Mode numbers */
  66. static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f};
  67. static const unsigned short ModeIndex_320x240[] = {0x50, 0x56, 0x00, 0x53};
  68. static const unsigned short ModeIndex_320x240_FSTN[] = {0x5a, 0x5b, 0x00, 0x00}; /* FSTN */
  69. static const unsigned short ModeIndex_400x300[] = {0x51, 0x57, 0x00, 0x54};
  70. static const unsigned short ModeIndex_512x384[] = {0x52, 0x58, 0x00, 0x5c};
  71. static const unsigned short ModeIndex_640x400[] = {0x2f, 0x5d, 0x00, 0x5e};
  72. static const unsigned short ModeIndex_640x480[] = {0x2e, 0x44, 0x00, 0x62};
  73. static const unsigned short ModeIndex_720x480[] = {0x31, 0x33, 0x00, 0x35};
  74. static const unsigned short ModeIndex_720x576[] = {0x32, 0x34, 0x00, 0x36};
  75. static const unsigned short ModeIndex_768x576[] = {0x5f, 0x60, 0x00, 0x61};
  76. static const unsigned short ModeIndex_800x480[] = {0x70, 0x7a, 0x00, 0x76};
  77. static const unsigned short ModeIndex_800x600[] = {0x30, 0x47, 0x00, 0x63};
  78. static const unsigned short ModeIndex_848x480[] = {0x39, 0x3b, 0x00, 0x3e};
  79. static const unsigned short ModeIndex_856x480[] = {0x3f, 0x42, 0x00, 0x45};
  80. static const unsigned short ModeIndex_960x540[] = {0x1d, 0x1e, 0x00, 0x1f}; /* 315 series only */
  81. static const unsigned short ModeIndex_960x600[] = {0x20, 0x21, 0x00, 0x22}; /* 315 series only */
  82. static const unsigned short ModeIndex_1024x768[] = {0x38, 0x4a, 0x00, 0x64};
  83. static const unsigned short ModeIndex_1024x576[] = {0x71, 0x74, 0x00, 0x77};
  84. static const unsigned short ModeIndex_1024x600[] = {0x20, 0x21, 0x00, 0x22}; /* 300 series only */
  85. static const unsigned short ModeIndex_1280x1024[] = {0x3a, 0x4d, 0x00, 0x65};
  86. static const unsigned short ModeIndex_1280x960[] = {0x7c, 0x7d, 0x00, 0x7e};
  87. static const unsigned short ModeIndex_1152x768[] = {0x23, 0x24, 0x00, 0x25}; /* 300 series only */
  88. static const unsigned short ModeIndex_1152x864[] = {0x29, 0x2a, 0x00, 0x2b};
  89. static const unsigned short ModeIndex_300_1280x768[] = {0x55, 0x5a, 0x00, 0x5b};
  90. static const unsigned short ModeIndex_310_1280x768[] = {0x23, 0x24, 0x00, 0x25};
  91. static const unsigned short ModeIndex_1280x720[] = {0x79, 0x75, 0x00, 0x78};
  92. static const unsigned short ModeIndex_1280x800[] = {0x14, 0x15, 0x00, 0x16};
  93. static const unsigned short ModeIndex_1280x854[] = {0x1a, 0x1b, 0x00, 0x1c};
  94. static const unsigned short ModeIndex_1360x768[] = {0x48, 0x4b, 0x00, 0x4e};
  95. static const unsigned short ModeIndex_300_1360x1024[]= {0x67, 0x6f, 0x00, 0x72}; /* 300 series, BARCO only */
  96. static const unsigned short ModeIndex_1400x1050[] = {0x26, 0x27, 0x00, 0x28}; /* 315 series only */
  97. static const unsigned short ModeIndex_1680x1050[] = {0x17, 0x18, 0x00, 0x19}; /* 315 series only */
  98. static const unsigned short ModeIndex_1600x1200[] = {0x3c, 0x3d, 0x00, 0x66};
  99. static const unsigned short ModeIndex_1920x1080[] = {0x2c, 0x2d, 0x00, 0x73}; /* 315 series only */
  100. static const unsigned short ModeIndex_1920x1440[] = {0x68, 0x69, 0x00, 0x6b};
  101. static const unsigned short ModeIndex_300_2048x1536[]= {0x6c, 0x6d, 0x00, 0x00};
  102. static const unsigned short ModeIndex_310_2048x1536[]= {0x6c, 0x6d, 0x00, 0x6e};
  103. static const unsigned char SiS_MDA_DAC[] =
  104. {
  105. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  106. 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  107. 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  108. 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
  109. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  110. 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  111. 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  112. 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F
  113. };
  114. static const unsigned char SiS_CGA_DAC[] =
  115. {
  116. 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  117. 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  118. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  119. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  120. 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  121. 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  122. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  123. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
  124. };
  125. static const unsigned char SiS_EGA_DAC[] =
  126. {
  127. 0x00,0x10,0x04,0x14,0x01,0x11,0x05,0x15,
  128. 0x20,0x30,0x24,0x34,0x21,0x31,0x25,0x35,
  129. 0x08,0x18,0x0C,0x1C,0x09,0x19,0x0D,0x1D,
  130. 0x28,0x38,0x2C,0x3C,0x29,0x39,0x2D,0x3D,
  131. 0x02,0x12,0x06,0x16,0x03,0x13,0x07,0x17,
  132. 0x22,0x32,0x26,0x36,0x23,0x33,0x27,0x37,
  133. 0x0A,0x1A,0x0E,0x1E,0x0B,0x1B,0x0F,0x1F,
  134. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F
  135. };
  136. static const unsigned char SiS_VGA_DAC[] =
  137. {
  138. 0x00,0x10,0x04,0x14,0x01,0x11,0x09,0x15,
  139. 0x2A,0x3A,0x2E,0x3E,0x2B,0x3B,0x2F,0x3F,
  140. 0x00,0x05,0x08,0x0B,0x0E,0x11,0x14,0x18,
  141. 0x1C,0x20,0x24,0x28,0x2D,0x32,0x38,0x3F,
  142. 0x00,0x10,0x1F,0x2F,0x3F,0x1F,0x27,0x2F,
  143. 0x37,0x3F,0x2D,0x31,0x36,0x3A,0x3F,0x00,
  144. 0x07,0x0E,0x15,0x1C,0x0E,0x11,0x15,0x18,
  145. 0x1C,0x14,0x16,0x18,0x1A,0x1C,0x00,0x04,
  146. 0x08,0x0C,0x10,0x08,0x0A,0x0C,0x0E,0x10,
  147. 0x0B,0x0C,0x0D,0x0F,0x10
  148. };
  149. static const struct SiS_St SiS_SModeIDTable[] =
  150. {
  151. {0x01,0x9208,0x01,0x00,0x00,0x00,0x01,0x00,0x40},
  152. {0x01,0x1210,0x14,0x01,0x01,0x00,0x01,0x00,0x40},
  153. {0x01,0x1010,0x17,0x02,0x02,0x00,0x01,0x01,0x40},
  154. {0x03,0x8208,0x03,0x00,0x00,0x00,0x01,0x02,0x40},
  155. {0x03,0x0210,0x16,0x01,0x01,0x00,0x01,0x02,0x40},
  156. {0x03,0x0010,0x18,0x02,0x02,0x00,0x01,0x03,0x40},
  157. {0x05,0x9209,0x05,0x00,0x00,0x00,0x00,0x04,0x40},
  158. {0x06,0x8209,0x06,0x00,0x00,0x00,0x00,0x05,0x40},
  159. {0x07,0x0000,0x07,0x03,0x03,0x00,0x01,0x03,0x40},
  160. {0x07,0x0000,0x19,0x02,0x02,0x00,0x01,0x03,0x40},
  161. {0x0d,0x920a,0x0d,0x00,0x00,0x00,0x00,0x04,0x40},
  162. {0x0e,0x820a,0x0e,0x00,0x00,0x00,0x00,0x05,0x40},
  163. {0x0f,0x0202,0x11,0x01,0x01,0x00,0x00,0x05,0x40},
  164. {0x10,0x0212,0x12,0x01,0x01,0x00,0x00,0x05,0x40},
  165. {0x11,0x0212,0x1a,0x04,0x04,0x00,0x00,0x05,0x40},
  166. {0x12,0x0212,0x1b,0x04,0x04,0x00,0x00,0x05,0x40},
  167. {0x13,0x021b,0x1c,0x00,0x00,0x00,0x00,0x04,0x40},
  168. {0x12,0x0010,0x18,0x02,0x02,0x00,0x00,0x05,0x40},
  169. {0x12,0x0210,0x18,0x01,0x01,0x00,0x00,0x05,0x40},
  170. {0xff,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
  171. };
  172. static const struct SiS_StResInfo_S SiS_StResInfo[]=
  173. {
  174. { 640,400},
  175. { 640,350},
  176. { 720,400},
  177. { 720,350},
  178. { 640,480}
  179. };
  180. static const struct SiS_ModeResInfo_S SiS_ModeResInfo[] =
  181. {
  182. { 320, 200, 8, 8}, /* 0x00 */
  183. { 320, 240, 8, 8}, /* 0x01 */
  184. { 320, 400, 8, 8}, /* 0x02 */
  185. { 400, 300, 8, 8}, /* 0x03 */
  186. { 512, 384, 8, 8}, /* 0x04 */
  187. { 640, 400, 8,16}, /* 0x05 */
  188. { 640, 480, 8,16}, /* 0x06 */
  189. { 800, 600, 8,16}, /* 0x07 */
  190. { 1024, 768, 8,16}, /* 0x08 */
  191. { 1280,1024, 8,16}, /* 0x09 */
  192. { 1600,1200, 8,16}, /* 0x0a */
  193. { 1920,1440, 8,16}, /* 0x0b */
  194. { 2048,1536, 8,16}, /* 0x0c */
  195. { 720, 480, 8,16}, /* 0x0d */
  196. { 720, 576, 8,16}, /* 0x0e */
  197. { 1280, 960, 8,16}, /* 0x0f */
  198. { 800, 480, 8,16}, /* 0x10 */
  199. { 1024, 576, 8,16}, /* 0x11 */
  200. { 1280, 720, 8,16}, /* 0x12 */
  201. { 856, 480, 8,16}, /* 0x13 */
  202. { 1280, 768, 8,16}, /* 0x14 */
  203. { 1400,1050, 8,16}, /* 0x15 */
  204. { 1152, 864, 8,16}, /* 0x16 */
  205. { 848, 480, 8,16}, /* 0x17 */
  206. { 1360, 768, 8,16}, /* 0x18 */
  207. { 1024, 600, 8,16}, /* 0x19 */
  208. { 1152, 768, 8,16}, /* 0x1a */
  209. { 768, 576, 8,16}, /* 0x1b */
  210. { 1360,1024, 8,16}, /* 0x1c */
  211. { 1680,1050, 8,16}, /* 0x1d */
  212. { 1280, 800, 8,16}, /* 0x1e */
  213. { 1920,1080, 8,16}, /* 0x1f */
  214. { 960, 540, 8,16}, /* 0x20 */
  215. { 960, 600, 8,16}, /* 0x21 */
  216. { 1280, 854, 8,16} /* 0x22 */
  217. };
  218. #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
  219. static const struct SiS_StandTable_S SiS_StandTable[]=
  220. {
  221. /* 0x00: MD_0_200 */
  222. {
  223. 0x28,0x18,0x08,0x0800,
  224. {0x09,0x03,0x00,0x02},
  225. 0x63,
  226. {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  227. 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  228. 0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
  229. 0xff},
  230. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  231. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  232. 0x08,0x00,0x0f,0x00},
  233. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  234. 0xff}
  235. },
  236. /* 0x01: MD_1_200 */
  237. {
  238. 0x28,0x18,0x08,0x0800,
  239. {0x09,0x03,0x00,0x02},
  240. 0x63,
  241. {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  242. 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  243. 0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
  244. 0xff},
  245. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  246. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  247. 0x08,0x00,0x0f,0x00},
  248. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  249. 0xff}
  250. },
  251. /* 0x02: MD_2_200 */
  252. {
  253. 0x50,0x18,0x08,0x1000,
  254. {0x01,0x03,0x00,0x02},
  255. 0x63,
  256. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  257. 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  258. 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
  259. 0xff},
  260. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  261. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  262. 0x08,0x00,0x0f,0x00},
  263. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  264. 0xff}
  265. },
  266. /* 0x03: MD_3_200 - mode 0x03 - 0 */
  267. {
  268. 0x50,0x18,0x08,0x1000,
  269. {0x01,0x03,0x00,0x02},
  270. 0x63,
  271. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  272. 0x00,0xc7,0x06,0x07,0x00,0x00,0x00,0x00,
  273. 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
  274. 0xff},
  275. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  276. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  277. 0x08,0x00,0x0f,0x00},
  278. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  279. 0xff}
  280. },
  281. /* 0x04: MD_4 */
  282. {
  283. 0x28,0x18,0x08,0x4000,
  284. {0x09,0x03,0x00,0x02},
  285. 0x63,
  286. {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x2c is 2b for 300 */
  287. 0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
  288. 0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
  289. 0xff},
  290. {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
  291. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  292. 0x01,0x00,0x03,0x00},
  293. {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
  294. 0xff}
  295. },
  296. /* 0x05: MD_5 */
  297. {
  298. 0x28,0x18,0x08,0x4000,
  299. {0x09,0x03,0x00,0x02},
  300. 0x63,
  301. {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 0x2c is 2b for 300 */
  302. 0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
  303. 0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xa2,
  304. 0xff},
  305. {0x00,0x13,0x15,0x17,0x02,0x04,0x06,0x07,
  306. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  307. 0x01,0x00,0x03,0x00},
  308. {0x00,0x00,0x00,0x00,0x00,0x30,0x0f,0x00,
  309. 0xff}
  310. },
  311. /* 0x06: MD_6 */
  312. {
  313. 0x50,0x18,0x08,0x4000,
  314. {0x01,0x01,0x00,0x06},
  315. 0x63,
  316. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 for 300 */
  317. 0x00,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,
  318. 0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xc2,
  319. 0xff},
  320. {0x00,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
  321. 0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
  322. 0x01,0x00,0x01,0x00},
  323. {0x00,0x00,0x00,0x00,0x00,0x00,0x0d,0x00,
  324. 0xff}
  325. },
  326. /* 0x07: MD_7 */
  327. {
  328. 0x50,0x18,0x0e,0x1000,
  329. {0x00,0x03,0x00,0x03},
  330. 0xa6,
  331. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  332. 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  333. 0x83,0x85,0x5d,0x28,0x0d,0x63,0xba,0xa3,
  334. 0xff},
  335. {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
  336. 0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
  337. 0x0e,0x00,0x0f,0x08},
  338. {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
  339. 0xff}
  340. },
  341. /* 0x08: MDA_DAC */
  342. {
  343. 0x00,0x00,0x00,0x0000,
  344. {0x00,0x00,0x00,0x15},
  345. 0x15,
  346. {0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  347. 0x15,0x15,0x15,0x15,0x15,0x15,0x3f,0x3f,
  348. 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x00,0x00,
  349. 0x00},
  350. {0x00,0x00,0x00,0x00,0x00,0x15,0x15,0x15,
  351. 0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
  352. 0x15,0x15,0x15,0x15},
  353. {0x15,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
  354. 0x3f}
  355. },
  356. /* 0x09: CGA_DAC */
  357. {
  358. 0x00,0x10,0x04,0x0114,
  359. {0x11,0x09,0x15,0x00},
  360. 0x10,
  361. {0x04,0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,
  362. 0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x2a,0x3a,
  363. 0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x10,
  364. 0x04},
  365. {0x14,0x01,0x11,0x09,0x15,0x00,0x10,0x04,
  366. 0x14,0x01,0x11,0x09,0x15,0x2a,0x3a,0x2e,
  367. 0x3e,0x2b,0x3b,0x2f},
  368. {0x3f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
  369. 0x3f}
  370. },
  371. /* 0x0a: EGA_DAC */
  372. {
  373. 0x00,0x10,0x04,0x0114,
  374. {0x11,0x05,0x15,0x20},
  375. 0x30,
  376. {0x24,0x34,0x21,0x31,0x25,0x35,0x08,0x18,
  377. 0x0c,0x1c,0x09,0x19,0x0d,0x1d,0x28,0x38,
  378. 0x2c,0x3c,0x29,0x39,0x2d,0x3d,0x02,0x12,
  379. 0x06},
  380. {0x16,0x03,0x13,0x07,0x17,0x22,0x32,0x26,
  381. 0x36,0x23,0x33,0x27,0x37,0x0a,0x1a,0x0e,
  382. 0x1e,0x0b,0x1b,0x0f},
  383. {0x1f,0x2a,0x3a,0x2e,0x3e,0x2b,0x3b,0x2f,
  384. 0x3f}
  385. },
  386. /* 0x0b: VGA_DAC */
  387. {
  388. 0x00,0x10,0x04,0x0114,
  389. {0x11,0x09,0x15,0x2a},
  390. 0x3a,
  391. {0x2e,0x3e,0x2b,0x3b,0x2f,0x3f,0x00,0x05,
  392. 0x08,0x0b,0x0e,0x11,0x14,0x18,0x1c,0x20,
  393. 0x24,0x28,0x2d,0x32,0x38,0x3f,0x00,0x10,
  394. 0x1f},
  395. {0x2f,0x3f,0x1f,0x27,0x2f,0x37,0x3f,0x2d,
  396. 0x31,0x36,0x3a,0x3f,0x00,0x07,0x0e,0x15,
  397. 0x1c,0x0e,0x11,0x15},
  398. {0x18,0x1c,0x14,0x16,0x18,0x1a,0x1c,0x00,
  399. 0x04}
  400. },
  401. /* 0x0c */
  402. {
  403. 0x08,0x0c,0x10,0x0a08,
  404. {0x0c,0x0e,0x10,0x0b},
  405. 0x0c,
  406. {0x0d,0x0f,0x10,0x10,0x01,0x08,0x00,0x00,
  407. 0x00,0x00,0x01,0x00,0x02,0x02,0x01,0x00,
  408. 0x04,0x04,0x01,0x00,0x05,0x02,0x05,0x00,
  409. 0x06},
  410. {0x01,0x06,0x05,0x06,0x00,0x08,0x01,0x08,
  411. 0x00,0x07,0x02,0x07,0x06,0x07,0x00,0x00,
  412. 0x00,0x00,0x00,0x00},
  413. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  414. 0x00}
  415. },
  416. /* 0x0d: MD_D */
  417. {
  418. 0x28,0x18,0x08,0x2000,
  419. {0x09,0x0f,0x00,0x06},
  420. 0x63,
  421. {0x2d,0x27,0x28,0x90,0x2c,0x80,0xbf,0x1f, /* 2c is 2b for 300 */
  422. 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
  423. 0x9c,0x8e,0x8f,0x14,0x00,0x96,0xb9,0xe3,
  424. 0xff},
  425. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  426. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  427. 0x01,0x00,0x0f,0x00},
  428. {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  429. 0xff}
  430. },
  431. /* 0x0e: MD_E */
  432. {
  433. 0x50,0x18,0x08,0x4000,
  434. {0x01,0x0f,0x00,0x06},
  435. 0x63,
  436. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 for 300 */
  437. 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
  438. 0x9c,0x8e,0x8f,0x28,0x00,0x96,0xb9,0xe3,
  439. 0xff},
  440. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  441. 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
  442. 0x01,0x00,0x0f,0x00},
  443. {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  444. 0xff}
  445. },
  446. /* 0x0f: ExtVGATable - modes > 0x13 */
  447. {
  448. 0x00,0x00,0x00,0x0000,
  449. {0x01,0x0f,0x00,0x0e},
  450. 0x23,
  451. {0x5f,0x4f,0x50,0x82,0x54,0x80,0x0b,0x3e,
  452. 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  453. 0xea,0x8c,0xdf,0x28,0x40,0xe7,0x04,0xa3,
  454. 0xff},
  455. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  456. 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
  457. 0x01,0x00,0x00,0x00},
  458. {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
  459. 0xff}
  460. },
  461. /* 0x10: ROM_SAVEPTR - totally different for 300 */
  462. {
  463. 0x9f,0x3b,0x00,0x00c0,
  464. {0x00,0x00,0x00,0x00},
  465. 0x00,
  466. {0x00,0x00,0x00,0x00,0x00,0x00,0xbb,0x3f,
  467. 0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,
  468. 0x00,0x00,0x1a,0x00,0xac,0x3e,0x00,0xc0,
  469. 0x00},
  470. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  471. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  472. 0x00,0x00,0x00,0x00},
  473. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  474. 0x00}
  475. },
  476. /* 0x11: MD_F */
  477. {
  478. 0x50,0x18,0x0e,0x8000,
  479. {0x01,0x0f,0x00,0x06},
  480. 0xa2,
  481. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 on 300 */
  482. 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  483. 0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3, /* 82,84 is 83,85 on 300 */
  484. 0xff},
  485. {0x00,0x08,0x00,0x00,0x18,0x18,0x00,0x00,
  486. 0x00,0x08,0x00,0x00,0x00,0x18,0x00,0x00,
  487. 0x0b,0x00,0x05,0x00},
  488. {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,
  489. 0xff}
  490. },
  491. /* 0x12: MD_10 */
  492. {
  493. 0x50,0x18,0x0e,0x8000,
  494. {0x01,0x0f,0x00,0x06},
  495. 0xa3,
  496. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 on 300 */
  497. 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  498. 0x82,0x84,0x5d,0x28,0x0f,0x63,0xba,0xe3, /* 82,84 is 83,85 on 300 */
  499. 0xff},
  500. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  501. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  502. 0x01,0x00,0x0f,0x00},
  503. {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  504. 0xff}
  505. },
  506. /* 0x13: MD_0_350 */
  507. {
  508. 0x28,0x18,0x0e,0x0800,
  509. {0x09,0x03,0x00,0x02},
  510. 0xa3,
  511. {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f, /* b1 is a0 on 300 */
  512. 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  513. 0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
  514. 0xff},
  515. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  516. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  517. 0x08,0x00,0x0f,0x00},
  518. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  519. 0xff}
  520. },
  521. /* 0x14: MD_1_350 */
  522. {
  523. 0x28,0x18,0x0e,0x0800,
  524. {0x09,0x03,0x00,0x02},
  525. 0xa3,
  526. {0x2d,0x27,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  527. 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  528. 0x83,0x85,0x5d,0x14,0x1f,0x63,0xba,0xa3,
  529. 0xff},
  530. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  531. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  532. 0x08,0x00,0x0f,0x00},
  533. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  534. 0xff}
  535. },
  536. /* 0x15: MD_2_350 */
  537. {
  538. 0x50,0x18,0x0e,0x1000,
  539. {0x01,0x03,0x00,0x02},
  540. 0xa3,
  541. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  542. 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  543. 0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
  544. 0xff},
  545. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  546. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  547. 0x08,0x00,0x0f,0x00},
  548. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  549. 0xff}
  550. },
  551. /* 0x16: MD_3_350 - mode 0x03 - 1 */
  552. {
  553. 0x50,0x18,0x0e,0x1000,
  554. {0x01,0x03,0x00,0x02},
  555. 0xa3,
  556. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  557. 0x00,0x4d,0x0b,0x0c,0x00,0x00,0x00,0x00,
  558. 0x83,0x85,0x5d,0x28,0x1f,0x63,0xba,0xa3,
  559. 0xff},
  560. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  561. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  562. 0x08,0x00,0x0f,0x00},
  563. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  564. 0xff}
  565. },
  566. /* 0x17: MD_0_1_400 */
  567. {
  568. 0x28,0x18,0x10,0x0800,
  569. {0x08,0x03,0x00,0x02},
  570. 0x67,
  571. {0x2d,0x27,0x28,0x90,0x2b,0xb1,0xbf,0x1f, /* b1 is a0 on 300 */
  572. 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
  573. 0x9c,0x8e,0x8f,0x14,0x1f,0x96,0xb9,0xa3,
  574. 0xff},
  575. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  576. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  577. 0x0c,0x00,0x0f,0x08},
  578. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  579. 0xff}
  580. },
  581. /* 0x18: MD_2_3_400 - mode 0x03 - 2 */
  582. {
  583. 0x50,0x18,0x10,0x1000,
  584. {0x00,0x03,0x00,0x02},
  585. 0x67,
  586. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  587. 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
  588. 0x9c,0x8e,0x8f,0x28,0x1f,0x96,0xb9,0xa3,
  589. 0xff},
  590. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  591. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  592. 0x0c,0x00,0x0f,0x08},
  593. {0x00,0x00,0x00,0x00,0x00,0x10,0x0e,0x00,
  594. 0xff}
  595. },
  596. /* 0x19: MD_7_400 */
  597. {
  598. 0x50,0x18,0x10,0x1000,
  599. {0x00,0x03,0x00,0x02},
  600. 0x66,
  601. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f,
  602. 0x00,0x4f,0x0d,0x0e,0x00,0x00,0x00,0x00,
  603. 0x9c,0x8e,0x8f,0x28,0x0f,0x96,0xb9,0xa3,
  604. 0xff},
  605. {0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
  606. 0x10,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
  607. 0x0e,0x00,0x0f,0x08},
  608. {0x00,0x00,0x00,0x00,0x00,0x10,0x0a,0x00,
  609. 0xff}
  610. },
  611. /* 0x1a: MD_11 */
  612. {
  613. 0x50,0x1d,0x10,0xa000,
  614. {0x01,0x0f,0x00,0x06},
  615. 0xe3,
  616. {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, /* 55,81 is 54,80 on 300 */
  617. 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  618. 0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xc3, /* e9,8b is ea,8c on 300 */
  619. 0xff},
  620. {0x00,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
  621. 0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
  622. 0x01,0x00,0x0f,0x00},
  623. {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x01,
  624. 0xff}
  625. },
  626. /* 0x1b: ExtEGATable - Modes <= 0x02 */
  627. {
  628. 0x50,0x1d,0x10,0xa000,
  629. {0x01,0x0f,0x00,0x06},
  630. 0xe3,
  631. {0x5f,0x4f,0x50,0x82,0x55,0x81,0x0b,0x3e, /* 55,81 is 54,80 on 300 */
  632. 0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  633. 0xe9,0x8b,0xdf,0x28,0x00,0xe7,0x04,0xe3, /* e9,8b is ea,8c on 300 */
  634. 0xff},
  635. {0x00,0x01,0x02,0x03,0x04,0x05,0x14,0x07,
  636. 0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
  637. 0x01,0x00,0x0f,0x00},
  638. {0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x0f,
  639. 0xff}
  640. },
  641. /* 0x1c: MD_13 */
  642. {
  643. 0x28,0x18,0x08,0x2000,
  644. {0x01,0x0f,0x00,0x0e},
  645. 0x63,
  646. {0x5f,0x4f,0x50,0x82,0x55,0x81,0xbf,0x1f, /* 55,81 is 54,80 on 300 */
  647. 0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,
  648. 0x9c,0x8e,0x8f,0x28,0x40,0x96,0xb9,0xa3,
  649. 0xff},
  650. {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
  651. 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
  652. 0x41,0x00,0x0f,0x00},
  653. {0x00,0x00,0x00,0x00,0x00,0x40,0x05,0x0f,
  654. 0xff}
  655. }
  656. };
  657. #endif
  658. /**************************************************************/
  659. /* SIS VIDEO BRIDGE ----------------------------------------- */
  660. /**************************************************************/
  661. static const unsigned char SiS_SoftSetting = 0x30; /* RAM setting */
  662. static const unsigned char SiS_OutputSelect = 0x40;
  663. static const unsigned char SiS_NTSCTiming[] = {
  664. 0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
  665. 0x94,0x49,0x01,0x0a,0x06,0x0d,0x04,0x0a,
  666. 0x06,0x14,0x0d,0x04,0x0a,0x00,0x85,0x1b,
  667. 0x0c,0x50,0x00,0x97,0x00,0xda,0x4a,0x17,
  668. 0x7d,0x05,0x4b,0x00,0x00,0xe2,0x00,0x02,
  669. 0x03,0x0a,0x65,0x9d,0x08,0x92,0x8f,0x40,
  670. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x50,
  671. 0x00,0x40,0x44,0x00,0xdb,0x02,0x3b,0x00
  672. };
  673. static const unsigned char SiS_PALTiming[] = {
  674. 0x19,0x52,0x35,0x6e,0x04,0x38,0x3d,0x70,
  675. 0x94,0x49,0x01,0x12,0x06,0x3e,0x35,0x6d,
  676. 0x06,0x14,0x3e,0x35,0x6d,0x00,0x45,0x2b,
  677. 0x70,0x50,0x00,0x9b,0x00,0xd9,0x5d,0x17,
  678. 0x7d,0x05,0x45,0x00,0x00,0xe8,0x00,0x02,
  679. 0x0d,0x00,0x68,0xb0,0x0b,0x92,0x8f,0x40,
  680. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x63,
  681. 0x00,0x40,0x3e,0x00,0xe1,0x02,0x28,0x00
  682. };
  683. static const unsigned char SiS_HiTVExtTiming[] = {
  684. 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
  685. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  686. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  687. 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
  688. 0x2a,0xde,0x2a,0x44,0x40,0x2a,0x44,0x40,
  689. 0x8e,0x8e,0x82,0x07,0x0b,0x92,0x0f,0x40,
  690. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x3d,
  691. 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
  692. };
  693. static const unsigned char SiS_HiTVSt1Timing[] = {
  694. 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
  695. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  696. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  697. 0x65,0x90,0x7b,0xa8,0x03,0xf0,0x87,0x03,
  698. 0x11,0x15,0x11,0xcf,0x10,0x11,0xcf,0x10,
  699. 0x35,0x35,0x3b,0x69,0x1d,0x92,0x0f,0x40,
  700. 0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x86,
  701. 0xaf,0x5d,0x0e,0x00,0xfc,0xff,0x2d,0x00
  702. };
  703. static const unsigned char SiS_HiTVSt2Timing[] = {
  704. 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x64,
  705. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  706. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  707. 0x64,0x90,0x33,0x8c,0x18,0x36,0x3e,0x13,
  708. 0x2a,0xde,0x2a,0x44,0x40,0x2a,0x44,0x40,
  709. 0x8e,0x8e,0x82,0x07,0x0b,0x92,0x0f,0x40,
  710. 0x60,0x80,0x14,0x90,0x8c,0x60,0x14,0x3d,
  711. 0x63,0x4f,0x27,0x00,0xfc,0xff,0x6a,0x00
  712. };
  713. #if 0
  714. static const unsigned char SiS_HiTVTextTiming[] = {
  715. 0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
  716. 0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
  717. 0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
  718. 0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03,
  719. 0x14,0x78,0x14,0x08,0x20,0x14,0x08,0x20,
  720. 0xc8,0xc8,0x3b,0xd2,0x26,0x92,0x0f,0x40,
  721. 0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x96,
  722. 0x72,0x5c,0x11,0x00,0xfc,0xff,0x32,0x00
  723. };
  724. #endif
  725. static const unsigned char SiS_HiTVGroup3Data[] = {
  726. 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x5f,
  727. 0x05,0x21,0xb2,0xb2,0x55,0x77,0x2a,0xa6,
  728. 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
  729. 0x8c,0x6e,0x60,0x2e,0x58,0x48,0x72,0x44,
  730. 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
  731. 0x4f,0x7f,0x03,0xa8,0x7d,0x20,0x1a,0xa9,
  732. 0x14,0x05,0x03,0x7e,0x64,0x31,0x14,0x75,
  733. 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
  734. };
  735. static const unsigned char SiS_HiTVGroup3Simu[] = {
  736. 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0x95,
  737. 0xdb,0x20,0xb8,0xb8,0x55,0x47,0x2a,0xa6,
  738. 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
  739. 0x8c,0x6e,0x60,0x15,0x26,0xd3,0xe4,0x11,
  740. 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
  741. 0x67,0x36,0x01,0x47,0x0e,0x10,0xbe,0xb4,
  742. 0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
  743. 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
  744. };
  745. #if 0
  746. static const unsigned char SiS_HiTVGroup3Text[] = {
  747. 0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7,
  748. 0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6,
  749. 0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
  750. 0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22,
  751. 0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
  752. 0x93,0x3c,0x01,0x50,0x2f,0x10,0xf4,0xca,
  753. 0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
  754. 0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
  755. };
  756. #endif
  757. static const struct SiS_TVData SiS_StPALData[] =
  758. {
  759. { 1, 1, 864, 525,1270, 400, 100, 0, 760, 0,0xf4,0xff,0x1c,0x22},
  760. { 1, 1, 864, 525,1270, 350, 100, 0, 760, 0,0xf4,0xff,0x1c,0x22},
  761. { 1, 1, 864, 525,1270, 400, 0, 0, 720, 0,0xf1,0x04,0x1f,0x18},
  762. { 1, 1, 864, 525,1270, 350, 0, 0, 720, 0,0xf4,0x0b,0x1c,0x0a},
  763. { 1, 1, 864, 525,1270, 480, 50, 0, 760, 0,0xf4,0xff,0x1c,0x22},
  764. { 1, 1, 864, 525,1270, 600, 50, 0, 0,0x300,0xf4,0xff,0x1c,0x22}
  765. };
  766. static const struct SiS_TVData SiS_ExtPALData[] =
  767. {
  768. { 27, 10, 848, 448,1270, 530, 50, 0, 50, 0,0xf4,0xff,0x1c,0x22}, /* 640x400, 320x200 */
  769. { 108, 35, 848, 398,1270, 530, 50, 0, 50, 0,0xf4,0xff,0x1c,0x22},
  770. { 12, 5, 954, 448,1270, 530, 50, 0, 50, 0,0xf1,0x04,0x1f,0x18},
  771. { 9, 4, 960, 463,1644, 438, 50, 0, 50, 0,0xf4,0x0b,0x1c,0x0a},
  772. { 9, 4, 848, 528,1270, 530, 0, 0, 50, 0,0xf5,0xfb,0x1b,0x2a}, /* 640x480, 320x240 */
  773. { 36, 25,1060, 648,1270, 530, 438, 0, 438, 0,0xeb,0x05,0x25,0x16}, /* 800x600, 400x300 */
  774. { 3, 2,1080, 619,1270, 540, 438, 0, 438, 0,0xf3,0x00,0x1d,0x20}, /* 720x576 */
  775. { 1, 1,1170, 821,1270, 520, 686, 0, 686, 0,0xF3,0x00,0x1D,0x20}, /* 1024x768 */
  776. { 1, 1,1170, 821,1270, 520, 686, 0, 686, 0,0xF3,0x00,0x1D,0x20}, /* 1024x768 (for NTSC equ) */
  777. { 9, 4, 848, 528,1270, 530, 0, 0, 50, 0,0xf5,0xfb,0x1b,0x2a} /* 720x480 */
  778. };
  779. static const struct SiS_TVData SiS_StNTSCData[] =
  780. {
  781. { 1, 1, 858, 525,1270, 400, 50, 0, 760, 0,0xf1,0x04,0x1f,0x18},
  782. { 1, 1, 858, 525,1270, 350, 50, 0, 640, 0,0xf1,0x04,0x1f,0x18},
  783. { 1, 1, 858, 525,1270, 400, 0, 0, 720, 0,0xf1,0x04,0x1f,0x18},
  784. { 1, 1, 858, 525,1270, 350, 0, 0, 720, 0,0xf4,0x0b,0x1c,0x0a},
  785. { 1, 1, 858, 525,1270, 480, 0, 0, 760, 0,0xf1,0x04,0x1f,0x18}
  786. };
  787. static const struct SiS_TVData SiS_ExtNTSCData[] =
  788. {
  789. { 143, 65, 858, 443,1270, 440, 171, 0, 171, 0,0xf1,0x04,0x1f,0x18}, /* 640x400, 320x200 */
  790. { 88, 35, 858, 393,1270, 440, 171, 0, 171, 0,0xf1,0x04,0x1f,0x18},
  791. { 143, 70, 924, 443,1270, 440, 92, 0, 92, 0,0xf1,0x04,0x1f,0x18},
  792. { 143, 70, 924, 393,1270, 440, 92, 0, 92, 0,0xf4,0x0b,0x1c,0x0a},
  793. { 143, 76, 836, 523,1270, 440, 224, 0, 0, 0,0xf1,0x05,0x1f,0x16}, /* 640x480, 320x240 */
  794. { 143, 120,1056, 643,1270, 440, 0, 1, 0, 0,0xf4,0x10,0x1c,0x00}, /* 800x600, 400x300 */
  795. { 143, 76, 836, 523,1270, 440, 0, 1, 0, 0,0xee,0x0c,0x22,0x08}, /* 720x480 - BETTER (from 300 series) */
  796. { 1, 1,1100, 811,1412, 440, 0, 1, 0, 0,0xee,0x0c,0x22,0x08}, /* 1024x768 (525i) CORRECTED */
  797. #if 0 /* flimmert und ist unten abgeschnitten (NTSCHT, NTSC clock) */
  798. { 65, 64,1056, 791,1270, 480, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  799. #endif
  800. #if 0
  801. { 1, 1,1100, 811,1412, 440, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  802. #endif
  803. #if 0
  804. { 1, 1,1120, 821,1516, 420, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  805. #endif
  806. #if 0
  807. { 1, 1, 938, 821,1516, 420, 0, 1, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  808. #endif
  809. #if 0 /* zoom hin, unten abgeschnitten (NTSC2HT, NTSC1024 clock) */
  810. { 1, 1,1072, 791,1270, 480, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  811. #endif
  812. #if 1 /* zu weit links (squeezed) (NTSC2HT, NTSC1024 clock) */
  813. { 1, 1,1100, 846,1270, 440, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  814. #endif
  815. #if 0 /* zu weit links, rechts abgeschnitten (NTSC2HT, NTSC1024 clock) */
  816. { 1, 1,1100, 846,1412, 440, 455, 0, 0, 0,0x00,0x00,0x00,0x00} /* 1024x768 (525p) */
  817. #endif
  818. };
  819. static const struct SiS_TVData SiS_StHiTVData[] = /* Slave + TVSimu */
  820. {
  821. { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0, 0, 0, 0, 0},
  822. { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
  823. { 1, 1, 0x37c,0x233,0x2b2,0x320, 0, 0, 0, 0, 0, 0, 0, 0},
  824. { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
  825. { 1, 1, 0x37c,0x233,0x2b2,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
  826. { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x150, 1, 0, 0, 0, 0, 0, 0}
  827. };
  828. static const struct SiS_TVData SiS_St2HiTVData[] = /* Slave */
  829. {
  830. { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0},
  831. { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
  832. { 3, 1, 0x348,0x1e3,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0},
  833. { 1, 1, 0x37c,0x233,0x2b2,0x2bc, 0, 0, 0, 0, 0, 0, 0, 0},
  834. { 5, 2, 0x348,0x233,0x670,0x3c0,0x08d, 1, 0, 0, 0, 0, 0, 0},
  835. { 8, 5, 0x41a,0x2ab,0x670,0x3c0,0x17c, 1, 0, 0, 0, 0, 0, 0}
  836. };
  837. static const struct SiS_TVData SiS_ExtHiTVData[] =
  838. { /* all ok */
  839. { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
  840. { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
  841. { 6, 1, 0x348,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
  842. { 3, 1, 0x3c0,0x233,0x660,0x3c0, 0, 0, 0, 0, 0, 0, 0, 0},
  843. { 5, 1, 0x348,0x233,0x670,0x3c0,0x166, 1, 0, 0, 0, 0, 0, 0}, /* 640x480 */
  844. { 16, 5, 0x41a,0x2ab,0x670,0x3c0,0x143, 1, 0, 0, 0, 0, 0, 0}, /* 800x600 */
  845. { 25, 12, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 1024x768 */
  846. { 5, 4, 0x627,0x464,0x670,0x3c0,0x128, 0, 0, 0, 0, 0, 0, 0}, /* 1280x1024 */
  847. { 4, 1, 0x41a,0x233,0x60c,0x3c0,0x143, 1, 0, 0, 0, 0, 0, 0}, /* 800x480 */
  848. { 5, 2, 0x578,0x293,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 1024x576 */
  849. { 8, 5, 0x6d6,0x323,0x670,0x3c0,0x128, 0, 0, 0, 0, 0, 0, 0}, /* 1280x720 */
  850. { 8, 3, 0x4ec,0x353,0x670,0x3c0,0x032, 0, 0, 0, 0, 0, 0, 0}, /* 960x600 */
  851. };
  852. static const struct SiS_TVData SiS_St525pData[] =
  853. {
  854. { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
  855. { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
  856. { 1, 1, 0x6b4,0x20d,0x4f6,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
  857. { 1, 1, 0x6b4,0x20d,0x4f6,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
  858. { 1, 1, 0x6b4,0x20d,0x4f6,0x1e0, 0, 0, 0x2f8, 0, 0, 0, 0, 0}
  859. };
  860. static const struct SiS_TVData SiS_St750pData[] =
  861. {
  862. { 1, 1, 0x672,0x2ee,0x500,0x190, 50, 0, 0x2f8, 0, 0, 0, 0, 0},
  863. { 1, 1, 0x672,0x2ee,0x500,0x15e, 50, 0, 0x280, 0, 0, 0, 0, 0},
  864. { 1, 1, 0x672,0x2ee,0x500,0x190, 0, 0, 0x2d0, 0, 0, 0, 0, 0},
  865. { 1, 1, 0x672,0x2ee,0x500,0x15e, 0, 0, 0x2d0, 0, 0, 0, 0, 0},
  866. { 1, 1, 0x672,0x2ee,0x500,0x1e0, 0, 0, 0x2f8, 0, 0, 0, 0, 0}
  867. };
  868. static const struct SiS_TVData SiS_Ext750pData[] =
  869. { /* all ok */
  870. { 3, 1, 935, 470, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0}, /* 320x200/640x400 */
  871. { 24, 7, 935, 420, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
  872. { 3, 1, 935, 470, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
  873. { 24, 7, 935, 420, 1130, 680, 50, 0, 0, 0, 0, 0, 0, 0},
  874. { 2, 1, 1100, 590, 1130, 640, 50, 0, 0, 0, 0, 0, 0, 0}, /* 640x480 */
  875. { 3, 2, 1210, 690, 1130, 660, 50, 0, 0, 0, 0, 0, 0, 0}, /* 800x600 OK */
  876. { 2, 1, 1100, 562, 1130, 640, 0, 1, 0, 0, 0, 0, 0, 0}, /* 720x480 OK */
  877. { 1, 1, 1375, 878, 1130, 640, 638, 0, 0, 0, 0, 0, 0, 0}, /* 1024x768 OK */
  878. { 5, 3, 1100, 675, 1130, 640, 0, 1, 0, 0, 0, 0, 0, 0}, /* 720/768x576 OK */
  879. { 25, 24, 1496, 755, 1120, 680, 50, 0, 0, 0, 0, 0, 0, 0} /* 1280x720 OK */
  880. };
  881. static const struct SiS_LCDData SiS_LCD1280x720Data[] = /* 2.03.00 */
  882. {
  883. { 44, 15, 864, 430, 1408, 806 }, /* 640x400 */
  884. { 128, 35, 792, 385, 1408, 806 },
  885. { 44, 15, 864, 430, 1408, 806 },
  886. { 128, 35, 792, 385, 1408, 806 },
  887. { 22, 9, 864, 516, 1408, 806 }, /* 640x480 */
  888. { 8, 5, 1056, 655, 1408, 806 }, /* 800x600 */
  889. { 0, 0, 0, 0, 0, 0 }, /* 1024x768 */
  890. { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
  891. { 0, 0, 0, 0, 0, 0 },
  892. { 0, 0, 0, 0, 0, 0 },
  893. { 1, 1, 1408, 806, 1408, 806 } /* 1280x720 */
  894. };
  895. /* About 1280x768: For TMDS, Panel_1280x768 will only be set if
  896. * the panel is a Fujitsu 7911 (VL-17WDX8) (with clock 81, 1688x802)
  897. * Other TMDS panels of this resolution will be treated as custom.
  898. * For LVDS, we know another type (_2).
  899. * (Note: 1280x768_3 is now special for SiS301/NetVista
  900. */
  901. static const struct SiS_LCDData SiS_StLCD1280x768_2Data[] = /* 2.03.00 */
  902. {
  903. { 64, 21, 858, 434, 1408, 806 }, /* 640x400 */
  904. { 32, 9, 858, 372, 1408, 806 },
  905. { 64, 21, 858, 434, 1408, 806 },
  906. { 32, 9, 858, 372, 1408, 806 },
  907. { 143, 68, 1024, 527, 1408, 806 }, /* 640x480 */
  908. { 64, 51, 1364, 663, 1408, 806 }, /* 800x600 */
  909. { 88, 81, 1296, 806, 1408, 806 }, /* 1024x768 */
  910. { 0, 0, 0, 0, 0, 0 },
  911. { 1, 1, 1408, 806, 1408, 806 }, /* 1280x768 */
  912. { 0, 0, 0, 0, 0, 0 },
  913. { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 - from Ext */
  914. };
  915. static const struct SiS_LCDData SiS_ExtLCD1280x768_2Data[] = /* 2.03.00 */
  916. {
  917. { 16, 5, 960, 410, 1600, 806 }, /* 640x400 */
  918. { 64, 21, 1152, 364, 1600, 806 },
  919. { 16, 5, 960, 410, 1600, 806 },
  920. { 64, 21, 1152, 364, 1600, 806 },
  921. { 32, 13, 1040, 493, 1600, 806 }, /* 640x480 */
  922. { 16, 9, 1152, 618, 1600, 806 }, /* 800x600 */
  923. { 25, 21, 1344, 796, 1600, 806 }, /* 1024x768 */
  924. { 0, 0, 0, 0, 0, 0 },
  925. { 1, 1, 1600, 806, 1600, 806 }, /* 1280x768 */
  926. { 0, 0, 0, 0, 0, 0 },
  927. { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 */
  928. };
  929. #if 0 /* Not used; _3 now reserved for NetVista (SiS301) */
  930. static const struct SiS_LCDData SiS_LCD1280x768_3Data[] =
  931. {
  932. { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */
  933. { 128, 39, 884, 396, 1408, 806 }, /* ,640 */
  934. { 64, 25, 1056, 422, 1664, 798 }, /* 640x400 */
  935. { 128, 39, 884, 396, 1408, 806 }, /* ,640 */
  936. { 32, 15, 1056, 513, 1408, 806 }, /* ,664 */ /* 640x480 */
  937. { 176, 125, 1280, 640, 1408, 806 }, /* ,768 */ /* 800x600 */
  938. { 64, 61, 1342, 806, 1408, 806 }, /* 1024x768 */
  939. { 0, 0, 0, 0, 0, 0 },
  940. { 1, 1, 1408, 806, 1408, 806 }, /* 1280x768 */
  941. { 0, 0, 0, 0, 0, 0 },
  942. { 16, 15, 1600, 750, 1600, 806 } /* 1280x720 from above */
  943. };
  944. #endif
  945. static const struct SiS_LCDData SiS_LCD1280x800Data[] = /* 0.93.12a (TMDS) */
  946. {
  947. { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
  948. { 128, 49, 1232, 361, 1408, 816 },
  949. { 128, 51, 1122, 412, 1408, 816 },
  950. { 128, 49, 1232, 361, 1408, 816 },
  951. { 8, 3, 880, 491, 1408, 816 }, /* 640x480 */
  952. { 11, 6, 1024, 612, 1408, 816 }, /* 800x600 */
  953. { 22, 21, 1400, 784, 1408, 816 }, /* 1024x768 */
  954. { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
  955. { 1, 1, 1408, 816, 1408, 816 }, /* 1280x800 */
  956. { 0, 0, 0, 0, 0, 0 }, /* 1280x768 (patch index) */
  957. { 0, 0, 0, 0, 0, 0 } /* 1280x720 */
  958. };
  959. static const struct SiS_LCDData SiS_LCD1280x800_2Data[] = /* 2.03.00 (LVDS) */
  960. {
  961. { 97, 42, 1344, 409, 1552, 812 }, /* 640x400 */
  962. { 97, 35, 1280, 358, 1552, 812 },
  963. { 97, 42, 1344, 409, 1552, 812 },
  964. { 97, 35, 1280, 358, 1552, 812 },
  965. { 97, 39, 1040, 488, 1552, 812 }, /* 640x480 */
  966. { 194, 105, 1120, 608, 1552, 812 }, /* 800x600 */
  967. { 97, 84, 1400, 780, 1552, 812 }, /* 1024x768 */
  968. { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
  969. { 1, 1, 1552, 812, 1552, 812 }, /* 1280x800 */
  970. { 97, 96, 1600, 780, 1552, 812 }, /* 1280x768 - patch index */
  971. { 97, 90, 1600, 730, 1552, 812 } /* 1280x720 */
  972. };
  973. #if 0
  974. static const struct SiS_LCDData SiS_LCD1280x800_3Data[] = /* 2.02.05a (LVDS); m250 */
  975. {
  976. { 128, 51, 1122, 412, 1408, 816 }, /* 640x400 */
  977. { 128, 49, 1232, 361, 1408, 816 },
  978. { 128, 51, 1122, 412, 1408, 816 },
  979. { 128, 49, 1232, 361, 1408, 816 },
  980. { 8, 3, 880, 491, 1408, 816 }, /* 640x480 */
  981. { 11, 6, 1024, 612, 1408, 816 }, /* 800x600 */
  982. { 22, 21, 1400, 784, 1408, 816 }, /* 1024x768 */
  983. { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
  984. { 1, 1, 1408, 816, 1408, 816 }, /* 1280x800 */
  985. { 0, 0, 0, 0, 0, 0 }, /* 1280x768 - patch index */
  986. { 0, 0, 0, 0, 0, 0 } /* 1280x720 */
  987. };
  988. #endif
  989. static const struct SiS_LCDData SiS_LCD1280x854Data[] = /* 2.21.00CS (LVDS) */
  990. {
  991. { 56, 15, 936, 410, 1664, 861 }, /* 640x400 */
  992. { 64, 25, 1586, 355, 1664, 861 },
  993. { 56, 15, 936, 410, 1664, 861 },
  994. { 64, 25, 1586, 355, 1664, 861 },
  995. { 91, 45, 1464, 485, 1664, 861 }, /* 640x480 */
  996. { 182, 75, 976, 605, 1664, 861 }, /* 800x600 */
  997. { 91, 66, 1342, 774, 1664, 861 }, /* 1024x768 */
  998. { 0, 0, 0, 0, 0, 0 }, /* 1280x1024 */
  999. { 26, 25, 1708, 807, 1664, 861 }, /* 1280x800 */
  1000. { 13, 12, 1708, 774, 1664, 861 }, /* 1280x768 - patch index */
  1001. { 52, 45, 1708, 725, 1664, 861 }, /* 1280x720 */
  1002. { 0, 0, 0, 0, 0, 0 },
  1003. { 0, 0, 0, 0, 0, 0 },
  1004. { 1, 1, 1664, 861, 1664, 861 } /* 1280x854 */
  1005. };
  1006. static const struct SiS_LCDData SiS_LCD1280x960Data[] =
  1007. {
  1008. { 9, 2, 800, 500, 1800, 1000 },
  1009. { 9, 2, 800, 500, 1800, 1000 },
  1010. { 4, 1, 900, 500, 1800, 1000 },
  1011. { 4, 1, 900, 500, 1800, 1000 },
  1012. { 9, 2, 800, 500, 1800, 1000 },
  1013. { 30, 11, 1056, 625, 1800, 1000 },
  1014. { 5, 3, 1350, 800, 1800, 1000 },
  1015. { 1, 1, 1576, 1050, 1576, 1050 },
  1016. { 1, 1, 1800, 1000, 1800, 1000 },
  1017. { 0, 0, 0, 0, 0, 0 },
  1018. { 0, 0, 0, 0, 0, 0 },
  1019. { 0, 0, 0, 0, 0, 0 },
  1020. { 0, 0, 0, 0, 0, 0 },
  1021. { 0, 0, 0, 0, 0, 0 }
  1022. };
  1023. static const struct SiS_LCDData SiS_StLCD1400x1050Data[] =
  1024. {
  1025. { 211, 100, 2100, 408, 1688, 1066 },
  1026. { 211, 64, 1536, 358, 1688, 1066 },
  1027. { 211, 100, 2100, 408, 1688, 1066 },
  1028. { 211, 64, 1536, 358, 1688, 1066 },
  1029. { 211, 48, 840, 488, 1688, 1066 },
  1030. { 211, 72, 1008, 609, 1688, 1066 },
  1031. { 211, 128, 1400, 776, 1688, 1066 },
  1032. { 211, 205, 1680, 1041, 1688, 1066 },
  1033. { 1, 1, 1688, 1066, 1688, 1066 },
  1034. { 0, 0, 0, 0, 0, 0 },
  1035. { 0, 0, 0, 0, 0, 0 },
  1036. { 0, 0, 0, 0, 0, 0 },
  1037. { 0, 0, 0, 0, 0, 0 },
  1038. { 0, 0, 0, 0, 0, 0 }
  1039. };
  1040. static const struct SiS_LCDData SiS_ExtLCD1400x1050Data[] =
  1041. {
  1042. /* { 211, 60, 1260, 410, 1688, 1066 }, 640x400 (6330) */
  1043. { 211, 100, 2100, 408, 1688, 1066 }, /* 640x400 (6325) WORKS */
  1044. { 211, 64, 1536, 358, 1688, 1066 },
  1045. { 211, 100, 2100, 408, 1688, 1066 },
  1046. { 211, 64, 1536, 358, 1688, 1066 },
  1047. /* { 211, 80, 1400, 490, 1688, 1066 }, 640x480 (6330) */
  1048. { 211, 48, 840, 488, 1688, 1066 }, /* 640x480 (6325) WORKS */
  1049. /* { 211, 117, 1638, 613, 1688, 1066 }, 800x600 (6330) */
  1050. { 211, 72, 1008, 609, 1688, 1066 }, /* 800x600 (6325) WORKS */
  1051. { 211, 128, 1400, 776, 1688, 1066 }, /* 1024x768 */
  1052. { 211, 205, 1680, 1041, 1688, 1066 }, /* 1280x1024 - not used (always unscaled) */
  1053. { 1, 1, 1688, 1066, 1688, 1066 }, /* 1400x1050 */
  1054. { 0, 0, 0, 0, 0, 0 }, /* kludge */
  1055. { 211, 120, 1400, 730, 1688, 1066 }, /* 1280x720 */
  1056. { 0, 0, 0, 0, 0, 0 },
  1057. { 0, 0, 0, 0, 0, 0 },
  1058. { 0, 0, 0, 0, 0, 0 }
  1059. };
  1060. static const struct SiS_LCDData SiS_LCD1680x1050Data[] =
  1061. {
  1062. { 95, 24, 1260, 410, 1900, 1066 }, /* 0 640x400 */
  1063. { 10, 3, 1710, 362, 1900, 1066 },
  1064. { 95, 24, 1260, 410, 1900, 1066 },
  1065. { 10, 3, 1710, 362, 1900, 1066 },
  1066. { 95, 32, 1400, 490, 1900, 1066 }, /* 4 640x480 */
  1067. { 95, 42, 1470, 610, 1900, 1066 }, /* 5 800x600 */
  1068. { 95, 64, 1750, 784, 1900, 1066 }, /* 6 1024x768 */
  1069. { 95, 94, 1900, 1055, 1900, 1066 }, /* 7 1280x1024 */
  1070. { 41, 31, 1900, 806, 1900, 1066 }, /* 8 1280x768 */
  1071. { 95, 69, 1800, 817, 1900, 1066 }, /* 9 1280x800 patch index */
  1072. { 13, 9, 1900, 739, 1900, 1066 }, /* 10 1280x720 */
  1073. { 95, 94, 1880, 1066, 1900, 1066 }, /* 11 1400x1050 patch index */
  1074. { 1, 1, 1900, 1066, 1900, 1066 }, /* 12 1680x1050 */
  1075. { 0, 0, 0, 0, 0, 0 }
  1076. };
  1077. static const struct SiS_LCDData SiS_StLCD1600x1200Data[] =
  1078. {
  1079. {27, 4, 800, 500, 2160, 1250 },
  1080. {27, 4, 800, 500, 2160, 1250 },
  1081. { 6, 1, 900, 500, 2160, 1250 },
  1082. { 6, 1, 900, 500, 2160, 1250 },
  1083. {27, 1, 800, 500, 2160, 1250 },
  1084. { 4, 1,1080, 625, 2160, 1250 },
  1085. { 5, 2,1350, 800, 2160, 1250 },
  1086. {135,88,1600,1100, 2160, 1250 },
  1087. {72, 49,1680,1092, 2160, 1250 },
  1088. { 1, 1,2160,1250, 2160, 1250 },
  1089. { 0, 0, 0, 0, 0, 0 },
  1090. { 0, 0, 0, 0, 0, 0 },
  1091. { 0, 0, 0, 0, 0, 0 },
  1092. { 0, 0, 0, 0, 0, 0 }
  1093. };
  1094. static const struct SiS_LCDData SiS_ExtLCD1600x1200Data[] =
  1095. {
  1096. {72,11, 990, 422, 2160, 1250 }, /* 640x400 (6330) WORKS */
  1097. /* {27, 4, 800, 500, 2160, 1250 }, 640x400 (6235) */
  1098. {27, 4, 800, 500, 2160, 1250 },
  1099. { 6, 1, 900, 500, 2160, 1250 },
  1100. { 6, 1, 900, 500, 2160, 1250 },
  1101. {45, 8, 960, 505, 2160, 1250 }, /* 640x480 (6330) WORKS */
  1102. /* {27, 1, 800, 500, 2160, 1250 }, 640x480 (6325) */
  1103. { 4, 1,1080, 625, 2160, 1250 },
  1104. { 5, 2,1350, 800, 2160, 1250 },
  1105. {27,16,1500,1064, 2160, 1250 }, /* 1280x1024 */
  1106. {72,49,1680,1092, 2160, 1250 }, /* 1400x1050 (6330, was not supported on 6325) */
  1107. { 1, 1,2160,1250, 2160, 1250 },
  1108. { 0, 0, 0, 0, 0, 0 },
  1109. { 0, 0, 0, 0, 0, 0 },
  1110. { 0, 0, 0, 0, 0, 0 },
  1111. { 0, 0, 0, 0, 0, 0 }
  1112. };
  1113. static const struct SiS_LCDData SiS_NoScaleData[] =
  1114. {
  1115. { 1, 1, 800, 449, 800, 449 }, /* 0x00: 320x200, 640x400 */
  1116. { 1, 1, 800, 449, 800, 449 },
  1117. { 1, 1, 900, 449, 900, 449 },
  1118. { 1, 1, 900, 449, 900, 449 },
  1119. { 1, 1, 800, 525, 800, 525 }, /* 0x04: 320x240, 640x480 */
  1120. { 1, 1,1056, 628,1056, 628 }, /* 0x05: 400x300, 800x600 */
  1121. { 1, 1,1344, 806,1344, 806 }, /* 0x06: 512x384, 1024x768 */
  1122. { 1, 1,1688,1066,1688,1066 }, /* 0x07: 1280x1024 */
  1123. { 1, 1,1688, 802,1688, 802 }, /* 0x08: 1280x768: Fujitsu, TMDS only */
  1124. { 1, 1,2160,1250,2160,1250 }, /* 0x09: 1600x1200 */
  1125. { 1, 1,1800,1000,1800,1000 }, /* 0x0a: 1280x960 */
  1126. { 1, 1,1688,1066,1688,1066 }, /* 0x0b: 1400x1050 */
  1127. { 1, 1,1650, 750,1650, 750 }, /* 0x0c: 1280x720 (TMDS, projector) */
  1128. { 1, 1,1552, 812,1552, 812 }, /* 0x0d: 1280x800_2 (LVDS) (was: 1408,816/ 1656,841) */
  1129. { 1, 1,1900,1066,1900,1066 }, /* 0x0e: 1680x1050 (LVDS) */
  1130. { 1, 1,1660, 806,1660, 806 }, /* 0x0f: 1280x768_2 (LVDS) */
  1131. { 1, 1,1664, 798,1664, 798 }, /* 0x10: 1280x768_3 (NetVista SiS 301) - TODO */
  1132. { 1, 1,1688, 802,1688, 802 }, /* 0x11: 1280x768 (TMDS Fujitsu) */
  1133. { 1, 1,1408, 806,1408, 806 }, /* 0x12: 1280x720 (LVDS) */
  1134. { 1, 1, 896, 497, 896, 497 }, /* 0x13: 720x480 */
  1135. { 1, 1, 912, 597, 912, 597 }, /* 0x14: 720x576 */
  1136. { 1, 1, 912, 597, 912, 597 }, /* 0x15: 768x576 */
  1137. { 1, 1,1056, 497,1056, 497 }, /* 0x16: 848x480 */
  1138. { 1, 1,1064, 497,1064, 497 }, /* 0x17: 856x480 */
  1139. { 1, 1,1056, 497,1056, 497 }, /* 0x18: 800x480 */
  1140. { 1, 1,1328, 739,1328, 739 }, /* 0x19: 1024x576 */
  1141. { 1, 1,1680, 892,1680, 892 }, /* 0x1a: 1152x864 */
  1142. { 1, 1,1808, 808,1808, 808 }, /* 0x1b: 1360x768 */
  1143. { 1, 1,1104, 563,1104, 563 }, /* 0x1c: 960x540 */
  1144. { 1, 1,1120, 618,1120, 618 }, /* 0x1d: 960x600 */
  1145. { 1, 1,1408, 816,1408, 816 }, /* 0x1f: 1280x800 (TMDS special) */
  1146. { 1, 1,1760,1235,1760,1235 }, /* 0x20: 1600x1200 for LCDA */
  1147. { 1, 1,2048,1320,2048,1320 }, /* 0x21: 1600x1200 for non-SiS LVDS */
  1148. { 1, 1,1664, 861,1664, 861 } /* 0x22: 1280x854 */
  1149. };
  1150. /**************************************************************/
  1151. /* LVDS ----------------------------------------------------- */
  1152. /**************************************************************/
  1153. /* FSTN/DSTN 320x240, 2 variants */
  1154. static const struct SiS_LVDSData SiS_LVDS320x240Data_1[]=
  1155. {
  1156. { 848, 433, 400, 525},
  1157. { 848, 389, 400, 525},
  1158. { 848, 433, 400, 525},
  1159. { 848, 389, 400, 525},
  1160. { 848, 518, 400, 525},
  1161. {1056, 628, 400, 525},
  1162. { 400, 525, 400, 525} /* xSTN */
  1163. };
  1164. static const struct SiS_LVDSData SiS_LVDS320x240Data_2[]=
  1165. {
  1166. { 800, 445, 800, 525},
  1167. { 800, 395, 800, 525},
  1168. { 800, 445, 800, 525},
  1169. { 800, 395, 800, 525},
  1170. { 800, 525, 800, 525},
  1171. {1056, 628,1056, 628},
  1172. { 480, 525, 480, 525} /* xSTN */
  1173. };
  1174. static const struct SiS_LVDSData SiS_LVDS640x480Data_1[]=
  1175. {
  1176. { 800, 445, 800, 525}, /* 800, 449, 800, 449 */
  1177. { 800, 395, 800, 525},
  1178. { 800, 445, 800, 525},
  1179. { 800, 395, 800, 525},
  1180. { 800, 525, 800, 525}
  1181. };
  1182. static const struct SiS_LVDSData SiS_LVDS800x600Data_1[]=
  1183. {
  1184. { 848, 433,1060, 629},
  1185. { 848, 389,1060, 629},
  1186. { 848, 433,1060, 629},
  1187. { 848, 389,1060, 629},
  1188. { 848, 518,1060, 629},
  1189. {1056, 628,1056, 628}
  1190. };
  1191. static const struct SiS_LVDSData SiS_LVDS1024x600Data_1[] =
  1192. {
  1193. { 840, 604,1344, 800},
  1194. { 840, 560,1344, 800},
  1195. { 840, 604,1344, 800},
  1196. { 840, 560,1344, 800},
  1197. { 840, 689,1344, 800},
  1198. {1050, 800,1344, 800},
  1199. {1344, 800,1344, 800}
  1200. };
  1201. static const struct SiS_LVDSData SiS_LVDS1024x768Data_1[]=
  1202. {
  1203. { 840, 438,1344, 806},
  1204. { 840, 409,1344, 806},
  1205. { 840, 438,1344, 806},
  1206. { 840, 409,1344, 806},
  1207. { 840, 518,1344, 806}, /* 640x480 */
  1208. {1050, 638,1344, 806}, /* 800x600 */
  1209. {1344, 806,1344, 806}, /* 1024x768 */
  1210. };
  1211. static const struct SiS_LVDSData SiS_CHTVUNTSCData[]=
  1212. {
  1213. { 840, 600, 840, 600},
  1214. { 840, 600, 840, 600},
  1215. { 840, 600, 840, 600},
  1216. { 840, 600, 840, 600},
  1217. { 784, 600, 784, 600},
  1218. {1064, 750,1064, 750},
  1219. {1160, 945,1160, 945}
  1220. };
  1221. static const struct SiS_LVDSData SiS_CHTVONTSCData[]=
  1222. {
  1223. { 840, 525, 840, 525},
  1224. { 840, 525, 840, 525},
  1225. { 840, 525, 840, 525},
  1226. { 840, 525, 840, 525},
  1227. { 784, 525, 784, 525},
  1228. {1040, 700,1040, 700},
  1229. {1160, 840,1160, 840}
  1230. };
  1231. /* CRT1 CRTC data for slave modes */
  1232. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_1[] =
  1233. {
  1234. {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
  1235. 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
  1236. 0x00 }},
  1237. {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
  1238. 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
  1239. 0x00 }},
  1240. {{0x65,0x4f,0x89,0x54,0x9f,0xc4,0x1f,
  1241. 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
  1242. 0x00 }},
  1243. {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
  1244. 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
  1245. 0x00 }},
  1246. {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
  1247. 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
  1248. 0x00 }},
  1249. {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  1250. 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
  1251. 0x01 }},
  1252. {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
  1253. 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
  1254. 0x00 }}
  1255. };
  1256. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2[] =
  1257. {
  1258. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1259. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1260. 0x00}},
  1261. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1262. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1263. 0x00}},
  1264. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1265. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1266. 0x00}},
  1267. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1268. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1269. 0x00}},
  1270. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1271. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1272. 0x00}},
  1273. {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  1274. 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
  1275. 0x01}},
  1276. #if 0
  1277. {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
  1278. 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
  1279. 0x00}}
  1280. #endif
  1281. {{0x5f,0x4f,0x83,0x55,0x81,0x0b,0x3e,
  1282. 0xe9,0x8b,0xe8,0x0c,0x00,0x00,0x05,
  1283. 0x00}},
  1284. };
  1285. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2_H[] =
  1286. {
  1287. {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
  1288. 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
  1289. 0x00}},
  1290. {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
  1291. 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
  1292. 0x00}},
  1293. {{0x65,0x4f,0x89,0x54,0x9f,0xc4,0x1f,
  1294. 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
  1295. 0x00}},
  1296. {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
  1297. 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
  1298. 0x00}},
  1299. {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
  1300. 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
  1301. 0x00}},
  1302. {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  1303. 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
  1304. 0x01}},
  1305. {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
  1306. 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
  1307. 0x00}}
  1308. };
  1309. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3[] =
  1310. {
  1311. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1312. 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
  1313. 0x00}},
  1314. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1315. 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
  1316. 0x00}},
  1317. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1318. 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
  1319. 0x00}},
  1320. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1321. 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
  1322. 0x00}},
  1323. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1324. 0xe9,0x8b,0xdf,0x04,0x00,0x00,0x05,
  1325. 0x00}},
  1326. {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  1327. 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
  1328. 0x01}},
  1329. {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
  1330. 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
  1331. 0x00}}
  1332. };
  1333. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3_H[] =
  1334. {
  1335. {{0x65,0x4f,0x89,0x56,0x83,0xaa,0x1f,
  1336. 0x90,0x85,0x8f,0xab,0x30,0x00,0x05,
  1337. 0x00}},
  1338. {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
  1339. 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
  1340. 0x00}},
  1341. {{0x65,0x4f,0x89,0x54,0x9f,0xc4,0x1f,
  1342. 0x92,0x89,0x8f,0xb5,0x30,0x00,0x01,
  1343. 0x00}},
  1344. {{0x65,0x4f,0x89,0x56,0x83,0x83,0x1f,
  1345. 0x5e,0x83,0x5d,0x79,0x10,0x00,0x05,
  1346. 0x00}},
  1347. {{0x65,0x4f,0x89,0x56,0x83,0x04,0x3e,
  1348. 0xe0,0x85,0xdf,0xfb,0x10,0x00,0x05,
  1349. 0x00}},
  1350. {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  1351. 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
  1352. 0x01}},
  1353. {{0x2d,0x27,0x90,0x2c,0x80,0x0b,0x3e,
  1354. 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
  1355. 0x00}}
  1356. };
  1357. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1[] =
  1358. {
  1359. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1360. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1361. 0x00}},
  1362. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1363. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1364. 0x00}},
  1365. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1366. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1367. 0x00}},
  1368. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1369. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1370. 0x00}},
  1371. {{0x5f,0x4f,0x82,0x55,0x81,0x0b,0x3e,
  1372. 0xe9,0x8b,0xdf,0x04,0x30,0x00,0x05,
  1373. 0x00}},
  1374. {{0x7f,0x63,0x83,0x6c,0x1c,0x72,0xf0,
  1375. 0x58,0x8c,0x57,0x73,0x20,0x00,0x06,
  1376. 0x01}}
  1377. };
  1378. static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] =
  1379. {
  1380. {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  1381. 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
  1382. 0x00}},
  1383. {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  1384. 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
  1385. 0x00}},
  1386. {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  1387. 0x9c,0x8e,0x96,0xb9,0x00,0x00,0x00,
  1388. 0x00}},
  1389. {{0x2d,0x28,0x90,0x2b,0xa0,0xbf,0x1f,
  1390. 0x83,0x85,0x63,0xba,0x00,0x00,0x00,
  1391. 0x00}},
  1392. {{0x2d,0x28,0x90,0x2c,0x80,0x0b,0x3e,
  1393. 0xe9,0x8b,0xe7,0x04,0x00,0x00,0x00,
  1394. 0x00}}
  1395. };
  1396. bool SiSInitPtr(struct SiS_Private *SiS_Pr);
  1397. unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
  1398. int VDisplay, int Depth, bool FSTN,
  1399. unsigned short CustomT, int LCDwith, int LCDheight,
  1400. unsigned int VBFlags2);
  1401. unsigned short SiS_GetModeID_TV(int VGAEngine, unsigned int VBFlags, int HDisplay,
  1402. int VDisplay, int Depth, unsigned int VBFlags2);
  1403. unsigned short SiS_GetModeID_VGA2(int VGAEngine, unsigned int VBFlags, int HDisplay,
  1404. int VDisplay, int Depth, unsigned int VBFlags2);
  1405. void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
  1406. void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
  1407. void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
  1408. void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
  1409. void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
  1410. unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1411. unsigned short ModeIdIndex);
  1412. bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
  1413. bool SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
  1414. unsigned short *ModeIdIndex);
  1415. unsigned short SiS_GetModePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1416. unsigned short ModeIdIndex);
  1417. unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
  1418. unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
  1419. unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1420. unsigned short ModeIdIndex);
  1421. unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo,
  1422. unsigned short ModeIdIndex, unsigned short RRTI);
  1423. #ifdef CONFIG_FB_SIS_300
  1424. void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1,
  1425. unsigned short *idx2);
  1426. unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2);
  1427. unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
  1428. #endif
  1429. void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
  1430. bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
  1431. void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
  1432. void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1433. unsigned short ModeIdIndex);
  1434. void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
  1435. int yres, struct fb_var_screeninfo *var, bool writeres);
  1436. /* From init301.c: */
  1437. extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1438. unsigned short ModeIdIndex, int chkcrt2mode);
  1439. extern void SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1440. unsigned short ModeIdIndex);
  1441. extern void SiS_SetYPbPr(struct SiS_Private *SiS_Pr);
  1442. extern void SiS_SetTVMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1443. unsigned short ModeIdIndex);
  1444. extern void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
  1445. extern void SiS_DisableBridge(struct SiS_Private *);
  1446. extern bool SiS_SetCRT2Group(struct SiS_Private *, unsigned short);
  1447. extern unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1448. unsigned short ModeIdIndex);
  1449. extern void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
  1450. extern unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1451. unsigned short ModeIdIndex);
  1452. extern unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
  1453. extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
  1454. unsigned short ModeIdIndex, unsigned short RRTI);
  1455. extern bool SiS_IsVAMode(struct SiS_Private *);
  1456. extern bool SiS_IsDualEdge(struct SiS_Private *);
  1457. #ifdef CONFIG_FB_SIS_300
  1458. extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
  1459. extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg,
  1460. unsigned int val);
  1461. #endif
  1462. #ifdef CONFIG_FB_SIS_315
  1463. extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg,
  1464. unsigned char val);
  1465. extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
  1466. #endif
  1467. #endif