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