diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-11-07 04:00:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:52 -0500 |
commit | 14c8102ffc9d08aa86fb08ed4bdb005768650e44 (patch) | |
tree | d84d0dceef0e115914f16d0ea4662cd6cb8d42c2 | |
parent | 998e6d51162707685336ff99c029c8911b270d32 (diff) |
[PATCH] fbdev: Rearrange mode database entries
Rearrange mode database entries such that preferred timings are entered first,
and less preferred timings are entered last. (Detailed, VESA,
established/standard).
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/video/fbmon.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 442a52d10913..fc7965b66775 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c | |||
@@ -538,25 +538,12 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize) | |||
538 | 538 | ||
539 | *dbsize = 0; | 539 | *dbsize = 0; |
540 | 540 | ||
541 | DPRINTK(" Supported VESA Modes\n"); | ||
542 | block = edid + ESTABLISHED_TIMING_1; | ||
543 | num += get_est_timing(block, &mode[num]); | ||
544 | |||
545 | DPRINTK(" Standard Timings\n"); | ||
546 | block = edid + STD_TIMING_DESCRIPTIONS_START; | ||
547 | for (i = 0; i < STD_TIMING; i++, block += STD_TIMING_DESCRIPTION_SIZE) | ||
548 | num += get_std_timing(block, &mode[num]); | ||
549 | |||
550 | DPRINTK(" Detailed Timings\n"); | 541 | DPRINTK(" Detailed Timings\n"); |
551 | block = edid + DETAILED_TIMING_DESCRIPTIONS_START; | 542 | block = edid + DETAILED_TIMING_DESCRIPTIONS_START; |
552 | for (i = 0; i < 4; i++, block+= DETAILED_TIMING_DESCRIPTION_SIZE) { | 543 | for (i = 0; i < 4; i++, block+= DETAILED_TIMING_DESCRIPTION_SIZE) { |
553 | int first = 1; | 544 | int first = 1; |
554 | 545 | ||
555 | if (block[0] == 0x00 && block[1] == 0x00) { | 546 | if (!(block[0] == 0x00 && block[1] == 0x00)) { |
556 | if (block[3] == 0xfa) { | ||
557 | num += get_dst_timing(block + 5, &mode[num]); | ||
558 | } | ||
559 | } else { | ||
560 | get_detailed_timing(block, &mode[num]); | 547 | get_detailed_timing(block, &mode[num]); |
561 | if (first) { | 548 | if (first) { |
562 | mode[num].flag |= FB_MODE_IS_FIRST; | 549 | mode[num].flag |= FB_MODE_IS_FIRST; |
@@ -565,6 +552,21 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize) | |||
565 | num++; | 552 | num++; |
566 | } | 553 | } |
567 | } | 554 | } |
555 | |||
556 | DPRINTK(" Supported VESA Modes\n"); | ||
557 | block = edid + ESTABLISHED_TIMING_1; | ||
558 | num += get_est_timing(block, &mode[num]); | ||
559 | |||
560 | DPRINTK(" Standard Timings\n"); | ||
561 | block = edid + STD_TIMING_DESCRIPTIONS_START; | ||
562 | for (i = 0; i < STD_TIMING; i++, block += STD_TIMING_DESCRIPTION_SIZE) | ||
563 | num += get_std_timing(block, &mode[num]); | ||
564 | |||
565 | block = edid + DETAILED_TIMING_DESCRIPTIONS_START; | ||
566 | for (i = 0; i < 4; i++, block+= DETAILED_TIMING_DESCRIPTION_SIZE) { | ||
567 | if (block[0] == 0x00 && block[1] == 0x00 && block[3] == 0xfa) | ||
568 | num += get_dst_timing(block + 5, &mode[num]); | ||
569 | } | ||
568 | 570 | ||
569 | /* Yikes, EDID data is totally useless */ | 571 | /* Yikes, EDID data is totally useless */ |
570 | if (!num) { | 572 | if (!num) { |