ChangeLog | 100 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 29 +++++++---- debian/changelog | 7 ++ debian/control | 2 src/Makefile.am | 3 - src/compat-api.h | 99 ++++++++++++++++++++++++++++++++++++++++ src/neo.h | 26 ++++++++-- src/neo_2070.c | 16 ++++-- src/neo_2090.c | 15 +++--- src/neo_2097.c | 11 +++- src/neo_2200.c | 10 +++- src/neo_cursor.c | 4 - src/neo_dga.c | 28 ++++++----- src/neo_driver.c | 135 ++++++++++++++++++++++++++++++++++--------------------- src/neo_i2c.c | 1 src/neo_shadow.c | 11 ++-- src/neo_video.c | 10 +--- 17 files changed, 399 insertions(+), 108 deletions(-)
New commits: commit d89e214297a69fcd22165de7f293645a1d9ecd76 Author: Maarten Lankhorst <[email protected]> Date: Wed Sep 25 16:59:46 2013 +0200 release to unstable diff --git a/debian/changelog b/debian/changelog index 520d66e..0ffed78 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -xserver-xorg-video-neomagic (1:1.2.8-1) UNRELEASED; urgency=low +xserver-xorg-video-neomagic (1:1.2.8-1) unstable; urgency=low * New upstream release. * Bump Standards-Version to 3.9.3 (no changes needed). - -- Maarten Lankhorst <[email protected]> Wed, 18 Jul 2012 14:41:34 +0200 + -- Maarten Lankhorst <[email protected]> Wed, 25 Sep 2013 16:59:37 +0200 xserver-xorg-video-neomagic (1:1.2.6-1) unstable; urgency=medium commit e642373e04e0b86601bc668b7f3769a26e585699 Author: Maarten Lankhorst <[email protected]> Date: Wed Sep 25 16:58:40 2013 +0200 bump version to 1.2.8 diff --git a/ChangeLog b/ChangeLog index 32f3c5a..ada33ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,69 @@ +commit a559a07989265a84ee31530a2b002899b40389ae +Author: Matt Turner <[email protected]> +Date: Fri Aug 16 11:12:14 2013 -0700 + + xf86-video-neomagic 1.2.8 + + Signed-off-by: Matt Turner <[email protected]> + +commit d7c14dfbac1b50ad484c0070075f060b53783550 +Author: Matthieu Herrb <[email protected]> +Date: Thu Jun 13 23:38:13 2013 +0200 + + Unbreak shadowfb initialization with modern X servers. + + Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=434468 + Signed-off-by: Matthieu Herrb <[email protected]> + Signed-off-by: Matt Turner <[email protected]> + +commit 005d61313e989bf054b1cc2190f1c743362d86ff +Author: Adam Jackson <[email protected]> +Date: Tue Sep 25 08:54:44 2012 -0400 + + Remove mibstore.h + + Signed-off-by: Adam Jackson <[email protected]> + +commit bc78be1c268d02c91926425cdf09ba1f7f1e3879 +Author: Matt Turner <[email protected]> +Date: Sun Sep 9 14:07:22 2012 -0700 + + Don't check for unneeded proto headers + + DGA unneeded since b6633ee7, others probably never needed. + + Signed-off-by: Matt Turner <[email protected]> + +commit a419c141d67728f84fdb376257618fe199154d29 +Author: Matt Turner <[email protected]> +Date: Sun Sep 9 13:29:24 2012 -0700 + + Remove uses of xf86PciInfo.h + + Signed-off-by: Matt Turner <[email protected]> + +commit 3a4cd45c63671f89bed7b1c9cc518ac028c189d3 +Author: Matt Turner <[email protected]> +Date: Sun Sep 9 13:23:35 2012 -0700 + + Add &component=Driver/Neomagic to Bugzilla link + + Signed-off-by: Matt Turner <[email protected]> + +commit 66f7229838ce725cff0813a9eae02ed452204ad1 +Author: Matt Turner <[email protected]> +Date: Sun Sep 9 13:10:24 2012 -0700 + + Don't call NEO_Sync with no XAA + + The commit that makes XAA optional left a use of NEO_Sync while putting + the body inside an #ifdef HAVE_XAA_H block, which caused undefined + symbol errors when loading the driver. NEO_Sync doesn't do anything + without XAA, so don't bother calling it without XAA. + + Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=434468 + Reviewed-by: Alex Deucher <[email protected]> + commit 7a10cbda5a0a9ae31e33c5cc77c6b1bda8cae852 Author: Dave Airlie <[email protected]> Date: Tue Jul 17 16:05:09 2012 +1000 diff --git a/debian/changelog b/debian/changelog index f531574..520d66e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xserver-xorg-video-neomagic (1:1.2.7-1) UNRELEASED; urgency=low +xserver-xorg-video-neomagic (1:1.2.8-1) UNRELEASED; urgency=low * New upstream release. * Bump Standards-Version to 3.9.3 (no changes needed). commit a559a07989265a84ee31530a2b002899b40389ae Author: Matt Turner <[email protected]> Date: Fri Aug 16 11:12:14 2013 -0700 xf86-video-neomagic 1.2.8 Signed-off-by: Matt Turner <[email protected]> diff --git a/configure.ac b/configure.ac index a6eafa3..dce0d93 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-neomagic], - [1.2.7], + [1.2.8], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Neomagic], [xf86-video-neomagic]) AC_CONFIG_SRCDIR([Makefile.am]) commit d7c14dfbac1b50ad484c0070075f060b53783550 Author: Matthieu Herrb <[email protected]> Date: Thu Jun 13 23:38:13 2013 +0200 Unbreak shadowfb initialization with modern X servers. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=434468 Signed-off-by: Matthieu Herrb <[email protected]> Signed-off-by: Matt Turner <[email protected]> diff --git a/src/neo.h b/src/neo.h index 6812e7a..7b386d4 100644 --- a/src/neo.h +++ b/src/neo.h @@ -261,6 +261,7 @@ typedef struct neoRec vbeInfoPtr pVbe; unsigned char * ShadowPtr; int ShadowPitch; + CreateScreenResourcesProcPtr CreateScreenResources; RefreshAreaFuncPtr refreshArea; void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y); int rotate; diff --git a/src/neo_driver.c b/src/neo_driver.c index a17b925..7e60f3e 100644 --- a/src/neo_driver.c +++ b/src/neo_driver.c @@ -1401,6 +1401,44 @@ NEOLoadPalette( } } +static Bool +NEOCreateScreenResources(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + NEOPtr pNeo = NEOPTR(pScrn); + PixmapPtr pPixmap; + Bool ret; + + pScreen->CreateScreenResources = pNeo->CreateScreenResources; + ret = pScreen->CreateScreenResources(pScreen); + pScreen->CreateScreenResources = NEOCreateScreenResources; + + if (!ret) + return FALSE; + + pPixmap = pScreen->GetScreenPixmap(pScreen); + + if (!shadowAdd(pScreen, pPixmap, neoShadowUpdate, + NULL, 0, NULL)) { + return FALSE; + } + return TRUE; +} + +static Bool +NEOShadowInit(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + NEOPtr pNeo = NEOPTR(pScrn); + + if (!shadowSetup(pScreen)) + return FALSE; + pNeo->CreateScreenResources = pScreen->CreateScreenResources; + pScreen->CreateScreenResources = NEOCreateScreenResources; + + return TRUE; +} + /* Mandatory */ static Bool NEOScreenInit(SCREEN_INIT_ARGS_DECL) @@ -1651,7 +1689,7 @@ NEOScreenInit(SCREEN_INIT_ARGS_DECL) #if 0 ShadowFBInit(pScreen, nPtr->refreshArea); #else - shadowInit (pScreen, neoShadowUpdate, 0); + NEOShadowInit (pScreen); #endif } commit 005d61313e989bf054b1cc2190f1c743362d86ff Author: Adam Jackson <[email protected]> Date: Tue Sep 25 08:54:44 2012 -0400 Remove mibstore.h Signed-off-by: Adam Jackson <[email protected]> diff --git a/src/neo_driver.c b/src/neo_driver.c index ce89ce0..a17b925 100644 --- a/src/neo_driver.c +++ b/src/neo_driver.c @@ -69,9 +69,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* All drivers initialising the SW cursor need this */ #include "mipointer.h" -/* All drivers implementing backing store need this */ -#include "mibstore.h" - /* All drivers using the mi colormap manipulation need this */ #include "micmap.h" @@ -1618,7 +1615,6 @@ NEOScreenInit(SCREEN_INIT_ARGS_DECL) "Acceleration %s Initialized\n",ret ? "" : "not"); } - miInitializeBackingStore(pScreen); xf86SetBackingStore(pScreen); xf86SetSilkenMouse(pScreen); commit bc78be1c268d02c91926425cdf09ba1f7f1e3879 Author: Matt Turner <[email protected]> Date: Sun Sep 9 14:07:22 2012 -0700 Don't check for unneeded proto headers DGA unneeded since b6633ee7, others probably never needed. Signed-off-by: Matt Turner <[email protected]> diff --git a/configure.ac b/configure.ac index 342b133..a6eafa3 100644 --- a/configure.ac +++ b/configure.ac @@ -53,14 +53,6 @@ AC_ARG_WITH(xorg-module-dir, [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) - -# Store the list of server defined optional extensions in REQUIRED_MODULES -XORG_DRIVER_CHECK_EXT(RANDR, randrproto) -XORG_DRIVER_CHECK_EXT(RENDER, renderproto) -XORG_DRIVER_CHECK_EXT(XV, videoproto) -XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) -XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto) - # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES]) commit a419c141d67728f84fdb376257618fe199154d29 Author: Matt Turner <[email protected]> Date: Sun Sep 9 13:29:24 2012 -0700 Remove uses of xf86PciInfo.h Signed-off-by: Matt Turner <[email protected]> diff --git a/src/neo.h b/src/neo.h index 6aecc33..6812e7a 100644 --- a/src/neo.h +++ b/src/neo.h @@ -320,3 +320,14 @@ typedef struct { #define PROBED_NM2097 0x83 #define PROBED_NM2160 0x44 #define PROBED_NM2200 0x45 + +#define PCI_VENDOR_NEOMAGIC 0x10C8 +#define PCI_CHIP_NM2070 0x0001 +#define PCI_CHIP_NM2090 0x0002 +#define PCI_CHIP_NM2093 0x0003 +#define PCI_CHIP_NM2097 0x0083 +#define PCI_CHIP_NM2160 0x0004 +#define PCI_CHIP_NM2200 0x0005 +#define PCI_CHIP_NM2230 0x0025 +#define PCI_CHIP_NM2360 0x0006 +#define PCI_CHIP_NM2380 0x0016 diff --git a/src/neo_2090.c b/src/neo_2090.c index 5049ab4..2f1efc8 100644 --- a/src/neo_2090.c +++ b/src/neo_2090.c @@ -42,7 +42,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" -#include "xf86PciInfo.h" /* Drivers that use XAA need this */ #include "xf86fbman.h" diff --git a/src/neo_dga.c b/src/neo_dga.c index 8ea31a9..c5d60d5 100644 --- a/src/neo_dga.c +++ b/src/neo_dga.c @@ -29,7 +29,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xf86PciInfo.h" #include "neo.h" #include "neo_reg.h" #include "dgaproc.h" diff --git a/src/neo_driver.c b/src/neo_driver.c index d7369e2..ce89ce0 100644 --- a/src/neo_driver.c +++ b/src/neo_driver.c @@ -60,9 +60,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xf86RAC.h" #endif -/* Drivers for PCI hardware need this */ -#include "xf86PciInfo.h" - /* Drivers that need to access the PCI config space directly need this */ #include "xf86Pci.h" diff --git a/src/neo_i2c.c b/src/neo_i2c.c index 82d1f2a..5bbb3fb 100644 --- a/src/neo_i2c.c +++ b/src/neo_i2c.c @@ -44,7 +44,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "compiler.h" #include "xf86Pci.h" -#include "xf86PciInfo.h" #include "vgaHW.h" diff --git a/src/neo_shadow.c b/src/neo_shadow.c index 2df7657..04efe4f 100644 --- a/src/neo_shadow.c +++ b/src/neo_shadow.c @@ -10,7 +10,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86PciInfo.h" #include "xf86Pci.h" #include "shadowfb.h" #include "servermd.h" commit 3a4cd45c63671f89bed7b1c9cc518ac028c189d3 Author: Matt Turner <[email protected]> Date: Sun Sep 9 13:23:35 2012 -0700 Add &component=Driver/Neomagic to Bugzilla link Signed-off-by: Matt Turner <[email protected]> diff --git a/configure.ac b/configure.ac index 29cf772..342b133 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-neomagic], [1.2.7], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Neomagic], [xf86-video-neomagic]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit 66f7229838ce725cff0813a9eae02ed452204ad1 Author: Matt Turner <[email protected]> Date: Sun Sep 9 13:10:24 2012 -0700 Don't call NEO_Sync with no XAA The commit that makes XAA optional left a use of NEO_Sync while putting the body inside an #ifdef HAVE_XAA_H block, which caused undefined symbol errors when loading the driver. NEO_Sync doesn't do anything without XAA, so don't bother calling it without XAA. Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=434468 Reviewed-by: Alex Deucher <[email protected]> diff --git a/src/neo_dga.c b/src/neo_dga.c index b6346c5..8ea31a9 100644 --- a/src/neo_dga.c +++ b/src/neo_dga.c @@ -38,10 +38,10 @@ static Bool NEO_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, int *, int *, int *); static Bool NEO_SetMode(ScrnInfoPtr, DGAModePtr); -static void NEO_Sync(ScrnInfoPtr); static int NEO_GetViewport(ScrnInfoPtr); static void NEO_SetViewport(ScrnInfoPtr, int, int, int); #ifdef HAVE_XAA_H +static void NEO_Sync(ScrnInfoPtr); static void NEO_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void NEO_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); #if 0 @@ -57,8 +57,8 @@ DGAFunctionRec NEODGAFuncs = { NEO_SetMode, NEO_SetViewport, NEO_GetViewport, - NEO_Sync, #ifdef HAVE_XAA_H + NEO_Sync, NEO_FillRect, NEO_BlitRect, #if 0 @@ -219,17 +219,14 @@ NEO_FillRect ( } } - static void NEO_Sync( ScrnInfoPtr pScrn ){ NEOPtr pNEO = NEOPTR(pScrn); -#ifdef HAVE_XAA_H if(pNEO->AccelInfoRec) { (*pNEO->AccelInfoRec->Sync)(pScrn); } -#endif } static void commit 8c439b3ff1d35a71707f1895fca8e9eb485892c1 Author: Maarten Lankhorst <[email protected]> Date: Wed Jul 18 14:42:48 2012 +0200 Bump Standards-Version to 3.9.3 (no changes needed). diff --git a/debian/changelog b/debian/changelog index f6493d4..f531574 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ xserver-xorg-video-neomagic (1:1.2.7-1) UNRELEASED; urgency=low * New upstream release. + * Bump Standards-Version to 3.9.3 (no changes needed). -- Maarten Lankhorst <[email protected]> Wed, 18 Jul 2012 14:41:34 +0200 diff --git a/debian/control b/debian/control index 5d91a0e..eb115e4 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Build-Depends: x11proto-render-dev, x11proto-xext-dev, xutils-dev (>= 1:7.5+4), -Standards-Version: 3.9.1 +Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-neomagic Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-neomagic.git commit fcec53d9e9552b57bb10c2a8cbb4022237463deb Author: Maarten Lankhorst <[email protected]> Date: Wed Jul 18 14:42:07 2012 +0200 New upstream release. diff --git a/debian/changelog b/debian/changelog index 124637e..f6493d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-video-neomagic (1:1.2.7-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Maarten Lankhorst <[email protected]> Wed, 18 Jul 2012 14:41:34 +0200 + xserver-xorg-video-neomagic (1:1.2.6-1) unstable; urgency=medium * New upstream release, fixes compatibility with xserver 1.12. commit 4b0cb3b6b4cdf8d8ee2d26cc2860870044819e0e Author: Maarten Lankhorst <[email protected]> Date: Wed Jul 18 14:41:10 2012 +0200 Bump changelog diff --git a/ChangeLog b/ChangeLog index f139b6b..32f3c5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +commit 7a10cbda5a0a9ae31e33c5cc77c6b1bda8cae852 +Author: Dave Airlie <[email protected]> +Date: Tue Jul 17 16:05:09 2012 +1000 + + xf86-video-neomagic: bump to version 1.2.7 + + Signed-off-by: Dave Airlie <[email protected]> + +commit 808aa999ad78ccc3384d08d501d43688795bee5e +Author: Dave Airlie <[email protected]> +Date: Mon Jul 16 03:29:55 2012 +0100 + + neomagic: fix build when XAA is unavailable. + + Signed-off-by: Dave Airlie <[email protected]> + +commit 9b33cc9fe94d97c8b954a3614ead34622d293bc3 +Author: Dave Airlie <[email protected]> +Date: Wed Jun 6 12:21:55 2012 +0100 + + neomagic: port to new compat API. + + Signed-off-by: Dave Airlie <[email protected]> + +commit 3b06ee079494b0d08913a9f724c3661f9ac35907 +Author: Adam Jackson <[email protected]> +Date: Wed Apr 18 10:50:28 2012 -0400 + + Use DamageRegion for shadow damage + + The 'damage' member is an ancient compatibility hack I want to destroy. + + Signed-off-by: Adam Jackson <[email protected]> + commit 25c7bb8b063777f31db678db743191265f17e7be Author: Alan Coopersmith <[email protected]> Date: Fri Mar 23 19:08:03 2012 -0700 commit 7a10cbda5a0a9ae31e33c5cc77c6b1bda8cae852 Author: Dave Airlie <[email protected]> Date: Tue Jul 17 16:05:09 2012 +1000 xf86-video-neomagic: bump to version 1.2.7 Signed-off-by: Dave Airlie <[email protected]> diff --git a/configure.ac b/configure.ac index 48bce17..29cf772 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-neomagic], - [1.2.6], + [1.2.7], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-neomagic]) AC_CONFIG_SRCDIR([Makefile.am]) commit 808aa999ad78ccc3384d08d501d43688795bee5e Author: Dave Airlie <[email protected]> Date: Mon Jul 16 03:29:55 2012 +0100 neomagic: fix build when XAA is unavailable. Signed-off-by: Dave Airlie <[email protected]> diff --git a/configure.ac b/configure.ac index ded0912..48bce17 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,23 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [#include "xorg-server.h"]) CPPFLAGS="$SAVE_CPPFLAGS" +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]) if test "x$XSERVER_LIBPCIACCESS" = xyes; then PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) diff --git a/src/neo.h b/src/neo.h index 7c7beb1..6aecc33 100644 --- a/src/neo.h +++ b/src/neo.h @@ -46,8 +46,11 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Everything using inb/outb, etc needs "compiler.h" */ #include "compiler.h" +#ifdef HAVE_XAA_H #include "xaa.h" #include "xaalocal.h" /* XAA internals as we replace some of XAA */ +#endif +#include "xf86fbman.h" #include "xf86Cursor.h" #include "shadowfb.h" @@ -202,7 +205,9 @@ typedef struct neoRec PCITAG PciTag; #endif EntityInfoPtr pEnt; +#ifdef HAVE_XAA_H XAAInfoRecPtr AccelInfoRec; +#endif NEOACLRec Accel; unsigned long NeoMMIOAddr; unsigned long NeoLinearAddr; diff --git a/src/neo_2070.c b/src/neo_2070.c index fab01ab..4767b7d 100644 --- a/src/neo_2070.c +++ b/src/neo_2070.c @@ -52,6 +52,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "neo_reg.h" #include "neo_macros.h" +#ifdef HAVE_XAA_H /* Memory Mapped I/O for BitBlt */ #define NEO2070_BLTSTAT 0x00 #define NEO2070_BLTCNTL 0x04 @@ -99,9 +100,12 @@ static void Neo2070SetupForSolidFillRect(ScrnInfoPtr pScrn, int color, int rop, static void Neo2070SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h); +#endif + Bool Neo2070AccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NEOPtr nPtr = NEOPTR(pScrn); @@ -160,9 +164,12 @@ Neo2070AccelInit(ScreenPtr pScreen) } return(XAAInit(pScreen, infoPtr)); - +#else + return FALSE; +#endif } +#ifdef HAVE_XAA_H static void Neo2070Sync(ScrnInfoPtr pScrn) { @@ -260,8 +267,5 @@ Neo2070SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h) OUTREG(NEO2070_XYEXT, ((h-1)<<16) | ((w-1) & 0xffff)); OUTREG(NEO2070_DSTSTART, (y * nAcl->Pitch) + (x * nAcl->PixelWidth)); } - - - - +#endif diff --git a/src/neo_2090.c b/src/neo_2090.c index f7b407a..5049ab4 100644 --- a/src/neo_2090.c +++ b/src/neo_2090.c @@ -53,6 +53,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "neo_reg.h" #include "neo_macros.h" +#ifdef HAVE_XAA_H static unsigned int neo2090Rop[16] = { 0x000000, /* 0x0000 - GXclear */ 0x080000, /* 0x1000 - GXand */ @@ -95,10 +96,11 @@ static void Neo2093SubsequentScanlineCPUToScreenColorExpandFill( int w, int h, int skipleft); static void Neo2093SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno); - +#endif Bool Neo2090AccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NEOPtr nPtr = NEOPTR(pScrn); @@ -198,8 +200,12 @@ Neo2090AccelInit(ScreenPtr pScreen) nAcl->BltCntlFlags |= NEO_BC3_FIFO_EN; return(XAAInit(pScreen, infoPtr)); +#else + return FALSE; +#endif } +#ifdef HAVE_XAA_H static void Neo2090Sync(ScrnInfoPtr pScrn) { @@ -363,6 +369,4 @@ Neo2093SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) OUTREG(NEOREG_XYEXT, (1<<16) | (nAcl->CPUToScreenColorExpandFill_w & 0xffff)); } - - - +#endif diff --git a/src/neo_2097.c b/src/neo_2097.c index d1e2389..399ace0 100644 --- a/src/neo_2097.c +++ b/src/neo_2097.c @@ -56,6 +56,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "neo_reg.h" #include "neo_macros.h" +#ifdef HAVE_XAA_H static void Neo2097Sync(ScrnInfoPtr pScrn); static void Neo2097SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop, @@ -118,11 +119,12 @@ static unsigned int neo2097Rop[16] = { 0x070000, /* 0x0111 - GXnand */ 0x0f0000 /* 0x1111 - GXset */ }; - +#endif Bool Neo2097AccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NEOPtr nPtr = NEOPTR(pScrn); @@ -249,8 +251,12 @@ Neo2097AccelInit(ScreenPtr pScreen) } return(XAAInit(pScreen, infoPtr)); +#else + return FALSE; +#endif } +#ifdef HAVE_XAA_H static void Neo2097Sync(ScrnInfoPtr pScrn) { @@ -544,3 +550,4 @@ Neo2097SubsequentImageWriteScanline( ){ /* should I be checking for fifo slots here ? */ } +#endif diff --git a/src/neo_2200.c b/src/neo_2200.c index 72864a5..5694ae4 100644 --- a/src/neo_2200.c +++ b/src/neo_2200.c @@ -51,6 +51,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "neo_reg.h" #include "neo_macros.h" +#ifdef HAVE_XAA_H static void Neo2200Sync(ScrnInfoPtr pScrn); static void Neo2200SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop, @@ -115,9 +116,11 @@ static unsigned int neo2200Rop[16] = { 0x0f0000 /* 0x1111 - GXset */ }; +#endif Bool Neo2200AccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NEOPtr nPtr = NEOPTR(pScrn); @@ -254,8 +257,12 @@ Neo2200AccelInit(ScreenPtr pScreen) } return(XAAInit(pScreen, infoPtr)); +#else + return FALSE; +#endif } +#ifdef HAVE_XAA_H static void Neo2200Sync(ScrnInfoPtr pScrn) { @@ -647,3 +654,4 @@ Neo2200SubsequentMono8x8PatternFill(ScrnInfoPtr pScrn, OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff)); } #endif +#endif diff --git a/src/neo_dga.c b/src/neo_dga.c index 799150c..b6346c5 100644 --- a/src/neo_dga.c +++ b/src/neo_dga.c @@ -30,8 +30,6 @@ #include "xf86_OSproc.h" #include "xf86Pci.h" #include "xf86PciInfo.h" -#include "xaa.h" -#include "xaalocal.h" #include "neo.h" #include "neo_reg.h" #include "dgaproc.h" @@ -43,12 +41,14 @@ static Bool NEO_SetMode(ScrnInfoPtr, DGAModePtr); static void NEO_Sync(ScrnInfoPtr); static int NEO_GetViewport(ScrnInfoPtr); static void NEO_SetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H static void NEO_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void NEO_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); #if 0 static void NEO_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); #endif +#endif static DGAFunctionRec NEODGAFuncs = { @@ -58,6 +58,7 @@ DGAFunctionRec NEODGAFuncs = { NEO_SetViewport, NEO_GetViewport, NEO_Sync, +#ifdef HAVE_XAA_H NEO_FillRect, NEO_BlitRect, #if 0 @@ -65,6 +66,9 @@ DGAFunctionRec NEODGAFuncs = { #else NULL #endif +#else + NULL, NULL, NULL +#endif }; Bool @@ -99,8 +103,10 @@ NEODGAInit(ScreenPtr pScreen) currentMode->mode = pMode; currentMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE; +#ifdef HAVE_XAA_H if (!pNEO->noAccel) currentMode->flags |= (DGA_FILL_RECT | DGA_BLIT_RECT); +#endif if(pMode->Flags & V_DBLSCAN) currentMode->flags |= DGA_DOUBLESCAN; if(pMode->Flags & V_INTERLACE) @@ -197,6 +203,7 @@ NEO_SetViewport( pNEO->DGAViewportStatus = 0; } +#ifdef HAVE_XAA_H static void NEO_FillRect ( ScrnInfoPtr pScrn, @@ -212,15 +219,17 @@ NEO_FillRect ( } } + static void NEO_Sync( ScrnInfoPtr pScrn ){ NEOPtr pNEO = NEOPTR(pScrn); - +#ifdef HAVE_XAA_H if(pNEO->AccelInfoRec) { (*pNEO->AccelInfoRec->Sync)(pScrn); } +#endif } static void @@ -257,7 +266,7 @@ NEO_BlitTransRect( prohibit usage of ~0 as the key */ } #endif - +#endif static Bool NEO_OpenFramebuffer( ScrnInfoPtr pScrn, @@ -277,3 +286,4 @@ NEO_OpenFramebuffer( return TRUE; } + diff --git a/src/neo_driver.c b/src/neo_driver.c index 124bd6f..d7369e2 100644 --- a/src/neo_driver.c +++ b/src/neo_driver.c @@ -1788,8 +1788,10 @@ NEOCloseScreen(CLOSE_SCREEN_ARGS_DECL) neoLock(pScrn); neoUnmapMem(pScrn); } +#ifdef HAVE_XAA_H if (nPtr->AccelInfoRec) XAADestroyInfoRec(nPtr->AccelInfoRec); +#endif if (nPtr->CursorInfo) xf86DestroyCursorInfoRec(nPtr->CursorInfo); if (nPtr->ShadowPtr) diff --git a/src/neo_video.c b/src/neo_video.c index 8e63947..be60421 100644 --- a/src/neo_video.c +++ b/src/neo_video.c @@ -38,8 +38,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) #include "dixstruct.h" -#include "xaa.h" -#include "xaalocal.h" static XF86VideoAdaptorPtr NEOSetupVideo(ScreenPtr); commit 9b33cc9fe94d97c8b954a3614ead34622d293bc3 Author: Dave Airlie <[email protected]> Date: Wed Jun 6 12:21:55 2012 +0100 neomagic: port to new compat API. Signed-off-by: Dave Airlie <[email protected]> diff --git a/src/Makefile.am b/src/Makefile.am index e07e52e..764cb5f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,4 +43,5 @@ neomagic_drv_la_SOURCES = \ neo_shadow.c \ neo_video.c \ neo_video.h \ - neo_pcirename.h + neo_pcirename.h \ + compat-api.h diff --git a/src/compat-api.h b/src/compat-api.h new file mode 100644 index 0000000..6bc946f --- /dev/null +++ b/src/compat-api.h @@ -0,0 +1,99 @@ +/* + * Copyright 2012 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

