Hello community,

here is the log from the commit of package xf86-video-cirrus for 
openSUSE:Factory checked in at 2012-09-18 14:00:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-video-cirrus (Old)
 and      /work/SRC/openSUSE:Factory/.xf86-video-cirrus.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xf86-video-cirrus", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-video-cirrus/xf86-video-cirrus.changes      
2012-06-01 18:55:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xf86-video-cirrus.new/xf86-video-cirrus.changes 
2012-09-18 14:00:18.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Sep 14 10:51:21 UTC 2012 - sndir...@suse.com
+
+- Update to version 1.5.1
+  * handle server with no XAA
+- adjusted u_cirrus-qemu.patch
+
+-------------------------------------------------------------------

Old:
----
  xf86-video-cirrus-1.4.0.tar.bz2

New:
----
  xf86-video-cirrus-1.5.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xf86-video-cirrus.spec ++++++
--- /var/tmp/diff_new_pack.FV1Ami/_old  2012-09-18 14:00:20.000000000 +0200
+++ /var/tmp/diff_new_pack.FV1Ami/_new  2012-09-18 14:00:20.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           xf86-video-cirrus
-Version:        1.4.0
+Version:        1.5.1
 Release:        0
 Summary:        Cirrus Logic video driver for the Xorg X server
 License:        MIT

++++++ u_cirrus-qemu.patch ++++++
--- /var/tmp/diff_new_pack.FV1Ami/_old  2012-09-18 14:00:20.000000000 +0200
+++ /var/tmp/diff_new_pack.FV1Ami/_new  2012-09-18 14:00:20.000000000 +0200
@@ -1,14 +1,14 @@
-diff -up xf86-video-cirrus-1.2.0/src/alp_driver.c.jx 
xf86-video-cirrus-1.2.0/src/alp_driver.c
---- xf86-video-cirrus-1.2.0/src/alp_driver.c.jx        2008-03-19 
10:29:23.000000000 -0400
-+++ xf86-video-cirrus-1.2.0/src/alp_driver.c   2009-02-27 10:59:27.000000000 
-0500
-@@ -812,6 +812,12 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
+--- xf86-video-cirrus-1.5.1/src/alp_driver.c.orig      2012-09-14 
14:02:24.477314000 +0200
++++ xf86-video-cirrus-1.5.1/src/alp_driver.c   2012-09-14 14:02:28.610956000 
+0200
+@@ -775,6 +775,13 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
       else
        xf86SetDDCproperties(pScrn,xf86PrintEDID(
-           xf86DoEDID_DDC2(pScrn->scrnIndex,pCir->I2CPtr1)));
+                xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn),pCir->I2CPtr1)));
++
 +#ifdef XSERVER_LIBPCIACCESS
 +     if (!pScrn->monitor->DDC &&
-+       ((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4)) {
-+        pCir->NoAccel = TRUE;
++      ((pCir->PciInfo->subvendor_id & 0xffff) == 0x1af4)) {
++      pCir->NoAccel = TRUE;
 +     }
 +#endif
   

++++++ xf86-video-cirrus-1.4.0.tar.bz2 -> xf86-video-cirrus-1.5.1.tar.bz2 ++++++
++++ 26569 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/ChangeLog new/xf86-video-cirrus-1.5.1/ChangeLog
--- old/xf86-video-cirrus-1.4.0/ChangeLog       2012-03-24 02:49:00.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/ChangeLog       2012-07-17 08:19:40.000000000 
+0200
@@ -1,3 +1,65 @@
+commit 129076c2a9c20ab515736bb7141b4f334699e21b
+Author: Dave Airlie <airl...@redhat.com>
+Date:   Tue Jul 17 16:05:09 2012 +1000
+
+    xf86-video-cirrus: bump to version 1.5.1
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit e443ede15981549ff5f6b01f42c3cb8dc909d778
+Author: Dave Airlie <airl...@gmail.com>
+Date:   Fri Jul 13 14:47:40 2012 +1000
+
+    cirrus: handle server with no XAA
+    
+    this fixes cirrus to work with a server with no XAA module.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit 46a9e962c6f33509e89d664115a9a2db51c9b67d
+Author: Dave Airlie <airl...@redhat.com>
+Date:   Mon Jul 2 11:57:59 2012 +0100
+
+    cirrus: bump to 1.5.0 for release.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit 7ae890b29b12609d410f5558640bb0407b0fdd2d
+Author: Johannes Obermayr <johannesoberm...@gmx.de>
+Date:   Sat Jun 9 11:29:02 2012 +0100
+
+    use int scrnIndex instead of int i in macro SCREEN_INIT_ARGS_DECL.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit bab8041291ff81c81a98aca385cce561ecddc9d1
+Author: Dave Airlie <airl...@redhat.com>
+Date:   Tue Jun 5 19:35:39 2012 +0100
+
+    cirrus: drop xf86PciInfo.
+    
+    This drops usage of deprecated header file.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit 9a5e19597be4f5ee4c1030e4a716207789e78668
+Author: Dave Airlie <airl...@redhat.com>
+Date:   Tue Jun 5 19:26:15 2012 +0100
+
+    cirrus: convert to compat server API.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
+commit 2e35bc316d7b74feca177c87a49a8050a2a0ff00
+Author: Dave Airlie <airl...@redhat.com>
+Date:   Thu May 17 10:23:34 2012 +0100
+
+    cirrus: don't bind if there is a PCI kernel driver loaded.
+    
+    this should ensure we end up using -modesetting under kms.
+    
+    Signed-off-by: Dave Airlie <airl...@redhat.com>
+
 commit 52ae4d254fee97a215ac497a45b69b4c83470b2b
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Fri Mar 23 18:48:04 2012 -0700
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/config.h.in new/xf86-video-cirrus-1.5.1/config.h.in
--- old/xf86-video-cirrus-1.4.0/config.h.in     2012-03-24 02:48:25.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/config.h.in     2012-07-17 08:19:40.000000000 
+0200
@@ -32,6 +32,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the <xaa.h> header file. */
+#undef HAVE_XAA_H
+
 /* Have 1bpp support */
 #undef HAVE_XF1BPP
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/configure.ac 
new/xf86-video-cirrus-1.5.1/configure.ac
--- old/xf86-video-cirrus-1.4.0/configure.ac    2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/configure.ac    2012-07-17 08:00:16.000000000 
+0200
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-cirrus],
-        [1.4.0],
+        [1.5.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-cirrus])
 AC_CONFIG_SRCDIR([Makefile.am])
@@ -72,6 +72,24 @@
 AC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[])
 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])
     XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/missing new/xf86-video-cirrus-1.5.1/missing
--- old/xf86-video-cirrus-1.4.0/missing 2012-03-24 02:48:26.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/missing 2012-06-05 20:13:26.000000000 +0200
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@
   help2man     touch the output file
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -122,15 +121,6 @@
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
@@ -226,7 +216,7 @@
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +246,7 @@
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -318,41 +308,6 @@
     touch $file
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
 WARNING: \`$1' is needed, and is $msg.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/CirrusClk.c 
new/xf86-video-cirrus-1.5.1/src/CirrusClk.c
--- old/xf86-video-cirrus-1.4.0/src/CirrusClk.c 2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/CirrusClk.c 2012-06-05 20:35:08.000000000 
+0200
@@ -17,7 +17,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86PciInfo.h"
 #include "xf86Pci.h"
 
 #include "cir.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/Makefile.am 
new/xf86-video-cirrus-1.5.1/src/Makefile.am
--- old/xf86-video-cirrus-1.4.0/src/Makefile.am 2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/Makefile.am 2012-06-05 20:13:08.000000000 
+0200
@@ -34,7 +34,8 @@
          cir.h \
          CirrusClk.c \
          cir_shadow.c \
-         cir_pcirename.h
+         cir_pcirename.h \
+         compat-api.h
 
 cirrus_alpine_la_LTLIBRARIES = cirrus_alpine.la
 cirrus_alpine_la_LDFLAGS = -module -avoid-version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/alp.h new/xf86-video-cirrus-1.5.1/src/alp.h
--- old/xf86-video-cirrus-1.4.0/src/alp.h       2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/alp.h       2012-07-16 04:02:41.000000000 
+0200
@@ -40,8 +40,10 @@
 } AlpRegRec, *AlpRegPtr;
 
 extern Bool AlpHWCursorInit(ScreenPtr pScreen, int size);
+#ifdef HAVE_XAA_H
 extern Bool AlpXAAInit(ScreenPtr pScreen);
 extern Bool AlpXAAInitMMIO(ScreenPtr pScreen);
+#endif
 extern Bool AlpDGAInit(ScreenPtr pScreen);
 extern Bool AlpI2CInit(ScrnInfoPtr pScrn);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/alp_driver.c 
new/xf86-video-cirrus-1.5.1/src/alp_driver.c
--- old/xf86-video-cirrus-1.4.0/src/alp_driver.c        2012-03-24 
02:48:16.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/src/alp_driver.c        2012-07-16 
04:02:41.000000000 +0200
@@ -24,13 +24,6 @@
 /* Everything using inb/outb, etc needs "compiler.h" */
 #include "compiler.h"
 
-/* Drivers for PCI hardware need this */
-#include "xf86PciInfo.h"
-
-#ifndef PCI_CHIP_GD7556  /*  for old xf86PciInfo.h  */
-#define PCI_CHIP_GD7556            0x004C
-#endif
-
 /* Drivers that need to access the PCI config space directly need this */
 #include "xf86Pci.h"
 
@@ -92,20 +85,20 @@
 /* Mandatory functions */
 
 Bool AlpPreInit(ScrnInfoPtr pScrn, int flags);
-Bool AlpScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv);
-Bool AlpEnterVT(int scrnIndex, int flags);
-void AlpLeaveVT(int scrnIndex, int flags);
-static Bool    AlpCloseScreen(int scrnIndex, ScreenPtr pScreen);
+Bool AlpScreenInit(SCREEN_INIT_ARGS_DECL);
+Bool AlpEnterVT(VT_FUNC_ARGS_DECL);
+void AlpLeaveVT(VT_FUNC_ARGS_DECL);
+static Bool    AlpCloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool    AlpSaveScreen(ScreenPtr pScreen, int mode);
 
 /* Required if the driver supports mode switching */
-Bool AlpSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+Bool AlpSwitchMode(SWITCH_MODE_ARGS_DECL);
 /* Required if the driver supports moving the viewport */
-void AlpAdjustFrame(int scrnIndex, int x, int y, int flags);
+void AlpAdjustFrame(ADJUST_FRAME_ARGS_DECL);
 
 /* Optional functions */
-void AlpFreeScreen(int scrnIndex, int flags);
-ModeStatus AlpValidMode(int scrnIndex, DisplayModePtr mode,
+void AlpFreeScreen(FREE_SCREEN_ARGS_DECL);
+ModeStatus AlpValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
                        Bool verbose, int flags);
 /* Internally used functions */
 static void    AlpSave(ScrnInfoPtr pScrn);
@@ -781,7 +774,7 @@
      }
      else
        xf86SetDDCproperties(pScrn,xf86PrintEDID(
-           xf86DoEDID_DDC2(pScrn->scrnIndex,pCir->I2CPtr1)));
+                xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn),pCir->I2CPtr1)));
  
      /* Probe the possible LCD display */
      AlpProbeLCD(pScrn);
@@ -1095,7 +1088,12 @@
 
        /* Load XAA if needed */
        if (!pCir->NoAccel) {
-               if (!xf86LoadSubModule(pScrn, "xaa")) {
+#ifdef HAVE_XAA_H
+               if (!xf86LoadSubModule(pScrn, "xaa"))
+#else
+               if (1)
+#endif
+                {
                        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                                   "Falling back to shadowfb\n");
                        pCir->NoAccel = TRUE;
@@ -1103,6 +1101,7 @@
                }
        }
 
+
        /* Load ramdac if needed */
        if (pCir->HWCursor) {
                if (!xf86LoadSubModule(pScrn, "ramdac")) {
@@ -1457,9 +1456,9 @@
 /* This gets called at the start of each server generation */
 
 Bool
-AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+AlpScreenInit(SCREEN_INIT_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn;
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
        vgaHWPtr hwp;
        CirPtr pCir;
        int i, ret;
@@ -1473,11 +1472,6 @@
        ErrorF("AlpScreenInit\n");
 #endif
 
-       /*
-        * First get the ScrnInfoRec
-        */
-       pScrn = xf86Screens[pScreen->myNum];
-
        hwp = VGAHWPTR(pScrn);
        pCir = CIRPTR(pScrn);
        
@@ -1513,7 +1507,7 @@
        AlpSaveScreen(pScreen, SCREEN_SAVER_ON);
 
        /* Set the viewport */
-       AlpAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+       AlpAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, 
pScrn->frameY0));
 
        /*
         * The next step is to setup the screen's visuals, and initialise the
@@ -1591,7 +1585,7 @@
            init_picture = 1;
            break;
        default:
-           xf86DrvMsg(scrnIndex, X_ERROR,
+           xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                       "X11: Internal error: invalid bpp (%d) in 
AlpScreenInit\n",
                       pScrn->bitsPerPixel);
            ret = FALSE;
@@ -1662,10 +1656,12 @@
 
        if (!pCir->NoAccel) { /* Initialize XAA functions */
            AlpOffscreenAccelInit(pScrn);
+#ifdef HAVE_XAA_H
            if (!(pCir->UseMMIO ? AlpXAAInitMMIO(pScreen) :
                  AlpXAAInit(pScreen)))
              xf86DrvMsg(pScrn->scrnIndex, X_ERROR, 
                         "Could not initialize XAA\n");
+#endif
        }
 
 #if 1
@@ -1747,9 +1743,10 @@
 
 /* Usually mandatory */
 Bool
-AlpSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+AlpSwitchMode(SWITCH_MODE_ARGS_DECL)
 {
-       return AlpModeInit(xf86Screens[scrnIndex], mode);
+       SCRN_INFO_PTR(arg);
+       return AlpModeInit(pScrn, mode);
 }
 
 
@@ -1759,13 +1756,12 @@
  */
 /* Usually mandatory */
 void
-AlpAdjustFrame(int scrnIndex, int x, int y, int flags)
+AlpAdjustFrame(ADJUST_FRAME_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn;
+       SCRN_INFO_PTR(arg);
        int Base, tmp;
        vgaHWPtr hwp;
 
-       pScrn = xf86Screens[scrnIndex];
        hwp = VGAHWPTR(pScrn);
 
        Base = ((y * pScrn->displayWidth + x) / 8);
@@ -1803,9 +1799,9 @@
 
 /* Mandatory */
 Bool
-AlpEnterVT(int scrnIndex, int flags)
+AlpEnterVT(VT_FUNC_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       SCRN_INFO_PTR(arg);
        CirPtr pCir = CIRPTR(pScrn);
        Bool ret;
 
@@ -1833,9 +1829,9 @@
 
 /* Mandatory */
 void
-AlpLeaveVT(int scrnIndex, int flags)
+AlpLeaveVT(VT_FUNC_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       SCRN_INFO_PTR(arg);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
 #ifdef ALP_DEBUG
        ErrorF("AlpLeaveVT\n");
@@ -1860,9 +1856,9 @@
 
 /* Mandatory */
 static Bool
-AlpCloseScreen(int scrnIndex, ScreenPtr pScreen)
+AlpCloseScreen(CLOSE_SCREEN_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
        CirPtr pCir = CIRPTR(pScrn);
 
@@ -1872,9 +1868,11 @@
            CirUnmapMem(pCir, pScrn->scrnIndex);
        }
 
+#ifdef HAVE_XAA_H
        if (pCir->AccelInfoRec)
                XAADestroyInfoRec(pCir->AccelInfoRec);
        pCir->AccelInfoRec = NULL;
+#endif
        if (pCir->CursorInfoRec)
                xf86DestroyCursorInfoRec(pCir->CursorInfoRec);
        pCir->CursorInfoRec = NULL;
@@ -1891,7 +1889,7 @@
 #endif
 
        pScreen->CloseScreen = pCir->CloseScreen;
-       return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+       return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
 }
 
 
@@ -1899,8 +1897,9 @@
 
 /* Optional */
 void
-AlpFreeScreen(int scrnIndex, int flags)
+AlpFreeScreen(FREE_SCREEN_ARGS_DECL)
 {
+       SCRN_INFO_PTR(arg);
 #ifdef ALP_DEBUG
        ErrorF("AlpFreeScreen\n");
 #endif
@@ -1909,8 +1908,8 @@
         * get called routinely at the end of a server generation.
         */
        if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
-               vgaHWFreeHWRec(xf86Screens[scrnIndex]);
-       AlpFreeRec(xf86Screens[scrnIndex]);
+               vgaHWFreeHWRec(pScrn);
+       AlpFreeRec(pScrn);
 }
 
 
@@ -1918,7 +1917,7 @@
 
 /* Optional */
 ModeStatus
-AlpValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+AlpValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
 {
        int lace;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/alp_hwcurs.c 
new/xf86-video-cirrus-1.5.1/src/alp_hwcurs.c
--- old/xf86-video-cirrus-1.4.0/src/alp_hwcurs.c        2012-03-24 
02:48:16.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/src/alp_hwcurs.c        2012-06-05 
20:33:56.000000000 +0200
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
@@ -187,7 +186,7 @@
 static Bool
 AlpUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
 {
-       ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 #ifdef ALP_DEBUG
        ErrorF("AlpUseHWCursor\n");
 #endif
@@ -200,7 +199,7 @@
 Bool
 AlpHWCursorInit(ScreenPtr pScreen, int size)
 {
-       ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
        const CirPtr pCir = CIRPTR(pScrn);
        const AlpPtr pAlp = ALPPTR(pCir);
        
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/alp_i2c.c 
new/xf86-video-cirrus-1.5.1/src/alp_i2c.c
--- old/xf86-video-cirrus-1.4.0/src/alp_i2c.c   2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/alp_i2c.c   2012-06-05 20:35:25.000000000 
+0200
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/alp_xaa.c 
new/xf86-video-cirrus-1.5.1/src/alp_xaa.c
--- old/xf86-video-cirrus-1.4.0/src/alp_xaa.c   2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/alp_xaa.c   2012-07-16 04:02:41.000000000 
+0200
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
@@ -17,6 +16,7 @@
 #define _ALP_PRIVATE_
 #include "alp.h"
 
+#ifdef HAVE_XAA_H
 #define WAIT   outb(pCir->PIOReg, 0x31); \
                while(inb(pCir->PIOReg + 1) & pCir->chip.alp->waitMsk){};
 #define WAIT_1 outb(pCir->PIOReg, 0x31); \
@@ -588,7 +588,7 @@
 Bool
 AlpXAAInit(ScreenPtr pScreen)
 {
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     CirPtr pCir = CIRPTR(pScrn);
     AlpPtr pAlp = ALPPTR(pCir);
     XAAInfoRecPtr XAAPtr;
@@ -684,4 +684,4 @@
 
     return TRUE;
 }
-
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/alp_xaam.c 
new/xf86-video-cirrus-1.5.1/src/alp_xaam.c
--- old/xf86-video-cirrus-1.4.0/src/alp_xaam.c  2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/alp_xaam.c  2012-07-16 04:02:41.000000000 
+0200
@@ -10,7 +10,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
@@ -18,6 +17,7 @@
 #define _ALP_PRIVATE_
 #include "alp.h"
 
+#ifdef HAVE_XAA_H
 #ifdef DEBUG
 #define minb(p) \
         (ErrorF("minb(%X)\n", p),\
@@ -222,7 +222,7 @@
 Bool
 AlpXAAInitMMIO(ScreenPtr pScreen)
 {
-       ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
        CirPtr pCir = CIRPTR(pScrn);
        XAAInfoRecPtr XAAPtr;
        
@@ -267,7 +267,4 @@
        return TRUE;
 }
 
-
-
-
-
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/cir.h new/xf86-video-cirrus-1.5.1/src/cir.h
--- old/xf86-video-cirrus-1.4.0/src/cir.h       2012-03-24 02:48:16.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/cir.h       2012-07-16 04:02:41.000000000 
+0200
@@ -4,11 +4,14 @@
 #define CIR_H
 
 #include "xf86Cursor.h"
+#ifdef HAVE_XAA_H
 #include "xaa.h"
+#endif
 #include "xf86i2c.h"
 #include <string.h>
 #include <stdlib.h>
 
+#include "compat-api.h"
 #include "cir_pcirename.h"
 
 /* Card-specific driver information */
@@ -43,7 +46,9 @@
        Bool                    NoAccel;
        Bool                    HWCursor;
        Bool                    UseMMIO;
+#ifdef HAVE_XAA_H
        XAAInfoRecPtr           AccelInfoRec;
+#endif
        xf86CursorInfoPtr       CursorInfoRec;
        int                     DGAnumModes;
        DGAModePtr              DGAModes;
@@ -59,7 +64,7 @@
        int                     rotate;
        int                     ShadowPitch;
        unsigned char *         ShadowPtr;
-       void                    (*PointerMoved)(int index, int x, int y);
+       void                    (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int 
y);
        int                     pitch;
 
        unsigned char **        ScanlineColorExpandBuffers;
@@ -85,7 +90,7 @@
 extern Bool CirDGAInit(ScreenPtr pScreen);
 
 /* in cir_shadow.c */
-void cirPointerMoved(int index, int x, int y);
+void cirPointerMoved(SCRN_ARG_TYPE arg, int x, int y);
 void cirRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
 void cirRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
 void cirRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/cir_dga.c 
new/xf86-video-cirrus-1.5.1/src/cir_dga.c
--- old/xf86-video-cirrus-1.4.0/src/cir_dga.c   2012-03-24 02:48:17.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/cir_dga.c   2012-07-16 04:02:41.000000000 
+0200
@@ -30,9 +30,10 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
+#ifdef HAVE_XAA_H
 #include "xaa.h"
 #include "xaalocal.h"
+#endif
 #include "vgaHW.h"
 #include "cir.h"
 #include "dgaproc.h"
@@ -40,15 +41,17 @@
 static Bool Cir_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, 
                                  int *, int *, int *);
 static Bool Cir_SetMode(ScrnInfoPtr, DGAModePtr);
-static void Cir_Sync(ScrnInfoPtr);
 static int  Cir_GetViewport(ScrnInfoPtr);
 static void Cir_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef HAVE_XAA_H
+static void Cir_Sync(ScrnInfoPtr);
 static void Cir_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
 static void Cir_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
 /*
 static void Cir_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, 
                                 unsigned long);
 */
+#endif
 
 static
 DGAFunctionRec CirDGAFuncs = {
@@ -57,9 +60,13 @@
    Cir_SetMode,
    Cir_SetViewport,
    Cir_GetViewport,
+#ifdef HAVE_XAA_H
    Cir_Sync,
    Cir_FillRect,
    Cir_BlitRect,
+#else
+   NULL, NULL, NULL,
+#endif
    NULL  /* Cir_BlitTransRect */
 };
 
@@ -69,7 +76,7 @@
 _X_EXPORT Bool
 CirDGAInit(ScreenPtr pScreen)
 {
-  ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+  ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
   CirPtr pCir = CIRPTR(pScrn);
   DGAModePtr modes = NULL, newmodes = NULL, currentMode;
   DisplayModePtr pMode, firstMode;
@@ -191,7 +198,7 @@
    CirPtr pCir = CIRPTR(pScrn);
    vgaHWPtr hwp = VGAHWPTR(pScrn);
 
-   pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags);
+   pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y));
 
    while((hwp->readST01(hwp) & 0x08));
    while(!(hwp->readST01(hwp) & 0x08));
@@ -208,14 +215,12 @@
     return pCir->DGAViewportStatus;
 }
 
-
-
+#ifdef HAVE_XAA_H
 static void 
 Cir_Sync(
    ScrnInfoPtr pScrn
 ){
     CirPtr pCir = CIRPTR(pScrn);
-
     if(pCir->AccelInfoRec) {
        (*pCir->AccelInfoRec->Sync)(pScrn);
     }
@@ -256,3 +261,4 @@
        SET_SYNC_FLAG(pCir->AccelInfoRec);
     }
 }
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/cir_driver.c 
new/xf86-video-cirrus-1.5.1/src/cir_driver.c
--- old/xf86-video-cirrus-1.4.0/src/cir_driver.c        2012-03-24 
02:48:17.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/src/cir_driver.c        2012-06-05 
20:34:31.000000000 +0200
@@ -24,13 +24,6 @@
 #endif
 /* All drivers need this */
 
-/* Drivers for PCI hardware need this */
-#include "xf86PciInfo.h"
-
-#ifndef PCI_CHIP_GD7556  /*  for old xf86PciInfo.h  */
-#define PCI_CHIP_GD7556            0x004C
-#endif
-
 /* Drivers that need to access the PCI config space directly need this */
 #include "xf86Pci.h"
 
@@ -256,6 +249,17 @@
           they should be handled in this driver (as opposed to their
           own driver). */
        pPci = xf86GetPciInfoForEntity(usedChips[i]);
+
+#ifdef XSERVER_LIBPCIACCESS
+    if (pci_device_has_kernel_driver(pPci)) {
+        xf86DrvMsg(0, X_ERROR,
+                   "cirrus: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has 
a kernel module claiming it.\n",
+                   pPci->device_id, pPci->bus, pPci->domain, pPci->dev, 
pPci->func);
+        xf86DrvMsg(0, X_ERROR,
+                   "cirrus: This driver cannot operate until it has been 
unloaded.\n");
+        return FALSE;
+    }
+#endif
        pScrn = NULL;
        if (pPci && (PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GD5462 ||
                     PCI_DEV_DEVICE_ID(pPci) == PCI_CHIP_GD5464 ||
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/cir_pcirename.h 
new/xf86-video-cirrus-1.5.1/src/cir_pcirename.h
--- old/xf86-video-cirrus-1.4.0/src/cir_pcirename.h     2012-03-24 
02:48:17.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/src/cir_pcirename.h     2012-06-05 
20:33:40.000000000 +0200
@@ -146,4 +146,28 @@
 
 #endif /* XSERVER_LIBPCIACCESS */
 
+#ifndef _XF86_PCIINFO_H
+
+#define PCI_VENDOR_CIRRUS              0x1013
+/* Cirrus Logic */
+#define PCI_CHIP_GD7548                        0x0038
+#define PCI_CHIP_GD7555                        0x0040
+#define PCI_CHIP_GD7556                 0x004C
+#define PCI_CHIP_GD5430                        0x00A0
+#define PCI_CHIP_GD5434_4              0x00A4
+#define PCI_CHIP_GD5434_8              0x00A8
+#define PCI_CHIP_GD5436                        0x00AC
+#define PCI_CHIP_GD5446                        0x00B8
+#define PCI_CHIP_GD5480                        0x00BC
+#define PCI_CHIP_GD5462                        0x00D0
+#define PCI_CHIP_GD5464                        0x00D4
+#define PCI_CHIP_GD5464BD              0x00D5
+#define PCI_CHIP_GD5465                        0x00D6
+#define PCI_CHIP_6729                  0x1100
+#define PCI_CHIP_6832                  0x1110
+#define PCI_CHIP_GD7542                        0x1200
+#define PCI_CHIP_GD7543                        0x1202
+#define PCI_CHIP_GD7541                        0x1204
+
+#endif
 #endif /* CIRPCIRENAME_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/cir_shadow.c 
new/xf86-video-cirrus-1.5.1/src/cir_shadow.c
--- old/xf86-video-cirrus-1.4.0/src/cir_shadow.c        2012-03-24 
02:48:17.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/src/cir_shadow.c        2012-06-05 
20:35:18.000000000 +0200
@@ -9,7 +9,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86PciInfo.h"
 #include "xf86Pci.h"
 #include "shadowfb.h"
 #include "servermd.h"
@@ -44,9 +43,9 @@
 } 
 
 _X_EXPORT void
-cirPointerMoved(int index, int x, int y)
+cirPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
 {
-    ScrnInfoPtr pScrn = xf86Screens[index];
+    SCRN_INFO_PTR(arg);
     CirPtr pCir = CIRPTR(pScrn);
     int newX, newY;
 
@@ -58,7 +57,7 @@
        newY = pScrn->pScreen->width - x - 1;
     }
 
-    (*pCir->PointerMoved)(index, newX, newY);
+    (*pCir->PointerMoved)(arg, newX, newY);
 }
 
 _X_EXPORT void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/compat-api.h 
new/xf86-video-cirrus-1.5.1/src/compat-api.h
--- old/xf86-video-cirrus-1.4.0/src/compat-api.h        1970-01-01 
01:00:00.000000000 +0100
+++ new/xf86-video-cirrus-1.5.1/src/compat-api.h        2012-06-09 
12:28:27.000000000 +0200
@@ -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 <airl...@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 scrnIndex, 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/lg.h new/xf86-video-cirrus-1.5.1/src/lg.h
--- old/xf86-video-cirrus-1.4.0/src/lg.h        2012-03-24 02:48:17.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/lg.h        2012-07-16 04:02:41.000000000 
+0200
@@ -59,8 +59,10 @@
 /* lg_driver.c */
 extern LgLineDataRec LgLineData[];
 
+#ifdef HAVE_XAA_H
 /* lg_xaa.c */
 extern Bool LgXAAInit(ScreenPtr pScreen);
+#endif
 
 /* lg_hwcurs.c */
 extern Bool LgHWCursorInit(ScreenPtr pScreen);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/lg_driver.c 
new/xf86-video-cirrus-1.5.1/src/lg_driver.c
--- old/xf86-video-cirrus-1.4.0/src/lg_driver.c 2012-03-24 02:48:17.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/lg_driver.c 2012-07-16 04:02:41.000000000 
+0200
@@ -28,9 +28,6 @@
 
 #include "compiler.h"
 
-/* Drivers for PCI hardware need this */
-#include "xf86PciInfo.h"
-
 /* Drivers that need to access the PCI config space directly need this */
 #include "xf86Pci.h"
 
@@ -78,20 +75,20 @@
 
 /* Mandatory functions */
 Bool LgPreInit(ScrnInfoPtr pScrn, int flags);
-Bool LgScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv);
-Bool LgEnterVT(int scrnIndex, int flags);
-void LgLeaveVT(int scrnIndex, int flags);
-static Bool    LgCloseScreen(int scrnIndex, ScreenPtr pScreen);
+Bool LgScreenInit(SCREEN_INIT_ARGS_DECL);
+Bool LgEnterVT(VT_FUNC_ARGS_DECL);
+void LgLeaveVT(VT_FUNC_ARGS_DECL);
+static Bool    LgCloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool    LgSaveScreen(ScreenPtr pScreen, Bool mode);
 
 /* Required if the driver supports mode switching */
-Bool LgSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+Bool LgSwitchMode(SWITCH_MODE_ARGS_DECL);
 /* Required if the driver supports moving the viewport */
-void LgAdjustFrame(int scrnIndex, int x, int y, int flags);
+void LgAdjustFrame(ADJUST_FRAME_ARGS_DECL);
 
 /* Optional functions */
-void LgFreeScreen(int scrnIndex, int flags);
-ModeStatus LgValidMode(int scrnIndex, DisplayModePtr mode,
+void LgFreeScreen(FREE_SCREEN_ARGS_DECL);
+ModeStatus LgValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
                       Bool verbose, int flags);
 
 /* Internally used functions */
@@ -800,7 +797,12 @@
 
        /* Load XAA if needed */
        if (!pCir->NoAccel) {
-               if (!xf86LoadSubModule(pScrn, "xaa")) {
+#ifdef HAVE_XAA_H
+               if (!xf86LoadSubModule(pScrn, "xaa"))
+#else
+               if (1)
+#endif
+                {
                        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                                   "Falling back to shadowfb\n");
                        pCir->NoAccel = TRUE;
@@ -1232,10 +1234,10 @@
 /* This gets called at the start of each server generation */
 
 Bool
-LgScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+LgScreenInit(SCREEN_INIT_ARGS_DECL)
 {
        /* The vgaHW references will disappear one day */
-       ScrnInfoPtr pScrn;
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
        vgaHWPtr hwp;
        CirPtr pCir;
        int i, ret;
@@ -1247,11 +1249,6 @@
        ErrorF("LgScreenInit\n");
 #endif
 
-       /*
-        * First get the ScrnInfoRec
-        */
-       pScrn = xf86Screens[pScreen->myNum];
-
        hwp = VGAHWPTR(pScrn);
 
        hwp->MapSize = 0x10000;         /* Standard 64k VGA window */
@@ -1281,7 +1278,7 @@
        LgSaveScreen(pScreen, SCREEN_SAVER_ON);
 
        /* Set the viewport */
-       LgAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+       LgAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
 
        /*
         * The next step is to setup the screen's visuals, and initialise the
@@ -1344,7 +1341,7 @@
                                displayWidth,pScrn->bitsPerPixel);
            break;
        default:
-               xf86DrvMsg(scrnIndex, X_ERROR,
+               xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                           "X11: Internal error: invalid bpp (%d) in 
LgScreenInit\n",
                           pScrn->bitsPerPixel);
                ret = FALSE;
@@ -1383,10 +1380,12 @@
         */
        xf86SetBlackWhitePixels(pScreen);
 
+#ifdef HAVE_XAA_H
        if (!pCir->NoAccel) { /* Initialize XAA functions */
                if (!LgXAAInit(pScreen))
                        xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not 
initialize XAA\n");
        }
+#endif
 #if 1
        pCir->DGAModeInit = LgModeInit;
        if (!CirDGAInit(pScreen))
@@ -1443,9 +1442,10 @@
 
 /* Usually mandatory */
 Bool
-LgSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+LgSwitchMode(SWITCH_MODE_ARGS_DECL)
 {
-       return LgModeInit(xf86Screens[scrnIndex], mode);
+       SCRN_INFO_PTR(arg);
+       return LgModeInit(pScrn, mode);
 }
 
 #define ROUND_DOWN(x, mod)     (((x) / (mod)) * (mod))
@@ -1457,9 +1457,9 @@
  */
 /* Usually mandatory */
 void
-LgAdjustFrame(int scrnIndex, int x, int y, int flags)
+LgAdjustFrame(ADJUST_FRAME_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       SCRN_INFO_PTR(arg);
        int Base, tmp;
        CirPtr pCir = CIRPTR(pScrn);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
@@ -1545,9 +1545,9 @@
 
 /* Mandatory */
 Bool
-LgEnterVT(int scrnIndex, int flags)
+LgEnterVT(VT_FUNC_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       SCRN_INFO_PTR(arg);
        CirPtr pCir = CIRPTR(pScrn);
 #ifdef LG_DEBUG
        ErrorF("LgEnterVT\n");
@@ -1572,9 +1572,9 @@
 
 /* Mandatory */
 void
-LgLeaveVT(int scrnIndex, int flags)
+LgLeaveVT(VT_FUNC_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       SCRN_INFO_PTR(arg);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
        CirPtr pCir = CIRPTR(pScrn);
 #ifdef LG_DEBUG
@@ -1600,9 +1600,9 @@
 
 /* Mandatory */
 static Bool
-LgCloseScreen(int scrnIndex, ScreenPtr pScreen)
+LgCloseScreen(CLOSE_SCREEN_ARGS_DECL)
 {
-       ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+       ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
        vgaHWPtr hwp = VGAHWPTR(pScrn);
        CirPtr pCir = CIRPTR(pScrn);
 
@@ -1616,9 +1616,11 @@
        CirUnmapMem(pCir, pScrn->scrnIndex);
        }
 
+#ifdef HAVE_XAA_H
        if (pCir->AccelInfoRec)
                XAADestroyInfoRec(pCir->AccelInfoRec);
        pCir->AccelInfoRec = NULL;
+#endif
 
        if (pCir->CursorInfoRec)
                xf86DestroyCursorInfoRec(pCir->CursorInfoRec);
@@ -1631,7 +1633,7 @@
        pScrn->vtSema = FALSE;
 
        pScreen->CloseScreen = pCir->CloseScreen;
-       return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+       return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
 }
 
 
@@ -1639,8 +1641,9 @@
 
 /* Optional */
 void
-LgFreeScreen(int scrnIndex, int flags)
+LgFreeScreen(FREE_SCREEN_ARGS_DECL)
 {
+       SCRN_INFO_PTR(arg);
 #ifdef LG_DEBUG
        ErrorF("LgFreeScreen\n");
 #endif
@@ -1649,8 +1652,8 @@
         * get called routinely at the end of a server generation.
         */
        if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
-               vgaHWFreeHWRec(xf86Screens[scrnIndex]);
-       LgFreeRec(xf86Screens[scrnIndex]);
+               vgaHWFreeHWRec(pScrn);
+       LgFreeRec(pScrn);
 }
 
 
@@ -1658,7 +1661,7 @@
 
 /* Optional */
 ModeStatus
-LgValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+LgValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
 {
        int lace;
 
@@ -1684,14 +1687,14 @@
 static Bool
 LgSaveScreen(ScreenPtr pScreen, int mode)
 {
-       CirPtr pCir = CIRPTR(xf86Screens[pScreen->myNum]);
+       CirPtr pCir = CIRPTR(xf86ScreenToScrn(pScreen));
        ScrnInfoPtr pScrn = NULL;
        Bool unblank;
 
        unblank = xf86IsUnblank(mode);
 
        if (pScreen != NULL)
-           pScrn = xf86Screens[pScreen->myNum];
+           pScrn = xf86ScreenToScrn(pScreen);
 
        if (pScrn != NULL && pScrn->vtSema) {
            if (unblank)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/lg_hwcurs.c 
new/xf86-video-cirrus-1.5.1/src/lg_hwcurs.c
--- old/xf86-video-cirrus-1.4.0/src/lg_hwcurs.c 2012-03-24 02:48:17.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/lg_hwcurs.c 2012-06-05 20:34:51.000000000 
+0200
@@ -20,7 +20,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
@@ -328,7 +327,7 @@
  */
 static Bool LgUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
 {
-  ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+  ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 
 #ifdef LG_CURSOR_DEBUG
   ErrorF("LgUseHWCursor\n");
@@ -346,7 +345,7 @@
  */
 Bool LgHWCursorInit(ScreenPtr pScreen)
 {
-  ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+  ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
   CirPtr pCir = CIRPTR(pScrn);
   xf86CursorInfoPtr infoPtr;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/lg_i2c.c 
new/xf86-video-cirrus-1.5.1/src/lg_i2c.c
--- old/xf86-video-cirrus-1.4.0/src/lg_i2c.c    2012-03-24 02:48:17.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/lg_i2c.c    2012-06-05 20:34:47.000000000 
+0200
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xf86-video-cirrus-1.4.0/src/lg_xaa.c 
new/xf86-video-cirrus-1.5.1/src/lg_xaa.c
--- old/xf86-video-cirrus-1.4.0/src/lg_xaa.c    2012-03-24 02:48:17.000000000 
+0100
+++ new/xf86-video-cirrus-1.5.1/src/lg_xaa.c    2012-07-16 04:02:41.000000000 
+0200
@@ -20,13 +20,14 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
 #include "cir.h"
 #define _LG_PRIVATE_
 #include "lg.h"
+
+#ifdef HAVE_XAA_H
 #include "lg_xaa.h"
 
 /* Laguna raster operations, source is OP1 and destination is OP0. */
@@ -98,7 +99,7 @@
 Bool
 LgXAAInit(ScreenPtr pScreen)
 {
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     CirPtr pCir = CIRPTR(pScrn);
     XAAInfoRecPtr XAAPtr;
 
@@ -297,4 +298,4 @@
        LgSETDSTXY(x2, y2);
        LgSETEXTENTS(w, h);
 }
-
+#endif

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to