[PATCH] fbdev modedb: allow refresh rates for named video modes
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Mon, 12 Feb 2007 08:55:18 +0000 (00:55 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 12 Feb 2007 17:48:44 +0000 (09:48 -0800)
fbdev modedb: Take into account the specified refresh rates for video modes
specified by name, so e.g.  all of `720p', `720p@60', and `720p@50' work.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/modedb.c

index 5df41f6f2b86064f1b1db8d42a10ec5386ea4f4a..53427a734d4b0d90db2e047aad71f66e858bbe25 100644 (file)
@@ -610,10 +610,8 @@ done:
        diff = refresh;
        best = -1;
        for (i = 0; i < dbsize; i++) {
-               if ((name_matches(db[i], name, namelen) &&
-                       !fb_try_mode(var, info, &db[i], bpp)))
-                       return 1;
-               if (res_specified && res_matches(db[i], xres, yres)) {
+               if (name_matches(db[i], name, namelen) ||
+                   (res_specified && res_matches(db[i], xres, yres))) {
                        if(!fb_try_mode(var, info, &db[i], bpp)) {
                                if(!refresh_specified || db[i].refresh == refresh)
                                        return 1;