summaryrefslogtreecommitdiff
path: root/src/mga_video.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-03-03 12:12:19 +0000
committerEgbert Eich <eich@suse.de>2004-03-03 12:12:19 +0000
commitd8072750f830173e3c9eefae8364d12190b20c26 (patch)
treebfc99c3d4bdcc4ef6bb59fcca5294ef1f49e1fec /src/mga_video.c
parentddb58a6e1be274dce96cc7c29965a45c2294c5d3 (diff)
Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENT
Diffstat (limited to 'src/mga_video.c')
-rw-r--r--src/mga_video.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mga_video.c b/src/mga_video.c
index 62bb2ad..4b4afba 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c,v 1.33 2003/11/10 18:22:23 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/mga_video.c,v 1.33tsi Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -460,6 +460,7 @@ MGACopyData(
){
w <<= 1;
while(h--) {
+ /* XXX Maybe this one needs big-endian fixes, too? -ReneR */
memcpy(dst, src, w);
src += srcPitch;
dst += dstPitch;
@@ -489,16 +490,27 @@ MGACopyMungedData(
s1 = src1; s2 = src2; s3 = src3;
i = w;
while(i > 4) {
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
dst[0] = s1[0] | (s1[1] << 16) | (s3[0] << 8) | (s2[0] << 24);
dst[1] = s1[2] | (s1[3] << 16) | (s3[1] << 8) | (s2[1] << 24);
dst[2] = s1[4] | (s1[5] << 16) | (s3[2] << 8) | (s2[2] << 24);
dst[3] = s1[6] | (s1[7] << 16) | (s3[3] << 8) | (s2[3] << 24);
+#else
+ dst[0] = (s1[0] << 16) | s1[1] | (s3[0] << 24) | (s2[0] << 8);
+ dst[1] = (s1[2] << 16) | s1[3] | (s3[1] << 24) | (s2[1] << 8);
+ dst[2] = (s1[4] << 16) | s1[5] | (s3[2] << 24) | (s2[2] << 8);
+ dst[3] = (s1[6] << 16) | s1[7] | (s3[3] << 24) | (s2[3] << 8);
+#endif
dst += 4; s2 += 4; s3 += 4; s1 += 8;
i -= 4;
}
while(i--) {
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
dst[0] = s1[0] | (s1[1] << 16) | (s3[0] << 8) | (s2[0] << 24);
+#else
+ dst[0] = (s1[0] << 16) | s1[1] | (s3[0] << 24) | (s2[0] << 8);
+#endif
dst++; s2++; s3++;
s1 += 2;
}
@@ -1008,7 +1020,8 @@ MGAStopSurface(
OffscreenPrivPtr pPriv = (OffscreenPrivPtr)surface->devPrivate.ptr;
if(pPriv->isOn) {
- MGAPtr pMga = MGAPTR(surface->pScrn);
+ ScrnInfoPtr pScrn = surface->pScrn;
+ MGAPtr pMga = MGAPTR(pScrn);
OUTREG(MGAREG_BESCTL, 0);
pPriv->isOn = FALSE;
}