Re: FB_VISUAL_TRUECOLOR vs.FB_VISUAL_DIRECTCOLOR

"Antonino A. Daplas" <[email protected]> Mon, 07 Aug 2006 07:43:54 +0800
Newsgroups gmane.linux.fbdev.user
Message-ID <[email protected]>
Sean D'Epagnier wrote:
> On Sun, Aug 06, 2006 at 11:27:49AM +0800, Antonino A. Daplas wrote:
>> James Lehman wrote:
>>> But if I leave the fb at 8 bpp and my code changes the bpp at runtime to 32,
>>> it looks like the first 16 console colors have been written into the color
>>> map.
>>>
>> Try switching the VC to KD_GRAPHICS mode before you run your app. Then
>> switch it back to KD_TEXT on exit, ie:
>>
>> fd = open("/dev/tty0", FLAG);
>> ioctl(fd, KDSETMODE, KD_GRAPHICS);
>>
>> Let me know if doing the above still writes the console palette to the
>> cmap. That will be a bug.
>>
>> Tony
> 
> I have tried this, and no, KD_GRAPHICS does not seem to work, I think if you do not set to graphics mode while running, then you can restore the cmap by switching to graphics then text on exit.
> 
> I have found also that matroxfb does not need to set the cmap but nvidiafb does.
> 
> Does anyone know a use for directcolor other than gamma correction?

That's it. DirectFB also uses it to adjust saturation, brightness, etc
in admininistrative mode.

Tony

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV