oem310.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. /* $XFree86$ */
  2. /* $XdotOrg$ */
  3. /*
  4. * OEM Data for 315/330/340 series
  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. static const unsigned char SiS310_LCDDelayCompensation_301[] = /* 301 */
  53. {
  54. 0x00,0x00,0x00, /* 800x600 */
  55. 0x0b,0x0b,0x0b, /* 1024x768 */
  56. 0x08,0x08,0x08, /* 1280x1024 */
  57. 0x00,0x00,0x00, /* 640x480 (unknown) */
  58. 0x00,0x00,0x00, /* 1024x600 (unknown) */
  59. 0x00,0x00,0x00, /* 1152x864 (unknown) */
  60. 0x08,0x08,0x08, /* 1280x960 (guessed) */
  61. 0x00,0x00,0x00, /* 1152x768 (unknown) */
  62. 0x08,0x08,0x08, /* 1400x1050 */
  63. 0x08,0x08,0x08, /* 1280x768 (guessed) */
  64. 0x00,0x00,0x00, /* 1600x1200 */
  65. 0x00,0x00,0x00, /* 320x480 (unknown) */
  66. 0x00,0x00,0x00,
  67. 0x00,0x00,0x00,
  68. 0x00,0x00,0x00
  69. };
  70. /* This is contained in 650+301B BIOSes, but it is wrong - so we don't use it */
  71. static const unsigned char SiS310_LCDDelayCompensation_650301LV[] = /* 650 + 30xLV */
  72. {
  73. 0x01,0x01,0x01, /* 800x600 */
  74. 0x01,0x01,0x01, /* 1024x768 */
  75. 0x01,0x01,0x01, /* 1280x1024 */
  76. 0x01,0x01,0x01, /* 640x480 (unknown) */
  77. 0x01,0x01,0x01, /* 1024x600 (unknown) */
  78. 0x01,0x01,0x01, /* 1152x864 (unknown) */
  79. 0x01,0x01,0x01, /* 1280x960 (guessed) */
  80. 0x01,0x01,0x01, /* 1152x768 (unknown) */
  81. 0x01,0x01,0x01, /* 1400x1050 */
  82. 0x01,0x01,0x01, /* 1280x768 (guessed) */
  83. 0x01,0x01,0x01, /* 1600x1200 */
  84. 0x02,0x02,0x02,
  85. 0x02,0x02,0x02,
  86. 0x02,0x02,0x02,
  87. 0x02,0x02,0x02
  88. };
  89. static const unsigned char SiS310_LCDDelayCompensation_651301LV[] = /* M650/651 301LV */
  90. {
  91. 0x33,0x33,0x33, /* 800x600 (guessed) - new: PanelType, not PanelRes ! */
  92. 0x33,0x33,0x33, /* 1024x768 */
  93. 0x33,0x33,0x33, /* 1280x1024 */
  94. 0x33,0x33,0x33, /* 640x480 (unknown) */
  95. 0x33,0x33,0x33, /* 1024x600 (unknown) */
  96. 0x33,0x33,0x33, /* 1152x864 (unknown) */
  97. 0x33,0x33,0x33, /* 1280x960 (guessed) */
  98. 0x33,0x33,0x33, /* 1152x768 (unknown) */
  99. 0x33,0x33,0x33, /* 1400x1050 */
  100. 0x33,0x33,0x33, /* 1280x768 (guessed) */
  101. 0x33,0x33,0x33, /* 1600x1200 */
  102. 0x33,0x33,0x33,
  103. 0x33,0x33,0x33,
  104. 0x33,0x33,0x33,
  105. 0x33,0x33,0x33
  106. };
  107. static const unsigned char SiS310_LCDDelayCompensation_651302LV[] = /* M650/651 302LV */
  108. {
  109. 0x33,0x33,0x33, /* 800x600 (guessed) */
  110. 0x33,0x33,0x33, /* 1024x768 */
  111. 0x33,0x33,0x33, /* 1280x1024 */
  112. 0x33,0x33,0x33, /* 640x480 (unknown) */
  113. 0x33,0x33,0x33, /* 1024x600 (unknown) */
  114. 0x33,0x33,0x33, /* 1152x864 (unknown) */
  115. 0x33,0x33,0x33, /* 1280x960 (guessed) */
  116. 0x33,0x33,0x33, /* 1152x768 (unknown) */
  117. 0x33,0x33,0x33, /* 1400x1050 */
  118. 0x33,0x33,0x33, /* 1280x768 (guessed) */
  119. 0x33,0x33,0x33, /* 1600x1200 */
  120. 0x33,0x33,0x33,
  121. 0x33,0x33,0x33,
  122. 0x33,0x33,0x33,
  123. 0x33,0x33,0x33
  124. };
  125. static const unsigned char SiS310_LCDDelayCompensation_3xx301B[] = /* 30xB */
  126. {
  127. 0x01,0x01,0x01, /* 800x600 */
  128. 0x0C,0x0C,0x0C, /* 1024x768 */
  129. 0x0C,0x0C,0x0C, /* 1280x1024 */
  130. 0x08,0x08,0x08, /* 640x480 */
  131. 0x0C,0x0C,0x0C, /* 1024x600 (guessed) */
  132. 0x0C,0x0C,0x0C, /* 1152x864 (guessed) */
  133. 0x0C,0x0C,0x0C, /* 1280x960 (guessed) */
  134. 0x0C,0x0C,0x0C, /* 1152x768 (guessed) */
  135. 0x0C,0x0C,0x0C, /* 1400x1050 (guessed) */
  136. 0x0C,0x0C,0x0C, /* 1280x768 (guessed) */
  137. 0x0C,0x0C,0x0C, /* 1600x1200 (guessed) */
  138. 0x02,0x02,0x02,
  139. 0x02,0x02,0x02,
  140. 0x02,0x02,0x02,
  141. 0x02,0x02,0x02
  142. };
  143. static const unsigned char SiS310_LCDDelayCompensation_3xx301LV[] = /* 315+30xLV */
  144. {
  145. 0x01,0x01,0x01, /* 800x600 */
  146. 0x04,0x04,0x04, /* 1024x768 (A531/BIOS 1.14.05f: 4 - works with 6 */
  147. 0x0C,0x0C,0x0C, /* 1280x1024 */
  148. 0x08,0x08,0x08, /* 640x480 */
  149. 0x0C,0x0C,0x0C, /* 1024x600 (guessed) */
  150. 0x0C,0x0C,0x0C, /* 1152x864 (guessed) */
  151. 0x0C,0x0C,0x0C, /* 1280x960 (guessed) */
  152. 0x0C,0x0C,0x0C, /* 1152x768 (guessed) */
  153. 0x0C,0x0C,0x0C, /* 1400x1050 (guessed) */
  154. 0x0C,0x0C,0x0C, /* 1280x768 (guessed) */
  155. 0x0C,0x0C,0x0C, /* 1600x1200 (guessed) */
  156. 0x02,0x02,0x02,
  157. 0x02,0x02,0x02,
  158. 0x02,0x02,0x02,
  159. 0x02,0x02,0x02
  160. };
  161. static const unsigned char SiS310_TVDelayCompensation_301[] = /* 301 */
  162. {
  163. 0x02,0x02, /* NTSC Enhanced, Standard */
  164. 0x02,0x02, /* PAL */
  165. 0x08,0x0b /* HiVision */
  166. };
  167. static const unsigned char SiS310_TVDelayCompensation_301B[] = /* 30xB, 30xLV */
  168. {
  169. 0x03,0x03,
  170. 0x03,0x03,
  171. 0x03,0x03
  172. };
  173. static const unsigned char SiS310_TVDelayCompensation_740301B[] = /* 740 + 30xB (30xLV?) */
  174. {
  175. 0x05,0x05,
  176. 0x05,0x05,
  177. 0x05,0x05
  178. };
  179. static const unsigned char SiS310_TVDelayCompensation_651301LV[] = /* M650, 651, 301LV */
  180. {
  181. 0x33,0x33,
  182. 0x33,0x33,
  183. 0x33,0x33
  184. };
  185. static const unsigned char SiS310_TVDelayCompensation_651302LV[] = /* M650, 651, 302LV */
  186. {
  187. 0x33,0x33,
  188. 0x33,0x33,
  189. 0x33,0x33
  190. };
  191. static const unsigned char SiS_TVDelay661_301[] = /* 661, 301 */
  192. {
  193. 0x44,0x44,
  194. 0x44,0x44,
  195. 0x00,0x00,
  196. 0x44,0x44,
  197. 0x44,0x44,
  198. 0x44,0x44
  199. };
  200. static const unsigned char SiS_TVDelay661_301B[] = /* 661, 301B et al */
  201. {
  202. 0x44,0x44,
  203. 0x44,0x44,
  204. 0x00,0x00,
  205. 0x44,0x44,
  206. 0x44,0x44,
  207. 0x44,0x44
  208. };
  209. static const unsigned char SiS310_TVDelayCompensation_LVDS[] = /* LVDS */
  210. {
  211. 0x0a,0x0a,
  212. 0x0a,0x0a,
  213. 0x0a,0x0a
  214. };
  215. static const unsigned char SiS310_TVAntiFlick1[6][2] =
  216. {
  217. {0x4,0x0},
  218. {0x4,0x8},
  219. {0x0,0x0},
  220. {0x0,0x0},
  221. {0x0,0x0},
  222. {0x0,0x0}
  223. };
  224. static const unsigned char SiS310_TVEdge1[6][2] =
  225. {
  226. {0x0,0x4},
  227. {0x0,0x4},
  228. {0x0,0x0},
  229. {0x0,0x0},
  230. {0x0,0x0},
  231. {0x0,0x0}
  232. };
  233. static const unsigned char SiS310_TVYFilter1[5][8][4] =
  234. {
  235. {
  236. {0x00,0xf4,0x10,0x38}, /* NTSC */
  237. {0x00,0xf4,0x10,0x38},
  238. {0xeb,0x04,0x25,0x18},
  239. {0xf1,0x04,0x1f,0x18},
  240. {0x00,0xf4,0x10,0x38},
  241. {0xeb,0x04,0x25,0x18},
  242. {0xee,0x0c,0x22,0x08},
  243. {0xeb,0x15,0x25,0xf6}
  244. },
  245. {
  246. {0x00,0xf4,0x10,0x38}, /* PAL */
  247. {0x00,0xf4,0x10,0x38},
  248. {0xf1,0xf7,0x1f,0x32},
  249. {0xf3,0x00,0x1d,0x20},
  250. {0x00,0xf4,0x10,0x38},
  251. {0xf1,0xf7,0x1f,0x32},
  252. {0xf3,0x00,0x1d,0x20},
  253. {0xfc,0xfb,0x14,0x2a}
  254. },
  255. {
  256. {0x00,0x00,0x00,0x00}, /* HiVision */
  257. {0x00,0xf4,0x10,0x38},
  258. {0x00,0xf4,0x10,0x38},
  259. {0xeb,0x04,0x25,0x18},
  260. {0xf7,0x06,0x19,0x14},
  261. {0x00,0xf4,0x10,0x38},
  262. {0xeb,0x04,0x25,0x18},
  263. {0xee,0x0c,0x22,0x08}
  264. },
  265. {
  266. {0x00,0xf4,0x10,0x38}, /* PAL-M */
  267. {0x00,0xf4,0x10,0x38},
  268. {0xeb,0x04,0x10,0x18},
  269. {0xf7,0x06,0x19,0x14},
  270. {0x00,0xf4,0x10,0x38},
  271. {0xeb,0x04,0x25,0x18},
  272. {0xeb,0x04,0x25,0x18},
  273. {0xeb,0x15,0x25,0xf6}
  274. },
  275. {
  276. {0x00,0xf4,0x10,0x38}, /* PAL-N */
  277. {0x00,0xf4,0x10,0x38},
  278. {0xeb,0x04,0x10,0x18},
  279. {0xf7,0x06,0x19,0x14},
  280. {0x00,0xf4,0x10,0x38},
  281. {0xeb,0x04,0x25,0x18},
  282. {0xeb,0x04,0x25,0x18},
  283. {0xeb,0x15,0x25,0xf6}
  284. }
  285. };
  286. static const unsigned char SiS310_TVYFilter2[5][9][7] =
  287. {
  288. {
  289. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* NTSC */
  290. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  291. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  292. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  293. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  294. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  295. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  296. {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
  297. {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
  298. },
  299. {
  300. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL */
  301. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  302. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  303. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  304. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  305. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  306. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  307. {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
  308. {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
  309. },
  310. {
  311. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}, /* HiVision */
  312. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  313. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  314. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  315. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  316. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  317. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  318. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22},
  319. {0x00,0x00,0x00,0xF4,0xFF,0x1C,0x22}
  320. },
  321. {
  322. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL-M */
  323. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  324. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  325. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  326. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  327. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  328. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  329. {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
  330. {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
  331. },
  332. {
  333. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46}, /* PAL-N */
  334. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  335. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  336. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  337. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  338. {0xFF,0x03,0x02,0xF6,0xFC,0x27,0x46},
  339. {0x01,0x02,0xFE,0xF7,0x03,0x27,0x3C},
  340. {0x01,0x01,0xFC,0xF8,0x08,0x26,0x38},
  341. {0xFF,0xFF,0xFC,0x00,0x0F,0x22,0x28}
  342. }
  343. };
  344. static const unsigned char SiS310_TVPhaseIncr1[3][2][4] =
  345. {
  346. {
  347. {0x21,0xed,0xba,0x08},
  348. {0x21,0xed,0xba,0x08}
  349. },
  350. {
  351. {0x2a,0x05,0xe3,0x00},
  352. {0x2a,0x05,0xe3,0x00}
  353. },
  354. {
  355. {0x2a,0x05,0xd3,0x00},
  356. {0x2a,0x05,0xd3,0x00}
  357. }
  358. };
  359. static const unsigned char SiS310_TVPhaseIncr2[3][2][4] =
  360. {
  361. {
  362. {0x21,0xf0,0x7b,0xd6},
  363. {0x21,0xf0,0x7b,0xd6}
  364. },
  365. {
  366. {0x2a,0x0a,0x41,0xe9},
  367. {0x2a,0x0a,0x41,0xe9}
  368. },
  369. {
  370. {0x2a,0x05,0xd3,0x00},
  371. {0x2a,0x05,0xd3,0x00}
  372. }
  373. };
  374. /**************************************************************/
  375. /* CUSTOM TIMING DATA --------------------------------------- */
  376. /**************************************************************/
  377. /* Inventec / Compaq Presario 3045US, 3017 */
  378. static const struct SiS_LCDData SiS310_ExtCompaq1280x1024Data[] =
  379. {
  380. { 211, 60,1024, 501,1688,1066},
  381. { 211, 60,1024, 508,1688,1066},
  382. { 211, 60,1024, 501,1688,1066},
  383. { 211, 60,1024, 508,1688,1066},
  384. { 32, 15,1696, 501,1696,1066},
  385. { 212, 75,1024, 621,1696,1066},
  386. { 4, 3,1696, 810,1696,1066},
  387. { 1, 1,1696,1066,1696,1066}
  388. };
  389. /* Asus A2xxxH _2 */
  390. static const struct SiS_Part2PortTbl SiS310_CRT2Part2_Asus1024x768_3[] =
  391. {
  392. {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
  393. {{0x2c,0x13,0x9a,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
  394. {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
  395. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
  396. {{0x38,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
  397. {{0x38,0x13,0x16,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
  398. {{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
  399. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
  400. {{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}
  401. };