# Re: mono, gray and index configs

- From: Geert Uytterhoeven \<geert@linux-m68k.org\>
- Date: 2005-08-22 14:07:08 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2005/08/13455422
- Thread: https://ratatoskr.run/linux-fbdev/2005/08/13455364/t.md

```text
On Mon, 22 Aug 2005, Richard Smith wrote:
> > > This adds an optional function to each driver that advertises what
> > > configs it offers.
> > 
> > Do we really need this?
> > 
> > You can easily write a `probe loop' to find out about all supported configs for
> > a driver like this:
> > 
> >     for_all_possible_configs(config) {
> >         struct fb_var_screeninfo var;
> 
> This will actually try to set the mode right?

No, you cut the following line:

| var.activate |= FB_ACTIVATE_TEST;

which will cause the driver to check whether the mode is valid (or can be made
valid by rounding up).

> SDL does it this way and its caused me some pain dealing with
> framebuffers on hardware that has issues with certain modes.  Its also
> a good bit slower for the app to startup while the code crunches out
> the pll settings.
> 
> >From a users perspective I think advertising valid modes is a good thing.

Except that on most hardware the list of valid modes is _very_ large...
How many combinations of resolution, color depth, and timings do you think you
can have? I guess the complete list can easily fill up all your RAM...

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


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
```
