Skip to contentSkip to conversation

uvesafb: don't treat valid modes returned by fb_find_mode() as errors

PATCH In review Michal Januszewski 2 participants 3 messages Jan 27, 2008 – Mar 16, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uvesafb: don't treat valid modes returned by fb_find_mode() as errors

From: Michal Januszewski <[email protected]>

Don't treat valid modes returned by fb_find_mode() (best-fit modes, default modes or the first valid mode) as errors.

---

drivers/video/uvesafb.c +1 -1
index a14ef89..fc68b3e 100644
@@ -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 *)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#1 lore raw
Quoted 5 lines · On Sun, 27 Jan 2008 12:34:56 +0100 Michal Januszewski <[email protected]> wrote:

From: Michal Januszewski <[email protected]>

Don't treat valid modes returned by fb_find_mode() (best-fit modes, default modes or the first valid mode) as errors.

This changelog is too brief.

Quoted 7 lines

---

drivers/video/uvesafb.c +0 -0
index a14ef89..fc68b3e 100644

drivers/video/uvesafb.c static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) · line 891

Quoted 8 lines
drivers/video/uvesafb.c +1 -1
@@ -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 *)

Because I cannot tell what are the consequences of the bug which you're fixing, hence I cannot tell whether we need this fix in 2.6.25 or even 2.6.24.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#2 lore raw

PATCH 1/1 uvesafb: don't treat valid modes returned by fb_find_mode() as errors

From: Michal Januszewski <[email protected]>

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.

---
As requested, this patch contains an expanded changelog message. The bug is by no means critical and should have no impact on the large majority of users, so it's definitely not 2.6.24 material.

drivers/video/uvesafb.c +1 -1
index a14ef89..fc68b3e 100644
@@ -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 *)