Raise minimum supported Xserver version to 1.18 (ABI_VIDEODRV_VERSION 20.0)

Already effectively required by use of XNFcallocarray() introduced in
xorg/xserver@b96dc999 - xserver-1.18.0, released in Nov. 2015.

Allows dropping remnants of code for XAA and pre-pciaccess X servers

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-ast/-/merge_requests/9>
This commit is contained in:
Alan Coopersmith
2024-05-12 15:55:00 -07:00
parent 4b72faa322
commit 9f932c7d5e
4 changed files with 5 additions and 1751 deletions

View File

@@ -58,7 +58,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Obtain compiler/linker options for the driver dependencies # Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto >= 7.0.22 fontsproto $REQUIRED_MODULES]) PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto >= 7.0.22 fontsproto $REQUIRED_MODULES])
# Checks for libraries. # Checks for libraries.
SAVE_CPPFLAGS="$CPPFLAGS" SAVE_CPPFLAGS="$CPPFLAGS"
@@ -74,25 +74,6 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
fi fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) 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_SUBST([moduledir])
DRIVER_NAME=nv DRIVER_NAME=nv

View File

@@ -34,10 +34,6 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_XAA_H
#include "xaa.h"
#endif
#include "ast_pcirename.h" #include "ast_pcirename.h"
#include "compat-api.h" #include "compat-api.h"
@@ -231,9 +227,6 @@ typedef struct _ASTRec {
OptionInfoPtr Options; OptionInfoPtr Options;
DisplayModePtr ModePtr; DisplayModePtr ModePtr;
FBLinearPtr pCMDQPtr; FBLinearPtr pCMDQPtr;
#ifdef HAVE_XAA_H
XAAInfoRecPtr AccelInfoPtr;
#endif
xf86CursorInfoPtr HWCInfoPtr; xf86CursorInfoPtr HWCInfoPtr;
FBLinearPtr pHWCPtr; FBLinearPtr pHWCPtr;
@@ -266,11 +259,7 @@ typedef struct _ASTRec {
unsigned long FbMapSize; unsigned long FbMapSize;
unsigned long MMIOMapSize; unsigned long MMIOMapSize;
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
IOADDRESS RelocateIO;
#else
int RelocateIO; int RelocateIO;
#endif
VIDEOMODE VideoModeInfo; VIDEOMODE VideoModeInfo;
ASTRegRec SavedReg; ASTRegRec SavedReg;
@@ -351,9 +340,6 @@ void ASTDisableHWC(ScrnInfoPtr pScrn);
Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode); Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
/* ast_accel.c */ /* ast_accel.c */
#ifdef HAVE_XAA_H
Bool ASTAccelInit(ScreenPtr pScreen);
#endif
void ASTDisplayVideo(ScrnInfoPtr pScrn, ASTPortPrivPtr pPriv, RegionPtr clipBoxes, int id); void ASTDisplayVideo(ScrnInfoPtr pScrn, ASTPortPrivPtr pPriv, RegionPtr clipBoxes, int id);
/* ast_tool.c */ /* ast_tool.c */

File diff suppressed because it is too large Load Diff

View File

@@ -25,10 +25,6 @@
#endif #endif
#include "xf86.h" #include "xf86.h"
#include "xf86_OSproc.h" #include "xf86_OSproc.h"
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
#include "xf86Resources.h"
#include "xf86RAC.h"
#endif
#include "xf86cmap.h" #include "xf86cmap.h"
#include "compiler.h" #include "compiler.h"
#include "vgaHW.h" #include "vgaHW.h"
@@ -45,12 +41,6 @@
/* framebuffer offscreen manager */ /* framebuffer offscreen manager */
#include "xf86fbman.h" #include "xf86fbman.h"
/* include xaa includes */
#ifdef HAVE_XAA_H
#include "xaa.h"
#include "xaarop.h"
#endif
/* H/W cursor support */ /* H/W cursor support */
#include "xf86Cursor.h" #include "xf86Cursor.h"
@@ -90,11 +80,7 @@ static Bool ASTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
static void ASTInitVideo(ScreenPtr pScreen); static void ASTInitVideo(ScreenPtr pScreen);
static int ASTPutImage( ScrnInfoPtr, static int ASTPutImage( ScrnInfoPtr,
short, short, short, short, short, short, short, short, short, short, short, short, short, short, short, short,
int, unsigned char*, short, short, Bool, RegionPtr, pointer int, unsigned char*, short, short, Bool, RegionPtr, pointer, DrawablePtr);
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1
, DrawablePtr pDraw
#endif
);
#endif #endif
/* /*
@@ -281,11 +267,7 @@ ASTProbe(DriverPtr drv, int flags)
pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func); pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func);
xf86DrvMsg(0, X_ERROR, xf86DrvMsg(0, X_ERROR,
"ast: This driver cannot operate until it has been unloaded.\n"); "ast: This driver cannot operate until it has been unloaded.\n");
xf86UnclaimPciSlot(pPci xf86UnclaimPciSlot(pPci, devSections[0]);
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 13
, devSections[0]
#endif
);
free(devSections); free(devSections);
return FALSE; return FALSE;
} }
@@ -541,19 +523,7 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
(pScrn->chipset != NULL) ? pScrn->chipset : "Unknown ast"); (pScrn->chipset != NULL) ? pScrn->chipset : "Unknown ast");
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 pAST->RelocateIO = (PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO));
/* "Patch" the PIOOffset inside vgaHW in order to force
* the vgaHW module to use our relocated i/o ports.
*/
VGAHWPTR(pScrn)->PIOOffset =
pScrn->domainIOBase + PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) - 0x380;
pAST->RelocateIO = pScrn->domainIOBase +
PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO);
#else
pAST->RelocateIO = (PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO));
#endif
if (pAST->pEnt->device->MemBase != 0) { if (pAST->pEnt->device->MemBase != 0) {
@@ -745,35 +715,6 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
pAST->CMDQInfo.pjWritePort = pAST->MMIOVirtualAddr+ 0x8048; pAST->CMDQInfo.pjWritePort = pAST->MMIOVirtualAddr+ 0x8048;
pAST->CMDQInfo.pjReadPort = pAST->MMIOVirtualAddr+ 0x804C; pAST->CMDQInfo.pjReadPort = pAST->MMIOVirtualAddr+ 0x804C;
pAST->CMDQInfo.pjEngStatePort = pAST->MMIOVirtualAddr+ 0x804C; pAST->CMDQInfo.pjEngStatePort = pAST->MMIOVirtualAddr+ 0x804C;
#ifdef HAVE_XAA_H
pAST->AccelInfoPtr = NULL;
#ifdef Accel_2D
if (!xf86ReturnOptValBool(pAST->Options, OPTION_NOACCEL, FALSE))
{
if (xf86LoadSubModule(pScrn, "xaa")) {
pAST->noAccel = FALSE;
pAST->MMIO2D = TRUE;
#ifndef MMIO_2D
if (!xf86ReturnOptValBool(pAST->Options, OPTION_MMIO2D, FALSE)) {
pAST->CMDQInfo.ulCMDQSize = DEFAULT_CMDQ_SIZE;
pAST->MMIO2D = FALSE;
}
#endif
pAST->ENGCaps = ENG_CAP_ALL;
if (!xf86GetOptValInteger(pAST->Options, OPTION_ENG_CAPS, &pAST->ENGCaps)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "No ENG Capability options found\n");
}
pAST->DBGSelect = 0;
if (!xf86GetOptValInteger(pAST->Options, OPTION_DBG_SELECT, &pAST->DBGSelect)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "No DBG Seleclt options found\n");
}
}
}
#endif
#endif /* HAVE_XAA_H */
/* HW Cursor Check */ /* HW Cursor Check */
pAST->noHWC = TRUE; pAST->noHWC = TRUE;
@@ -964,19 +905,6 @@ ASTScreenInit(SCREEN_INIT_ARGS_DECL)
#endif #endif
xf86SetBlackWhitePixels(pScreen); xf86SetBlackWhitePixels(pScreen);
#ifdef HAVE_XAA_H
#ifdef Accel_2D
if (!pAST->noAccel)
{
if (!ASTAccelInit(pScreen)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"Hardware acceleration initialization failed\n");
pAST->noAccel = TRUE;
}
}
#endif /* end of Accel_2D */
#endif
xf86SetBackingStore(pScreen); xf86SetBackingStore(pScreen);
xf86SetSilkenMouse(pScreen); xf86SetSilkenMouse(pScreen);
@@ -1332,12 +1260,6 @@ ASTCloseScreen(CLOSE_SCREEN_ARGS_DECL)
vgaHWUnmapMem(pScrn); vgaHWUnmapMem(pScrn);
#endif #endif
#ifdef HAVE_XAA_H
if(pAST->AccelInfoPtr) {
XAADestroyInfoRec(pAST->AccelInfoPtr);
pAST->AccelInfoPtr = NULL;
}
#endif
if(pAST->HWCInfoPtr) { if(pAST->HWCInfoPtr) {
xf86DestroyCursorInfoRec(pAST->HWCInfoPtr); xf86DestroyCursorInfoRec(pAST->HWCInfoPtr);
pAST->HWCInfoPtr = NULL; pAST->HWCInfoPtr = NULL;
@@ -2107,11 +2029,7 @@ static int ASTPutImage(ScrnInfoPtr pScrn,
int id, unsigned char* buf, int id, unsigned char* buf,
short width, short height, short width, short height,
Bool sync, Bool sync,
RegionPtr clipBoxes, pointer data RegionPtr clipBoxes, pointer data, DrawablePtr pDraw)
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1
, DrawablePtr pDraw
#endif
)
{ {
ASTPtr pAST = ASTPTR(pScrn); ASTPtr pAST = ASTPTR(pScrn);
ASTPortPrivPtr pPriv = (ASTPortPrivPtr)data; ASTPortPrivPtr pPriv = (ASTPortPrivPtr)data;