From: Geert U. <ge...@li...> - 2001-11-22 14:27:48
|
On Thu, 22 Nov 2001, Benjamin Herrenschmidt wrote: > >In directcolor mode, there are two possible approaches to emulate console > >colors: > > - Use a linear ramp as colormap, and write the RGB triplets > corresponding to > > the console colors into the pixel values. > > - Store the RGB triples corresponding to the console colors in the > colormap, > > and set all of R, G and B in the pixel value to the console color index > > (i.e. the value you'd use in pseudocolor mode). > > > >The second approach has the advantage that you can change the console palette > >without having to redraw the screen, so atyfb uses that. > > Ok, so I'm trying to mimmic what atyfb does. Everything seem to work fine > with console and MOL well except 16bpp but I think I know how I broke that), > however, XFree (4.1.0 from latest debian sid) using fbdev seem to never set > the colormap. If I have a console at 8 bpp, X at 24 and MOL at 24, switching > from the console to X gives me an ugly X with what look like console colors > (wrong gamma ramp), but switching from MOL to X gives me correct display > (MOL properly sets it's own cmap). It looks like if X fbdevhw is not touching > the cmap at all like if it expected me to be TRUECOLOR. I don't know whether XFree86 4.x supports directcolor these days, or treats it like truecolor (with optional gamma table). In the latter case, make sure the X server sets the ramped colormap. I remember adding the code for setting the ramped colormap on directcolor to 3.x XF68_FBDev. 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 |