diff options
-rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 65059ba32044..dfe2abc63aad 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -132,6 +132,7 @@ | |||
132 | 132 | ||
133 | #include "intelfb.h" | 133 | #include "intelfb.h" |
134 | #include "intelfbhw.h" | 134 | #include "intelfbhw.h" |
135 | #include "../edid.h" | ||
135 | 136 | ||
136 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); | 137 | static void __devinit get_initial_mode(struct intelfb_info *dinfo); |
137 | static void update_dinfo(struct intelfb_info *dinfo, | 138 | static void update_dinfo(struct intelfb_info *dinfo, |
@@ -1031,13 +1032,42 @@ intelfb_init_var(struct intelfb_info *dinfo) | |||
1031 | sizeof(struct fb_var_screeninfo)); | 1032 | sizeof(struct fb_var_screeninfo)); |
1032 | msrc = 5; | 1033 | msrc = 5; |
1033 | } else { | 1034 | } else { |
1035 | const u8 *edid_s = fb_firmware_edid(&dinfo->pdev->dev); | ||
1036 | u8 *edid_d = NULL; | ||
1037 | |||
1038 | if (edid_s) { | ||
1039 | edid_d = kmalloc(128, GFP_KERNEL); | ||
1040 | |||
1041 | if (edid_d) { | ||
1042 | memcpy(edid_d, edid_s, 128); | ||
1043 | fb_edid_to_monspecs(edid_d, | ||
1044 | &dinfo->info->monspecs); | ||
1045 | kfree(edid_d); | ||
1046 | } | ||
1047 | } | ||
1048 | |||
1034 | if (mode) { | 1049 | if (mode) { |
1050 | printk("intelfb: Looking for mode in private " | ||
1051 | "database\n"); | ||
1035 | msrc = fb_find_mode(var, dinfo->info, mode, | 1052 | msrc = fb_find_mode(var, dinfo->info, mode, |
1036 | vesa_modes, VESA_MODEDB_SIZE, | 1053 | dinfo->info->monspecs.modedb, |
1054 | dinfo->info->monspecs.modedb_len, | ||
1037 | NULL, 0); | 1055 | NULL, 0); |
1038 | if (msrc) | 1056 | |
1039 | msrc |= 8; | 1057 | if (msrc && msrc > 1) { |
1058 | printk("intelfb: No mode in private database, " | ||
1059 | "intelfb: looking for mode in global " | ||
1060 | "database "); | ||
1061 | msrc = fb_find_mode(var, dinfo->info, mode, | ||
1062 | vesa_modes, | ||
1063 | VESA_MODEDB_SIZE, NULL, 0); | ||
1064 | |||
1065 | if (msrc) | ||
1066 | msrc |= 8; | ||
1067 | } | ||
1068 | |||
1040 | } | 1069 | } |
1070 | |||
1041 | if (!msrc) { | 1071 | if (!msrc) { |
1042 | msrc = fb_find_mode(var, dinfo->info, PREFERRED_MODE, | 1072 | msrc = fb_find_mode(var, dinfo->info, PREFERRED_MODE, |
1043 | vesa_modes, VESA_MODEDB_SIZE, | 1073 | vesa_modes, VESA_MODEDB_SIZE, |