linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: Get the default mode from the right database
@ 2006-10-02 22:57 Jordan Crouse
  2006-10-03  7:04 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Jordan Crouse @ 2006-10-02 22:57 UTC (permalink / raw)
  To: linux-fbdev-devel, linux-kernel, devel

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

fb_find_mode() is behaving in an non-intuitive way.  When I specify my
own video mode database, and no default mode, I would have expected it
to assume the first mode in my database as the default mode.  Instead, it
uses the built in database:

> if (!db) {
>     db = modedb;
>     dbsize = ARRAY_SIZE(modedb);
> }
> if (!default_mode)
>     default_mode = &modedb[DEFAULT_MODEDB_INDEX];

Personally, I think this is incorrect - if an alternate database is
specified, it should be always using that.  Patch is attached.

Regards,
Jordan

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>

[-- Attachment #2: modedb-fix.patch --]
[-- Type: text/plain, Size: 763 bytes --]

[PATCH] video: Get the default mode from the right database

From: Jordan Crouse <jordan.crouse@amd.com>

If no default mode is specified, it should be grabbed from the supplied
database, not the default one.  

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
---

 drivers/video/modedb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index d126790..e068f52 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -506,7 +506,7 @@ int fb_find_mode(struct fb_var_screeninf
 	dbsize = ARRAY_SIZE(modedb);
     }
     if (!default_mode)
-	default_mode = &modedb[DEFAULT_MODEDB_INDEX];
+	default_mode = &db[DEFAULT_MODEDB_INDEX];
     if (!default_bpp)
 	default_bpp = 8;
 

[-- Attachment #3: Type: text/plain, Size: 133 bytes --]

_______________________________________________
Devel mailing list
Devel@laptop.org
http://mailman.laptop.org/mailman/listinfo/devel

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

end of thread, other threads:[~2006-10-03 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-02 22:57 [PATCH] video: Get the default mode from the right database Jordan Crouse
2006-10-03  7:04 ` Geert Uytterhoeven
2006-10-03 15:07   ` Jordan Crouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).