From: Geert U. <ge...@li...> - 2001-06-19 14:06:44
|
On Tue, 19 Jun 2001, Sven LUTHER wrote: > On Tue, Jun 19, 2001 at 03:55:28PM +0200, Geert Uytterhoeven wrote: > > On Tue, 19 Jun 2001, Sven LUTHER wrote: > > > On Tue, Jun 19, 2001 at 02:08:11PM +0000, Petr Vandrovec wrote: > > > > for truecolor and 4bpp pseudocolor, 0x0f0f0f0f is correct for > > > > 8bpp pseudocolor, 0xXX0f0f0f (*) is for 24/32bpp directcolor, > > > > 0x3DEF3DEF for 15bpp, 0x79EF79EF for 16bpp, and you cannot > > > > use RGB332 truecolor without information loss. > > > > > > mmm, truecolor is when the the rgb value is written directly to the pixel ? > > > and pseudo color is when you use a color index table. > > > > > > What exactly is direct color ? > > > > truecolor: > > > > red = (pixel & redmask) >> redshift > > green = (pixel & greenmask) >> greenshift > > blue = (pixel & bluemask) >> blueshift > > > > pseudocolor: > > > > red = redtable[pixel] > > green = greentable[pixel] > > blue = bluetable[pixel] > > > > directcolor: > > > > red = redtable[(pixel & redmask) >> redshift] > > green = greentable[(pixel & greenmask) >> greenshift] > > blue = bluetable[(pixel & bluemask) >> blueshift] > > > > To make sure revc always does the correct thing, there should be a 17th entry > > in the display->dispsw_data telling the invertion mask. > > And the correct thing to do is ? EXOR with 15 for pseudocolor EXOR with -1 for truecolor EXOR with (15 << redshift | 15 << greenshift | 15 << blueshift) for directcolor The directcolor case assumes your driver loaded the console palette to the DAC. Some fbdevs load a linear palette to the DAC so it behaves like truecolor. In that case, EXOR with -1. That's the reason why we need the 17th entry: fbcon-* cannot guess easily which mode is being used. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... 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 |