From: Petr V. <VAN...@vc...> - 2001-06-19 12:08:45
|
On 19 Jun 01 at 13:41, Sven LUTHER wrote: > On Tue, Jun 19, 2001 at 01:34:43PM +0200, Romain Dolbeau wrote: > > Sven LUTHER wrote: > > pm2fb use non-accelerated fbcon-cfb8, and this one > > simply do pixels = (pixels ^ 0x0f0f0f0f). > > > > So I guess it is the answer :-) > > Ok, let's go for this, in wait for a response from the more knowledgeable > fbdev gurus ... I do not know whether I'm more knowledgeable, but revc, together with other character based functions (putc/putcs/clear (and maybe clear_margin)) have to support only 16 colors. And it is driver bussiness how it will perform console color -> value in framebuffer mapping. But it is convient, and couple of apps expects that for pseudocolor console color is directly stored in framebuffer, so only palette entries 0 .. 15 are used. But you can use entries 0, 17, 34, 51, 68, ... 238, 255 as well - although I'm sure that some fbdev apps will not agree with you. If you decide to use standard way, then using 0xffffffff is correct 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. Petr (*) it is (15 << red.shift) | (15 << green.shift) | (15 << blue.shift) |