aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_edid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r--drivers/gpu/drm/drm_edid.c354
1 files changed, 1 insertions, 353 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 4cbf7a587f16..6ac405534620 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -33,6 +33,7 @@
33#include <linux/i2c-algo-bit.h> 33#include <linux/i2c-algo-bit.h>
34#include "drmP.h" 34#include "drmP.h"
35#include "drm_edid.h" 35#include "drm_edid.h"
36#include "drm_edid_modes.h"
36 37
37#define version_greater(edid, maj, min) \ 38#define version_greater(edid, maj, min) \
38 (((edid)->version > (maj)) || \ 39 (((edid)->version > (maj)) || \
@@ -386,7 +387,6 @@ static u32 edid_get_quirks(struct edid *edid)
386#define MODE_SIZE(m) ((m)->hdisplay * (m)->vdisplay) 387#define MODE_SIZE(m) ((m)->hdisplay * (m)->vdisplay)
387#define MODE_REFRESH_DIFF(m,r) (abs((m)->vrefresh - target_refresh)) 388#define MODE_REFRESH_DIFF(m,r) (abs((m)->vrefresh - target_refresh))
388 389
389
390/** 390/**
391 * edid_fixup_preferred - set preferred modes based on quirk list 391 * edid_fixup_preferred - set preferred modes based on quirk list
392 * @connector: has mode list to fix up 392 * @connector: has mode list to fix up
@@ -433,245 +433,6 @@ static void edid_fixup_preferred(struct drm_connector *connector,
433 preferred_mode->type |= DRM_MODE_TYPE_PREFERRED; 433 preferred_mode->type |= DRM_MODE_TYPE_PREFERRED;
434} 434}
435 435
436/*
437 * Add the Autogenerated from the DMT spec.
438 * This table is copied from xfree86/modes/xf86EdidModes.c.
439 * But the mode with Reduced blank feature is deleted.
440 */
441static struct drm_display_mode drm_dmt_modes[] = {
442 /* 640x350@85Hz */
443 { DRM_MODE("640x350", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
444 736, 832, 0, 350, 382, 385, 445, 0,
445 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
446 /* 640x400@85Hz */
447 { DRM_MODE("640x400", DRM_MODE_TYPE_DRIVER, 31500, 640, 672,
448 736, 832, 0, 400, 401, 404, 445, 0,
449 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
450 /* 720x400@85Hz */
451 { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 756,
452 828, 936, 0, 400, 401, 404, 446, 0,
453 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
454 /* 640x480@60Hz */
455 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
456 752, 800, 0, 480, 489, 492, 525, 0,
457 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
458 /* 640x480@72Hz */
459 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
460 704, 832, 0, 480, 489, 492, 520, 0,
461 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
462 /* 640x480@75Hz */
463 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
464 720, 840, 0, 480, 481, 484, 500, 0,
465 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
466 /* 640x480@85Hz */
467 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 36000, 640, 696,
468 752, 832, 0, 480, 481, 484, 509, 0,
469 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
470 /* 800x600@56Hz */
471 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
472 896, 1024, 0, 600, 601, 603, 625, 0,
473 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
474 /* 800x600@60Hz */
475 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
476 968, 1056, 0, 600, 601, 605, 628, 0,
477 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
478 /* 800x600@72Hz */
479 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
480 976, 1040, 0, 600, 637, 643, 666, 0,
481 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
482 /* 800x600@75Hz */
483 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
484 896, 1056, 0, 600, 601, 604, 625, 0,
485 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
486 /* 800x600@85Hz */
487 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 56250, 800, 832,
488 896, 1048, 0, 600, 601, 604, 631, 0,
489 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
490 /* 848x480@60Hz */
491 { DRM_MODE("848x480", DRM_MODE_TYPE_DRIVER, 33750, 848, 864,
492 976, 1088, 0, 480, 486, 494, 517, 0,
493 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
494 /* 1024x768@43Hz, interlace */
495 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 44900, 1024, 1032,
496 1208, 1264, 0, 768, 768, 772, 817, 0,
497 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
498 DRM_MODE_FLAG_INTERLACE) },
499 /* 1024x768@60Hz */
500 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
501 1184, 1344, 0, 768, 771, 777, 806, 0,
502 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
503 /* 1024x768@70Hz */
504 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
505 1184, 1328, 0, 768, 771, 777, 806, 0,
506 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
507 /* 1024x768@75Hz */
508 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78750, 1024, 1040,
509 1136, 1312, 0, 768, 769, 772, 800, 0,
510 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
511 /* 1024x768@85Hz */
512 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
513 1168, 1376, 0, 768, 769, 772, 808, 0,
514 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
515 /* 1152x864@75Hz */
516 { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
517 1344, 1600, 0, 864, 865, 868, 900, 0,
518 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
519 /* 1280x768@60Hz */
520 { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 79500, 1280, 1344,
521 1472, 1664, 0, 768, 771, 778, 798, 0,
522 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
523 /* 1280x768@75Hz */
524 { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 102250, 1280, 1360,
525 1488, 1696, 0, 768, 771, 778, 805, 0,
526 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
527 /* 1280x768@85Hz */
528 { DRM_MODE("1280x768", DRM_MODE_TYPE_DRIVER, 117500, 1280, 1360,
529 1496, 1712, 0, 768, 771, 778, 809, 0,
530 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
531 /* 1280x800@60Hz */
532 { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 83500, 1280, 1352,
533 1480, 1680, 0, 800, 803, 809, 831, 0,
534 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC) },
535 /* 1280x800@75Hz */
536 { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 106500, 1280, 1360,
537 1488, 1696, 0, 800, 803, 809, 838, 0,
538 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
539 /* 1280x800@85Hz */
540 { DRM_MODE("1280x800", DRM_MODE_TYPE_DRIVER, 122500, 1280, 1360,
541 1496, 1712, 0, 800, 803, 809, 843, 0,
542 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
543 /* 1280x960@60Hz */
544 { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1376,
545 1488, 1800, 0, 960, 961, 964, 1000, 0,
546 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
547 /* 1280x960@85Hz */
548 { DRM_MODE("1280x960", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1344,
549 1504, 1728, 0, 960, 961, 964, 1011, 0,
550 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
551 /* 1280x1024@60Hz */
552 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 108000, 1280, 1328,
553 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
554 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
555 /* 1280x1024@75Hz */
556 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
557 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
558 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
559 /* 1280x1024@85Hz */
560 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 157500, 1280, 1344,
561 1504, 1728, 0, 1024, 1025, 1028, 1072, 0,
562 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
563 /* 1360x768@60Hz */
564 { DRM_MODE("1360x768", DRM_MODE_TYPE_DRIVER, 85500, 1360, 1424,
565 1536, 1792, 0, 768, 771, 777, 795, 0,
566 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
567 /* 1440x1050@60Hz */
568 { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 121750, 1400, 1488,
569 1632, 1864, 0, 1050, 1053, 1057, 1089, 0,
570 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
571 /* 1440x1050@75Hz */
572 { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 156000, 1400, 1504,
573 1648, 1896, 0, 1050, 1053, 1057, 1099, 0,
574 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
575 /* 1440x1050@85Hz */
576 { DRM_MODE("1400x1050", DRM_MODE_TYPE_DRIVER, 179500, 1400, 1504,
577 1656, 1912, 0, 1050, 1053, 1057, 1105, 0,
578 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
579 /* 1440x900@60Hz */
580 { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 106500, 1440, 1520,
581 1672, 1904, 0, 900, 903, 909, 934, 0,
582 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
583 /* 1440x900@75Hz */
584 { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 136750, 1440, 1536,
585 1688, 1936, 0, 900, 903, 909, 942, 0,
586 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
587 /* 1440x900@85Hz */
588 { DRM_MODE("1440x900", DRM_MODE_TYPE_DRIVER, 157000, 1440, 1544,
589 1696, 1952, 0, 900, 903, 909, 948, 0,
590 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
591 /* 1600x1200@60Hz */
592 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 162000, 1600, 1664,
593 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
594 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
595 /* 1600x1200@65Hz */
596 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 175500, 1600, 1664,
597 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
598 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
599 /* 1600x1200@70Hz */
600 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 189000, 1600, 1664,
601 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
602 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
603 /* 1600x1200@75Hz */
604 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 202500, 1600, 1664,
605 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
606 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
607 /* 1600x1200@85Hz */
608 { DRM_MODE("1600x1200", DRM_MODE_TYPE_DRIVER, 229500, 1600, 1664,
609 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
610 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
611 /* 1680x1050@60Hz */
612 { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 146250, 1680, 1784,
613 1960, 2240, 0, 1050, 1053, 1059, 1089, 0,
614 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
615 /* 1680x1050@75Hz */
616 { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 187000, 1680, 1800,
617 1976, 2272, 0, 1050, 1053, 1059, 1099, 0,
618 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
619 /* 1680x1050@85Hz */
620 { DRM_MODE("1680x1050", DRM_MODE_TYPE_DRIVER, 214750, 1680, 1808,
621 1984, 2288, 0, 1050, 1053, 1059, 1105, 0,
622 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
623 /* 1792x1344@60Hz */
624 { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 204750, 1792, 1920,
625 2120, 2448, 0, 1344, 1345, 1348, 1394, 0,
626 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
627 /* 1729x1344@75Hz */
628 { DRM_MODE("1792x1344", DRM_MODE_TYPE_DRIVER, 261000, 1792, 1888,
629 2104, 2456, 0, 1344, 1345, 1348, 1417, 0,
630 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
631 /* 1853x1392@60Hz */
632 { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 218250, 1856, 1952,
633 2176, 2528, 0, 1392, 1393, 1396, 1439, 0,
634 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
635 /* 1856x1392@75Hz */
636 { DRM_MODE("1856x1392", DRM_MODE_TYPE_DRIVER, 288000, 1856, 1984,
637 2208, 2560, 0, 1392, 1395, 1399, 1500, 0,
638 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
639 /* 1920x1200@60Hz */
640 { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 193250, 1920, 2056,
641 2256, 2592, 0, 1200, 1203, 1209, 1245, 0,
642 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
643 /* 1920x1200@75Hz */
644 { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 245250, 1920, 2056,
645 2264, 2608, 0, 1200, 1203, 1209, 1255, 0,
646 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
647 /* 1920x1200@85Hz */
648 { DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 281250, 1920, 2064,
649 2272, 2624, 0, 1200, 1203, 1209, 1262, 0,
650 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
651 /* 1920x1440@60Hz */
652 { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 234000, 1920, 2048,
653 2256, 2600, 0, 1440, 1441, 1444, 1500, 0,
654 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
655 /* 1920x1440@75Hz */
656 { DRM_MODE("1920x1440", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2064,
657 2288, 2640, 0, 1440, 1441, 1444, 1500, 0,
658 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
659 /* 2560x1600@60Hz */
660 { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 348500, 2560, 2752,
661 3032, 3504, 0, 1600, 1603, 1609, 1658, 0,
662 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
663 /* 2560x1600@75HZ */
664 { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 443250, 2560, 2768,
665 3048, 3536, 0, 1600, 1603, 1609, 1672, 0,
666 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
667 /* 2560x1600@85HZ */
668 { DRM_MODE("2560x1600", DRM_MODE_TYPE_DRIVER, 505250, 2560, 2768,
669 3048, 3536, 0, 1600, 1603, 1609, 1682, 0,
670 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) },
671};
672static const int drm_num_dmt_modes =
673 sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
674
675struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, 436struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
676 int hsize, int vsize, int fresh) 437 int hsize, int vsize, int fresh)
677{ 438{
@@ -1248,119 +1009,6 @@ add_inferred_modes(struct drm_connector *connector, struct edid *edid)
1248 return closure.modes; 1009 return closure.modes;
1249} 1010}
1250 1011
1251static struct drm_display_mode edid_est_modes[] = {
1252 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 40000, 800, 840,
1253 968, 1056, 0, 600, 601, 605, 628, 0,
1254 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@60Hz */
1255 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 36000, 800, 824,
1256 896, 1024, 0, 600, 601, 603, 625, 0,
1257 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@56Hz */
1258 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 656,
1259 720, 840, 0, 480, 481, 484, 500, 0,
1260 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@75Hz */
1261 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 31500, 640, 664,
1262 704, 832, 0, 480, 489, 491, 520, 0,
1263 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@72Hz */
1264 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 30240, 640, 704,
1265 768, 864, 0, 480, 483, 486, 525, 0,
1266 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@67Hz */
1267 { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25200, 640, 656,
1268 752, 800, 0, 480, 490, 492, 525, 0,
1269 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 640x480@60Hz */
1270 { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 35500, 720, 738,
1271 846, 900, 0, 400, 421, 423, 449, 0,
1272 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 720x400@88Hz */
1273 { DRM_MODE("720x400", DRM_MODE_TYPE_DRIVER, 28320, 720, 738,
1274 846, 900, 0, 400, 412, 414, 449, 0,
1275 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 720x400@70Hz */
1276 { DRM_MODE("1280x1024", DRM_MODE_TYPE_DRIVER, 135000, 1280, 1296,
1277 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
1278 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1280x1024@75Hz */
1279 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 78800, 1024, 1040,
1280 1136, 1312, 0, 768, 769, 772, 800, 0,
1281 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1024x768@75Hz */
1282 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 75000, 1024, 1048,
1283 1184, 1328, 0, 768, 771, 777, 806, 0,
1284 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 1024x768@70Hz */
1285 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 65000, 1024, 1048,
1286 1184, 1344, 0, 768, 771, 777, 806, 0,
1287 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 1024x768@60Hz */
1288 { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER,44900, 1024, 1032,
1289 1208, 1264, 0, 768, 768, 776, 817, 0,
1290 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* 1024x768@43Hz */
1291 { DRM_MODE("832x624", DRM_MODE_TYPE_DRIVER, 57284, 832, 864,
1292 928, 1152, 0, 624, 625, 628, 667, 0,
1293 DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* 832x624@75Hz */
1294 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 49500, 800, 816,
1295 896, 1056, 0, 600, 601, 604, 625, 0,
1296 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@75Hz */
1297 { DRM_MODE("800x600", DRM_MODE_TYPE_DRIVER, 50000, 800, 856,
1298 976, 1040, 0, 600, 637, 643, 666, 0,
1299 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 800x600@72Hz */
1300 { DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
1301 1344, 1600, 0, 864, 865, 868, 900, 0,
1302 DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* 1152x864@75Hz */
1303};
1304
1305static const struct {
1306 short w;
1307 short h;
1308 short r;
1309 short rb;
1310} est3_modes[] = {
1311 /* byte 6 */
1312 { 640, 350, 85, 0 },
1313 { 640, 400, 85, 0 },
1314 { 720, 400, 85, 0 },
1315 { 640, 480, 85, 0 },
1316 { 848, 480, 60, 0 },
1317 { 800, 600, 85, 0 },
1318 { 1024, 768, 85, 0 },
1319 { 1152, 864, 75, 0 },
1320 /* byte 7 */
1321 { 1280, 768, 60, 1 },
1322 { 1280, 768, 60, 0 },
1323 { 1280, 768, 75, 0 },
1324 { 1280, 768, 85, 0 },
1325 { 1280, 960, 60, 0 },
1326 { 1280, 960, 85, 0 },
1327 { 1280, 1024, 60, 0 },
1328 { 1280, 1024, 85, 0 },
1329 /* byte 8 */
1330 { 1360, 768, 60, 0 },
1331 { 1440, 900, 60, 1 },
1332 { 1440, 900, 60, 0 },
1333 { 1440, 900, 75, 0 },
1334 { 1440, 900, 85, 0 },
1335 { 1400, 1050, 60, 1 },
1336 { 1400, 1050, 60, 0 },
1337 { 1400, 1050, 75, 0 },
1338 /* byte 9 */
1339 { 1400, 1050, 85, 0 },
1340 { 1680, 1050, 60, 1 },
1341 { 1680, 1050, 60, 0 },
1342 { 1680, 1050, 75, 0 },
1343 { 1680, 1050, 85, 0 },
1344 { 1600, 1200, 60, 0 },
1345 { 1600, 1200, 65, 0 },
1346 { 1600, 1200, 70, 0 },
1347 /* byte 10 */
1348 { 1600, 1200, 75, 0 },
1349 { 1600, 1200, 85, 0 },
1350 { 1792, 1344, 60, 0 },
1351 { 1792, 1344, 85, 0 },
1352 { 1856, 1392, 60, 0 },
1353 { 1856, 1392, 75, 0 },
1354 { 1920, 1200, 60, 1 },
1355 { 1920, 1200, 60, 0 },
1356 /* byte 11 */
1357 { 1920, 1200, 75, 0 },
1358 { 1920, 1200, 85, 0 },
1359 { 1920, 1440, 60, 0 },
1360 { 1920, 1440, 75, 0 },
1361};
1362static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]);
1363
1364static int 1012static int
1365drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing) 1013drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing)
1366{ 1014{