[patch][vesa]wrong operator causes color distortion when palette is needed

Liu, Wolke Wolke.Liu at amd.com
Thu Jan 31 05:19:38 PST 2008


diff --git a/src/vesa.c b/src/vesa.c
index e4e6547..57ca3a7 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -1169,7 +1169,7 @@ VESASetMode(ScrnInfoPtr pScrn, DisplayModePtr
pMode)
        VBESetLogicalScanline(pVesa->pVbe, pScrn->displayWidth);
 
     if (pScrn->bitsPerPixel == 8 && pVesa->vbeInfo->Capabilities[0] &
0x01 &&
-        !(data->data->MemoryModel & 0x6 || data->data->MemoryModel &
0x7)) 
+        !(data->data->MemoryModel == 0x6 || data->data->MemoryModel ==
0x7)) 
        VBESetGetDACPaletteFormat(pVesa->pVbe, 8);
 
     pScrn->vtSema = TRUE;

------------

Note: mode 0x6 is direct color mode and 0x7 is YUV mode. (see: vbecore
v.3)

Regards,
Wolke Liu





More information about the xorg mailing list