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

xserver-xorg-video-cirrus: Changes to 'ubuntu'



Rebased ref, commits from common ancestor:
commit 1a6f1031c3dfd8fa85185e911e512a1b6b7f68d9
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Aug 22 10:45:14 2012 +0300

    Add fix-fallback.diff from upstream git, if a kernel driver is found don't try to claim the pci device. (LP: #1039648)

diff --git a/debian/changelog b/debian/changelog
index 26443f6..02d9ea7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-cirrus (1:1.5.1-0ubuntu2) quantal; urgency=low
+
+  * Add fix-fallback.diff from upstream git, if a kernel driver is found
+    don't try to claim the pci device. (LP: #1039648)
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 22 Aug 2012 10:42:50 +0300
+
 xserver-xorg-video-cirrus (1:1.5.1-0ubuntu1) quantal-proposed; urgency=low
 
   * Sync from unreleased debian git.
diff --git a/debian/control b/debian/control
index 7470065..889427d 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
 Source: xserver-xorg-video-cirrus
 Section: x11
 Priority: optional
-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
+Maintainer: Ubuntu X-SWAT <ubuntu-x@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
 Uploaders: Cyril Brulebois <kibi@debian.org>
 Build-Depends:
  debhelper (>= 8),
diff --git a/debian/patches/fix-fallback.diff b/debian/patches/fix-fallback.diff
new file mode 100644
index 0000000..7e543a9
--- /dev/null
+++ b/debian/patches/fix-fallback.diff
@@ -0,0 +1,45 @@
+commit bc04e9ed659be51a3c712f34a038bd60f639f9c5
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Aug 20 13:49:19 2012 +1000
+
+    cirrus: fix falling back after kernel check
+    
+    if we find a kernel driver the code leave the pci slot claimed which
+    stops us falling back. unclaim the pci slot.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+diff --git a/src/cir_driver.c b/src/cir_driver.c
+index 5468b6b..c8d5aae 100644
+--- a/src/cir_driver.c
++++ b/src/cir_driver.c
+@@ -237,9 +237,10 @@ CIRProbe(DriverPtr drv, int flags)
+ 				    CIRChipsets, CIRPciChipsets, devSections,
+  				    numDevSections, drv, &usedChips);
+     /* Free it since we don't need that list after this */
+-    free(devSections);
+-    if (numUsed <= 0)
++    if (numUsed <= 0) {
++        free(devSections);
+  	return FALSE;
++    }
+     if (flags & PROBE_DETECT)
+  	foundScreen = TRUE;
+     else for (i = 0; i < numUsed; i++) {
+@@ -257,6 +258,8 @@ CIRProbe(DriverPtr drv, int flags)
+                    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");
++	xf86UnclaimPciSlot(pPci, devSections[0]);
++        free(devSections);
+         return FALSE;
+     }
+ #endif
+@@ -290,6 +293,7 @@ CIRProbe(DriverPtr drv, int flags)
+  	    pScrn->Probe	 = NULL;
+  	}
+     }
++    free(devSections);
+     free(usedChips);
+      
+     return foundScreen;
diff --git a/debian/patches/series b/debian/patches/series
index 354eb33..7fa23bc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 10-qemu.diff
+fix-fallback.diff

commit b406bc7ca3d3f8e0f2ad2b91675089e17707b79b
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Aug 22 10:40:16 2012 +0300

    add previous changelog entry

diff --git a/debian/changelog b/debian/changelog
index b47b682..26443f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-cirrus (1:1.5.1-0ubuntu1) quantal-proposed; urgency=low
+
+  * Sync from unreleased debian git.
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 01 Aug 2012 17:31:56 +0300
+
 xserver-xorg-video-cirrus (1:1.5.1-1) UNRELEASED; urgency=low
 
   * New upstream release 1.5.1

commit 793c8649e5ce47298e3c488a85674328aac865db
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Jul 25 09:09:43 2012 +0200

    Bump changelog

diff --git a/ChangeLog b/ChangeLog
index d10418a..a5d1a48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+commit 129076c2a9c20ab515736bb7141b4f334699e21b
+Author: Dave Airlie <airlied@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 <airlied@redhat.com>
+
 commit e443ede15981549ff5f6b01f42c3cb8dc909d778
 Author: Dave Airlie <airlied@gmail.com>
 Date:   Fri Jul 13 14:47:40 2012 +1000

commit 8fc560784e21fdb773c3e21d7b732dff76f29256
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Jul 25 09:07:48 2012 +0200

    New upstream release 1.5.1

diff --git a/debian/changelog b/debian/changelog
index 363ed16..b47b682 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-xserver-xorg-video-cirrus (1:1.5.99~somegit) UNRELEASED; urgency=low
+xserver-xorg-video-cirrus (1:1.5.1-1) UNRELEASED; urgency=low
 
-  * New upstream release 1.5.0
+  * New upstream release 1.5.1
   * Require xserver 1.13rc1
   * Refresh 10-qemu.diff
 
diff --git a/debian/control b/debian/control
index cf053c5..7470065 100644
--- a/debian/control
+++ b/debian/control
@@ -16,7 +16,7 @@ Build-Depends:
  x11proto-render-dev,
  x11proto-xext-dev,
  xutils-dev
-Standards-Version: 3.9.1
+Standards-Version: 3.9.3
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-cirrus
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-cirrus.git
 

commit 129076c2a9c20ab515736bb7141b4f334699e21b
Author: Dave Airlie <airlied@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 <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index 1157ab1..dddf9ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-cirrus],
-        [1.5.0],
+        [1.5.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-cirrus])
 AC_CONFIG_SRCDIR([Makefile.am])

commit a3c79a44c306eb55c77fe227c04f2f133fd73215
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Jul 16 15:38:46 2012 +0200

    Refresh 10-qemu.diff

diff --git a/debian/changelog b/debian/changelog
index e08d0f2..363ed16 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ xserver-xorg-video-cirrus (1:1.5.99~somegit) UNRELEASED; urgency=low
 
   * New upstream release 1.5.0
   * Require xserver 1.13rc1
+  * Refresh 10-qemu.diff
 
  -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Mon, 16 Jul 2012 15:30:58 +0200
 
diff --git a/debian/patches/10-qemu.diff b/debian/patches/10-qemu.diff
index 4a5532d..7089205 100644
--- a/debian/patches/10-qemu.diff
+++ b/debian/patches/10-qemu.diff
@@ -5,10 +5,11 @@ Stolen from Fedora.
 Pointed out by Guido Günther <agx@sigxcpu.org> in #586693.
 --- a/src/alp_driver.c
 +++ b/src/alp_driver.c
-@@ -734,6 +734,20 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
+@@ -775,7 +775,21 @@
       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)) {
@@ -23,6 +24,7 @@ Pointed out by Guido Günther <agx@sigxcpu.org> in #586693.
 +	pScrn->monitor->maxPixClock = 65000;
 +     }
 +#endif
-  
++
       /* Probe the possible LCD display */
       AlpProbeLCD(pScrn);
+ 

commit c855e6d70261c02a32388b54c90f8b1ee42716f1
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Jul 16 15:32:29 2012 +0200

    Bump changelog

diff --git a/ChangeLog b/ChangeLog
index 9881813..d10418a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,57 @@
+commit e443ede15981549ff5f6b01f42c3cb8dc909d778
+Author: Dave Airlie <airlied@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 <airlied@redhat.com>
+
+commit 46a9e962c6f33509e89d664115a9a2db51c9b67d
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Mon Jul 2 11:57:59 2012 +0100
+
+    cirrus: bump to 1.5.0 for release.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 7ae890b29b12609d410f5558640bb0407b0fdd2d
+Author: Johannes Obermayr <johannesobermayr@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 <airlied@redhat.com>
+
+commit bab8041291ff81c81a98aca385cce561ecddc9d1
+Author: Dave Airlie <airlied@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 <airlied@redhat.com>
+
+commit 9a5e19597be4f5ee4c1030e4a716207789e78668
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Tue Jun 5 19:26:15 2012 +0100
+
+    cirrus: convert to compat server API.
+    
+    Signed-off-by: Dave Airlie <airlied@redhat.com>
+
+commit 2e35bc316d7b74feca177c87a49a8050a2a0ff00
+Author: Dave Airlie <airlied@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 <airlied@redhat.com>
+
 commit 52ae4d254fee97a215ac497a45b69b4c83470b2b
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 Date:   Fri Mar 23 18:48:04 2012 -0700

commit fd02fec2f7033d876815e43d02fa8a876db03d8c
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Mon Jul 16 15:32:16 2012 +0200

    New upstream release 1.5.0
    
    * New upstream release 1.5.0
    * Require xserver 1.13rc1

diff --git a/debian/changelog b/debian/changelog
index e4030f1..e08d0f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-cirrus (1:1.5.99~somegit) UNRELEASED; urgency=low
+
+  * New upstream release 1.5.0
+  * Require xserver 1.13rc1
+
+ -- Maarten Lankhorst <maarten.lankhorst@canonical.com>  Mon, 16 Jul 2012 15:30:58 +0200
+
 xserver-xorg-video-cirrus (1:1.4.0-1) unstable; urgency=low
 
   * New upstream release:
diff --git a/debian/control b/debian/control
index d2f1197..cf053c5 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Build-Depends:
  dh-autoreconf,
  quilt,
  pkg-config,
- xserver-xorg-dev (>= 2:1.9.4),
+ xserver-xorg-dev (>= 2:1.12.99.901),
  x11proto-video-dev,
  x11proto-core-dev,
  x11proto-fonts-dev,

commit e443ede15981549ff5f6b01f42c3cb8dc909d778
Author: Dave Airlie <airlied@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 <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index 1cc4d93..1157ab1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,24 @@ AC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[])
 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 --git a/src/alp.h b/src/alp.h
index a182d0c..c09e24b 100644
--- a/src/alp.h
+++ b/src/alp.h
@@ -40,8 +40,10 @@ typedef struct {
 } 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 --git a/src/alp_driver.c b/src/alp_driver.c
index d1300df..e38c613 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -1088,7 +1088,12 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 
 	/* 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;
@@ -1096,6 +1101,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 		}
 	}
 
+
 	/* Load ramdac if needed */
 	if (pCir->HWCursor) {
 		if (!xf86LoadSubModule(pScrn, "ramdac")) {
@@ -1650,10 +1656,12 @@ AlpScreenInit(SCREEN_INIT_ARGS_DECL)
 
 	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
@@ -1860,9 +1868,11 @@ AlpCloseScreen(CLOSE_SCREEN_ARGS_DECL)
 	    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;
diff --git a/src/alp_xaa.c b/src/alp_xaa.c
index 5a43357..b3ddd64 100644
--- a/src/alp_xaa.c
+++ b/src/alp_xaa.c
@@ -16,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); \
@@ -683,4 +684,4 @@ AlpXAAInit(ScreenPtr pScreen)
 
     return TRUE;
 }
-
+#endif
diff --git a/src/alp_xaam.c b/src/alp_xaam.c
index 79f621d..8e9fd52 100644
--- a/src/alp_xaam.c
+++ b/src/alp_xaam.c
@@ -17,6 +17,7 @@
 #define _ALP_PRIVATE_
 #include "alp.h"
 
+#ifdef HAVE_XAA_H
 #ifdef DEBUG
 #define minb(p) \
         (ErrorF("minb(%X)\n", p),\
@@ -266,7 +267,4 @@ AlpXAAInitMMIO(ScreenPtr pScreen)
 	return TRUE;
 }
 
-
-
-
-
+#endif
diff --git a/src/cir.h b/src/cir.h
index 3915a31..0a5d403 100644
--- a/src/cir.h
+++ b/src/cir.h
@@ -4,7 +4,9 @@
 #define CIR_H
 
 #include "xf86Cursor.h"
+#ifdef HAVE_XAA_H
 #include "xaa.h"
+#endif
 #include "xf86i2c.h"
 #include <string.h>
 #include <stdlib.h>
@@ -44,7 +46,9 @@ typedef struct {
 	Bool			NoAccel;
 	Bool			HWCursor;
 	Bool			UseMMIO;
+#ifdef HAVE_XAA_H
 	XAAInfoRecPtr		AccelInfoRec;
+#endif
 	xf86CursorInfoPtr	CursorInfoRec;
 	int			DGAnumModes;
 	DGAModePtr		DGAModes;
diff --git a/src/cir_dga.c b/src/cir_dga.c
index b841be3..bf3a9dd 100644
--- a/src/cir_dga.c
+++ b/src/cir_dga.c
@@ -30,8 +30,10 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xf86Pci.h"
+#ifdef HAVE_XAA_H
 #include "xaa.h"
 #include "xaalocal.h"
+#endif
 #include "vgaHW.h"
 #include "cir.h"
 #include "dgaproc.h"
@@ -39,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 = {
@@ -56,9 +60,13 @@ DGAFunctionRec CirDGAFuncs = {
    Cir_SetMode,
    Cir_SetViewport,
    Cir_GetViewport,
+#ifdef HAVE_XAA_H
    Cir_Sync,
    Cir_FillRect,
    Cir_BlitRect,
+#else
+   NULL, NULL, NULL,
+#endif
    NULL  /* Cir_BlitTransRect */
 };
 
@@ -207,14 +215,12 @@ Cir_GetViewport(
     return pCir->DGAViewportStatus;
 }
 
-
-
+#ifdef HAVE_XAA_H
 static void 
 Cir_Sync(
    ScrnInfoPtr pScrn
 ){
     CirPtr pCir = CIRPTR(pScrn);
-
     if(pCir->AccelInfoRec) {
 	(*pCir->AccelInfoRec->Sync)(pScrn);
     }
@@ -255,3 +261,4 @@ Cir_BlitRect(
 	SET_SYNC_FLAG(pCir->AccelInfoRec);
     }
 }
+#endif
diff --git a/src/lg.h b/src/lg.h
index 985f634..fa716d6 100644
--- a/src/lg.h
+++ b/src/lg.h
@@ -59,8 +59,10 @@ typedef struct {
 /* 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 --git a/src/lg_driver.c b/src/lg_driver.c
index ab613d8..13f222d 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -797,7 +797,12 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 
 	/* 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;
@@ -1375,10 +1380,12 @@ LgScreenInit(SCREEN_INIT_ARGS_DECL)
 	 */
 	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))
@@ -1609,9 +1616,11 @@ LgCloseScreen(CLOSE_SCREEN_ARGS_DECL)
 	CirUnmapMem(pCir, pScrn->scrnIndex);
 	}
 
+#ifdef HAVE_XAA_H
 	if (pCir->AccelInfoRec)
 		XAADestroyInfoRec(pCir->AccelInfoRec);
 	pCir->AccelInfoRec = NULL;
+#endif
 
 	if (pCir->CursorInfoRec)
 		xf86DestroyCursorInfoRec(pCir->CursorInfoRec);
diff --git a/src/lg_xaa.c b/src/lg_xaa.c
index 45ecea7..5e6e72e 100644
--- a/src/lg_xaa.c
+++ b/src/lg_xaa.c
@@ -26,6 +26,8 @@
 #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. */
@@ -296,4 +298,4 @@ LgSubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1,
 	LgSETDSTXY(x2, y2);
 	LgSETEXTENTS(w, h);
 }
-
+#endif

commit 46a9e962c6f33509e89d664115a9a2db51c9b67d
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Jul 2 11:57:59 2012 +0100

    cirrus: bump to 1.5.0 for release.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/configure.ac b/configure.ac
index e6e22f5..1cc4d93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-cirrus],
-        [1.4.0],
+        [1.5.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-cirrus])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 7ae890b29b12609d410f5558640bb0407b0fdd2d
Author: Johannes Obermayr <johannesobermayr@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 <airlied@redhat.com>

diff --git a/src/compat-api.h b/src/compat-api.h
index 6bc946f..205ac59 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -46,7 +46,7 @@
 #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 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

commit bab8041291ff81c81a98aca385cce561ecddc9d1
Author: Dave Airlie <airlied@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 <airlied@redhat.com>

diff --git a/src/CirrusClk.c b/src/CirrusClk.c
index 6fd6270..a8b24ac 100644
--- a/src/CirrusClk.c
+++ b/src/CirrusClk.c
@@ -17,7 +17,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86PciInfo.h"
 #include "xf86Pci.h"
 
 #include "cir.h"
diff --git a/src/alp_driver.c b/src/alp_driver.c
index 77a5ba9..d1300df 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -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"
 
diff --git a/src/alp_hwcurs.c b/src/alp_hwcurs.c
index 97c72e1..afab7a0 100644
--- a/src/alp_hwcurs.c
+++ b/src/alp_hwcurs.c
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff --git a/src/alp_i2c.c b/src/alp_i2c.c
index 7365215..9341543 100644
--- a/src/alp_i2c.c
+++ b/src/alp_i2c.c
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff --git a/src/alp_xaa.c b/src/alp_xaa.c
index cc8c0d9..5a43357 100644
--- a/src/alp_xaa.c
+++ b/src/alp_xaa.c
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff --git a/src/alp_xaam.c b/src/alp_xaam.c
index 42bbb31..79f621d 100644
--- a/src/alp_xaam.c
+++ b/src/alp_xaam.c
@@ -10,7 +10,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff --git a/src/cir_dga.c b/src/cir_dga.c
index 44abfd9..b841be3 100644
--- a/src/cir_dga.c
+++ b/src/cir_dga.c
@@ -30,7 +30,6 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 #include "xaa.h"
 #include "xaalocal.h"
 #include "vgaHW.h"
diff --git a/src/cir_driver.c b/src/cir_driver.c
index c6967da..5468b6b 100644
--- a/src/cir_driver.c
+++ b/src/cir_driver.c
@@ -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"
 
diff --git a/src/cir_pcirename.h b/src/cir_pcirename.h
index 669b8fe..c1fb249 100644
--- a/src/cir_pcirename.h
+++ b/src/cir_pcirename.h
@@ -146,4 +146,28 @@ typedef struct pci_device *pciVideoPtr;
 
 #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 --git a/src/cir_shadow.c b/src/cir_shadow.c
index 5dc8d08..a9b425b 100644
--- a/src/cir_shadow.c
+++ b/src/cir_shadow.c
@@ -9,7 +9,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86PciInfo.h"
 #include "xf86Pci.h"
 #include "shadowfb.h"
 #include "servermd.h"
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 1ae6765..ab613d8 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -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"
 
diff --git a/src/lg_hwcurs.c b/src/lg_hwcurs.c
index 80d1dff..4012db0 100644
--- a/src/lg_hwcurs.c
+++ b/src/lg_hwcurs.c
@@ -20,7 +20,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff --git a/src/lg_i2c.c b/src/lg_i2c.c
index 145cc2e..3e8c962 100644
--- a/src/lg_i2c.c
+++ b/src/lg_i2c.c
@@ -9,7 +9,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 
diff --git a/src/lg_xaa.c b/src/lg_xaa.c
index 7abfb20..45ecea7 100644
--- a/src/lg_xaa.c
+++ b/src/lg_xaa.c
@@ -20,7 +20,6 @@
 #include "compiler.h"
 
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 
 #include "vgaHW.h"
 

commit 9a5e19597be4f5ee4c1030e4a716207789e78668
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jun 5 19:26:15 2012 +0100

    cirrus: convert to compat server API.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index f2cb24f..c649b3d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,7 +34,8 @@ cirrus_drv_la_SOURCES = \
          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 --git a/src/alp_driver.c b/src/alp_driver.c
index 2e19461..77a5ba9 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -92,20 +92,20 @@ static void AlpProbeI2C(int scrnIndex);
 /* 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 +781,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
      }
      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);
@@ -1457,9 +1457,9 @@ AlpRestore(ScrnInfoPtr pScrn)
 /* 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 +1473,6 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	ErrorF("AlpScreenInit\n");
 #endif
 


Reply to: