[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-voodoo: Changes to 'debian-unstable'



 ChangeLog             |  182 ++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac          |   58 ++++++++++-----
 debian/changelog      |    9 ++
 debian/control        |    5 -
 man/Makefile.am       |   22 +-----
 man/voodoo.man        |    1 
 src/Makefile.am       |    1 
 src/compat-api.h      |   99 +++++++++++++++++++++++++++
 src/voodoo.h          |    6 +
 src/voodoo_dga.c      |   11 +--
 src/voodoo_driver.c   |   73 ++++++++++----------
 src/voodoo_hardware.c |   23 ++++--
 12 files changed, 399 insertions(+), 91 deletions(-)

New commits:
commit 3120e11625f688f3699625921da913601e51558c
Author: Michele Cane <michele.cane@gmail.com>
Date:   Sun Jul 21 20:06:44 2013 +0200

    Build against Xserver 1.14.

diff --git a/debian/changelog b/debian/changelog
index c89e331..eeb4654 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ xserver-xorg-video-voodoo (1:1.2.5-1) UNRELEASED; urgency=low
   * New upstream release.
   * Bump Standards-Version to 3.9.4, no changes needed.
   * Add an explicit build-dep on libpciaccess-dev. 
+  * Build against Xserver 1.14.
 
  -- Michele Cane <michele.cane@gmail.com>  Fri, 12 Jul 2013 09:06:06 +0200
 
diff --git a/debian/control b/debian/control
index 5d87cf4..f23ca63 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends:
  quilt,
  pkg-config,
  xutils-dev,
- xserver-xorg-dev (>= 2:1.9.4),
+ xserver-xorg-dev (>= 2:1.14),
  x11proto-xext-dev,
  x11proto-xf86dga-dev,
  x11proto-core-dev,

commit b2429588f2257cbcf6c9793afc55954a8cae358a
Author: Michele Cane <michele.cane@gmail.com>
Date:   Sun Jul 21 20:05:21 2013 +0200

    Add an explicit build-dep on libpciaccess-dev.

diff --git a/debian/changelog b/debian/changelog
index c0915b7..c89e331 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ xserver-xorg-video-voodoo (1:1.2.5-1) UNRELEASED; urgency=low
 
   * New upstream release.
   * Bump Standards-Version to 3.9.4, no changes needed.
+  * Add an explicit build-dep on libpciaccess-dev. 
 
  -- Michele Cane <michele.cane@gmail.com>  Fri, 12 Jul 2013 09:06:06 +0200
 
diff --git a/debian/control b/debian/control
index 4396b70..5d87cf4 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,7 @@ Build-Depends:
  x11proto-fonts-dev,
  x11proto-randr-dev,
  x11proto-render-dev,
+ libpciaccess-dev (>= 0.8),
 Standards-Version: 3.9.4
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-voodoo
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-voodoo.git

commit dc37eb4133d3edd4a4c44b45407f6b67ff50cbf7
Author: Michele Cane <michele.cane@gmail.com>
Date:   Sun Jul 21 20:02:23 2013 +0200

    Bump Standards-Version to 3.9.4, no changes needed.

diff --git a/debian/changelog b/debian/changelog
index f3da2ee..c0915b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-voodoo (1:1.2.5-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Bump Standards-Version to 3.9.4, no changes needed.
 
  -- Michele Cane <michele.cane@gmail.com>  Fri, 12 Jul 2013 09:06:06 +0200
 
diff --git a/debian/control b/debian/control
index 18af5e4..4396b70 100644
--- a/debian/control
+++ b/debian/control
@@ -16,7 +16,7 @@ Build-Depends:
  x11proto-fonts-dev,
  x11proto-randr-dev,
  x11proto-render-dev,
-Standards-Version: 3.9.1
+Standards-Version: 3.9.4
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-voodoo
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-voodoo.git
 

commit 284c28339e6600d30870fb7aa979f11866fed347
Author: Michele Cane <michele.cane@gmail.com>
Date:   Fri Jul 12 09:06:43 2013 +0200

    Bump changelogs.

diff --git a/ChangeLog b/ChangeLog
index 0f52b59..a5cbc5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,185 @@
+commit e505d6b24873046285b18446df43ef505b650663
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Jul 17 16:05:09 2012 +1000
+
+    xf86-video-voodoo: bump to version 1.2.5
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 7dd9360b9d9cdd76fed73323cc5cd8f6cc6c4adc
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Jul 17 15:39:50 2012 +1000
+
+    voodoo: fix build against older X servers.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit f9e303905639ba84cb4eea909faa942d515c1968
+Author: Dave Airlie <airlied@gmail.com>
+Date:   Mon Jul 16 18:52:50 2012 +1000
+
+    voodoo: fix build against XAA-less server.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit a5a9f9d7f69f812ef81557a50451efaa2f577cfb
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Wed Jun 6 12:39:10 2012 +0100
+
+    voodoo: add compat API.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 8c1121725c4dc1a81dd1af74b83405a1cb69562e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Dec 19 17:40:16 2011 -0500
+
+    Drop useless vgaHW include
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit b835f5083cfef2aad6575277fb168a60bbb76af4
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Mon Dec 19 17:39:44 2011 -0500
+
+    Fall back to shadowfb if XAA is unavailable
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+commit d2f109c4179c13c3367b08f1ee4f4baa3a2a68ad
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date:   Sat Oct 29 19:02:46 2011 -0700
+
+    Fix implicit declaration warning
+    
+    voodoo_driver.c:898:7: warning: implicit declaration of function 'VoodooRestorePassThrough' [-Wimplicit-function-declaration]
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 614ccdf6a5dcc496d254aa361cc06ef70f2792f5
+Author: Trevor Woerner <twoerner@gmail.com>
+Date:   Fri Oct 22 14:51:16 2010 -0400
+
+    Update xf86dgastr.h include.
+    
+    To xf86dgaproto.h.
+    
+    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ae5f55acea3753ae83bd3b78bba86137f9b4b7f3
+Author: Trevor Woerner <twoerner@gmail.com>
+Date:   Fri Oct 22 14:51:01 2010 -0400
+
+    Convert x+m/calloc/free to m/calloc/free.
+    
+    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit db25d980b71396430c1a93f61687bbb971b02f7b
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date:   Tue Sep 28 13:29:52 2010 -0700
+
+    Purge cvs tags.
+    
+    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 83be53038fc95cfceb3dec53d68e52fd82026998
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Jul 21 16:49:04 2010 -0400
+
+    config: add comments for main statements
+
+commit 1f0d72b11e212eb250c3614b2b799b84bd4e021b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Jul 21 16:07:00 2010 -0400
+
+    config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit dfa89c2014813e080a34aac5a650d475d31479db
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Jul 21 14:37:42 2010 -0400
+
+    config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 54a332ac745af89d60ca4b3c5907e592a40a37d6
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Jul 21 14:05:23 2010 -0400
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit a3dcd95353834098f7a64ada7062288f2667587f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Jul 21 09:27:42 2010 -0400
+
+    config: complete AC_INIT m4 quoting
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit beb44a9dbdbe8376738f5476333405e727ce17e6
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 21:44:58 2010 -0400
+
+    config: remove unrequired AC_SUBST([XORG_CFLAGS])
+    
+    This macro is called by PKG_CHECK_MODULES
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 3e43d913b90e2bd3930c3a22951f9a248c746941
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 20:24:42 2010 -0400
+
+    config: remove unrequired AC_HEADER_STDC
+    
+    Autoconf says:
+    "This macro is obsolescent, as current systems have conforming
+    header files. New programs need not use this macro".
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit d251e3bbec7ca5feae7480dd60ea4e4814feaaf9
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 19:41:31 2010 -0400
+
+    config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+    
+    XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+    AC_PROG_C_C99. This sets gcc with -std=gnu99.
+    If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1b4cf228ef6c9c8bb28447f3e61eb523b22b309b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 18:45:19 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 494fd2ae23a845efd722cdf8b8c26d9a8dd4bbce
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Jul 20 16:15:30 2010 -0400
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+
 commit e58d315815dca51b6fcecdeceb267fc8a7cb19e1
 Author: Dave Airlie <airlied@redhat.com>
 Date:   Mon Jul 5 14:39:03 2010 +1000
diff --git a/debian/changelog b/debian/changelog
index 59b02f4..f3da2ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-voodoo (1:1.2.5-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Michele Cane <michele.cane@gmail.com>  Fri, 12 Jul 2013 09:06:06 +0200
+
 xserver-xorg-video-voodoo (1:1.2.4-2) unstable; urgency=low
 
   * Update debian/copyright from upstream COPYING.

commit e505d6b24873046285b18446df43ef505b650663
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jul 17 16:05:09 2012 +1000

    xf86-video-voodoo: bump to version 1.2.5
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index d433aa2..372006a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-voodoo],
-        [1.2.4],
+        [1.2.5],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-voodoo])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 7dd9360b9d9cdd76fed73323cc5cd8f6cc6c4adc
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jul 17 15:39:50 2012 +1000

    voodoo: fix build against older X servers.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c
index 280c997..edcde47 100644
--- a/src/voodoo_dga.c
+++ b/src/voodoo_dga.c
@@ -48,7 +48,9 @@
 #include "vgaHW.h"
 #include "compiler.h"
 #include "dgaproc.h"
-
+#ifdef HAVE_XAA_H
+#include "xaa.h"
+#endif
 #include "voodoo.h"
 
 #define _XF86DGA_SERVER_
diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c
index cd50bdb..6ef12ae 100644
--- a/src/voodoo_driver.c
+++ b/src/voodoo_driver.c
@@ -59,7 +59,9 @@
 #include "xf86Resources.h"
 #endif
 #include "compiler.h"
-
+#ifdef HAVE_XAA_H
+#include "xaa.h"
+#endif
 #include "voodoo.h"
 
 #define _XF86DGA_SERVER_
diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c
index 232248c..5a85446 100644
--- a/src/voodoo_hardware.c
+++ b/src/voodoo_hardware.c
@@ -49,6 +49,10 @@
 #include "vgaHW.h"
 #include "compiler.h"
 
+#ifdef HAVE_XAA_H
+#include "xaa.h"
+#endif
+
 #include "voodoo.h"
 
 #include <X11/extensions/xf86dgaproto.h>

commit f9e303905639ba84cb4eea909faa942d515c1968
Author: Dave Airlie <airlied@gmail.com>
Date:   Mon Jul 16 18:52:50 2012 +1000

    voodoo: fix build against XAA-less server.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index da7dc53..d433aa2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,25 @@ 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=voodoo
diff --git a/src/voodoo.h b/src/voodoo.h
index 5cb3799..bfed497 100644
--- a/src/voodoo.h
+++ b/src/voodoo.h
@@ -13,7 +13,9 @@ typedef struct {
   CARD8 *             ShadowPtr;	/* Shadow buffer */
   CARD32              ShadowPitch;
   CloseScreenProcPtr  CloseScreen;	/* Wrapped Close */
+#ifdef HAVE_XAA_H
   XAAInfoRecPtr	      AccelInfoRec;	/* Cached Accel rec for close */
+#endif
   Bool                Blanked;
   Bool                PassThrough;     /* Set to restore pass through on exit */
   EntityInfoPtr       pEnt;
diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c
index 74bff97..280c997 100644
--- a/src/voodoo_dga.c
+++ b/src/voodoo_dga.c
@@ -47,7 +47,6 @@
 #include "shadowfb.h"
 #include "vgaHW.h"
 #include "compiler.h"
-#include "xaa.h"
 #include "dgaproc.h"
 
 #include "voodoo.h"
diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c
index 08325e3..cd50bdb 100644
--- a/src/voodoo_driver.c
+++ b/src/voodoo_driver.c
@@ -59,7 +59,6 @@
 #include "xf86Resources.h"
 #endif
 #include "compiler.h"
-#include "xaa.h"
 
 #include "voodoo.h"
 
@@ -769,8 +768,10 @@ VoodooCloseScreen(CLOSE_SCREEN_ARGS_DECL)
       VoodooRestore(pScrn, TRUE);
   if(pVoo->ShadowPtr)
       free(pVoo->ShadowPtr);
+#ifdef HAVE_XAA_H
   if(pVoo->AccelInfoRec)
       free(pVoo->AccelInfoRec);
+#endif
   if (pVoo->pDGAMode) {
     free(pVoo->pDGAMode);
     pVoo->pDGAMode = NULL;
diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c
index 88e937d..232248c 100644
--- a/src/voodoo_hardware.c
+++ b/src/voodoo_hardware.c
@@ -47,7 +47,6 @@
 #include "xf86cmap.h"
 #include "shadowfb.h"
 #include "vgaHW.h"
-#include "xaa.h"
 #include "compiler.h"
 
 #include "voodoo.h"
@@ -67,7 +66,7 @@
 
 #include <unistd.h>
 
-
+#ifdef HAVE_XAA_H
 #if 0
 static void VoodooReadWriteBank(ScreenPtr pScreen, int bank);
 #endif
@@ -82,7 +81,7 @@ static Bool VoodooSetupForCPUToScreenTexture(ScrnInfoPtr pScrn, int op,
 static void VoodooSubsequentCPUToScreenTexture(ScrnInfoPtr pScrn,
 	int dstx, int dsty, int srcx, int srcy, int width, int height);
 
-
+#endif
 static int debug = 0;
 
 /*
@@ -920,6 +919,7 @@ void VoodooSync(ScrnInfoPtr pScrn)
 	mmio32_w(pVoo, 0x10C, 0);	/* Maybe flag this */
 }
 
+#ifdef HAVE_XAA_H
 static void Voodoo2Setup2D(VoodooPtr pVoo)
 {
 	wait_idle(pVoo);
@@ -1386,9 +1386,11 @@ CARD32 VoodooAlphaTextureFormats[2] = {PICT_a8, 0};
 CARD32 VoodooTextureFormats[3] = {PICT_a8r8g8b8, PICT_x8r8g8b8, 0};
 
 #endif
+#endif
 
 void Voodoo2XAAInit(ScreenPtr pScreen)
 {
+#ifdef HAVE_XAA_H
 	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	VoodooPtr pVoo = VoodooPTR(pScrn);
 	XAAInfoRecPtr pAccel = XAACreateInfoRec();
@@ -1472,4 +1474,5 @@ void Voodoo2XAAInit(ScreenPtr pScreen)
 		ErrorF("Unable to set up acceleration.\n");
 		
 	Voodoo2DisableClipping(pScrn);
+#endif
 }

commit a5a9f9d7f69f812ef81557a50451efaa2f577cfb
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jun 6 12:39:10 2012 +0100

    voodoo: add compat API.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index 5eb704e..c145c27 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,6 +29,7 @@ voodoo_drv_la_LDFLAGS = -module -avoid-version
 voodoo_drv_ladir = @moduledir@/drivers
 
 voodoo_drv_la_SOURCES = \
+         compat-api.h \
          voodoo_dga.c \
          voodoo_driver.c \
          voodoo.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
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Dave Airlie <airlied@redhat.com>
+ */
+
+/* this file provides API compat between server post 1.13 and pre it,
+   it should be reused inside as many drivers as possible */
+#ifndef COMPAT_API_H
+#define COMPAT_API_H
+
+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
+#endif
+
+#ifndef XF86_HAS_SCRN_CONV
+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
+#endif
+
+#ifndef XF86_SCRN_INTERFACE
+
+#define SCRN_ARG_TYPE int
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
+
+#define SCREEN_ARG_TYPE int
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
+
+#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
+
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
+#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
+
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
+#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
+
+#define FREE_SCREEN_ARGS_DECL int arg, int flags
+
+#define VT_FUNC_ARGS_DECL int arg, int flags
+#define VT_FUNC_ARGS pScrn->scrnIndex, 0
+
+#define XF86_SCRN_ARG(x) ((x)->scrnIndex)
+#else
+#define SCRN_ARG_TYPE ScrnInfoPtr
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
+
+#define SCREEN_ARG_TYPE ScreenPtr
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
+
+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS pScreen
+
+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
+#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
+
+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
+#define SWITCH_MODE_ARGS(arg, m) arg, m
+
+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
+
+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
+#define VT_FUNC_ARGS pScrn
+
+#define XF86_SCRN_ARG(x) (x)
+
+#endif
+
+#endif
diff --git a/src/voodoo.h b/src/voodoo.h
index 11a62c9..5cb3799 100644
--- a/src/voodoo.h
+++ b/src/voodoo.h
@@ -1,6 +1,8 @@
 #include "voodoo_pcirename.h"
 #include <string.h>
 
+#include "compat-api.h"
+
 typedef struct {
   CARD32		m;
   CARD32		n;
diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c
index 146de84..74bff97 100644
--- a/src/voodoo_dga.c
+++ b/src/voodoo_dga.c
@@ -105,7 +105,7 @@ static Bool VoodooDGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode)
 	frameY0 = pScrn->frameY0;
     }
 
-    if (!(*pScrn->SwitchMode)(scrnIdx, pMode, 0))
+    if (!(*pScrn->SwitchMode)(SWITCH_MODE_ARGS(pScrn, pMode)))
 	return FALSE;
     return TRUE;
 }
diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c
index 6dad301..08325e3 100644
--- a/src/voodoo_driver.c
+++ b/src/voodoo_driver.c
@@ -79,15 +79,15 @@ static const OptionInfoRec * VoodooAvailableOptions(int chipid, int busid);
 static void	VoodooIdentify(int flags);
 static Bool	VoodooProbe(DriverPtr drv, int flags);
 static Bool	VoodooPreInit(ScrnInfoPtr pScrn, int flags);
-static Bool	VoodooScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv);
-static Bool	VoodooEnterVT(int scrnIndex, int flags);
-static void	VoodooLeaveVT(int scrnIndex, int flags);
-static Bool	VoodooCloseScreen(int scrnIndex, ScreenPtr pScreen);
+static Bool	VoodooScreenInit(SCREEN_INIT_ARGS_DECL);
+static Bool	VoodooEnterVT(VT_FUNC_ARGS_DECL);
+static void	VoodooLeaveVT(VT_FUNC_ARGS_DECL);
+static Bool	VoodooCloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool	VoodooSaveScreen(ScreenPtr pScreen, int mode);
-static void     VoodooFreeScreen(int scrnIndex, int flags);
+static void     VoodooFreeScreen(FREE_SCREEN_ARGS_DECL);
 static void     VoodooRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
 static void     VoodooRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
-static Bool	VoodooSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+static Bool	VoodooSwitchMode(SWITCH_MODE_ARGS_DECL);
 static Bool     VoodooModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
 static void     VoodooRestore(ScrnInfoPtr pScrn, Bool Closing);
 
@@ -580,7 +580,7 @@ VoodooPreInit(ScrnInfoPtr pScrn, int flags)
 /* Mandatory */
 /* This gets called at the start of each server generation */
 static Bool
-VoodooScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+VoodooScreenInit(SCREEN_INIT_ARGS_DECL)
 {
   ScrnInfoPtr pScrn;
   VoodooPtr pVoo;
@@ -592,7 +592,7 @@ VoodooScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
   /* 
    * First get the ScrnInfoRec
    */
-  pScrn = xf86Screens[pScreen->myNum];
+  pScrn = xf86ScreenToScrn(pScreen);
 
   pVoo = VoodooPTR(pScrn);
 
@@ -730,9 +730,9 @@ VoodooScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
 /* Mandatory */
 static Bool
-VoodooEnterVT(int scrnIndex, int flags)
+VoodooEnterVT(VT_FUNC_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   return VoodooModeInit(pScrn, pScrn->currentMode);
 }
 
@@ -745,9 +745,9 @@ VoodooEnterVT(int scrnIndex, int flags)
 
 /* Mandatory */
 static void
-VoodooLeaveVT(int scrnIndex, int flags)
+VoodooLeaveVT(VT_FUNC_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   VoodooRestore(pScrn, FALSE);
 }
 
@@ -760,9 +760,9 @@ VoodooLeaveVT(int scrnIndex, int flags)
 
 /* Mandatory */
 static Bool
-VoodooCloseScreen(int scrnIndex, ScreenPtr pScreen)
+VoodooCloseScreen(CLOSE_SCREEN_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
   VoodooPtr pVoo = VoodooPTR(pScrn);
 
   if (pScrn->vtSema)
@@ -780,7 +780,7 @@ VoodooCloseScreen(int scrnIndex, ScreenPtr pScreen)
   pScrn->vtSema = FALSE;
 
   pScreen->CloseScreen = pVoo->CloseScreen;
-  return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+  return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
 }
 
 
@@ -788,9 +788,9 @@ VoodooCloseScreen(int scrnIndex, ScreenPtr pScreen)
 
 /* Optional */
 static void
-VoodooFreeScreen(int scrnIndex, int flags)
+VoodooFreeScreen(FREE_SCREEN_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   VoodooPtr pVoo = VoodooPTR(pScrn);
   /*
    * This only gets called when a screen is being deleted.  It does not
@@ -798,7 +798,7 @@ VoodooFreeScreen(int scrnIndex, int flags)
    */
   if (pVoo && pVoo->ShadowPtr)
     free(pVoo->ShadowPtr);
-  VoodooFreeRec(xf86Screens[scrnIndex]);
+  VoodooFreeRec(pScrn);
 }
 
 
@@ -814,7 +814,7 @@ VoodooSaveScreen(ScreenPtr pScreen, int mode)
   unblank = xf86IsUnblank(mode);
   if(pScreen != NULL)
   {
-    pScrn = xf86Screens[pScreen->myNum];
+    pScrn = xf86ScreenToScrn(pScreen);
     pVoo = VoodooPTR(pScrn);
     
     if(pScrn->vtSema && (unblank == pVoo->Blanked))
@@ -878,11 +878,11 @@ VoodooModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
  *	this is needed but it does no harm.
  */
  
-static Bool VoodooSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+static Bool VoodooSwitchMode(SWITCH_MODE_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   VoodooSync(pScrn);
-  return VoodooModeInit(xf86Screens[scrnIndex], mode);
+  return VoodooModeInit(pScrn, mode);
 }
 
 static void     
diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c
index 364f33f..88e937d 100644
--- a/src/voodoo_hardware.c
+++ b/src/voodoo_hardware.c
@@ -811,7 +811,7 @@ void VoodooClear(VoodooPtr pVoo)
  
 void VoodooReadBank(ScreenPtr pScreen, int bank)
 {
-	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	VoodooPtr pVoo = VoodooPTR(pScrn);
 	if(bank)
 	{
@@ -828,7 +828,7 @@ void VoodooReadBank(ScreenPtr pScreen, int bank)
 
 void VoodooWriteBank(ScreenPtr pScreen, int bank)
 {
-	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	VoodooPtr pVoo = VoodooPTR(pScrn);
 	if(bank)
 	{
@@ -846,7 +846,7 @@ void VoodooWriteBank(ScreenPtr pScreen, int bank)
 #if 0
 static void VoodooReadWriteBank(ScreenPtr pScreen, int bank)
 {
-	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	VoodooPtr pVoo = VoodooPTR(pScrn);
 	if(bank)
 	{
@@ -1389,7 +1389,7 @@ CARD32 VoodooTextureFormats[3] = {PICT_a8r8g8b8, PICT_x8r8g8b8, 0};
 
 void Voodoo2XAAInit(ScreenPtr pScreen)
 {
-	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	VoodooPtr pVoo = VoodooPTR(pScrn);
 	XAAInfoRecPtr pAccel = XAACreateInfoRec();
 	BoxRec cacheArea;

commit 8c1121725c4dc1a81dd1af74b83405a1cb69562e
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 19 17:40:16 2011 -0500

    Drop useless vgaHW include
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c
index c2cf974..6dad301 100644
--- a/src/voodoo_driver.c
+++ b/src/voodoo_driver.c
@@ -54,7 +54,6 @@
 #include "xf86Pci.h"
 #include "xf86cmap.h"
 #include "shadowfb.h"
-#include "vgaHW.h"
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86RAC.h"
 #include "xf86Resources.h"

commit b835f5083cfef2aad6575277fb168a60bbb76af4
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 19 17:39:44 2011 -0500

    Fall back to shadowfb if XAA is unavailable
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c
index 70fefd2..c2cf974 100644
--- a/src/voodoo_driver.c
+++ b/src/voodoo_driver.c
@@ -561,8 +561,9 @@ VoodooPreInit(ScrnInfoPtr pScrn, int flags)
   }
 
   if (!xf86LoadSubModule(pScrn, "xaa")) {
-    VoodooFreeRec(pScrn);
-    return FALSE;
+      xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n");
+      pVoo->Accel = 0;
+      pVoo->ShadowFB = 1;
   }
   
   if(pVoo->ShadowFB)

commit d2f109c4179c13c3367b08f1ee4f4baa3a2a68ad
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat Oct 29 19:02:46 2011 -0700

    Fix implicit declaration warning
    
    voodoo_driver.c:898:7: warning: implicit declaration of function 'VoodooRestorePassThrough' [-Wimplicit-function-declaration]
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/voodoo.h b/src/voodoo.h
index 4f97a8a..11a62c9 100644
--- a/src/voodoo.h
+++ b/src/voodoo.h
@@ -102,7 +102,7 @@ extern void Voodoo2XAAInit(ScreenPtr pScreen);
 extern void VoodooSync(ScrnInfoPtr pScrn);
 extern void VoodooReadBank(ScreenPtr pScreen, int bank);
 extern void VoodooWriteBank(ScreenPtr pScreen, int bank);
-extern void VoodooReadBank(ScreenPtr pScreen, int bank);
+extern void VoodooRestorePassThrough(VoodooPtr pVoo);
 
 /*
  *	DGA

commit 614ccdf6a5dcc496d254aa361cc06ef70f2792f5
Author: Trevor Woerner <twoerner@gmail.com>
Date:   Fri Oct 22 14:51:16 2010 -0400

    Update xf86dgastr.h include.
    
    To xf86dgaproto.h.
    
    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c
index 6e2da51..146de84 100644
--- a/src/voodoo_dga.c
+++ b/src/voodoo_dga.c
@@ -53,7 +53,7 @@
 #include "voodoo.h"
 
 #define _XF86DGA_SERVER_
-#include <X11/extensions/xf86dgastr.h>
+#include <X11/extensions/xf86dgaproto.h>
 
 #include "opaque.h"
 #ifdef HAVE_XEXTPROTO_71
diff --git a/src/voodoo_driver.c b/src/voodoo_driver.c
index d5d5971..70fefd2 100644
--- a/src/voodoo_driver.c
+++ b/src/voodoo_driver.c
@@ -65,7 +65,7 @@
 #include "voodoo.h"
 
 #define _XF86DGA_SERVER_
-#include <X11/extensions/xf86dgastr.h>
+#include <X11/extensions/xf86dgaproto.h>
 
 #include "opaque.h"
 #ifdef HAVE_XEXTPROTO_71
diff --git a/src/voodoo_hardware.c b/src/voodoo_hardware.c
index 25859c7..364f33f 100644
--- a/src/voodoo_hardware.c
+++ b/src/voodoo_hardware.c
@@ -52,7 +52,7 @@
 
 #include "voodoo.h"
 
-#include <X11/extensions/xf86dgastr.h>
+#include <X11/extensions/xf86dgaproto.h>
 
 #include "opaque.h"
 #ifdef HAVE_XEXTPROTO_71

commit ae5f55acea3753ae83bd3b78bba86137f9b4b7f3
Author: Trevor Woerner <twoerner@gmail.com>
Date:   Fri Oct 22 14:51:01 2010 -0400

    Convert x+m/calloc/free to m/calloc/free.
    
    Signed-off-by: Trevor Woerner <twoerner@gmail.com>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>

diff --git a/src/voodoo_dga.c b/src/voodoo_dga.c
index 5b960e8..6e2da51 100644
--- a/src/voodoo_dga.c


Reply to: