Re: [Linux-fbdev-devel] [PATCH] video: Get the default mode from the right database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 -- [email protected]

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux