mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm] fb: modedb uses wrong default_mode
@ 2006-11-15 17:43 Tero Roponen
  2006-11-15 23:29 ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Tero Roponen @ 2006-11-15 17:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm


It seems that default_mode is always overwritten in
fb_find_mode() if caller gives its own modedb; this
patch should fix it.

dmesg diff before and after the following patch:

 neofb: mapped framebuffer at c4a80000
 -Mode (640x400) won't display properly on LCD
 -Mode (640x400) won't display properly on LCD
 -neofb v0.4.2: 2048kB VRAM, using 640x480, 31.469kHz, 59Hz
 -Console: switching to colour frame buffer device 80x30
 +neofb v0.4.2: 2048kB VRAM, using 800x600, 37.878kHz, 60Hz
 +Console: switching to colour frame buffer device 100x37
  fb0: MagicGraph 128XD frame buffer device

Signed-off-by: Tero Roponen <teanropo@jyu.fi>
---

--- linux-2.6.19-rc5-mm2/drivers/video/modedb.c.orig	2006-11-15 19:03:03.000000000 +0200
+++ linux-2.6.19-rc5-mm2/drivers/video/modedb.c	2006-11-15 19:02:57.000000000 +0200
@@ -507,7 +507,7 @@ int fb_find_mode(struct fb_var_screeninf
     }
     if (!default_mode && db != modedb)
 	default_mode = &db[0];
-    else
+    else if (!default_mode)
 	default_mode = &modedb[DEFAULT_MODEDB_INDEX];
 
     if (!default_bpp)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-11-20 20:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-15 17:43 [PATCH -mm] fb: modedb uses wrong default_mode Tero Roponen
2006-11-15 23:29 ` Andrew Morton
2006-11-15 23:44   ` Jordan Crouse
2006-11-17 20:08     ` [Linux-fbdev-devel] " James Simmons
2006-11-17 20:40       ` Andrew Morton
2006-11-18 10:39         ` Tero Roponen
2006-11-20 16:48         ` James Simmons
2006-11-20 20:05           ` Andrew Morton
2006-11-20 20:37             ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®