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