fb: add a new mode matching function fb_find_best_nearest_mode

The intent is that if you have a native panel resolution of 1920x1080@60 but this cannot
be displayed, you can find the nearest resolution with the HIGHEST refresh rate (fb_find_nearest_mode
only selects the CLOSEST refresh rate). It also, by virtue of some rather unintended
side effect, picks better matches (1680x1050->1440x900) than find_nearest (1680x1050->1280x1024)
when it comes to widescreen modes.
This commit is contained in:
Matt Sealey
2011-06-13 19:51:55 -05:00
parent 54cf91e215
commit 5b7fe2afda
2 changed files with 59 additions and 0 deletions

View File

@@ -1080,8 +1080,12 @@ extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *
struct list_head *head);
extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
struct list_head *head);
extern const struct fb_videomode *fb_find_best_nearest_mode(const struct fb_videomode *mode,
struct list_head *head);
extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
struct list_head *head);
extern void fb_destroy_modelist(struct list_head *head);
extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
struct list_head *head);