![]() | |||||||||||||
Messages in this thread |
On Wed, 5 Nov 2003, Ronald Lembcke wrote:
> The following patches make a few framebuffer-drivers behave (imho) more
> sensible: (Matrox and Riva allready behave like this)
>
> When selecting a video mode with bits_per_pixel == 16 is selected, but
> green.length != 6 (... 0 because the calling programm made no assumtion
> if the mode is 5/6/5 or maybe 6/5/5 or whatever) a 15 bpp mode is
> selected with 5/5/5.
> That's not nice ... when 16 bpp were requested.
Your change is not correct: bpp is the _physical_ bits per pixel, i.e. it's 16
for both color depth 15 (5/5/5 mode) and color depth 16 (5/6/5).
To differentiate between 5/5/5 and 5/6/5, you have to look at green.length, and
apply standard fbdev fit-our-round-up[*] rules.
Note that some hardware in addition does RGBA4444, too.
Gr{oetje,eeting}s,
Geert
[*] If a value doesn't fit, try to round it _up_. If that fails, return an
error.
--
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: 2005-03-22 12:58 [from the cache] ©2003-2008 | |||||||||||||