Module Name: xsrc
Committed By: macallan
Date: Fri Dec 9 23:13:14 UTC 2016
Modified Files:
xsrc/external/mit/xf86-video-glint/dist/src: pm2_dac.c
Log Message:
enable byte swapping on big endian hardware
for some reason this was only enabled for pm2v but not pm2
Now this works properly on sparc64
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-glint/dist/src/pm2_dac.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-glint/dist/src/pm2_dac.c
diff -u xsrc/external/mit/xf86-video-glint/dist/src/pm2_dac.c:1.3 xsrc/external/mit/xf86-video-glint/dist/src/pm2_dac.c:1.4
--- xsrc/external/mit/xf86-video-glint/dist/src/pm2_dac.c:1.3 Sun Jun 2 07:36:43 2013
+++ xsrc/external/mit/xf86-video-glint/dist/src/pm2_dac.c Fri Dec 9 23:13:14 2016
@@ -95,8 +95,27 @@ Permedia2Init(ScrnInfoPtr pScrn, Display
GLINTRegPtr pReg = &pGlint->ModeReg[0];
CARD32 temp1, temp2, temp3, temp4;
- pReg->glintRegs[Aperture0 >> 3] = 0;
- pReg->glintRegs[Aperture1 >> 3] = 0;
+#if X_BYTE_ORDER == X_BIG_ENDIAN
+ switch (pGlint->HwBpp) {
+ case 8:
+ case 24:
+ temp1 = 0x00;
+ break;
+
+ case 15:
+ case 16:
+ temp1 = 0x02;
+ break;
+
+ case 32:
+ temp1 = 0x01;
+ break;
+ default:
+ break;
+ };
+#endif /* BIG_ENDIAN */
+ pReg->glintRegs[Aperture0 >> 3] = temp1;
+ pReg->glintRegs[Aperture1 >> 3] = temp1;
pReg->glintRegs[PMFramebufferWriteMask >> 3] = 0xFFFFFFFF;
pReg->glintRegs[PMBypassWriteMask >> 3] = 0xFFFFFFFF;