mirror of
https://github.com/X11Libre/xf86-video-xgi.git
synced 2026-03-24 01:24:35 +00:00
drop obsolete XAA support
Since recent commits require xserver-1.18.0 or later to build against, there's no reason leaving behind big chunks of code that can only build against the XAA support removed in xserver-1.13.0 (released in 2012). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-xgi/-/merge_requests/6>
This commit is contained in:
18
configure.ac
18
configure.ac
@@ -118,24 +118,6 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
|
||||
fi
|
||||
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
|
||||
|
||||
AC_ARG_ENABLE(xaa,
|
||||
AS_HELP_STRING([--enable-xaa],
|
||||
[Enable legacy X Acceleration Architecture (XAA) [default=auto]]),
|
||||
[XAA="$enableval"],
|
||||
[XAA=auto])
|
||||
if test "x$XAA" != xno; then
|
||||
save_CFLAGS=$CFLAGS
|
||||
save_CPPFLAGS=$CPPFLAGS
|
||||
CFLAGS=$XORG_CFLAGS
|
||||
CPPFLAGS="$XORG_CFLAGS"
|
||||
AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no)
|
||||
CFLAGS=$save_CFLAGS
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to include XAA support])
|
||||
AM_CONDITIONAL(XAA, test "x$XAA" = xyes)
|
||||
AC_MSG_RESULT([$XAA])
|
||||
|
||||
AC_SUBST([moduledir])
|
||||
AC_DEFINE_UNQUOTED(XGI_RELEASE_DATE, ["$RELEASE_DATE"], [Driver release])
|
||||
DRIVER_NAME=xgi
|
||||
|
||||
17
src/xgi.h
17
src/xgi.h
@@ -158,15 +158,6 @@ extern Bool g_bRunTimeDebug;
|
||||
#define XGI_USE_EXA
|
||||
#endif
|
||||
|
||||
/* Jong 01/13/2009; support EXA */
|
||||
#ifdef HAVE_XAA_H
|
||||
#define XGI_USE_XAA
|
||||
#endif
|
||||
/* #define XGI_USE_EXA */
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
#include "xaa.h"
|
||||
#endif
|
||||
#ifdef XGI_USE_EXA
|
||||
#include "exa.h"
|
||||
#endif
|
||||
@@ -565,7 +556,6 @@ typedef struct {
|
||||
} XGIEntRec, *XGIEntPtr;
|
||||
|
||||
#define XGIPTR(p) ((XGIPtr)((p)->driverPrivate))
|
||||
#define XAAPTR(p) ((XAAInfoRecPtr)(XGIPTR(p)->AccelInfoPtr))
|
||||
|
||||
#define ExtRegSize 0x40
|
||||
|
||||
@@ -651,9 +641,6 @@ typedef struct {
|
||||
XGIRegRec SavedReg;
|
||||
XGIRegRec ModeReg;
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
XAAInfoRecPtr AccelInfoPtr;
|
||||
#endif
|
||||
#ifdef XGI_USE_EXA /* Jong 01/13/2009; support EXA */
|
||||
ExaDriverPtr EXADriverPtr;
|
||||
int fillPitch, fillBpp;
|
||||
@@ -824,10 +811,6 @@ typedef struct {
|
||||
uint32_t colorKey;
|
||||
uint32_t MiscFlags;
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
FBLinearPtr AccelLinearScratch;
|
||||
#endif
|
||||
|
||||
float zClearVal;
|
||||
unsigned long bClrColor, dwColor;
|
||||
int AllowHotkey;
|
||||
|
||||
396
src/xgi_accel.c
396
src/xgi_accel.c
@@ -49,13 +49,6 @@
|
||||
#include "xgi.h"
|
||||
#include "vb_def.h"
|
||||
|
||||
/* Jong 01/13/2009; support EXA */
|
||||
#ifdef XGI_USE_XAA
|
||||
#include "xaarop.h"
|
||||
#include <xaa.h>
|
||||
#include <xaalocal.h>
|
||||
#endif
|
||||
|
||||
#include <xf86fbman.h>
|
||||
|
||||
#define DEV_HEIGHT 0xfff /* "Device height of destination bitmap" */
|
||||
@@ -620,10 +613,6 @@ Volari_InitializeAccelerator(ScrnInfoPtr pScrn)
|
||||
Bool
|
||||
Volari_AccelInit(ScreenPtr pScreen)
|
||||
{
|
||||
#ifdef XGI_USE_XAA
|
||||
XAAInfoRecPtr infoPtr;
|
||||
#endif
|
||||
|
||||
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
int reservedFbSize;
|
||||
@@ -637,70 +626,6 @@ Volari_AccelInit(ScreenPtr pScreen)
|
||||
|
||||
PDEBUG1(ErrorF("Volari_AccelInit()\n" )) ;
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
/* Jong 01/07/2008; force to disable 2D based on SR3A[6] for XG21 */
|
||||
if( !((pXGI->Chipset == PCI_CHIP_XGIXG21) && ForceToDisable2DEngine(pScrn)) && !(pXGI->useEXA) )
|
||||
{
|
||||
PDEBUG(ErrorF("--- XAA ---\n" )) ;
|
||||
pXGI->AccelInfoPtr = infoPtr = XAACreateInfoRec();
|
||||
if (!infoPtr) return FALSE;
|
||||
|
||||
Volari_InitializeAccelerator(pScrn);
|
||||
|
||||
infoPtr->Flags = LINEAR_FRAMEBUFFER |
|
||||
OFFSCREEN_PIXMAPS |
|
||||
PIXMAP_CACHE;
|
||||
|
||||
/* sync */
|
||||
infoPtr->Sync = Volari_Sync;
|
||||
|
||||
if ((pScrn->bitsPerPixel != 8) &&
|
||||
(pScrn->bitsPerPixel != 16) &&
|
||||
(pScrn->bitsPerPixel != 32))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
PDEBUG(ErrorF("--- Enable XAA ---\n" )) ;
|
||||
|
||||
#ifdef XGIG2_SCR2SCRCOPY
|
||||
/* BitBlt */
|
||||
/* Jong 08/24/2007; cause an extra rectangle drawing at top-left corner while clicking "Computer" on Suse SP1 (Xorg6.9.0) */
|
||||
if(pScrn->bitsPerPixel != 8)
|
||||
{
|
||||
infoPtr->SetupForScreenToScreenCopy = Volari_SetupForScreenToScreenCopy;
|
||||
infoPtr->SubsequentScreenToScreenCopy = Volari_SubsequentScreenToScreenCopy;
|
||||
|
||||
/* Jong@08112009; bug fixing */
|
||||
/* infoPtr->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY | ONLY_LEFT_TO_RIGHT_BITBLT; */
|
||||
infoPtr->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XGIG2_SOLIDFILL
|
||||
/* solid fills */
|
||||
infoPtr->SetupForSolidFill = Volari_SetupForSolidFill;
|
||||
infoPtr->SubsequentSolidFillRect = Volari_SubsequentSolidFillRect;
|
||||
infoPtr->SolidFillFlags = NO_PLANEMASK;
|
||||
#endif
|
||||
|
||||
#ifdef XGIG2_8X8MONOPATFILL
|
||||
/* 8x8 mono pattern fill */
|
||||
infoPtr->SetupForMono8x8PatternFill = Volari_SetupForMonoPatternFill;
|
||||
infoPtr->SubsequentMono8x8PatternFillRect = Volari_SubsequentMonoPatternFill;
|
||||
infoPtr->Mono8x8PatternFillFlags =
|
||||
NO_PLANEMASK |
|
||||
HARDWARE_PATTERN_SCREEN_ORIGIN |
|
||||
HARDWARE_PATTERN_PROGRAMMED_BITS |
|
||||
/* 2005/08/15 modified by jjtseng */
|
||||
/* NO_TRANSPARENCY | */
|
||||
/*~ jjtseng 2005/08/15 */
|
||||
BIT_ORDER_IN_BYTE_MSBFIRST ;
|
||||
#endif /* XGIG2_8X8MONOPATFILL */
|
||||
}
|
||||
#endif /* XAA */
|
||||
|
||||
/* Jong 01/13/2009; support EXA */
|
||||
#ifdef XGI_USE_EXA /* ----------------------- EXA ----------------------- */
|
||||
PDEBUG(ErrorF("--- EXA ---\n" )) ;
|
||||
@@ -816,97 +741,6 @@ Volari_AccelInit(ScreenPtr pScreen)
|
||||
}
|
||||
#endif /* EXA */
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(!(pXGI->useEXA)) {
|
||||
/* init Frame Buffer Manager */
|
||||
reservedFbSize = 0;
|
||||
if (pXGI->TurboQueue)
|
||||
{
|
||||
reservedFbSize += pXGI->cmdQueueSize ;
|
||||
}
|
||||
|
||||
if (pXGI->HWCursor)
|
||||
{
|
||||
reservedFbSize += VOLARI_CURSOR_SHAPE_SIZE;
|
||||
}
|
||||
|
||||
#ifdef XGIG2_COLOREXPSCANLN
|
||||
reservedFbSize += (pXGI->ColorExpandBufferNumber * pXGI->PerColorExpandBufferSize);
|
||||
#endif
|
||||
|
||||
UsableFbSize = pXGI->FbMapSize - reservedFbSize;
|
||||
AvailBufBase = pXGI->FbBase + UsableFbSize;
|
||||
|
||||
for (i = 0; i < pXGI->ColorExpandBufferNumber; i++) {
|
||||
const int base = i * pXGI->PerColorExpandBufferSize;
|
||||
|
||||
pXGI->ColorExpandBufferAddr[i] = AvailBufBase + base;
|
||||
pXGI->ColorExpandBufferScreenOffset[i] = UsableFbSize + base;
|
||||
}
|
||||
|
||||
#ifdef XGIG2_IMAGEWRITE
|
||||
reservedFbSize += pXGI->ImageWriteBufferSize;
|
||||
UsableFbSize = pXGI->FbMapSize - reservedFbSize;
|
||||
pXGI->ImageWriteBufferAddr = AvailBufBase = pXGI->FbBase + UsableFbSize;
|
||||
infoPtr->ImageWriteRange = pXGI->ImageWriteBufferAddr;
|
||||
#endif /* XGIG2_IMAGEWRITE */
|
||||
|
||||
Avail.x1 = 0;
|
||||
Avail.y1 = 0;
|
||||
|
||||
/*
|
||||
Avail.x2 = pScrn->displayWidth;
|
||||
|
||||
ErrorF("FbDevExist=%s\n",FbDevExist?"TRUE":"FALSE");
|
||||
|
||||
if( FbDevExist && (pXGI->Chipset != PCI_CHIP_XGIXG20 ) && (pXGI->Chipset != PCI_CHIP_XGIXG27 ) )
|
||||
{
|
||||
if( UsableFbSize >= 8*1024*1024 )
|
||||
{
|
||||
UsableFbSize = 8*1024*1024 ;
|
||||
}
|
||||
else
|
||||
{
|
||||
UsableFbSize = 4*1024*1024 ;
|
||||
}
|
||||
}
|
||||
|
||||
PDEBUG1(ErrorF( "UsabelFbSize = %08lx\n", UsableFbSize )) ;
|
||||
Avail.y2 = UsableFbSize / pXGI->scrnOffset ;
|
||||
|
||||
if ((unsigned long)Avail.y2 > 8192)
|
||||
{
|
||||
Avail.y2 = 8192 ;
|
||||
}
|
||||
*/
|
||||
|
||||
UsableFbSize = pXGI->CursorOffset ;
|
||||
Avail.x1 = 0 ;
|
||||
Avail.y1 = 0 ;
|
||||
Avail.x2 = pScrn->displayWidth;
|
||||
Avail.y2 = UsableFbSize / pXGI->scrnOffset ;
|
||||
|
||||
|
||||
if ((unsigned long)Avail.y2 > 8192)
|
||||
{
|
||||
Avail.y2 = 8192 ;
|
||||
}
|
||||
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"Usable FBSize = %08lx\n", UsableFbSize ) ;
|
||||
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
"Frame Buffer From (%d,%d) To (%d,%d)\n",
|
||||
Avail.x1, Avail.y1, Avail.x2, Avail.y2);
|
||||
|
||||
xf86InitFBManager(pScreen, &Avail);
|
||||
|
||||
return(XAAInit(pScreen, infoPtr));
|
||||
}
|
||||
#endif /* XAA */
|
||||
|
||||
#ifdef XGI_USE_EXA
|
||||
if(pXGI->useEXA)
|
||||
{
|
||||
@@ -984,236 +818,6 @@ static int xgiG2_PatALUConv[] =
|
||||
0xFF, /* dest = 0xFF; 1, GXset, 0xF */
|
||||
};
|
||||
|
||||
/* ---------------------------- XAA -------------------------- */
|
||||
#ifdef XGI_USE_XAA
|
||||
static void
|
||||
Volari_SetupForScreenToScreenCopy(
|
||||
ScrnInfoPtr pScrn,
|
||||
int xdir, int ydir, int rop,
|
||||
unsigned int planemask, int trans_color)
|
||||
{
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
//#ifdef SHOW_XAAINFO
|
||||
XAAInfoRecPtr pXAA = XAAPTR(pScrn);
|
||||
PDEBUG1(ErrorF("XAAInfoPtr->UsingPixmapCache = %s\n"
|
||||
"XAAInfoPtr->CanDoMono8x8 = %s\n"
|
||||
"XAAInfoPtr->CanDoColor8x8 = %s\n"
|
||||
"XAAInfoPtr->CachePixelGranularity = %d\n"
|
||||
"XAAInfoPtr->MaxCacheableTileWidth = %d\n"
|
||||
"XAAInfoPtr->MaxCacheableTileHeight = %d\n"
|
||||
"XAAInfoPtr->MaxCacheableStippleWidth = %d\n"
|
||||
"XAAInfoPtr->MaxCacheableStippleHeight = %d\n"
|
||||
"XAAInfoPtr->MonoPatternPitch = %d\n"
|
||||
"XAAInfoPtr->CacheWidthMono8x8Pattern = %d\n"
|
||||
"XAAInfoPtr->CacheHeightMono8x8Pattern = %d\n"
|
||||
"XAAInfoPtr->ColorPatternPitch = %d\n"
|
||||
"XAAInfoPtr->CacheWidthColor8x8Pattern = %d\n"
|
||||
"XAAInfoPtr->CacheHeightColor8x8Pattern = %d\n"
|
||||
"XAAInfoPtr->CacheColorExpandDensity = %d\n"
|
||||
"XAAInfoPtr->maxOffPixWidth = %d\n"
|
||||
"XAAInfoPtr->maxOffPixHeight= %d\n"
|
||||
"XAAInfoPtr->NeedToSync = %s\n"
|
||||
"\n",
|
||||
pXAA->UsingPixmapCache ? "True" : "False",
|
||||
pXAA->CanDoMono8x8 ? "True" : "False",
|
||||
pXAA->CanDoColor8x8 ? "True" : "False",
|
||||
pXAA->CachePixelGranularity,
|
||||
pXAA->MaxCacheableTileWidth,
|
||||
pXAA->MaxCacheableTileHeight,
|
||||
pXAA->MaxCacheableStippleWidth,
|
||||
pXAA->MaxCacheableStippleHeight,
|
||||
pXAA->MonoPatternPitch,
|
||||
pXAA->CacheWidthMono8x8Pattern,
|
||||
pXAA->CacheHeightMono8x8Pattern,
|
||||
pXAA->ColorPatternPitch,
|
||||
pXAA->CacheWidthColor8x8Pattern,
|
||||
pXAA->CacheHeightColor8x8Pattern,
|
||||
pXAA->CacheColorExpandDensity,
|
||||
pXAA->maxOffPixWidth,
|
||||
pXAA->maxOffPixHeight,
|
||||
pXAA->NeedToSync ? "True" : "False"));
|
||||
//#endif
|
||||
|
||||
PDEBUG1(ErrorF("Setup ScreenCopy(%d, %d, 0x%x, 0x%x, 0x%x)\n",
|
||||
xdir, ydir, rop, planemask, trans_color));
|
||||
|
||||
Volari_ResetCmd ;
|
||||
GuardBand(0x20 * Alignment);
|
||||
Volari_SetupDSTColorDepth(pXGI->DstColor);
|
||||
Volari_SetupSRCPitch(pXGI->scrnOffset) ;
|
||||
Volari_SetupDSTRect(pXGI->scrnOffset, Dst_Hight) ;
|
||||
Volari_SetupROP(xgiG2_ALUConv[rop]) ;
|
||||
}
|
||||
|
||||
static void
|
||||
Volari_SubsequentScreenToScreenCopy(
|
||||
ScrnInfoPtr pScrn,
|
||||
int src_x, int src_y,
|
||||
int dst_x, int dst_y,
|
||||
int width, int height)
|
||||
{
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
long srcbase, dstbase;
|
||||
int mymin, mymax;
|
||||
|
||||
PDEBUG1(ErrorF("Subsequent ScreenCopy(%d,%d, %d,%d, %d,%d)\n",
|
||||
src_x, src_y,
|
||||
dst_x, dst_y,
|
||||
width, height));
|
||||
|
||||
srcbase=dstbase=0;
|
||||
mymin = min(src_y, dst_y);
|
||||
mymax = max(src_y, dst_y);
|
||||
|
||||
#if 1 /* Jong@08112009; bug fixing */
|
||||
if((mymax - mymin) < height) {
|
||||
PDEBUG1(ErrorF("(mymax - mymin) < height...\n"));
|
||||
if((src_y >= 2048) || (dst_y >= 2048)) {
|
||||
PDEBUG1(ErrorF("(src_y >= 2048) || (dst_y >= 2048)...\n"));
|
||||
srcbase = pXGI->scrnOffset * mymin;
|
||||
dstbase = pXGI->scrnOffset * mymin;
|
||||
src_y -= mymin;
|
||||
dst_y -= mymin;
|
||||
}
|
||||
} else {
|
||||
PDEBUG1(ErrorF("(mymax - mymin) >= height...\n"));
|
||||
if(src_y >= 2048) {
|
||||
PDEBUG1(ErrorF("src_y >= 2048...\n"));
|
||||
srcbase = pXGI->scrnOffset * src_y;
|
||||
src_y = 0;
|
||||
}
|
||||
if((dst_y >= pScrn->virtualY) || (dst_y >= 2048)) {
|
||||
PDEBUG1(ErrorF("(dst_y >= pScrn->virtualY) || (dst_y >= 2048...\n"));
|
||||
dstbase = pXGI->scrnOffset * dst_y;
|
||||
dst_y = 0;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (src_y >= 2048)
|
||||
{
|
||||
srcbase=pXGI->scrnOffset*src_y;
|
||||
src_y=0;
|
||||
}
|
||||
if (dst_y >= pScrn->virtualY)
|
||||
{
|
||||
dstbase=pXGI->scrnOffset*dst_y;
|
||||
dst_y=0;
|
||||
}
|
||||
#endif
|
||||
|
||||
PDEBUG1(ErrorF("SrcBase = %08lX DstBase = %08lX\n",srcbase,dstbase)) ;
|
||||
PDEBUG1(ErrorF("SrcX = %08lX SrcY = %08lX\n",src_x,src_y)) ;
|
||||
PDEBUG1(ErrorF("DstX = %08lX DstY = %08lX\n",dst_x,dst_y)) ;
|
||||
|
||||
GuardBand(0x30 * Alignment);
|
||||
Volari_SetupSRCBase(srcbase);
|
||||
Volari_SetupDSTBase(dstbase);
|
||||
Volari_SetupSRCXY(src_x,src_y) ;
|
||||
Volari_SetupDSTXY(dst_x,dst_y) ;
|
||||
Volari_SetupRect(width, height) ;
|
||||
Volari_DoCMD ;
|
||||
|
||||
/* Jong@08112009 */
|
||||
PDEBUG(XGIDumpCMDQueue(pScrn));
|
||||
}
|
||||
|
||||
static void
|
||||
Volari_SetupForSolidFill(ScrnInfoPtr pScrn,
|
||||
int color, int rop, unsigned int planemask)
|
||||
{
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
|
||||
PDEBUG1(ErrorF("Volari_SetupForSolidFill()\n")) ;
|
||||
PDEBUG1(ErrorF("Color = #%08lX ",color)) ;
|
||||
PDEBUG1(ErrorF("DstPitch = #%04lX ",(pXGI->scrnOffset))) ;
|
||||
PDEBUG1(ErrorF("\n")) ;
|
||||
|
||||
Volari_ResetCmd ;
|
||||
GuardBand(0x28 * Alignment);
|
||||
Volari_SetupPATFG(color) ;
|
||||
Volari_SetupDSTRect(pXGI->scrnOffset, Dst_Hight) ;
|
||||
Volari_SetupDSTColorDepth(XGIPTR(pScrn)->DstColor) ;
|
||||
Volari_SetupROP(xgiG2_PatALUConv[rop]) ;
|
||||
Volari_SetupCMDFlag(PATFG | BITBLT) ;
|
||||
}
|
||||
|
||||
static void
|
||||
Volari_SubsequentSolidFillRect(
|
||||
ScrnInfoPtr pScrn,
|
||||
int x, int y,
|
||||
int width, int height)
|
||||
{
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
unsigned long dstbase = 0 ;
|
||||
|
||||
PDEBUG1(ErrorF("Subsequent SolidFillRect(%d, %d, %d, %d)\n",
|
||||
x, y, width, height));
|
||||
|
||||
dstbase=0;
|
||||
if (y>=2048)
|
||||
{
|
||||
dstbase=pXGI->scrnOffset*y;
|
||||
y=0;
|
||||
}
|
||||
|
||||
GuardBand(0x20 * Alignment);
|
||||
Volari_SetupDSTBase(dstbase) ;
|
||||
Volari_SetupDSTXY(x,y) ;
|
||||
Volari_SetupRect(width,height) ;
|
||||
Volari_DoCMD ;
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
Volari_SetupForMonoPatternFill(ScrnInfoPtr pScrn,
|
||||
int pat0, int pat1,
|
||||
int fg, int bg,
|
||||
int rop, unsigned int planemask)
|
||||
{
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
|
||||
PDEBUG1(ErrorF("Setup MonoPatFill(0x%x,0x%x, 0x%x,0x%x, 0x%x, 0x%x)\n",
|
||||
pat0, pat1, fg, bg, rop, planemask));
|
||||
|
||||
Volari_ResetCmd ;
|
||||
GuardBand(0x40 * Alignment);
|
||||
Volari_SetupDSTRect(pXGI->scrnOffset, Dst_Hight) ;
|
||||
Volari_SetupMONOPAT0(pat0) ;
|
||||
Volari_SetupMONOPAT1(pat1) ;
|
||||
Volari_SetupPATFG(fg) ;
|
||||
Volari_SetupPATBG(bg) ;
|
||||
Volari_SetupROP(xgiG2_PatALUConv[rop]) ;
|
||||
Volari_SetupDSTColorDepth(pXGI->DstColor) ;
|
||||
Volari_SetupCMDFlag(PATMONO | BITBLT) ;
|
||||
}
|
||||
|
||||
static void
|
||||
Volari_SubsequentMonoPatternFill(ScrnInfoPtr pScrn,
|
||||
int patx, int paty,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
long dstbase;
|
||||
|
||||
PDEBUG1(ErrorF("Subsequent MonoPatFill(0x%x,0x%x, %d,%d, %d,%d)\n",
|
||||
patx, paty, x, y, w, h));
|
||||
dstbase=0;
|
||||
if (y>=2048)
|
||||
{
|
||||
dstbase=pXGI->scrnOffset*y;
|
||||
y=0;
|
||||
}
|
||||
|
||||
GuardBand(0x20 * Alignment);
|
||||
Volari_SetupDSTBase(dstbase) ;
|
||||
Volari_SetupDSTXY(x,y) ;
|
||||
Volari_SetupRect(w,h) ;
|
||||
Volari_DoCMD ;
|
||||
/*Volari_Idle(pXGI)*/;
|
||||
}
|
||||
#endif /* XAA */
|
||||
/************************************************************************/
|
||||
|
||||
/* Jong 01/13/2009; support EXA */
|
||||
#ifdef XGI_USE_EXA /* ---------------------------- EXA -------------------------- */
|
||||
void XGIEXASync(ScreenPtr pScreen, int marker)
|
||||
|
||||
@@ -42,9 +42,6 @@
|
||||
#include "xgi.h"
|
||||
#include "xgi_regs.h"
|
||||
#include "dgaproc.h"
|
||||
#ifdef HAVE_XAA_H
|
||||
#include "xaalocal.h"
|
||||
#endif
|
||||
|
||||
#ifndef NEW_DGAOPENFRAMEBUFFER
|
||||
static Bool XGI_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
|
||||
@@ -305,28 +302,12 @@ XGI_FillRect (
|
||||
int x, int y, int w, int h,
|
||||
unsigned long color
|
||||
){
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(pXGI->AccelInfoPtr) {
|
||||
(*pXGI->AccelInfoPtr->SetupForSolidFill)(pScrn, color, GXcopy, ~0);
|
||||
(*pXGI->AccelInfoPtr->SubsequentSolidFillRect)(pScrn, x, y, w, h);
|
||||
SET_SYNC_FLAG(pXGI->AccelInfoPtr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
XGI_Sync(
|
||||
ScrnInfoPtr pScrn
|
||||
){
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(pXGI->AccelInfoPtr) {
|
||||
(*pXGI->AccelInfoPtr->Sync)(pScrn);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -337,19 +318,6 @@ XGI_BlitRect(
|
||||
int dstx, int dsty
|
||||
){
|
||||
XGIPtr pXGI = XGIPTR(pScrn);
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(pXGI->AccelInfoPtr) {
|
||||
int xdir = ((srcx < dstx) && (srcy == dsty)) ? -1 : 1;
|
||||
int ydir = (srcy < dsty) ? -1 : 1;
|
||||
|
||||
(*pXGI->AccelInfoPtr->SetupForScreenToScreenCopy)(
|
||||
pScrn, xdir, ydir, GXcopy, (uint32_t)~0, -1);
|
||||
(*pXGI->AccelInfoPtr->SubsequentScreenToScreenCopy)(
|
||||
pScrn, srcx, srcy, dstx, dsty, w, h);
|
||||
SET_SYNC_FLAG(pXGI->AccelInfoPtr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
||||
@@ -3972,23 +3972,11 @@ XGIPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Load XAA if needed */
|
||||
/* Load EXA if needed */
|
||||
if (!pXGI->NoAccel)
|
||||
{
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Accel enabled\n");
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(!(pXGI->useEXA))
|
||||
{
|
||||
if (!xf86LoadSubModule(pScrn, "xaa")) {
|
||||
XGIErrorLog(pScrn, "Could not load xaa module\n");
|
||||
|
||||
pXGI->NoAccel = TRUE;
|
||||
pXGI->ShadowFB = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XGI_USE_EXA
|
||||
if(pXGI->useEXA)
|
||||
{
|
||||
@@ -4455,13 +4443,6 @@ XGIRestore(ScrnInfoPtr pScrn)
|
||||
|
||||
PDEBUG(ErrorF("XGIRestore():\n"));
|
||||
|
||||
/* Wait for the accelerators */
|
||||
#ifdef XGI_USE_XAA
|
||||
if (!(pXGI->useEXA) && pXGI->AccelInfoPtr) {
|
||||
(*pXGI->AccelInfoPtr->Sync) (pScrn);
|
||||
}
|
||||
#endif
|
||||
|
||||
vgaHWProtect(pScrn, TRUE);
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
@@ -4915,13 +4896,6 @@ XGIScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
if (!xf86HandleColormaps(pScreen, 256, 8, XGILoadPalette, NULL,
|
||||
CMAP_RELOAD_ON_MODE_SWITCH))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
*/
|
||||
xf86DPMSInit(pScreen, (DPMSSetProcPtr) XGIDisplayPowerManagementSet, 0);
|
||||
|
||||
/* Init memPhysBase and fbOffset in pScrn */
|
||||
@@ -5055,15 +5029,6 @@ XGISwitchMode(SWITCH_MODE_ARGS_DECL)
|
||||
//pScrn->frameX1 = mode->HDisplay;
|
||||
//pScrn->frameY1 = mode->VDisplay;
|
||||
|
||||
if (!pXGI->NoAccel) {
|
||||
#ifdef XGI_USE_XAA
|
||||
if (!(pXGI->useEXA) && pXGI->AccelInfoPtr) {
|
||||
(*pXGI->AccelInfoPtr->Sync) (pScrn);
|
||||
PDEBUG(ErrorF("XGISwitchMode Accel Enabled. \n"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
PDEBUG(ErrorF
|
||||
("XGISwitchMode (%d, %d) \n", mode->HDisplay, mode->VDisplay));
|
||||
|
||||
@@ -5603,18 +5568,6 @@ XGICloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
pXGI->pInt = NULL;
|
||||
}
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if (pXGI->AccelLinearScratch) {
|
||||
xf86FreeOffscreenLinear(pXGI->AccelLinearScratch);
|
||||
pXGI->AccelLinearScratch = NULL;
|
||||
}
|
||||
|
||||
if (!(pXGI->useEXA) && pXGI->AccelInfoPtr) {
|
||||
XAADestroyInfoRec(pXGI->AccelInfoPtr);
|
||||
pXGI->AccelInfoPtr = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pXGI->CursorInfoPtr) {
|
||||
xf86DestroyCursorInfoRec(pXGI->CursorInfoPtr);
|
||||
pXGI->CursorInfoPtr = NULL;
|
||||
|
||||
@@ -394,22 +394,19 @@ xgiOptions(ScrnInfoPtr pScrn)
|
||||
if ((pXGI->Chipset== PCI_CHIP_XGIXG20)||(pXGI->Chipset== PCI_CHIP_XGIXG21)||(pXGI->Chipset== PCI_CHIP_XGIXG27))
|
||||
pXGI->NoXvideo = TRUE;
|
||||
|
||||
pXGI->useEXA = FALSE; /* default : XAA */
|
||||
pXGI->useEXA = FALSE;
|
||||
if(!pXGI->NoAccel)
|
||||
{
|
||||
from = X_DEFAULT;
|
||||
if((strptr = (char *)xf86GetOptValString(pXGI->Options, OPTION_ACCELMETHOD))) {
|
||||
if(!xf86NameCmp(strptr,"XAA")) {
|
||||
from = X_CONFIG;
|
||||
pXGI->useEXA = FALSE;
|
||||
} else if(!xf86NameCmp(strptr,"EXA")) {
|
||||
if(!xf86NameCmp(strptr,"EXA")) {
|
||||
from = X_CONFIG;
|
||||
pXGI->useEXA = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
xf86DrvMsg(pScrn->scrnIndex, from, "Using %s acceleration architecture\n",
|
||||
pXGI->useEXA ? "EXA" : "XAA");
|
||||
pXGI->useEXA ? "EXA" : "none");
|
||||
}
|
||||
|
||||
/* SWCursor
|
||||
|
||||
@@ -73,9 +73,6 @@
|
||||
#include "xgi.h"
|
||||
#include "xf86xv.h"
|
||||
#include <X11/extensions/Xv.h>
|
||||
#ifdef HAVE_XAA_H
|
||||
#include "xaalocal.h"
|
||||
#endif
|
||||
#include "dixstruct.h"
|
||||
#include "fourcc.h"
|
||||
|
||||
@@ -470,11 +467,6 @@ XGISetupImageVideo(ScreenPtr pScreen)
|
||||
|
||||
pPriv->currentBuf = 0;
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
pPriv->linear = NULL;
|
||||
pPriv->fbAreaPtr = NULL;
|
||||
#endif
|
||||
|
||||
pPriv->fbSize = 0;
|
||||
pPriv->videoStatus = 0;
|
||||
pPriv->linebufMergeLimit = 1280;
|
||||
@@ -1046,15 +1038,7 @@ XGIStopVideo(ScrnInfoPtr pScrn, pointer data, Bool exit)
|
||||
EnableCaptureAutoFlip(pXGI, FALSE);
|
||||
}
|
||||
# endif //VC
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(pPriv->fbAreaPtr) {
|
||||
xf86FreeOffscreenArea(pPriv->fbAreaPtr);
|
||||
pPriv->fbAreaPtr = NULL;
|
||||
pPriv->fbSize = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* clear all flag */
|
||||
pPriv->videoStatus = 0;
|
||||
|
||||
@@ -1155,31 +1139,9 @@ XGIPutImage(
|
||||
|
||||
pPriv->fbSize = totalSize;
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
if(pPriv->fbAreaPtr) {
|
||||
xf86FreeOffscreenArea(pPriv->fbAreaPtr);
|
||||
}
|
||||
#endif
|
||||
|
||||
depth = (pScrn->bitsPerPixel + 7 ) / 8;
|
||||
pitch = pScrn->displayWidth * depth;
|
||||
lines = ((totalSize * 2) / pitch) + 1;
|
||||
|
||||
#ifdef XGI_USE_XAA
|
||||
pPriv->fbAreaPtr = xf86AllocateOffscreenArea(pScrn->pScreen,
|
||||
pScrn->displayWidth,
|
||||
lines, 0, NULL, NULL, NULL);
|
||||
|
||||
if(!pPriv->fbAreaPtr) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
|
||||
"Allocate video memory fails\n");
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
pBox = &(pPriv->fbAreaPtr->box);
|
||||
pPriv->bufAddr[0] = (pBox->x1 * depth) + (pBox->y1 * pitch);
|
||||
pPriv->bufAddr[1] = pPriv->bufAddr[0] + totalSize;
|
||||
#endif
|
||||
} while(0);
|
||||
|
||||
/* copy data */
|
||||
|
||||
@@ -59,11 +59,6 @@
|
||||
#define BOB_ODD 2
|
||||
|
||||
typedef struct {
|
||||
#ifdef XGI_USE_XAA
|
||||
FBLinearPtr linear;
|
||||
FBAreaPtr fbAreaPtr;
|
||||
#endif
|
||||
|
||||
int fbSize;
|
||||
uint32_t bufAddr[2];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user