drm_edid_modes.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. /*
  2. * Copyright (c) 2007-2008 Intel Corporation
  3. * Jesse Barnes <jesse.barnes@intel.com>
  4. * Copyright 2010 Red Hat, Inc.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sub license,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice (including the
  14. * next paragraph) shall be included in all copies or substantial portions
  15. * of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
  20. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  23. * DEALINGS IN THE SOFTWARE.
  24. */
  25. #include <linux/kernel.h>
  26. #include "drmP.h"
  27. #include "drm_edid.h"
  28. /*
  29. * Autogenerated from the DMT spec.
  30. * This table is copied from xfree86/modes/xf86EdidModes.c.
  31. * But the mode with Reduced blank feature is deleted.
  32. */
  33. static const struct drm_display_mode drm_dmt_modes[] = {
  34. /* 640x350@85Hz */
  35. { DRM_MODE("640x350", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
  36. 736, 832, 0, 350, 382, 385, 445, 0,
  37. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
  38. /* 640x400@85Hz */
  39. { DRM_MODE("640x400", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
  40. 736, 832, 0, 400, 401, 404, 445, 0,
  41. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  42. /* 720x400@85Hz */
  43. { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 756,
  44. 828, 936, 0, 400, 401, 404, 446, 0,
  45. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  46. /* 640x480@60Hz */
  47. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
  48. 752, 800, 0, 480, 489, 492, 525, 0,
  49. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  50. /* 640x480@72Hz */
  51. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
  52. 704, 832, 0, 480, 489, 492, 520, 0,
  53. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  54. /* 640x480@75Hz */
  55. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
  56. 720, 840, 0, 480, 481, 484, 500, 0,
  57. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  58. /* 640x480@85Hz */
  59. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 36000, 640, 696,
  60. 752, 832, 0, 480, 481, 484, 509, 0,
  61. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  62. /* 800x600@56Hz */
  63. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
  64. 896, 1024, 0, 600, 601, 603, 625, 0,
  65. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  66. /* 800x600@60Hz */
  67. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
  68. 968, 1056, 0, 600, 601, 605, 628, 0,
  69. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  70. /* 800x600@72Hz */
  71. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
  72. 976, 1040, 0, 600, 637, 643, 666, 0,
  73. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  74. /* 800x600@75Hz */
  75. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
  76. 896, 1056, 0, 600, 601, 604, 625, 0,
  77. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  78. /* 800x600@85Hz */
  79. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 56250, 800, 832,
  80. 896, 1048, 0, 600, 601, 604, 631, 0,
  81. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  82. /* 848x480@60Hz */
  83. { DRM_MODE("848x480", DRM_MODE_TYPE_DRIVER, 33750, 848, 864,
  84. 976, 1088, 0, 480, 486, 494, 517, 0,
  85. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  86. /* 1024x768@43Hz, interlace */
  87. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 44900, 1024, 1032,
  88. 1208, 1264, 0, 768, 768, 772, 817, 0,
  89. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
  90. DRM_MODE_FLAG_INTERLACE) },
  91. /* 1024x768@60Hz */
  92. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
  93. 1184, 1344, 0, 768, 771, 777, 806, 0,
  94. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  95. /* 1024x768@70Hz */
  96. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
  97. 1184, 1328, 0, 768, 771, 777, 806, 0,
  98. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  99. /* 1024x768@75Hz */
  100. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78750, 1024, 1040,
  101. 1136, 1312, 0, 768, 769, 772, 800, 0,
  102. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  103. /* 1024x768@85Hz */
  104. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
  105. 1168, 1376, 0, 768, 769, 772, 808, 0,
  106. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  107. /* 1152x864@75Hz */
  108. { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
  109. 1344, 1600, 0, 864, 865, 868, 900, 0,
  110. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  111. /* 1280x768@60Hz */
  112. { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 79500, 1280, 1344,
  113. 1472, 1664, 0, 768, 771, 778, 798, 0,
  114. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  115. /* 1280x768@75Hz */
  116. { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 102250, 1280, 1360,
  117. 1488, 1696, 0, 768, 771, 778, 805, 0,
  118. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
  119. /* 1280x768@85Hz */
  120. { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 117500, 1280, 1360,
  121. 1496, 1712, 0, 768, 771, 778, 809, 0,
  122. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  123. /* 1280x800@60Hz */
  124. { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 83500, 1280, 1352,
  125. 1480, 1680, 0, 800, 803, 809, 831, 0,
  126. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
  127. /* 1280x800@75Hz */
  128. { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 106500, 1280, 1360,
  129. 1488, 1696, 0, 800, 803, 809, 838, 0,
  130. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  131. /* 1280x800@85Hz */
  132. { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 122500, 1280, 1360,
  133. 1496, 1712, 0, 800, 803, 809, 843, 0,
  134. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  135. /* 1280x960@60Hz */
  136. { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1376,
  137. 1488, 1800, 0, 960, 961, 964, 1000, 0,
  138. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  139. /* 1280x960@85Hz */
  140. { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1344,
  141. 1504, 1728, 0, 960, 961, 964, 1011, 0,
  142. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  143. /* 1280x1024@60Hz */
  144. { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1328,
  145. 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
  146. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  147. /* 1280x1024@75Hz */
  148. { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
  149. 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
  150. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  151. /* 1280x1024@85Hz */
  152. { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 157500, 1280, 1344,
  153. 1504, 1728, 0, 1024, 1025, 1028, 1072, 0,
  154. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  155. /* 1360x768@60Hz */
  156. { DRM_MODE("1360x768", DRM_MODE_TYPE_DRIVER, 85500, 1360, 1424,
  157. 1536, 1792, 0, 768, 771, 777, 795, 0,
  158. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  159. /* 1440x1050@60Hz */
  160. { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 121750, 1400, 1488,
  161. 1632, 1864, 0, 1050, 1053, 1057, 1089, 0,
  162. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  163. /* 1440x1050@75Hz */
  164. { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 156000, 1400, 1504,
  165. 1648, 1896, 0, 1050, 1053, 1057, 1099, 0,
  166. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  167. /* 1440x1050@85Hz */
  168. { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 179500, 1400, 1504,
  169. 1656, 1912, 0, 1050, 1053, 1057, 1105, 0,
  170. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  171. /* 1440x900@60Hz */
  172. { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 106500, 1440, 1520,
  173. 1672, 1904, 0, 900, 903, 909, 934, 0,
  174. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  175. /* 1440x900@75Hz */
  176. { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 136750, 1440, 1536,
  177. 1688, 1936, 0, 900, 903, 909, 942, 0,
  178. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  179. /* 1440x900@85Hz */
  180. { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 157000, 1440, 1544,
  181. 1696, 1952, 0, 900, 903, 909, 948, 0,
  182. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  183. /* 1600x1200@60Hz */
  184. { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 162000, 1600, 1664,
  185. 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
  186. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  187. /* 1600x1200@65Hz */
  188. { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 175500, 1600, 1664,
  189. 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
  190. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  191. /* 1600x1200@70Hz */
  192. { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 189000, 1600, 1664,
  193. 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
  194. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  195. /* 1600x1200@75Hz */
  196. { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 202500, 1600, 1664,
  197. 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
  198. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  199. /* 1600x1200@85Hz */
  200. { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 229500, 1600, 1664,
  201. 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
  202. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  203. /* 1680x1050@60Hz */
  204. { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 146250, 1680, 1784,
  205. 1960, 2240, 0, 1050, 1053, 1059, 1089, 0,
  206. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  207. /* 1680x1050@75Hz */
  208. { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 187000, 1680, 1800,
  209. 1976, 2272, 0, 1050, 1053, 1059, 1099, 0,
  210. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  211. /* 1680x1050@85Hz */
  212. { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 214750, 1680, 1808,
  213. 1984, 2288, 0, 1050, 1053, 1059, 1105, 0,
  214. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  215. /* 1792x1344@60Hz */
  216. { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 204750, 1792, 1920,
  217. 2120, 2448, 0, 1344, 1345, 1348, 1394, 0,
  218. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  219. /* 1729x1344@75Hz */
  220. { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 261000, 1792, 1888,
  221. 2104, 2456, 0, 1344, 1345, 1348, 1417, 0,
  222. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  223. /* 1853x1392@60Hz */
  224. { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 218250, 1856, 1952,
  225. 2176, 2528, 0, 1392, 1393, 1396, 1439, 0,
  226. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  227. /* 1856x1392@75Hz */
  228. { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 288000, 1856, 1984,
  229. 2208, 2560, 0, 1392, 1395, 1399, 1500, 0,
  230. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  231. /* 1920x1200@60Hz */
  232. { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 193250, 1920, 2056,
  233. 2256, 2592, 0, 1200, 1203, 1209, 1245, 0,
  234. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  235. /* 1920x1200@75Hz */
  236. { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 245250, 1920, 2056,
  237. 2264, 2608, 0, 1200, 1203, 1209, 1255, 0,
  238. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  239. /* 1920x1200@85Hz */
  240. { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 281250, 1920, 2064,
  241. 2272, 2624, 0, 1200, 1203, 1209, 1262, 0,
  242. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  243. /* 1920x1440@60Hz */
  244. { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 234000, 1920, 2048,
  245. 2256, 2600, 0, 1440, 1441, 1444, 1500, 0,
  246. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  247. /* 1920x1440@75Hz */
  248. { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2064,
  249. 2288, 2640, 0, 1440, 1441, 1444, 1500, 0,
  250. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  251. /* 2560x1600@60Hz */
  252. { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 348500, 2560, 2752,
  253. 3032, 3504, 0, 1600, 1603, 1609, 1658, 0,
  254. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  255. /* 2560x1600@75HZ */
  256. { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 443250, 2560, 2768,
  257. 3048, 3536, 0, 1600, 1603, 1609, 1672, 0,
  258. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  259. /* 2560x1600@85HZ */
  260. { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 505250, 2560, 2768,
  261. 3048, 3536, 0, 1600, 1603, 1609, 1682, 0,
  262. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
  263. };
  264. static const int drm_num_dmt_modes =
  265. sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
  266. static const struct drm_display_mode edid_est_modes[] = {
  267. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
  268. 968, 1056, 0, 600, 601, 605, 628, 0,
  269. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@60Hz */
  270. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
  271. 896, 1024, 0, 600, 601, 603, 625, 0,
  272. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@56Hz */
  273. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
  274. 720, 840, 0, 480, 481, 484, 500, 0,
  275. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@75Hz */
  276. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
  277. 704, 832, 0, 480, 489, 491, 520, 0,
  278. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@72Hz */
  279. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 30240, 640, 704,
  280. 768, 864, 0, 480, 483, 486, 525, 0,
  281. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@67Hz */
  282. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25200, 640, 656,
  283. 752, 800, 0, 480, 490, 492, 525, 0,
  284. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@60Hz */
  285. { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 738,
  286. 846, 900, 0, 400, 421, 423, 449, 0,
  287. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 720x400@88Hz */
  288. { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 28320, 720, 738,
  289. 846, 900, 0, 400, 412, 414, 449, 0,
  290. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 720x400@70Hz */
  291. { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
  292. 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
  293. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1280x1024@75Hz */
  294. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78800, 1024, 1040,
  295. 1136, 1312, 0, 768, 769, 772, 800, 0,
  296. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1024x768@75Hz */
  297. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
  298. 1184, 1328, 0, 768, 771, 777, 806, 0,
  299. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 1024x768@70Hz */
  300. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
  301. 1184, 1344, 0, 768, 771, 777, 806, 0,
  302. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 1024x768@60Hz */
  303. { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER,44900, 1024, 1032,
  304. 1208, 1264, 0, 768, 768, 776, 817, 0,
  305. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* 1024x768@43Hz */
  306. { DRM_MODE("832x624", DRM_MODE_TYPE_DRIVER, 57284, 832, 864,
  307. 928, 1152, 0, 624, 625, 628, 667, 0,
  308. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 832x624@75Hz */
  309. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
  310. 896, 1056, 0, 600, 601, 604, 625, 0,
  311. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@75Hz */
  312. { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
  313. 976, 1040, 0, 600, 637, 643, 666, 0,
  314. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@72Hz */
  315. { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
  316. 1344, 1600, 0, 864, 865, 868, 900, 0,
  317. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1152x864@75Hz */
  318. };
  319. static const struct {
  320. short w;
  321. short h;
  322. short r;
  323. short rb;
  324. } est3_modes[] = {
  325. /* byte 6 */
  326. { 640, 350, 85, 0 },
  327. { 640, 400, 85, 0 },
  328. { 720, 400, 85, 0 },
  329. { 640, 480, 85, 0 },
  330. { 848, 480, 60, 0 },
  331. { 800, 600, 85, 0 },
  332. { 1024, 768, 85, 0 },
  333. { 1152, 864, 75, 0 },
  334. /* byte 7 */
  335. { 1280, 768, 60, 1 },
  336. { 1280, 768, 60, 0 },
  337. { 1280, 768, 75, 0 },
  338. { 1280, 768, 85, 0 },
  339. { 1280, 960, 60, 0 },
  340. { 1280, 960, 85, 0 },
  341. { 1280, 1024, 60, 0 },
  342. { 1280, 1024, 85, 0 },
  343. /* byte 8 */
  344. { 1360, 768, 60, 0 },
  345. { 1440, 900, 60, 1 },
  346. { 1440, 900, 60, 0 },
  347. { 1440, 900, 75, 0 },
  348. { 1440, 900, 85, 0 },
  349. { 1400, 1050, 60, 1 },
  350. { 1400, 1050, 60, 0 },
  351. { 1400, 1050, 75, 0 },
  352. /* byte 9 */
  353. { 1400, 1050, 85, 0 },
  354. { 1680, 1050, 60, 1 },
  355. { 1680, 1050, 60, 0 },
  356. { 1680, 1050, 75, 0 },
  357. { 1680, 1050, 85, 0 },
  358. { 1600, 1200, 60, 0 },
  359. { 1600, 1200, 65, 0 },
  360. { 1600, 1200, 70, 0 },
  361. /* byte 10 */
  362. { 1600, 1200, 75, 0 },
  363. { 1600, 1200, 85, 0 },
  364. { 1792, 1344, 60, 0 },
  365. { 1792, 1344, 85, 0 },
  366. { 1856, 1392, 60, 0 },
  367. { 1856, 1392, 75, 0 },
  368. { 1920, 1200, 60, 1 },
  369. { 1920, 1200, 60, 0 },
  370. /* byte 11 */
  371. { 1920, 1200, 75, 0 },
  372. { 1920, 1200, 85, 0 },
  373. { 1920, 1440, 60, 0 },
  374. { 1920, 1440, 75, 0 },
  375. };
  376. static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]);
  377. /*
  378. * Probably taken from CEA-861 spec.
  379. * This table is converted from xorg's hw/xfree86/modes/xf86EdidModes.c.
  380. */
  381. static const struct drm_display_mode edid_cea_modes[] = {
  382. /* 640x480@60Hz */
  383. { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
  384. 752, 800, 0, 480, 490, 492, 525, 0,
  385. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  386. /* 720x480@60Hz */
  387. { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
  388. 798, 858, 0, 480, 489, 495, 525, 0,
  389. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  390. /* 720x480@60Hz */
  391. { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
  392. 798, 858, 0, 480, 489, 495, 525, 0,
  393. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  394. /* 1280x720@60Hz */
  395. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
  396. 1430, 1650, 0, 720, 725, 730, 750, 0,
  397. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  398. /* 1920x1080i@60Hz */
  399. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
  400. 2052, 2200, 0, 1080, 1084, 1094, 1125, 0,
  401. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
  402. DRM_MODE_FLAG_INTERLACE) },
  403. /* 1440x480i@60Hz */
  404. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
  405. 1602, 1716, 0, 480, 488, 494, 525, 0,
  406. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  407. DRM_MODE_FLAG_INTERLACE) },
  408. /* 1440x480i@60Hz */
  409. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
  410. 1602, 1716, 0, 480, 488, 494, 525, 0,
  411. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  412. DRM_MODE_FLAG_INTERLACE) },
  413. /* 1440x240@60Hz */
  414. { DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
  415. 1602, 1716, 0, 240, 244, 247, 262, 0,
  416. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  417. /* 1440x240@60Hz */
  418. { DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
  419. 1602, 1716, 0, 240, 244, 247, 262, 0,
  420. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  421. /* 2880x480i@60Hz */
  422. { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
  423. 3204, 3432, 0, 480, 488, 494, 525, 0,
  424. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  425. DRM_MODE_FLAG_INTERLACE) },
  426. /* 2880x480i@60Hz */
  427. { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
  428. 3204, 3432, 0, 480, 488, 494, 525, 0,
  429. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  430. DRM_MODE_FLAG_INTERLACE) },
  431. /* 2880x240@60Hz */
  432. { DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
  433. 3204, 3432, 0, 240, 244, 247, 262, 0,
  434. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  435. /* 2880x240@60Hz */
  436. { DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
  437. 3204, 3432, 0, 240, 244, 247, 262, 0,
  438. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  439. /* 1440x480@60Hz */
  440. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1472,
  441. 1596, 1716, 0, 480, 489, 495, 525, 0,
  442. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  443. /* 1440x480@60Hz */
  444. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1472,
  445. 1596, 1716, 0, 480, 489, 495, 525, 0,
  446. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  447. /* 1920x1080@60Hz */
  448. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
  449. 2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
  450. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  451. /* 720x576@50Hz */
  452. { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
  453. 796, 864, 0, 576, 581, 586, 625, 0,
  454. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  455. /* 720x576@50Hz */
  456. { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
  457. 796, 864, 0, 576, 581, 586, 625, 0,
  458. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  459. /* 1280x720@50Hz */
  460. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
  461. 1760, 1980, 0, 720, 725, 730, 750, 0,
  462. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  463. /* 1920x1080i@50Hz */
  464. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
  465. 2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
  466. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
  467. DRM_MODE_FLAG_INTERLACE) },
  468. /* 1440x576i@50Hz */
  469. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
  470. 1590, 1728, 0, 576, 580, 586, 625, 0,
  471. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  472. DRM_MODE_FLAG_INTERLACE) },
  473. /* 1440x576i@50Hz */
  474. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
  475. 1590, 1728, 0, 576, 580, 586, 625, 0,
  476. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  477. DRM_MODE_FLAG_INTERLACE) },
  478. /* 1440x288@50Hz */
  479. { DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
  480. 1590, 1728, 0, 288, 290, 293, 312, 0,
  481. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  482. /* 1440x288@50Hz */
  483. { DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
  484. 1590, 1728, 0, 288, 290, 293, 312, 0,
  485. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  486. /* 2880x576i@50Hz */
  487. { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
  488. 3180, 3456, 0, 576, 580, 586, 625, 0,
  489. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  490. DRM_MODE_FLAG_INTERLACE) },
  491. /* 2880x576i@50Hz */
  492. { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
  493. 3180, 3456, 0, 576, 580, 586, 625, 0,
  494. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  495. DRM_MODE_FLAG_INTERLACE) },
  496. /* 2880x288@50Hz */
  497. { DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
  498. 3180, 3456, 0, 288, 290, 293, 312, 0,
  499. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  500. /* 2880x288@50Hz */
  501. { DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
  502. 3180, 3456, 0, 288, 290, 293, 312, 0,
  503. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  504. /* 1440x576@50Hz */
  505. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
  506. 1592, 1728, 0, 576, 581, 586, 625, 0,
  507. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  508. /* 1440x576@50Hz */
  509. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
  510. 1592, 1728, 0, 576, 581, 586, 625, 0,
  511. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  512. /* 1920x1080@50Hz */
  513. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
  514. 2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
  515. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  516. /* 1920x1080@24Hz */
  517. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
  518. 2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
  519. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  520. /* 1920x1080@25Hz */
  521. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
  522. 2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
  523. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  524. /* 1920x1080@30Hz */
  525. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
  526. 2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
  527. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  528. /* 2880x480@60Hz */
  529. { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2944,
  530. 3192, 3432, 0, 480, 489, 495, 525, 0,
  531. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  532. /* 2880x480@60Hz */
  533. { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2944,
  534. 3192, 3432, 0, 480, 489, 495, 525, 0,
  535. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  536. /* 2880x576@50Hz */
  537. { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2928,
  538. 3184, 3456, 0, 576, 581, 586, 625, 0,
  539. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  540. /* 2880x576@50Hz */
  541. { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2928,
  542. 3184, 3456, 0, 576, 581, 586, 625, 0,
  543. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  544. /* 1920x1080i@50Hz */
  545. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 72000, 1920, 1952,
  546. 2120, 2304, 0, 1080, 1126, 1136, 1250, 0,
  547. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC |
  548. DRM_MODE_FLAG_INTERLACE) },
  549. /* 1920x1080i@100Hz */
  550. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
  551. 2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
  552. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
  553. DRM_MODE_FLAG_INTERLACE) },
  554. /* 1280x720@100Hz */
  555. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
  556. 1760, 1980, 0, 720, 725, 730, 750, 0,
  557. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  558. /* 720x576@100Hz */
  559. { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 732,
  560. 796, 864, 0, 576, 581, 586, 625, 0,
  561. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  562. /* 720x576@100Hz */
  563. { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 732,
  564. 796, 864, 0, 576, 581, 586, 625, 0,
  565. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  566. /* 1440x576i@100Hz */
  567. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
  568. 1590, 1728, 0, 576, 580, 586, 625, 0,
  569. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  570. /* 1440x576i@100Hz */
  571. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
  572. 1590, 1728, 0, 576, 580, 586, 625, 0,
  573. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  574. /* 1920x1080i@120Hz */
  575. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
  576. 2052, 2200, 0, 1080, 1084, 1094, 1125, 0,
  577. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
  578. DRM_MODE_FLAG_INTERLACE) },
  579. /* 1280x720@120Hz */
  580. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
  581. 1430, 1650, 0, 720, 725, 730, 750, 0,
  582. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  583. /* 720x480@120Hz */
  584. { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000, 720, 736,
  585. 798, 858, 0, 480, 489, 495, 525, 0,
  586. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  587. /* 720x480@120Hz */
  588. { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000, 720, 736,
  589. 798, 858, 0, 480, 489, 495, 525, 0,
  590. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  591. /* 1440x480i@120Hz */
  592. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
  593. 1602, 1716, 0, 480, 488, 494, 525, 0,
  594. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  595. DRM_MODE_FLAG_INTERLACE) },
  596. /* 1440x480i@120Hz */
  597. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
  598. 1602, 1716, 0, 480, 488, 494, 525, 0,
  599. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  600. DRM_MODE_FLAG_INTERLACE) },
  601. /* 720x576@200Hz */
  602. { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000, 720, 732,
  603. 796, 864, 0, 576, 581, 586, 625, 0,
  604. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  605. /* 720x576@200Hz */
  606. { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000, 720, 732,
  607. 796, 864, 0, 576, 581, 586, 625, 0,
  608. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  609. /* 1440x576i@200Hz */
  610. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
  611. 1590, 1728, 0, 576, 580, 586, 625, 0,
  612. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  613. DRM_MODE_FLAG_INTERLACE) },
  614. /* 1440x576i@200Hz */
  615. { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
  616. 1590, 1728, 0, 576, 580, 586, 625, 0,
  617. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  618. DRM_MODE_FLAG_INTERLACE) },
  619. /* 720x480@240Hz */
  620. { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000, 720, 736,
  621. 798, 858, 0, 480, 489, 495, 525, 0,
  622. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  623. /* 720x480@240Hz */
  624. { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000, 720, 736,
  625. 798, 858, 0, 480, 489, 495, 525, 0,
  626. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
  627. /* 1440x480i@240 */
  628. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
  629. 1602, 1716, 0, 480, 488, 494, 525, 0,
  630. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  631. DRM_MODE_FLAG_INTERLACE) },
  632. /* 1440x480i@240 */
  633. { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
  634. 1602, 1716, 0, 480, 488, 494, 525, 0,
  635. DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
  636. DRM_MODE_FLAG_INTERLACE) },
  637. /* 1280x720@24Hz */
  638. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
  639. 3080, 3300, 0, 720, 725, 730, 750, 0,
  640. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  641. /* 1280x720@25Hz */
  642. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
  643. 3740, 3960, 0, 720, 725, 730, 750, 0,
  644. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  645. /* 1280x720@30Hz */
  646. { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
  647. 3080, 3300, 0, 720, 725, 730, 750, 0,
  648. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  649. /* 1920x1080@120Hz */
  650. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
  651. 2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
  652. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  653. /* 1920x1080@100Hz */
  654. { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
  655. 2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
  656. DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
  657. };
  658. static const int drm_num_cea_modes =
  659. sizeof (edid_cea_modes) / sizeof (edid_cea_modes[0]);