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