diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-05-27 18:02:54 +0200 |
---|---|---|
committer | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-06-11 14:13:32 +0200 |
commit | 1bd62d4e151931e41e879ea4cb28b3a6a0600978 (patch) | |
tree | 25336c86178b2174b99ea241c7ad994b8287e5d1 | |
parent | 83b14d6e438d7250e1bc018ee0929f5779bf551c (diff) |
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>
-rw-r--r-- | configure.ac | 27 | ||||
-rw-r--r-- | src/geode.h | 29 | ||||
-rw-r--r-- | src/gx_accel.c | 125 | ||||
-rw-r--r-- | src/gx_driver.c | 60 | ||||
-rw-r--r-- | src/gx_rotate.c | 19 | ||||
-rw-r--r-- | src/gx_video.c | 4 |
6 files changed, 2 insertions, 262 deletions
diff --git a/configure.ac b/configure.ac index 410fbce..75f6a23 100644 --- a/configure.ac +++ b/configure.ac @@ -129,33 +129,6 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") -# Define a configure option to enable/disable XAA support; -# handles unavailability of XAA since xserver-1.13 -AC_ARG_ENABLE(xaa, - AS_HELP_STRING([--enable-xaa], - [Enable legacy X Acceleration Architecture (XAA) [default=auto]])) - -AS_IF([test "x$enable_xaa" != "xno"], - [ - save_CFLAGS=$CFLAGS - save_CPPFLAGS=$CPPFLAGS - CFLAGS=$XORG_CFLAGS - CPPFLAGS="$XORG_CFLAGS" - AC_CHECK_HEADERS([xaa.h], have_XAA=yes, have_XAA=no) - CFLAGS=$save_CFLAGS - CPPFLAGS=$save_CPPFLAGS -]) - -AC_MSG_CHECKING([whether to include XAA support]) - -AS_IF([test "x$have_XAA" = "xyes"], - [AC_MSG_RESULT([yes])], - [AS_IF([test "x$enable_xaa" = "xyes"], - [AC_MSG_ERROR([XAA requested but not found (perhaps building against xserver-1.13 or newer?)])], - [AC_MSG_RESULT([no]) - ]) -]) - # Checks for libpciaccess support. SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" diff --git a/src/geode.h b/src/geode.h index 3dd3e15..5ff1cca 100644 --- a/src/geode.h +++ b/src/geode.h @@ -32,9 +32,6 @@ #endif #include "geode_pcirename.h" -#ifdef HAVE_XAA_H -#include "xaa.h" -#endif #include "exa.h" #include "xf86Cursor.h" @@ -57,12 +54,6 @@ #undef XF86EXA #endif -#ifdef HAVE_XAA_H -#define XF86XAA 1 -#else -#undef XF86XAA -#endif - #define CFB 0 #define INT10_SUPPORT 1 @@ -83,21 +74,6 @@ #define GFX_CPU_GEODELX 4 -#if defined(HAVE_GX) && XF86XAA -#define GX_FILL_RECT_SUPPORT 1 -#define GX_BRES_LINE_SUPPORT 1 -#define GX_DASH_LINE_SUPPORT 0 /* does not do dashed lines */ -#define GX_MONO_8X8_PAT_SUPPORT 1 -#define GX_CLREXP_8X8_PAT_SUPPORT 1 -#define GX_SCR2SCREXP_SUPPORT 1 -#define GX_SCR2SCRCPY_SUPPORT 1 -#define GX_CPU2SCREXP_SUPPORT 1 -#define GX_SCANLINE_SUPPORT 1 -#define GX_USE_OFFSCRN_MEM 0 -#define GX_ONE_LINE_AT_A_TIME 1 -#define GX_WRITE_PIXMAP_SUPPORT 1 -#endif - #define GFX(func) gfx_##func #define GFX2(func) gfx2_##func @@ -297,8 +273,6 @@ typedef struct _geodeRec { xf86CursorInfoPtr CursorInfo; - /* XAA structures */ - unsigned int cpySrcOffset; int cpySrcPitch, cpySrcBpp; int cpyDx, cpyDy; @@ -311,9 +285,6 @@ typedef struct _geodeRec { int NoOfImgBuffers; unsigned char **AccelColorExpandBuffers; int NoOfColorExpandLines; -#if XF86XAA - XAAInfoRecPtr AccelInfoRec; -#endif /* Save state */ unsigned long FBCompressionOffset; diff --git a/src/gx_accel.c b/src/gx_accel.c index 1bc9a4c..38bd233 100644 --- a/src/gx_accel.c +++ b/src/gx_accel.c @@ -39,9 +39,6 @@ #include "vgaHW.h" #include "xf86.h" -#ifdef HAVE_XAA_H -#include "xaalocal.h" -#endif #include "xf86fbman.h" #include "miline.h" #include "xaarop.h" @@ -130,10 +127,6 @@ static GDashLine gdln; static unsigned int gu2_xshift, gu2_yshift; static unsigned int gu2_pitch; -#if XF86XAA -static XAAInfoRecPtr localRecPtr; -#endif - /* pat 0xF0 */ /* src 0xCC */ /* dst 0xAA */ @@ -1971,123 +1964,5 @@ GXAccelInit(ScreenPtr pScrn) } #endif -#if XF86XAA - - /* Getting the pointer for acceleration Inforecord */ - pGeode->AccelInfoRec = localRecPtr = XAACreateInfoRec(); - if (!pGeode->AccelInfoRec) - return FALSE; - - /* SET ACCELERATION FLAGS */ - localRecPtr->Flags = PIXMAP_CACHE | OFFSCREEN_PIXMAPS | LINEAR_FRAMEBUFFER; - - /* HOOK SYNCRONIZARION ROUTINE */ - localRecPtr->Sync = GXAccelSync; - -#if GX_FILL_RECT_SUPPORT - /* HOOK FILLED RECTANGLES */ - HOOK(SetupForSolidFill); - HOOK(SubsequentSolidFillRect); - localRecPtr->SolidFillFlags = 0; -#endif - -#if GX_MONO_8X8_PAT_SUPPORT - /* Color expansion */ - HOOK(SetupForMono8x8PatternFill); - HOOK(SubsequentMono8x8PatternFillRect); -/* BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY | */ - localRecPtr->Mono8x8PatternFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST | - HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_SCREEN_ORIGIN; -#endif - -#if GX_CLREXP_8X8_PAT_SUPPORT - /* Color expansion */ - HOOK(SetupForColor8x8PatternFill); - HOOK(SubsequentColor8x8PatternFillRect); -/* BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY | */ - localRecPtr->Color8x8PatternFillFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | - HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_PROGRAMMED_ORIGIN; -#endif - -#if GX_SCR2SCRCPY_SUPPORT - /* HOOK SCREEN TO SCREEN COPIES - * Set flag to only allow copy if transparency is enabled. - */ - HOOK(SetupForScreenToScreenCopy); - HOOK(SubsequentScreenToScreenCopy); - localRecPtr->ScreenToScreenCopyFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; -#endif - -#if GX_BRES_LINE_SUPPORT - /* HOOK BRESENHAM SOLID LINES */ - localRecPtr->SolidLineFlags = NO_PLANEMASK; - HOOK(SetupForSolidLine); - HOOK(SubsequentSolidBresenhamLine); - HOOK(SubsequentSolidHorVertLine); - HOOK(SubsequentSolidTwoPointLine); - localRecPtr->SolidBresenhamLineErrorTermBits = 15; -#endif - -#if GX_DASH_LINE_SUPPORT - /* HOOK BRESENHAM DASHED LINES */ - HOOK(SetupForDashedLine); - HOOK(SubsequentDashedBresenhamLine); - HOOK(SubsequentDashedTwoPointLine); - localRecPtr->DashedBresenhamLineErrorTermBits = 15; - localRecPtr->DashPatternMaxLength = 64; - localRecPtr->DashedLineFlags = NO_PLANEMASK | /* TRANSPARENCY_ONLY | */ - LINE_PATTERN_POWER_OF_2_ONLY | LINE_PATTERN_MSBFIRST_MSBJUSTIFIED; -#endif - -#if GX_SCR2SCREXP_SUPPORT - /* Color expansion */ - HOOK(SetupForScreenToScreenColorExpandFill); - HOOK(SubsequentScreenToScreenColorExpandFill); - localRecPtr->ScreenToScreenColorExpandFillFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY; -#endif - - if (pGeode->AccelImageWriteBuffers) { -#if GX_SCANLINE_SUPPORT - localRecPtr->ScanlineImageWriteBuffers = pGeode->AccelImageWriteBuffers; - localRecPtr->NumScanlineImageWriteBuffers = pGeode->NoOfImgBuffers; - HOOK(SetupForScanlineImageWrite); - HOOK(SubsequentScanlineImageWriteRect); - HOOK(SubsequentImageWriteScanline); - localRecPtr->ScanlineImageWriteFlags = NO_PLANEMASK | NO_GXCOPY | - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; -#endif - - } - else { - localRecPtr->PixmapCacheFlags = DO_NOT_BLIT_STIPPLES; - } - - if (pGeode->AccelColorExpandBuffers) { -#if GX_CPU2SCREXP_SUPPORT - /* Color expansion */ - localRecPtr->ScanlineColorExpandBuffers = - pGeode->AccelColorExpandBuffers; - localRecPtr->NumScanlineColorExpandBuffers = - pGeode->NoOfColorExpandLines; - HOOK(SetupForScanlineCPUToScreenColorExpandFill); - HOOK(SubsequentScanlineCPUToScreenColorExpandFill); - HOOK(SubsequentColorExpandScanline); - localRecPtr->ScanlineCPUToScreenColorExpandFillFlags = NO_PLANEMASK | - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; -#endif - } -#if GX_WRITE_PIXMAP_SUPPORT - pGeode->WritePixmap = localRecPtr->WritePixmap; - HOOK(WritePixmap); -#endif - - return (XAAInit(pScrn, localRecPtr)); -#else /* XF86XAA */ return FALSE; -#endif } - -/* END OF FILE */ diff --git a/src/gx_driver.c b/src/gx_driver.c index e858ad3..ca84427 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -255,50 +255,6 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) pExa->offScreenBase = fboffset; pExa->memorySize = fboffset + fbavail; } - - if (!pGeode->useEXA) { - -#if XF86XAA - if (!xf86FBManagerRunning(pScrn)) { - - unsigned int offset = fboffset; - unsigned int avail = fbavail; - RegionRec OffscreenRegion; - BoxRec AvailBox; - - /* Assume the shadow FB exists even if it doesn't */ - - if (pGeode->shadowSize == 0) { - size = (pScrn->width * bytpp) * pScrni->virtualX; - offset += size; - avail -= size; - } - - AvailBox.x1 = 0; - AvailBox.y1 = - (offset + pGeode->displayPitch - 1) / pGeode->displayPitch; - - AvailBox.x2 = pGeode->displayWidth; - AvailBox.y2 = (offset + avail) / pGeode->displayPitch; - - if (AvailBox.y1 < AvailBox.y2) { - REGION_INIT(pScrn, &OffscreenRegion, &AvailBox, 2); - - if (!xf86InitFBManagerRegion(pScrn, &OffscreenRegion)) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Memory manager initialization failed.\n"); - - REGION_UNINIT(pScrn, &OffscreenRegion); - } - else - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "Cache disabled - no offscreen memory available.\n"); - } - else - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "XAA offscreen memory has already been allocated.\n"); -#endif - } } return ret; } @@ -612,14 +568,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) panelgeo = xf86GetOptValString(GeodeOptions, GX_OPTION_PANEL_GEOMETRY); if ((s = xf86GetOptValString(GeodeOptions, GX_OPTION_ACCEL_METHOD))) { -#if defined(XF86XAA) && defined(XF86EXA) - if (!xf86NameCmp(s, "XAA")) - pGeode->useEXA = FALSE; - else if (xf86NameCmp(s, "EXA")) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Unknown acceleration method %s. Defaulting to XAA.\n", - s); -#elif defined(XF86EXA) +#if defined(XF86EXA) pGeode->useEXA = TRUE; #else pGeode->useEXA = FALSE; @@ -628,7 +577,7 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) xf86DrvMsg(pScrni->scrnIndex, X_INFO, "Using %s acceleration architecture\n", - pGeode->useEXA ? "EXA" : "XAA"); + pGeode->useEXA ? "EXA" : "none"); /* Set up the panel */ @@ -1011,11 +960,6 @@ GXCloseScreen(CLOSE_SCREEN_ARGS_DECL) if (pScrni->vtSema) GXLeaveGraphics(pScrni); -#ifdef XF86XAA - if (pGeode->AccelInfoRec) - XAADestroyInfoRec(pGeode->AccelInfoRec); -#endif - if (pGeode->AccelImageWriteBuffers) { free(pGeode->AccelImageWriteBuffers[0]); free(pGeode->AccelImageWriteBuffers); diff --git a/src/gx_rotate.c b/src/gx_rotate.c index 6076a40..c849792 100644 --- a/src/gx_rotate.c +++ b/src/gx_rotate.c @@ -157,25 +157,6 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) (pointer) (pGeode->FBBase + pScrni->fbOffset)); - /* Don't use XAA pixmap cache or offscreen pixmaps when rotated */ -#if XF86XAA - if (pGeode->AccelInfoRec) { - if (pGeode->rotation == RR_Rotate_0) { - pGeode->AccelInfoRec->Flags = - LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS | PIXMAP_CACHE; - pGeode->AccelInfoRec->UsingPixmapCache = TRUE; - pGeode->AccelInfoRec->maxOffPixWidth = 0; - pGeode->AccelInfoRec->maxOffPixHeight = 0; - } - else { - pGeode->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER; - pGeode->AccelInfoRec->UsingPixmapCache = FALSE; - pGeode->AccelInfoRec->maxOffPixWidth = 1; - pGeode->AccelInfoRec->maxOffPixHeight = 1; - } - } -#endif - return TRUE; error: diff --git a/src/gx_video.c b/src/gx_video.c index 847ca83..4eae44f 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -54,10 +54,6 @@ #include "geode.h" #include "xf86xv.h" #include <X11/extensions/Xv.h> -#ifdef HAVE_XAA_H -#include "xaa.h" -#include "xaalocal.h" -#endif #include "dixstruct.h" #include "fourcc.h" #include "geode_fourcc.h" |