lkml.org 
[lkml]   [2006]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] video: Get the default mode from the right database
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>
[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;
\
 
 \ /
  Last update: 2006-10-03 00:51    [W:0.100 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site