lkml.org 
[lkml]   [2006]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Linux-fbdev-devel] [PATCH] video: Get the default mode from the right database
On Mon, 2 Oct 2006, Jordan Crouse wrote:
> 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.

> --- 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;

Although currently DEFAULT_MODEDB_INDEX is defined to be 0, perhaps we need a
more rigorous check now it may apply to the custom video mode database?
Probably you always want the first mode of your custom video mode database to
be the default?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-03 09:07    [W:0.042 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site