[Xorg] VESA driver bug(and fix?)

whizzter at acidjazz.net whizzter at acidjazz.net
Fri Apr 16 17:32:52 PDT 2004


i recently bought a Toshiba R100 laptop with a Trident XP4 graphics card and
installed freebsd and XFree86 (as i've understood the XOrg is a pretty
recent forkso  i guess that you might stilll have  this bug)

the bug exists in XFree4.4.0 and seems pretty silly but easy to fix.  it
manifests itselfas garbled colors when using 16/32bpp colormodes on my  graphics card (if you
search for "toshiba r100 linux" a page on freed.net will popup  with the
exactlysame problem).
considering the nature of this bug it could possibly affect other chipsets
aswell.
now to the problem and fix.

inside programs/Xserver/hw/xfree86/drivers/vesa/vesa.c
there is a line that says:
    if (pScrn->bitsPerPixel >= 8 && pVesa->vbeInfo->Capabilities[0] & 0x01)
	VBESetGetDACPaletteFormat(pVesa->pVbe, 8);

(changing to pScrn->bitsPerPixel == 8 fixes the problem on this chip, but
maybe acheck for the memory model would be more proper?)

i looked at the vesa documentation(it was ages ago i read it last time,
sometimeduring the 90s when i was making stuff for dos :), and it says that after
a modereset the DAC will be reset to the vga 6bit format, so the above code
kinda makessense(atleast for 8bpp modes).

i hope you guys make a wise decision on how to resolve this. good luck.

/ Jonas Lund






More information about the xorg mailing list