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 * But the mode with Reduced blank feature is deleted. 35 */ 36 static struct drm_display_mode drm_dmt_modes[] = { 37 /* 640x350@85Hz */ 38 { DRM_MODE("640x350", DRM_MODE_TYPE_DRIVER, 31500, 640, 672, 39 736, 832, 0, 350, 382, 385, 445, 0, 40 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, 41 /* 640x400@85Hz */ 42 { DRM_MODE("640x400", DRM_MODE_TYPE_DRIVER, 31500, 640, 672, 43 736, 832, 0, 400, 401, 404, 445, 0, 44 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 45 /* 720x400@85Hz */ 46 { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 756, 47 828, 936, 0, 400, 401, 404, 446, 0, 48 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 49 /* 640x480@60Hz */ 50 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656, 51 752, 800, 0, 480, 489, 492, 525, 0, 52 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, 53 /* 640x480@72Hz */ 54 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664, 55 704, 832, 0, 480, 489, 492, 520, 0, 56 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, 57 /* 640x480@75Hz */ 58 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656, 59 720, 840, 0, 480, 481, 484, 500, 0, 60 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, 61 /* 640x480@85Hz */ 62 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 36000, 640, 696, 63 752, 832, 0, 480, 481, 484, 509, 0, 64 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, 65 /* 800x600@56Hz */ 66 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824, 67 896, 1024, 0, 600, 601, 603, 625, 0, 68 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 69 /* 800x600@60Hz */ 70 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840, 71 968, 1056, 0, 600, 601, 605, 628, 0, 72 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 73 /* 800x600@72Hz */ 74 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856, 75 976, 1040, 0, 600, 637, 643, 666, 0, 76 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 77 /* 800x600@75Hz */ 78 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816, 79 896, 1056, 0, 600, 601, 604, 625, 0, 80 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 81 /* 800x600@85Hz */ 82 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 56250, 800, 832, 83 896, 1048, 0, 600, 601, 604, 631, 0, 84 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 85 /* 848x480@60Hz */ 86 { DRM_MODE("848x480", DRM_MODE_TYPE_DRIVER, 33750, 848, 864, 87 976, 1088, 0, 480, 486, 494, 517, 0, 88 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 89 /* 1024x768@43Hz, interlace */ 90 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 44900, 1024, 1032, 91 1208, 1264, 0, 768, 768, 772, 817, 0, 92 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | 93 DRM_MODE_FLAG_INTERLACE) }, 94 /* 1024x768@60Hz */ 95 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048, 96 1184, 1344, 0, 768, 771, 777, 806, 0, 97 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, 98 /* 1024x768@70Hz */ 99 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048, 100 1184, 1328, 0, 768, 771, 777, 806, 0, 101 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, 102 /* 1024x768@75Hz */ 103 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78750, 1024, 1040, 104 1136, 1312, 0, 768, 769, 772, 800, 0, 105 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 106 /* 1024x768@85Hz */ 107 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072, 108 1168, 1376, 0, 768, 769, 772, 808, 0, 109 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 110 /* 1152x864@75Hz */ 111 { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216, 112 1344, 1600, 0, 864, 865, 868, 900, 0, 113 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 114 /* 1280x768@60Hz */ 115 { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 79500, 1280, 1344, 116 1472, 1664, 0, 768, 771, 778, 798, 0, 117 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 118 /* 1280x768@75Hz */ 119 { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 102250, 1280, 1360, 120 1488, 1696, 0, 768, 771, 778, 805, 0, 121 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, 122 /* 1280x768@85Hz */ 123 { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 117500, 1280, 1360, 124 1496, 1712, 0, 768, 771, 778, 809, 0, 125 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 126 /* 1280x800@60Hz */ 127 { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 83500, 1280, 1352, 128 1480, 1680, 0, 800, 803, 809, 831, 0, 129 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) }, 130 /* 1280x800@75Hz */ 131 { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 106500, 1280, 1360, 132 1488, 1696, 0, 800, 803, 809, 838, 0, 133 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 134 /* 1280x800@85Hz */ 135 { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 122500, 1280, 1360, 136 1496, 1712, 0, 800, 803, 809, 843, 0, 137 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 138 /* 1280x960@60Hz */ 139 { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1376, 140 1488, 1800, 0, 960, 961, 964, 1000, 0, 141 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 142 /* 1280x960@85Hz */ 143 { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1344, 144 1504, 1728, 0, 960, 961, 964, 1011, 0, 145 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 146 /* 1280x1024@60Hz */ 147 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1328, 148 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, 149 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 150 /* 1280x1024@75Hz */ 151 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296, 152 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, 153 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 154 /* 1280x1024@85Hz */ 155 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 157500, 1280, 1344, 156 1504, 1728, 0, 1024, 1025, 1028, 1072, 0, 157 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 158 /* 1360x768@60Hz */ 159 { DRM_MODE("1360x768", DRM_MODE_TYPE_DRIVER, 85500, 1360, 1424, 160 1536, 1792, 0, 768, 771, 777, 795, 0, 161 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 162 /* 1440x1050@60Hz */ 163 { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 121750, 1400, 1488, 164 1632, 1864, 0, 1050, 1053, 1057, 1089, 0, 165 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 166 /* 1440x1050@75Hz */ 167 { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 156000, 1400, 1504, 168 1648, 1896, 0, 1050, 1053, 1057, 1099, 0, 169 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 170 /* 1440x1050@85Hz */ 171 { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 179500, 1400, 1504, 172 1656, 1912, 0, 1050, 1053, 1057, 1105, 0, 173 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 174 /* 1440x900@60Hz */ 175 { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 106500, 1440, 1520, 176 1672, 1904, 0, 900, 903, 909, 934, 0, 177 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 178 /* 1440x900@75Hz */ 179 { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 136750, 1440, 1536, 180 1688, 1936, 0, 900, 903, 909, 942, 0, 181 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 182 /* 1440x900@85Hz */ 183 { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 157000, 1440, 1544, 184 1696, 1952, 0, 900, 903, 909, 948, 0, 185 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 186 /* 1600x1200@60Hz */ 187 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 162000, 1600, 1664, 188 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, 189 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 190 /* 1600x1200@65Hz */ 191 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 175500, 1600, 1664, 192 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, 193 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 194 /* 1600x1200@70Hz */ 195 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 189000, 1600, 1664, 196 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, 197 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 198 /* 1600x1200@75Hz */ 199 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 202500, 1600, 1664, 200 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, 201 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 202 /* 1600x1200@85Hz */ 203 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 229500, 1600, 1664, 204 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, 205 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, 206 /* 1680x1050@60Hz */ 207 { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 146250, 1680, 1784, 208 1960, 2240, 0, 1050, 1053, 1059, 1089, 0, 209 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 210 /* 1680x1050@75Hz */ 211 { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 187000, 1680, 1800, 212 1976, 2272, 0, 1050, 1053, 1059, 1099, 0, 213 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 214 /* 1680x1050@85Hz */ 215 { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 214750, 1680, 1808, 216 1984, 2288, 0, 1050, 1053, 1059, 1105, 0, 217 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 218 /* 1792x1344@60Hz */ 219 { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 204750, 1792, 1920, 220 2120, 2448, 0, 1344, 1345, 1348, 1394, 0, 221 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 222 /* 1729x1344@75Hz */ 223 { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 261000, 1792, 1888, 224 2104, 2456, 0, 1344, 1345, 1348, 1417, 0, 225 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 226 /* 1853x1392@60Hz */ 227 { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 218250, 1856, 1952, 228 2176, 2528, 0, 1392, 1393, 1396, 1439, 0, 229 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 230 /* 1856x1392@75Hz */ 231 { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 288000, 1856, 1984, 232 2208, 2560, 0, 1392, 1395, 1399, 1500, 0, 233 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 234 /* 1920x1200@60Hz */ 235 { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 193250, 1920, 2056, 236 2256, 2592, 0, 1200, 1203, 1209, 1245, 0, 237 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 238 /* 1920x1200@75Hz */ 239 { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 245250, 1920, 2056, 240 2264, 2608, 0, 1200, 1203, 1209, 1255, 0, 241 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 242 /* 1920x1200@85Hz */ 243 { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 281250, 1920, 2064, 244 2272, 2624, 0, 1200, 1203, 1209, 1262, 0, 245 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 246 /* 1920x1440@60Hz */ 247 { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 234000, 1920, 2048, 248 2256, 2600, 0, 1440, 1441, 1444, 1500, 0, 249 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 250 /* 1920x1440@75Hz */ 251 { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2064, 252 2288, 2640, 0, 1440, 1441, 1444, 1500, 0, 253 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 254 /* 2560x1600@60Hz */ 255 { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 348500, 2560, 2752, 256 3032, 3504, 0, 1600, 1603, 1609, 1658, 0, 257 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 258 /* 2560x1600@75HZ */ 259 { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 443250, 2560, 2768, 260 3048, 3536, 0, 1600, 1603, 1609, 1672, 0, 261 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 262 /* 2560x1600@85HZ */ 263 { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 505250, 2560, 2768, 264 3048, 3536, 0, 1600, 1603, 1609, 1682, 0, 265 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, 266 }; 267 static const int drm_num_dmt_modes = 268 sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode); 269 270 static struct drm_display_mode edid_est_modes[] = { 271 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840, 272 968, 1056, 0, 600, 601, 605, 628, 0, 273 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@60Hz */ 274 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824, 275 896, 1024, 0, 600, 601, 603, 625, 0, 276 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@56Hz */ 277 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656, 278 720, 840, 0, 480, 481, 484, 500, 0, 279 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@75Hz */ 280 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664, 281 704, 832, 0, 480, 489, 491, 520, 0, 282 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@72Hz */ 283 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 30240, 640, 704, 284 768, 864, 0, 480, 483, 486, 525, 0, 285 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@67Hz */ 286 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25200, 640, 656, 287 752, 800, 0, 480, 490, 492, 525, 0, 288 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@60Hz */ 289 { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 738, 290 846, 900, 0, 400, 421, 423, 449, 0, 291 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 720x400@88Hz */ 292 { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 28320, 720, 738, 293 846, 900, 0, 400, 412, 414, 449, 0, 294 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 720x400@70Hz */ 295 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296, 296 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, 297 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1280x1024@75Hz */ 298 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78800, 1024, 1040, 299 1136, 1312, 0, 768, 769, 772, 800, 0, 300 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1024x768@75Hz */ 301 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048, 302 1184, 1328, 0, 768, 771, 777, 806, 0, 303 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 1024x768@70Hz */ 304 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048, 305 1184, 1344, 0, 768, 771, 777, 806, 0, 306 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 1024x768@60Hz */ 307 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER,44900, 1024, 1032, 308 1208, 1264, 0, 768, 768, 776, 817, 0, 309 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* 1024x768@43Hz */ 310 { DRM_MODE("832x624", DRM_MODE_TYPE_DRIVER, 57284, 832, 864, 311 928, 1152, 0, 624, 625, 628, 667, 0, 312 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 832x624@75Hz */ 313 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816, 314 896, 1056, 0, 600, 601, 604, 625, 0, 315 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@75Hz */ 316 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856, 317 976, 1040, 0, 600, 637, 643, 666, 0, 318 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@72Hz */ 319 { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216, 320 1344, 1600, 0, 864, 865, 868, 900, 0, 321 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1152x864@75Hz */ 322 }; 323 324 static const struct { 325 short w; 326 short h; 327 short r; 328 short rb; 329 } est3_modes[] = { 330 /* byte 6 */ 331 { 640, 350, 85, 0 }, 332 { 640, 400, 85, 0 }, 333 { 720, 400, 85, 0 }, 334 { 640, 480, 85, 0 }, 335 { 848, 480, 60, 0 }, 336 { 800, 600, 85, 0 }, 337 { 1024, 768, 85, 0 }, 338 { 1152, 864, 75, 0 }, 339 /* byte 7 */ 340 { 1280, 768, 60, 1 }, 341 { 1280, 768, 60, 0 }, 342 { 1280, 768, 75, 0 }, 343 { 1280, 768, 85, 0 }, 344 { 1280, 960, 60, 0 }, 345 { 1280, 960, 85, 0 }, 346 { 1280, 1024, 60, 0 }, 347 { 1280, 1024, 85, 0 }, 348 /* byte 8 */ 349 { 1360, 768, 60, 0 }, 350 { 1440, 900, 60, 1 }, 351 { 1440, 900, 60, 0 }, 352 { 1440, 900, 75, 0 }, 353 { 1440, 900, 85, 0 }, 354 { 1400, 1050, 60, 1 }, 355 { 1400, 1050, 60, 0 }, 356 { 1400, 1050, 75, 0 }, 357 /* byte 9 */ 358 { 1400, 1050, 85, 0 }, 359 { 1680, 1050, 60, 1 }, 360 { 1680, 1050, 60, 0 }, 361 { 1680, 1050, 75, 0 }, 362 { 1680, 1050, 85, 0 }, 363 { 1600, 1200, 60, 0 }, 364 { 1600, 1200, 65, 0 }, 365 { 1600, 1200, 70, 0 }, 366 /* byte 10 */ 367 { 1600, 1200, 75, 0 }, 368 { 1600, 1200, 85, 0 }, 369 { 1792, 1344, 60, 0 }, 370 { 1792, 1344, 85, 0 }, 371 { 1856, 1392, 60, 0 }, 372 { 1856, 1392, 75, 0 }, 373 { 1920, 1200, 60, 1 }, 374 { 1920, 1200, 60, 0 }, 375 /* byte 11 */ 376 { 1920, 1200, 75, 0 }, 377 { 1920, 1200, 85, 0 }, 378 { 1920, 1440, 60, 0 }, 379 { 1920, 1440, 75, 0 }, 380 }; 381 static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]); 382