From dd1077a43fa79accbab85b531c8369d9fcead4c2 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 12 Oct 2012 15:44:29 +0300 Subject: [PATCH] --- yaml --- r: 344604 b: refs/heads/master c: 5e18e3527c5e7af6ccde475cfea5bfe6f1f0f0da h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/omap2/omapfb/omapfb-main.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9a62975e86e4..93d192e2a100 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2b5c0d4fd246a3ec0ab79c6518860c673c4515ef +refs/heads/master: 5e18e3527c5e7af6ccde475cfea5bfe6f1f0f0da diff --git a/trunk/drivers/video/omap2/omapfb/omapfb-main.c b/trunk/drivers/video/omap2/omapfb/omapfb-main.c index 24c339df0b88..be9096ced793 100644 --- a/trunk/drivers/video/omap2/omapfb/omapfb-main.c +++ b/trunk/drivers/video/omap2/omapfb/omapfb-main.c @@ -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; @@ -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) { @@ -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; }