diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-11-07 04:00:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:51 -0500 |
commit | 475666d4f80f148a091fa20257fe2381223d3c62 (patch) | |
tree | 87c64e09e2d6e26b56eb04d20de4236da4bcb812 /drivers/video/fbmon.c | |
parent | 9127fa28595093a146fc3e2c937747e014e4bfa2 (diff) |
[PATCH] fbdev: Workaround for buggy EDID blocks
Some EDID blocks set the flag "prefer first detailed timing" without providing
any detailed timing at all. Clear this flag if the block does not provide
detailed timings.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/fbmon.c')
-rw-r--r-- | drivers/video/fbmon.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 713226cdf3c6..442a52d10913 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c | |||
@@ -827,7 +827,7 @@ int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var) | |||
827 | void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) | 827 | void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) |
828 | { | 828 | { |
829 | unsigned char *block; | 829 | unsigned char *block; |
830 | int i; | 830 | int i, found = 0; |
831 | 831 | ||
832 | if (edid == NULL) | 832 | if (edid == NULL) |
833 | return; | 833 | return; |
@@ -869,6 +869,22 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs) | |||
869 | get_monspecs(edid, specs); | 869 | get_monspecs(edid, specs); |
870 | 870 | ||
871 | specs->modedb = fb_create_modedb(edid, &specs->modedb_len); | 871 | specs->modedb = fb_create_modedb(edid, &specs->modedb_len); |
872 | |||
873 | /* | ||
874 | * Workaround for buggy EDIDs that sets that the first | ||
875 | * detailed timing is preferred but has not detailed | ||
876 | * timing specified | ||
877 | */ | ||
878 | for (i = 0; i < specs->modedb_len; i++) { | ||
879 | if (specs->modedb[i].flag & FB_MODE_IS_DETAILED) { | ||
880 | found = 1; | ||
881 | break; | ||
882 | } | ||
883 | } | ||
884 | |||
885 | if (!found) | ||
886 | specs->misc &= ~FB_MISC_1ST_DETAIL; | ||
887 | |||
872 | DPRINTK("========================================\n"); | 888 | DPRINTK("========================================\n"); |
873 | } | 889 | } |
874 | 890 | ||