Skip to content

Commit

Permalink
uvesafb: don't treat valid modes returned byfb_find_mode() as errors
Browse files Browse the repository at this point in the history
Don't treat valid modes returned by fb_find_mode() (best-fit modes, default
modes or the first valid mode) as errors.

Currently, when fb_find_mode() finds a valid mode belonging to one of the
above-mentioned classes, uvesafb will ignore it and will try to set a 640x480
video mode.  The expected behaviour (introduced by this patch) would be to use
the valid mode returned by fb_find_mode() instead.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michal Januszewski authored and Linus Torvalds committed Apr 28, 2008
1 parent e0745ae commit 5e72b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/uvesafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ static int __devinit uvesafb_vbe_init_mode(struct fb_info *info)
}

/* fb_find_mode() failed */
if (i == 0 || i >= 3) {
if (i == 0) {
info->var.xres = 640;
info->var.yres = 480;
mode = (struct fb_videomode *)
Expand Down

0 comments on commit 5e72b32

Please sign in to comment.