Subject: Re: XFree86 4.0.* palette unfriendliness
To: Chris Gilbert <firstname.lastname@example.org>
From: Ken Hornstein <email@example.com>
Date: 02/13/2001 10:57:03
>Nope still get the lovely near black on black effect. The libvgahw.a and
>tdfx_drv.o are both the same size as the existing ones I had, which just
>seemed a little surprising? Did they rebuild properly?
"Hm". Well, it's not surprising that they're the same size, since the
only thing that changed is a flag. Maybe I missed a fix ... but I took
a guess; is your card really using the tdfx driver? It looks like their
might have been other voodoo drivers.
If you want to try debugging this yourself, what is typically going wrong
is that the chip-specific driver makes calls to the functions
vgaHWSave() and vgaHWRestore(). To save/restore the palette, you need
the flag VGA_SR_CMAP set as one of the third arguments. (There's also
a bug in the actual code that saves the palette in the vgahw routines,
but the patch on the web site fixes that).
To debug it, I ended up adding some code that dumped the entire palette
out to the log file before and after a mode switch. Once you know where
to look, it's really not that hard to track it down.