Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
drm_edid_modes.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007-2008 Intel Corporation
3  * Jesse Barnes <[email protected]>
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 
26 #include <linux/kernel.h>
27 #include <drm/drmP.h>
28 #include <drm/drm_edid.h>
29 
30 /*
31  * Autogenerated from the DMT spec.
32  * This table is copied from xfree86/modes/xf86EdidModes.c.
33  */
34 static const struct drm_display_mode drm_dmt_modes[] = {
35  /* [email protected] */
36  { DRM_MODE("640x350", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
37  736, 832, 0, 350, 382, 385, 445, 0,
39  /* [email protected] */
40  { DRM_MODE("640x400", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
41  736, 832, 0, 400, 401, 404, 445, 0,
43  /* [email protected] */
44  { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 756,
45  828, 936, 0, 400, 401, 404, 446, 0,
47  /* [email protected] */
48  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
49  752, 800, 0, 480, 489, 492, 525, 0,
51  /* [email protected] */
52  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
53  704, 832, 0, 480, 489, 492, 520, 0,
55  /* [email protected] */
56  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
57  720, 840, 0, 480, 481, 484, 500, 0,
59  /* [email protected] */
60  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 36000, 640, 696,
61  752, 832, 0, 480, 481, 484, 509, 0,
63  /* [email protected] */
64  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
65  896, 1024, 0, 600, 601, 603, 625, 0,
67  /* [email protected] */
68  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
69  968, 1056, 0, 600, 601, 605, 628, 0,
71  /* [email protected] */
72  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
73  976, 1040, 0, 600, 637, 643, 666, 0,
75  /* [email protected] */
76  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
77  896, 1056, 0, 600, 601, 604, 625, 0,
79  /* [email protected] */
80  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 56250, 800, 832,
81  896, 1048, 0, 600, 601, 604, 631, 0,
83  /* [email protected] RB */
84  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 73250, 800, 848,
85  880, 960, 0, 600, 603, 607, 636, 0,
87  /* [email protected] */
88  { DRM_MODE("848x480", DRM_MODE_TYPE_DRIVER, 33750, 848, 864,
89  976, 1088, 0, 480, 486, 494, 517, 0,
91  /* [email protected], interlace */
92  { DRM_MODE("1024x768i", DRM_MODE_TYPE_DRIVER, 44900, 1024, 1032,
93  1208, 1264, 0, 768, 768, 772, 817, 0,
96  /* [email protected] */
97  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
98  1184, 1344, 0, 768, 771, 777, 806, 0,
100  /* [email protected] */
101  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
102  1184, 1328, 0, 768, 771, 777, 806, 0,
104  /* [email protected] */
105  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78750, 1024, 1040,
106  1136, 1312, 0, 768, 769, 772, 800, 0,
108  /* [email protected] */
109  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
110  1168, 1376, 0, 768, 769, 772, 808, 0,
112  /* [email protected] RB */
113  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 115500, 1024, 1072,
114  1104, 1184, 0, 768, 771, 775, 813, 0,
116  /* [email protected] */
117  { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
118  1344, 1600, 0, 864, 865, 868, 900, 0,
120  /* [email protected] RB */
121  { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 68250, 1280, 1328,
122  1360, 1440, 0, 768, 771, 778, 790, 0,
124  /* [email protected] */
125  { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 79500, 1280, 1344,
126  1472, 1664, 0, 768, 771, 778, 798, 0,
128  /* [email protected] */
129  { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 102250, 1280, 1360,
130  1488, 1696, 0, 768, 771, 778, 805, 0,
132  /* [email protected] */
133  { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 117500, 1280, 1360,
134  1496, 1712, 0, 768, 771, 778, 809, 0,
136  /* [email protected] RB */
137  { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 140250, 1280, 1328,
138  1360, 1440, 0, 768, 771, 778, 813, 0,
140  /* [email protected] RB */
141  { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 71000, 1280, 1328,
142  1360, 1440, 0, 800, 803, 809, 823, 0,
144  /* [email protected] */
145  { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 83500, 1280, 1352,
146  1480, 1680, 0, 800, 803, 809, 831, 0,
148  /* [email protected] */
149  { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 106500, 1280, 1360,
150  1488, 1696, 0, 800, 803, 809, 838, 0,
152  /* [email protected] */
153  { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 122500, 1280, 1360,
154  1496, 1712, 0, 800, 803, 809, 843, 0,
156  /* [email protected] RB */
157  { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 146250, 1280, 1328,
158  1360, 1440, 0, 800, 803, 809, 847, 0,
160  /* [email protected] */
161  { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1376,
162  1488, 1800, 0, 960, 961, 964, 1000, 0,
164  /* [email protected] */
165  { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1344,
166  1504, 1728, 0, 960, 961, 964, 1011, 0,
168  /* [email protected] RB */
169  { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 175500, 1280, 1328,
170  1360, 1440, 0, 960, 963, 967, 1017, 0,
172  /* [email protected] */
173  { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1328,
174  1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
176  /* [email protected] */
177  { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
178  1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
180  /* [email protected] */
181  { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 157500, 1280, 1344,
182  1504, 1728, 0, 1024, 1025, 1028, 1072, 0,
184  /* [email protected] RB */
185  { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 187250, 1280, 1328,
186  1360, 1440, 0, 1024, 1027, 1034, 1084, 0,
188  /* [email protected] */
189  { DRM_MODE("1360x768", DRM_MODE_TYPE_DRIVER, 85500, 1360, 1424,
190  1536, 1792, 0, 768, 771, 777, 795, 0,
192  /* [email protected] RB */
193  { DRM_MODE("1360x768", DRM_MODE_TYPE_DRIVER, 148250, 1360, 1408,
194  1440, 1520, 0, 768, 771, 776, 813, 0,
196  /* [email protected] RB */
197  { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 101000, 1400, 1448,
198  1480, 1560, 0, 1050, 1053, 1057, 1080, 0,
200  /* [email protected] */
201  { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 121750, 1400, 1488,
202  1632, 1864, 0, 1050, 1053, 1057, 1089, 0,
204  /* [email protected] */
205  { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 156000, 1400, 1504,
206  1648, 1896, 0, 1050, 1053, 1057, 1099, 0,
208  /* [email protected] */
209  { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 179500, 1400, 1504,
210  1656, 1912, 0, 1050, 1053, 1057, 1105, 0,
212  /* [email protected] RB */
213  { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 208000, 1400, 1448,
214  1480, 1560, 0, 1050, 1053, 1057, 1112, 0,
216  /* [email protected] RB */
217  { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 88750, 1440, 1488,
218  1520, 1600, 0, 900, 903, 909, 926, 0,
220  /* [email protected] */
221  { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 106500, 1440, 1520,
222  1672, 1904, 0, 900, 903, 909, 934, 0,
224  /* [email protected] */
225  { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 136750, 1440, 1536,
226  1688, 1936, 0, 900, 903, 909, 942, 0,
228  /* [email protected] */
229  { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 157000, 1440, 1544,
230  1696, 1952, 0, 900, 903, 909, 948, 0,
232  /* [email protected] RB */
233  { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 182750, 1440, 1488,
234  1520, 1600, 0, 900, 903, 909, 953, 0,
236  /* [email protected] */
237  { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 162000, 1600, 1664,
238  1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
240  /* [email protected] */
241  { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 175500, 1600, 1664,
242  1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
244  /* [email protected] */
245  { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 189000, 1600, 1664,
246  1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
248  /* [email protected] */
249  { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 202500, 1600, 1664,
250  1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
252  /* [email protected] */
253  { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 229500, 1600, 1664,
254  1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
256  /* [email protected] RB */
257  { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 268250, 1600, 1648,
258  1680, 1760, 0, 1200, 1203, 1207, 1271, 0,
260  /* [email protected] RB */
261  { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 119000, 1680, 1728,
262  1760, 1840, 0, 1050, 1053, 1059, 1080, 0,
264  /* [email protected] */
265  { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 146250, 1680, 1784,
266  1960, 2240, 0, 1050, 1053, 1059, 1089, 0,
268  /* [email protected] */
269  { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 187000, 1680, 1800,
270  1976, 2272, 0, 1050, 1053, 1059, 1099, 0,
272  /* [email protected] */
273  { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 214750, 1680, 1808,
274  1984, 2288, 0, 1050, 1053, 1059, 1105, 0,
276  /* [email protected] RB */
277  { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 245500, 1680, 1728,
278  1760, 1840, 0, 1050, 1053, 1059, 1112, 0,
280  /* [email protected] */
281  { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 204750, 1792, 1920,
282  2120, 2448, 0, 1344, 1345, 1348, 1394, 0,
284  /* [email protected] */
285  { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 261000, 1792, 1888,
286  2104, 2456, 0, 1344, 1345, 1348, 1417, 0,
288  /* [email protected] RB */
289  { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 333250, 1792, 1840,
290  1872, 1952, 0, 1344, 1347, 1351, 1423, 0,
292  /* [email protected] */
293  { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 218250, 1856, 1952,
294  2176, 2528, 0, 1392, 1393, 1396, 1439, 0,
296  /* [email protected] */
297  { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 288000, 1856, 1984,
298  2208, 2560, 0, 1392, 1395, 1399, 1500, 0,
300  /* [email protected] RB */
301  { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 356500, 1856, 1904,
302  1936, 2016, 0, 1392, 1395, 1399, 1474, 0,
304  /* [email protected] RB */
305  { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 154000, 1920, 1968,
306  2000, 2080, 0, 1200, 1203, 1209, 1235, 0,
308  /* [email protected] */
309  { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 193250, 1920, 2056,
310  2256, 2592, 0, 1200, 1203, 1209, 1245, 0,
312  /* [email protected] */
313  { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 245250, 1920, 2056,
314  2264, 2608, 0, 1200, 1203, 1209, 1255, 0,
316  /* [email protected] */
317  { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 281250, 1920, 2064,
318  2272, 2624, 0, 1200, 1203, 1209, 1262, 0,
320  /* [email protected] RB */
321  { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 317000, 1920, 1968,
322  2000, 2080, 0, 1200, 1203, 1209, 1271, 0,
324  /* [email protected] */
325  { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 234000, 1920, 2048,
326  2256, 2600, 0, 1440, 1441, 1444, 1500, 0,
328  /* [email protected] */
329  { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2064,
330  2288, 2640, 0, 1440, 1441, 1444, 1500, 0,
332  /* [email protected] RB */
333  { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 380500, 1920, 1968,
334  2000, 2080, 0, 1440, 1443, 1447, 1525, 0,
336  /* [email protected] RB */
337  { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 268500, 2560, 2608,
338  2640, 2720, 0, 1600, 1603, 1609, 1646, 0,
340  /* [email protected] */
341  { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 348500, 2560, 2752,
342  3032, 3504, 0, 1600, 1603, 1609, 1658, 0,
344  /* [email protected] */
345  { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 443250, 2560, 2768,
346  3048, 3536, 0, 1600, 1603, 1609, 1672, 0,
348  /* [email protected] */
349  { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 505250, 2560, 2768,
350  3048, 3536, 0, 1600, 1603, 1609, 1682, 0,
352  /* [email protected] RB */
353  { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 552750, 2560, 2608,
354  2640, 2720, 0, 1600, 1603, 1609, 1694, 0,
356 
357 };
358 static const int drm_num_dmt_modes =
359  sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
360 
361 static const struct drm_display_mode edid_est_modes[] = {
362  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
363  968, 1056, 0, 600, 601, 605, 628, 0,
365  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
366  896, 1024, 0, 600, 601, 603, 625, 0,
368  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
369  720, 840, 0, 480, 481, 484, 500, 0,
371  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
372  704, 832, 0, 480, 489, 491, 520, 0,
374  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 30240, 640, 704,
375  768, 864, 0, 480, 483, 486, 525, 0,
377  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25200, 640, 656,
378  752, 800, 0, 480, 490, 492, 525, 0,
380  { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 738,
381  846, 900, 0, 400, 421, 423, 449, 0,
383  { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 28320, 720, 738,
384  846, 900, 0, 400, 412, 414, 449, 0,
386  { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
387  1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
389  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78800, 1024, 1040,
390  1136, 1312, 0, 768, 769, 772, 800, 0,
392  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
393  1184, 1328, 0, 768, 771, 777, 806, 0,
395  { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
396  1184, 1344, 0, 768, 771, 777, 806, 0,
398  { DRM_MODE("1024x768i", DRM_MODE_TYPE_DRIVER,44900, 1024, 1032,
399  1208, 1264, 0, 768, 768, 776, 817, 0,
401  { DRM_MODE("832x624", DRM_MODE_TYPE_DRIVER, 57284, 832, 864,
402  928, 1152, 0, 624, 625, 628, 667, 0,
404  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
405  896, 1056, 0, 600, 601, 604, 625, 0,
407  { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
408  976, 1040, 0, 600, 637, 643, 666, 0,
410  { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
411  1344, 1600, 0, 864, 865, 868, 900, 0,
413 };
414 
415 struct minimode {
416  short w;
417  short h;
418  short r;
419  short rb;
420 };
421 
422 static const struct minimode est3_modes[] = {
423  /* byte 6 */
424  { 640, 350, 85, 0 },
425  { 640, 400, 85, 0 },
426  { 720, 400, 85, 0 },
427  { 640, 480, 85, 0 },
428  { 848, 480, 60, 0 },
429  { 800, 600, 85, 0 },
430  { 1024, 768, 85, 0 },
431  { 1152, 864, 75, 0 },
432  /* byte 7 */
433  { 1280, 768, 60, 1 },
434  { 1280, 768, 60, 0 },
435  { 1280, 768, 75, 0 },
436  { 1280, 768, 85, 0 },
437  { 1280, 960, 60, 0 },
438  { 1280, 960, 85, 0 },
439  { 1280, 1024, 60, 0 },
440  { 1280, 1024, 85, 0 },
441  /* byte 8 */
442  { 1360, 768, 60, 0 },
443  { 1440, 900, 60, 1 },
444  { 1440, 900, 60, 0 },
445  { 1440, 900, 75, 0 },
446  { 1440, 900, 85, 0 },
447  { 1400, 1050, 60, 1 },
448  { 1400, 1050, 60, 0 },
449  { 1400, 1050, 75, 0 },
450  /* byte 9 */
451  { 1400, 1050, 85, 0 },
452  { 1680, 1050, 60, 1 },
453  { 1680, 1050, 60, 0 },
454  { 1680, 1050, 75, 0 },
455  { 1680, 1050, 85, 0 },
456  { 1600, 1200, 60, 0 },
457  { 1600, 1200, 65, 0 },
458  { 1600, 1200, 70, 0 },
459  /* byte 10 */
460  { 1600, 1200, 75, 0 },
461  { 1600, 1200, 85, 0 },
462  { 1792, 1344, 60, 0 },
463  { 1792, 1344, 85, 0 },
464  { 1856, 1392, 60, 0 },
465  { 1856, 1392, 75, 0 },
466  { 1920, 1200, 60, 1 },
467  { 1920, 1200, 60, 0 },
468  /* byte 11 */
469  { 1920, 1200, 75, 0 },
470  { 1920, 1200, 85, 0 },
471  { 1920, 1440, 60, 0 },
472  { 1920, 1440, 75, 0 },
473 };
474 static const int num_est3_modes = ARRAY_SIZE(est3_modes);
475 
476 static const struct minimode extra_modes[] = {
477  { 1024, 576, 60, 0 },
478  { 1366, 768, 60, 0 },
479  { 1600, 900, 60, 0 },
480  { 1680, 945, 60, 0 },
481  { 1920, 1080, 60, 0 },
482  { 2048, 1152, 60, 0 },
483  { 2048, 1536, 60, 0 },
484 };
485 static const int num_extra_modes = ARRAY_SIZE(extra_modes);
486 
487 /*
488  * Probably taken from CEA-861 spec.
489  * This table is converted from xorg's hw/xfree86/modes/xf86EdidModes.c.
490  */
491 static const struct drm_display_mode edid_cea_modes[] = {
492  /* 1 - [email protected] */
493  { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
494  752, 800, 0, 480, 490, 492, 525, 0,
496  /* 2 - [email protected] */
497  { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
498  798, 858, 0, 480, 489, 495, 525, 0,
500  /* 3 - [email protected] */
501  { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
502  798, 858, 0, 480, 489, 495, 525, 0,
504  /* 4 - [email protected] */
505  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
506  1430, 1650, 0, 720, 725, 730, 750, 0,
508  /* 5 - [email protected] */
509  { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
510  2052, 2200, 0, 1080, 1084, 1094, 1125, 0,
513  /* 6 - [email protected] */
514  { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
515  1602, 1716, 0, 480, 488, 494, 525, 0,
518  /* 7 - [email protected] */
519  { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
520  1602, 1716, 0, 480, 488, 494, 525, 0,
523  /* 8 - [email protected] */
524  { DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
525  1602, 1716, 0, 240, 244, 247, 262, 0,
528  /* 9 - [email protected] */
529  { DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
530  1602, 1716, 0, 240, 244, 247, 262, 0,
533  /* 10 - [email protected] */
534  { DRM_MODE("2880x480i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
535  3204, 3432, 0, 480, 488, 494, 525, 0,
538  /* 11 - [email protected] */
539  { DRM_MODE("2880x480i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
540  3204, 3432, 0, 480, 488, 494, 525, 0,
543  /* 12 - [email protected] */
544  { DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
545  3204, 3432, 0, 240, 244, 247, 262, 0,
547  /* 13 - [email protected] */
548  { DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2956,
549  3204, 3432, 0, 240, 244, 247, 262, 0,
551  /* 14 - [email protected] */
552  { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1472,
553  1596, 1716, 0, 480, 489, 495, 525, 0,
555  /* 15 - [email protected] */
556  { DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1472,
557  1596, 1716, 0, 480, 489, 495, 525, 0,
559  /* 16 - [email protected] */
560  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
561  2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
563  /* 17 - [email protected] */
564  { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
565  796, 864, 0, 576, 581, 586, 625, 0,
567  /* 18 - [email protected] */
568  { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
569  796, 864, 0, 576, 581, 586, 625, 0,
571  /* 19 - [email protected] */
572  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
573  1760, 1980, 0, 720, 725, 730, 750, 0,
575  /* 20 - [email protected] */
576  { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
577  2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
580  /* 21 - [email protected] */
581  { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
582  1590, 1728, 0, 576, 580, 586, 625, 0,
585  /* 22 - [email protected] */
586  { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
587  1590, 1728, 0, 576, 580, 586, 625, 0,
590  /* 23 - [email protected] */
591  { DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
592  1590, 1728, 0, 288, 290, 293, 312, 0,
595  /* 24 - [email protected] */
596  { DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
597  1590, 1728, 0, 288, 290, 293, 312, 0,
600  /* 25 - [email protected] */
601  { DRM_MODE("2880x576i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
602  3180, 3456, 0, 576, 580, 586, 625, 0,
605  /* 26 - [email protected] */
606  { DRM_MODE("2880x576i", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
607  3180, 3456, 0, 576, 580, 586, 625, 0,
610  /* 27 - [email protected] */
611  { DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
612  3180, 3456, 0, 288, 290, 293, 312, 0,
614  /* 28 - [email protected] */
615  { DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000, 2880, 2928,
616  3180, 3456, 0, 288, 290, 293, 312, 0,
618  /* 29 - [email protected] */
619  { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
620  1592, 1728, 0, 576, 581, 586, 625, 0,
622  /* 30 - [email protected] */
623  { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
624  1592, 1728, 0, 576, 581, 586, 625, 0,
626  /* 31 - [email protected] */
627  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
628  2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
630  /* 32 - [email protected] */
631  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
632  2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
634  /* 33 - [email protected] */
635  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
636  2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
638  /* 34 - [email protected] */
639  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
640  2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
642  /* 35 - [email protected] */
643  { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2944,
644  3192, 3432, 0, 480, 489, 495, 525, 0,
646  /* 36 - [email protected] */
647  { DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2944,
648  3192, 3432, 0, 480, 489, 495, 525, 0,
650  /* 37 - [email protected] */
651  { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2928,
652  3184, 3456, 0, 576, 581, 586, 625, 0,
654  /* 38 - [email protected] */
655  { DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000, 2880, 2928,
656  3184, 3456, 0, 576, 581, 586, 625, 0,
658  /* 39 - [email protected] */
659  { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 72000, 1920, 1952,
660  2120, 2304, 0, 1080, 1126, 1136, 1250, 0,
663  /* 40 - [email protected] */
664  { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
665  2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
668  /* 41 - [email protected] */
669  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
670  1760, 1980, 0, 720, 725, 730, 750, 0,
672  /* 42 - [email protected] */
673  { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 732,
674  796, 864, 0, 576, 581, 586, 625, 0,
676  /* 43 - [email protected] */
677  { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 732,
678  796, 864, 0, 576, 581, 586, 625, 0,
680  /* 44 - [email protected] */
681  { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
682  1590, 1728, 0, 576, 580, 586, 625, 0,
685  /* 45 - [email protected] */
686  { DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
687  1590, 1728, 0, 576, 580, 586, 625, 0,
690  /* 46 - [email protected] */
691  { DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
692  2052, 2200, 0, 1080, 1084, 1094, 1125, 0,
695  /* 47 - [email protected] */
696  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
697  1430, 1650, 0, 720, 725, 730, 750, 0,
699  /* 48 - [email protected] */
700  { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000, 720, 736,
701  798, 858, 0, 480, 489, 495, 525, 0,
703  /* 49 - [email protected] */
704  { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000, 720, 736,
705  798, 858, 0, 480, 489, 495, 525, 0,
707  /* 50 - [email protected] */
708  { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
709  1602, 1716, 0, 480, 488, 494, 525, 0,
712  /* 51 - [email protected] */
713  { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
714  1602, 1716, 0, 480, 488, 494, 525, 0,
717  /* 52 - [email protected] */
718  { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000, 720, 732,
719  796, 864, 0, 576, 581, 586, 625, 0,
721  /* 53 - [email protected] */
722  { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000, 720, 732,
723  796, 864, 0, 576, 581, 586, 625, 0,
725  /* 54 - [email protected] */
726  { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
727  1590, 1728, 0, 576, 580, 586, 625, 0,
730  /* 55 - [email protected] */
731  { DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
732  1590, 1728, 0, 576, 580, 586, 625, 0,
735  /* 56 - [email protected] */
736  { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000, 720, 736,
737  798, 858, 0, 480, 489, 495, 525, 0,
739  /* 57 - [email protected] */
740  { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000, 720, 736,
741  798, 858, 0, 480, 489, 495, 525, 0,
743  /* 58 - [email protected] */
744  { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
745  1602, 1716, 0, 480, 488, 494, 525, 0,
748  /* 59 - [email protected] */
749  { DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
750  1602, 1716, 0, 480, 488, 494, 525, 0,
753  /* 60 - [email protected] */
754  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
755  3080, 3300, 0, 720, 725, 730, 750, 0,
757  /* 61 - [email protected] */
758  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
759  3740, 3960, 0, 720, 725, 730, 750, 0,
761  /* 62 - [email protected] */
762  { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
763  3080, 3300, 0, 720, 725, 730, 750, 0,
765  /* 63 - [email protected] */
766  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
767  2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
769  /* 64 - [email protected] */
770  { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
771  2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
773 };
774 static const int drm_num_cea_modes = ARRAY_SIZE(edid_cea_modes);