Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27482
b: refs/heads/master
c: 56e004e
h: refs/heads/master
v: v3
  • Loading branch information
Antonino A. Daplas authored and Dave Airlie committed May 29, 2006
1 parent 2a7b6fb commit cee4fa4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 080a416802153dbbb20ab4f4fa1225867096d071
refs/heads/master: 56e004e5435c008728b1444b51d757da2e098976
36 changes: 33 additions & 3 deletions trunk/drivers/video/intelfb/intelfbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@

#include "intelfb.h"
#include "intelfbhw.h"
#include "../edid.h"

static void __devinit get_initial_mode(struct intelfb_info *dinfo);
static void update_dinfo(struct intelfb_info *dinfo,
Expand Down Expand Up @@ -1031,13 +1032,42 @@ intelfb_init_var(struct intelfb_info *dinfo)
sizeof(struct fb_var_screeninfo));
msrc = 5;
} else {
const u8 *edid_s = fb_firmware_edid(&dinfo->pdev->dev);
u8 *edid_d = NULL;

if (edid_s) {
edid_d = kmalloc(128, GFP_KERNEL);

if (edid_d) {
memcpy(edid_d, edid_s, 128);
fb_edid_to_monspecs(edid_d,
&dinfo->info->monspecs);
kfree(edid_d);
}
}

if (mode) {
printk("intelfb: Looking for mode in private "
"database\n");
msrc = fb_find_mode(var, dinfo->info, mode,
vesa_modes, VESA_MODEDB_SIZE,
dinfo->info->monspecs.modedb,
dinfo->info->monspecs.modedb_len,
NULL, 0);
if (msrc)
msrc |= 8;

if (msrc && msrc > 1) {
printk("intelfb: No mode in private database, "
"intelfb: looking for mode in global "
"database ");
msrc = fb_find_mode(var, dinfo->info, mode,
vesa_modes,
VESA_MODEDB_SIZE, NULL, 0);

if (msrc)
msrc |= 8;
}

}

if (!msrc) {
msrc = fb_find_mode(var, dinfo->info, PREFERRED_MODE,
vesa_modes, VESA_MODEDB_SIZE,
Expand Down

0 comments on commit cee4fa4

Please sign in to comment.