Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344604
b: refs/heads/master
c: 5e18e35
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed Oct 29, 2012
1 parent 6df0b4f commit dd1077a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 2b5c0d4fd246a3ec0ab79c6518860c673c4515ef
refs/heads/master: 5e18e3527c5e7af6ccde475cfea5bfe6f1f0f0da
13 changes: 8 additions & 5 deletions trunk/drivers/video/omap2/omapfb/omapfb-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,7 @@ static int omapfb_find_best_mode(struct omap_dss_device *display,
{
struct fb_monspecs *specs;
u8 *edid;
int r, i, best_xres, best_idx, len;
int r, i, best_idx, len;

if (!display->driver->read_edid)
return -ENODEV;
Expand All @@ -2272,7 +2272,6 @@ static int omapfb_find_best_mode(struct omap_dss_device *display,

fb_edid_to_monspecs(edid, specs);

best_xres = 0;
best_idx = -1;

for (i = 0; i < specs->modedb_len; ++i) {
Expand All @@ -2288,16 +2287,20 @@ static int omapfb_find_best_mode(struct omap_dss_device *display,
if (m->xres == 2880 || m->xres == 1440)
continue;

if (m->vmode & FB_VMODE_INTERLACED ||
m->vmode & FB_VMODE_DOUBLE)
continue;

fb_videomode_to_omap_timings(m, display, &t);

r = display->driver->check_timings(display, &t);
if (r == 0 && best_xres < m->xres) {
best_xres = m->xres;
if (r == 0) {
best_idx = i;
break;
}
}

if (best_xres == 0) {
if (best_idx == -1) {
r = -ENOENT;
goto err2;
}
Expand Down

0 comments on commit dd1077a

Please sign in to comment.