mirror of
https://github.com/X11Libre/xf86-video-ast.git
synced 2026-03-24 01:24:41 +00:00
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:
21
configure.ac
21
configure.ac
@@ -58,7 +58,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
|
||||
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
|
||||
|
||||
# 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.
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
@@ -74,25 +74,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])
|
||||
|
||||
DRIVER_NAME=nv
|
||||
|
||||
14
src/ast.h
14
src/ast.h
@@ -34,10 +34,6 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_XAA_H
|
||||
#include "xaa.h"
|
||||
#endif
|
||||
|
||||
#include "ast_pcirename.h"
|
||||
|
||||
#include "compat-api.h"
|
||||
@@ -231,9 +227,6 @@ typedef struct _ASTRec {
|
||||
OptionInfoPtr Options;
|
||||
DisplayModePtr ModePtr;
|
||||
FBLinearPtr pCMDQPtr;
|
||||
#ifdef HAVE_XAA_H
|
||||
XAAInfoRecPtr AccelInfoPtr;
|
||||
#endif
|
||||
xf86CursorInfoPtr HWCInfoPtr;
|
||||
FBLinearPtr pHWCPtr;
|
||||
|
||||
@@ -266,11 +259,7 @@ typedef struct _ASTRec {
|
||||
unsigned long FbMapSize;
|
||||
unsigned long MMIOMapSize;
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
|
||||
IOADDRESS RelocateIO;
|
||||
#else
|
||||
int RelocateIO;
|
||||
#endif
|
||||
|
||||
VIDEOMODE VideoModeInfo;
|
||||
ASTRegRec SavedReg;
|
||||
@@ -351,9 +340,6 @@ void ASTDisableHWC(ScrnInfoPtr pScrn);
|
||||
Bool ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
|
||||
|
||||
/* ast_accel.c */
|
||||
#ifdef HAVE_XAA_H
|
||||
Bool ASTAccelInit(ScreenPtr pScreen);
|
||||
#endif
|
||||
void ASTDisplayVideo(ScrnInfoPtr pScrn, ASTPortPrivPtr pPriv, RegionPtr clipBoxes, int id);
|
||||
|
||||
/* ast_tool.c */
|
||||
|
||||
1631
src/ast_accel.c
1631
src/ast_accel.c
File diff suppressed because it is too large
Load Diff
@@ -25,10 +25,6 @@
|
||||
#endif
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
|
||||
#include "xf86Resources.h"
|
||||
#include "xf86RAC.h"
|
||||
#endif
|
||||
#include "xf86cmap.h"
|
||||
#include "compiler.h"
|
||||
#include "vgaHW.h"
|
||||
@@ -45,12 +41,6 @@
|
||||
/* framebuffer offscreen manager */
|
||||
#include "xf86fbman.h"
|
||||
|
||||
/* include xaa includes */
|
||||
#ifdef HAVE_XAA_H
|
||||
#include "xaa.h"
|
||||
#include "xaarop.h"
|
||||
#endif
|
||||
|
||||
/* H/W cursor support */
|
||||
#include "xf86Cursor.h"
|
||||
|
||||
@@ -90,11 +80,7 @@ static Bool ASTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
|
||||
static void ASTInitVideo(ScreenPtr pScreen);
|
||||
static int ASTPutImage( ScrnInfoPtr,
|
||||
short, short, short, short, short, short, short, short,
|
||||
int, unsigned char*, short, short, Bool, RegionPtr, pointer
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1
|
||||
, DrawablePtr pDraw
|
||||
#endif
|
||||
);
|
||||
int, unsigned char*, short, short, Bool, RegionPtr, pointer, DrawablePtr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -281,11 +267,7 @@ ASTProbe(DriverPtr drv, int flags)
|
||||
pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func);
|
||||
xf86DrvMsg(0, X_ERROR,
|
||||
"ast: This driver cannot operate until it has been unloaded.\n");
|
||||
xf86UnclaimPciSlot(pPci
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 13
|
||||
, devSections[0]
|
||||
#endif
|
||||
);
|
||||
xf86UnclaimPciSlot(pPci, devSections[0]);
|
||||
free(devSections);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -541,19 +523,7 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
(pScrn->chipset != NULL) ? pScrn->chipset : "Unknown ast");
|
||||
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
|
||||
/* "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
|
||||
pAST->RelocateIO = (PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO));
|
||||
|
||||
|
||||
if (pAST->pEnt->device->MemBase != 0) {
|
||||
@@ -745,35 +715,6 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
pAST->CMDQInfo.pjWritePort = pAST->MMIOVirtualAddr+ 0x8048;
|
||||
pAST->CMDQInfo.pjReadPort = 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 */
|
||||
pAST->noHWC = TRUE;
|
||||
@@ -964,19 +905,6 @@ ASTScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
#endif
|
||||
|
||||
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);
|
||||
xf86SetSilkenMouse(pScreen);
|
||||
|
||||
@@ -1332,12 +1260,6 @@ ASTCloseScreen(CLOSE_SCREEN_ARGS_DECL)
|
||||
vgaHWUnmapMem(pScrn);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XAA_H
|
||||
if(pAST->AccelInfoPtr) {
|
||||
XAADestroyInfoRec(pAST->AccelInfoPtr);
|
||||
pAST->AccelInfoPtr = NULL;
|
||||
}
|
||||
#endif
|
||||
if(pAST->HWCInfoPtr) {
|
||||
xf86DestroyCursorInfoRec(pAST->HWCInfoPtr);
|
||||
pAST->HWCInfoPtr = NULL;
|
||||
@@ -2107,11 +2029,7 @@ static int ASTPutImage(ScrnInfoPtr pScrn,
|
||||
int id, unsigned char* buf,
|
||||
short width, short height,
|
||||
Bool sync,
|
||||
RegionPtr clipBoxes, pointer data
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 1
|
||||
, DrawablePtr pDraw
|
||||
#endif
|
||||
)
|
||||
RegionPtr clipBoxes, pointer data, DrawablePtr pDraw)
|
||||
{
|
||||
ASTPtr pAST = ASTPTR(pScrn);
|
||||
ASTPortPrivPtr pPriv = (ASTPortPrivPtr)data;
|
||||
|
||||
Reference in New Issue
Block a user