Module Name: xsrc
Committed By: macallan
Date: Thu Jan 19 23:50:32 UTC 2017
Modified Files:
xsrc/external/mit/xf86-video-chips/dist/src: ct_driver.c ct_driver.h
Log Message:
hook in EXA acceleration for 65550 / HiQV chips
mostly for rev. 4 sharks
also, default to 16bit colour since these chips really don't like higher depth
all that much
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 \
xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.h
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-chips/dist/src/ct_driver.c
diff -u xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.27 xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.28
--- xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.27 Thu Jan 5 12:23:11 2017
+++ xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c Thu Jan 19 23:50:31 2017
@@ -1270,11 +1270,19 @@ CHIPSPreInit(ScrnInfoPtr pScrn, int flag
}
if (cPtr->Flags & ChipsAccelSupport) {
+#ifdef HAVE_XAA_H
if (!xf86LoadSubModule(pScrn, "xaa")) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n");
cPtr->Flags &= ~(ChipsAccelSupport);
cPtr->Flags |= ChipsShadowFB;
}
+#else
+ if (!xf86LoadSubModule(pScrn, "exa")) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n");
+ cPtr->Flags &= ~(ChipsAccelSupport);
+ cPtr->Flags |= ChipsShadowFB;
+ }
+#endif
}
if (cPtr->Flags & ChipsShadowFB) {
@@ -1334,8 +1342,8 @@ chipsPreInitHiQV(ScrnInfoPtr pScrn, int
/* Set pScrn->monitor */
pScrn->monitor = pScrn->confScreen->monitor;
- /* All HiQV chips support 16/24/32 bpp */
- if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support24bppFb | Support32bppFb |
+ /* All HiQV chips support 16/24/32 bpp, default to 16bpp for speed & vram */
+ if (!xf86SetDepthBpp(pScrn, 16, 0, 0, Support24bppFb | Support32bppFb |
SupportConvert32to24 | PreferConvert32to24))
return FALSE;
else {
@@ -4202,17 +4210,22 @@ CHIPSScreenInit(SCREEN_INIT_ARGS_DECL)
xf86InitFBManager(pScreen, &AvailFBArea);
}
-#ifdef HAVE_XAA_H
if (cPtr->Flags & ChipsAccelSupport) {
if (IS_HiQV(cPtr)) {
+#ifdef HAVE_XAA_H
CHIPSHiQVAccelInit(pScreen);
- } else if (cPtr->UseMMIO) {
+#else
+ CHIPSInitEXA(pScreen);
+#endif
+ }
+#ifdef HAVE_XAA_H
+ else if (cPtr->UseMMIO) {
CHIPSMMIOAccelInit(pScreen);
} else {
CHIPSAccelInit(pScreen);
}
- }
#endif
+ }
xf86SetBackingStore(pScreen);
#ifdef ENABLE_SILKEN_MOUSE
xf86SetSilkenMouse(pScreen);
Index: xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.h
diff -u xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.h:1.3 xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.h:1.4
--- xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.h:1.3 Sun Jun 2 07:44:10 2013
+++ xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.h Thu Jan 19 23:50:31 2017
@@ -31,6 +31,7 @@
#include "xaa.h"
#include "xaalocal.h" /* XAA internals as we replace some of XAA */
#endif
+#include "exa.h"
#include "vbe.h"
#include "xf86Cursor.h"
#include "xf86i2c.h"
@@ -211,6 +212,7 @@ typedef struct {
unsigned int CacheEnd;
/* Storage for pattern mask */
int planemask;
+ int srcpitch, srcoffset, xdir, ydir;
/* Storage for foreground and background color */
int fgColor;
int bgColor;
@@ -329,6 +331,7 @@ typedef struct _CHIPSRec {
#ifdef HAVE_XAA_H
XAAInfoRecPtr AccelInfoRec;
#endif
+ ExaDriverPtr pExa;
xf86CursorInfoPtr CursorInfoRec;
CHIPSACLRec Accel;
unsigned int HWCursorContents;
@@ -419,6 +422,7 @@ void CHIPSMMIOSync(ScrnInfoPtr pScrn);
Bool CHIPSHiQVAccelInit(ScreenPtr pScreen);
void CHIPSHiQVSync(ScrnInfoPtr pScrn);
Bool CHIPSCursorInit(ScreenPtr pScreen);
+Bool CHIPSInitEXA(ScreenPtr pScreen);
/* register access functions */
void CHIPSSetStdExtFuncs(CHIPSPtr cPtr);