From: Geert Uytterhoeven Date: Mon, 12 Feb 2007 08:55:18 +0000 (-0800) Subject: [PATCH] fbdev modedb: allow refresh rates for named video modes X-Git-Tag: v2.6.21-rc1~274^2~24 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c52cbeb7f27e1242e88f99f7f6486a16d5733c7;p=linux-2.6 [PATCH] fbdev modedb: allow refresh rates for named video modes 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 Cc: James Simmons Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 5df41f6f2b..53427a734d 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -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;