xf86HandleColormaps() needs to know the RAMDAC depth.
Ask BIOS about its current value if BIOS has indicated
that RAMDAC supports 8-bit.

Signed-off-by: Egbert Eich <[email protected]>
---
 src/vesa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/vesa.c b/src/vesa.c
index 8de1983..93b4909 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -1096,7 +1096,8 @@ VESAScreenInit(SCREEN_INIT_ARGS_DECL)
     flags = CMAP_RELOAD_ON_MODE_SWITCH;
 
     if(!xf86HandleColormaps(pScreen, 256,
-       pVesa->vbeInfo->Capabilities[0] & 0x01 ? 8 : 6,
+                           (pVesa->vbeInfo->Capabilities[0] & 0x01 
+                            && VBESetGetDACPaletteFormat(pVesa->pVbe, 0) == 8) 
? 8 : 6,
        VESALoadPalette, NULL, flags))
        return (FALSE);
 
-- 
1.8.1.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to