diff options
author | Adam Jackson <ajax@redhat.com> | 2009-09-18 17:02:16 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-09-18 17:02:52 -0400 |
commit | 55f585a15f42ffe028ff37ea1f63543795dbf56e (patch) | |
tree | 1e86c1fbc9d14c6e94c113cff818eb2244e5feb7 | |
parent | 7bfa6d08d6df4b76ed01ddab1a543ffc8bf08886 (diff) | |
download | xorg-driver-xf86-video-vesa-55f585a15f42ffe028ff37ea1f63543795dbf56e.tar.gz |
Use VBE palette load, not VGA banging.
-rw-r--r-- | src/vesa.c | 27 |
1 files changed, 1 insertions, 26 deletions
@@ -1317,16 +1317,13 @@ VESAWindowWindowed(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, (offset - pVesa->windowAoffset)); } +/* This code works, but is very slow for programs that use it intensively */ static void VESALoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) { VESAPtr pVesa = VESAGetRec(pScrn); int i, idx; - -#if 0 - - /* This code works, but is very slow for programs that use it intensively */ int base; if (pVesa->pal == NULL) @@ -1350,28 +1347,6 @@ VESALoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, if (idx - 1 == indices[i - 1]) VBESetGetPaletteData(pVesa->pVbe, TRUE, base, idx - base, pVesa->pal + base, FALSE, TRUE); - -#else - -#define VESADACDelay() \ - do { \ - (void)inb(pVesa->ioBase + VGA_IOBASE_COLOR + VGA_IN_STAT_1_OFFSET); \ - (void)inb(pVesa->ioBase + VGA_IOBASE_COLOR + VGA_IN_STAT_1_OFFSET); \ - } while (0) - - for (i = 0; i < numColors; i++) { - idx = indices[i]; - outb(pVesa->ioBase + VGA_DAC_WRITE_ADDR, idx); - VESADACDelay(); - outb(pVesa->ioBase + VGA_DAC_DATA, colors[idx].red); - VESADACDelay(); - outb(pVesa->ioBase + VGA_DAC_DATA, colors[idx].green); - VESADACDelay(); - outb(pVesa->ioBase + VGA_DAC_DATA, colors[idx].blue); - VESADACDelay(); - } - -#endif } /* |