]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fbdev: fix the fb_find_nearest_mode() function
authorMichal Januszewski <spock@gentoo.org>
Mon, 7 Nov 2005 09:00:47 +0000 (01:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:52 +0000 (07:53 -0800)
commit907e9e769bc577d8c0e3ddf68dfb25669de19d34
treedb4037a6694d3ffb6871c073ecb009332ff783b5
parent03880f6d53e867bd7eaf595375db2989cac57eb9
[PATCH] fbdev: fix the fb_find_nearest_mode() function

Currently the fb_find_nearest_mode() function finds a mode with screen
resolution closest to that described by the 'var' argument and with some
arbitrary refresh rate (eg.  in the following sequence of refresh rates: 70 60
53 85 75, 53 is selected).

This patch fixes the function so that it looks for the closest mode as far as
both resolution and refresh rate are concerned.  The function's first argument
is changed to fb_videomode so that the refresh rate can be specified by the
caller, as fb_var_screeninfo doesn't have any fields that could directly hold
this data.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/console/fbcon.c
drivers/video/modedb.c
include/linux/fb.h