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

xserver-xorg-video-cirrus: Changes to 'upstream-unstable'



Rebased ref, commits from common ancestor:
commit 52ae4d254fee97a215ac497a45b69b4c83470b2b
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Mar 23 18:48:04 2012 -0700

    xf86-video-cirrus 1.4.0
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

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

commit 3fade932efae82c0ebd81a93aeaffd4e63640736
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Mar 13 18:36:15 2012 -0400

    alpine: Fix int10 setup
    
    The PC98-removal fix accidentally took out the non-PC98 path here.
    
    Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index 11cd2f2..2e19461 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -534,7 +534,10 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 			      PCI_DEV_FUNC(pCir->PciInfo));
 
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
-    if (!xf86IsPc98() && xf86LoadSubModule(pScrn, "int10")) {
+    if (!xf86IsPc98())
+#endif
+    if (xf86LoadSubModule(pScrn, "int10"))
+    {
 	xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
 	pInt = xf86InitInt10(pCir->pEnt->index);
 	xf86FreeInt10(pInt);
@@ -546,7 +549,6 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	PCI_WRITE_LONG(pCir->PciInfo, PCI_REGION_BASE(pCir->PciInfo, 0, REGION_MEM), 0x10);
 	PCI_WRITE_LONG(pCir->PciInfo, PCI_REGION_BASE(pCir->PciInfo, 1, REGION_MEM), 0x14);
     }
-#endif
 
     /* Set pScrn->monitor */
 	pScrn->monitor = pScrn->confScreen->monitor;

commit cbca35e71ed553f331a7eaa1525dad1dbe2a4904
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 20 13:56:42 2011 -0500

    Typo fix
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/lg_driver.c b/src/lg_driver.c
index 6577fa5..d4301e1 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -801,7 +801,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 	/* Load XAA if needed */
 	if (!pCir->NoAccel) {
 		if (!xf86LoadSubModule(pScrn, "xaa")) {
-			xf86DrvMsg(pScrn->scrnInfo, X_INFO,
+			xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 				   "Falling back to shadowfb\n");
 			pCir->NoAccel = TRUE;
 			pCir->shadowFB = TRUE;

commit f422d0c38b0befdb2152215ab05d0d14f3da3ed9
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 19 17:46:26 2011 -0500

    Fix for new vgaHW ABI
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index ecdd807..11cd2f2 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -503,6 +503,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	if (!vgaHWGetHWRec(pScrn))
 		return FALSE;
 	hwp = VGAHWPTR(pScrn);
+	vgaHWSetStdFuncs(hwp);
 	vgaHWGetIOBase(hwp);
 
 	/* Allocate the AlpRec driverPrivate */
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 80b5b02..6577fa5 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -364,6 +364,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 		return FALSE;
 
 	hwp = VGAHWPTR(pScrn);
+	vgaHWSetStdFuncs(hwp);
 	vgaHWGetIOBase(hwp);
 
 	/* Allocate the LgRec driverPrivate */

commit 92c7067070455610bd761b73f992642882ca2156
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 19 16:21:51 2011 -0500

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

diff --git a/src/alp_driver.c b/src/alp_driver.c
index d3d8e4f..ecdd807 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -1093,8 +1093,10 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	/* Load XAA if needed */
 	if (!pCir->NoAccel) {
 		if (!xf86LoadSubModule(pScrn, "xaa")) {
-			AlpFreeRec(pScrn);
-			return FALSE;
+			xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+				   "Falling back to shadowfb\n");
+			pCir->NoAccel = TRUE;
+			pCir->shadowFB = TRUE;
 		}
 	}
 
diff --git a/src/lg_driver.c b/src/lg_driver.c
index fc864f8..80b5b02 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -800,8 +800,10 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 	/* Load XAA if needed */
 	if (!pCir->NoAccel) {
 		if (!xf86LoadSubModule(pScrn, "xaa")) {
-			LgFreeRec(pScrn);
-			return FALSE;
+			xf86DrvMsg(pScrn->scrnInfo, X_INFO,
+				   "Falling back to shadowfb\n");
+			pCir->NoAccel = TRUE;
+			pCir->shadowFB = TRUE;
 		}
 	}
 

commit d9c9cc333e8a67749c20b3b30129f4d2297a3e0a
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sun Oct 30 20:34:47 2011 -0700

    Build fix for older servers (error: conflicting types for 'pciTag')
    
    /usr/include/xorg/xf86Pci.h:254:25: note: previous declaration of 'pciTag' was here
    
    Reported-by: Johannes Obermayr <johannesobermayr@gmx.de>
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/cir_pcirename.h b/src/cir_pcirename.h
index fa60a19..669b8fe 100644
--- a/src/cir_pcirename.h
+++ b/src/cir_pcirename.h
@@ -34,6 +34,10 @@ enum region_type {
     REGION_IO 
 };
 
+#include "xf86Module.h"
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12
+
 #if (defined(__alpha__) || defined(__ia64__)) && defined (linux)
 #define PCI_DOM_MASK    0x01fful
 #else
@@ -55,6 +59,7 @@ pciTag(int busnum, int devnum, int funcnum)
 
 	return tag;
 }
+#endif /* GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 12 */
 
 #ifndef XSERVER_LIBPCIACCESS
 

commit 05fd00f46eb3be46d669921d11dff6fe8a5bb60b
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat Oct 29 16:58:41 2011 -0700

    pciTag was removed from xorg-server, so provide it in-driver until this is updated to use libpciaccess
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/cir_pcirename.h b/src/cir_pcirename.h
index f0f5cf8..fa60a19 100644
--- a/src/cir_pcirename.h
+++ b/src/cir_pcirename.h
@@ -34,6 +34,28 @@ enum region_type {
     REGION_IO 
 };
 
+#if (defined(__alpha__) || defined(__ia64__)) && defined (linux)
+#define PCI_DOM_MASK    0x01fful
+#else
+#define PCI_DOM_MASK 0x0ffu
+#endif
+
+#ifndef PCI_DOM_MASK
+# define PCI_DOM_MASK 0x0ffu
+#endif
+#define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu)
+
+static inline uint32_t
+pciTag(int busnum, int devnum, int funcnum)
+{
+	uint32_t tag;
+	tag  = (busnum & (PCI_DOMBUS_MASK)) << 16;
+	tag |= (devnum & 0x00001fu) << 11;
+	tag |= (funcnum & 0x000007u) << 8;
+
+	return tag;
+}
+
 #ifndef XSERVER_LIBPCIACCESS
 
 /* pciVideoPtr */

commit 1a4dc3fb35223b708f27746b9d30a068a046cf3a
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat Oct 29 16:47:43 2011 -0700

    Disable PC98 code on newer servers.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index 79a1598..d3d8e4f 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -121,8 +121,10 @@ static void AlpOffscreenAccelInit(ScrnInfoPtr pScrn);
 static void	AlpDisplayPowerManagementSet(ScrnInfoPtr pScrn,
 											int PowerManagementMode, int flags);
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 static void PC98CIRRUS755xEnable(ScrnInfoPtr pScrn);
 static void PC98CIRRUS755xDisable(ScrnInfoPtr pScrn);
+#endif
 
 /*
  * This is intentionally screen-independent.  It indicates the binding
@@ -530,6 +532,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 			      PCI_DEV_DEV(pCir->PciInfo),
 			      PCI_DEV_FUNC(pCir->PciInfo));
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
     if (!xf86IsPc98() && xf86LoadSubModule(pScrn, "int10")) {
 	xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
 	pInt = xf86InitInt10(pCir->pEnt->index);
@@ -541,8 +544,8 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 
 	PCI_WRITE_LONG(pCir->PciInfo, PCI_REGION_BASE(pCir->PciInfo, 0, REGION_MEM), 0x10);
 	PCI_WRITE_LONG(pCir->PciInfo, PCI_REGION_BASE(pCir->PciInfo, 1, REGION_MEM), 0x14);
-	
     }
+#endif
 
     /* Set pScrn->monitor */
 	pScrn->monitor = pScrn->confScreen->monitor;
@@ -1408,8 +1411,10 @@ AlpModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 
 	vgaHWProtect(pScrn, FALSE);
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	if (xf86IsPc98())
 		PC98CIRRUS755xEnable(pScrn);
+#endif
 
 	return TRUE;
 }
@@ -1834,8 +1839,10 @@ AlpLeaveVT(int scrnIndex, int flags)
 	AlpRestore(pScrn);
 	vgaHWLock(hwp);
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	if (xf86IsPc98())
 		PC98CIRRUS755xDisable(pScrn);
+#endif
 }
 
 
@@ -1873,8 +1880,10 @@ AlpCloseScreen(int scrnIndex, ScreenPtr pScreen)
 
 	pScrn->vtSema = FALSE;
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	if (xf86IsPc98())
 		PC98CIRRUS755xDisable(pScrn);
+#endif
 
 	pScreen->CloseScreen = pCir->CloseScreen;
 	return (*pScreen->CloseScreen)(scrnIndex, pScreen);
@@ -2139,6 +2148,7 @@ AlpOffscreenAccelInit(ScrnInfoPtr pScrn)
     }
 }
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 static void
 PC98CIRRUS755xEnable(ScrnInfoPtr pScrn)  /*  enter_aile()  */
 {
@@ -2186,4 +2196,4 @@ PC98CIRRUS755xDisable(ScrnInfoPtr pScrn)  /*  leave_aile()  */
    outb(0x6a, 0x69);
    outb(0x6a, 0x06);
 }
-
+#endif

commit 28aef0c4a45288751b2d5b7d5d0c452a116a5b38
Author: Satoshi KImura <satosi.kimura@nifty.ne.jp>
Date:   Fri Oct 21 15:34:41 2011 -0700

    Add support for the NEC PC-9821
    
    https://bugs.freedesktop.org/show_bug.cgi?id=1837
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index 3153484..79a1598 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -27,6 +27,10 @@
 /* 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"
 
@@ -117,6 +121,9 @@ static void AlpOffscreenAccelInit(ScrnInfoPtr pScrn);
 static void	AlpDisplayPowerManagementSet(ScrnInfoPtr pScrn,
 											int PowerManagementMode, int flags);
 
+static void PC98CIRRUS755xEnable(ScrnInfoPtr pScrn);
+static void PC98CIRRUS755xDisable(ScrnInfoPtr pScrn);
+
 /*
  * This is intentionally screen-independent.  It indicates the binding
  * choice made in the first PreInit.
@@ -151,6 +158,8 @@ static int gd5430_MaxClocks[] = {  85500,  85500,  50000,  28500,      0 };
 static int gd5446_MaxClocks[] = { 135100, 135100,  85500,  85500,      0 };
 static int gd5480_MaxClocks[] = { 135100, 200000, 200000, 135100, 135100 };
 static int gd7548_MaxClocks[] = {  80100,  80100,  80100,  80100,  80100 };
+static int gd7555_MaxClocks[] = {  80100,  80100,  80100,  80100,  80100 };
+static int gd7556_MaxClocks[] = {  80100,  80100,  80100,  80100,  80100 };
 
 #ifdef XFree86LOADER
 
@@ -383,6 +392,11 @@ AlpCountRam(ScrnInfoPtr pScrn)
 			break;
 	}
 	break;
+
+    case PCI_CHIP_GD7555:
+    case PCI_CHIP_GD7556:
+	videoram = 2048;   /*  for PC-9821 La13 etc.  */
+	break;
     }
 
     /* UNMap the Alp memory and MMIO areas */
@@ -516,7 +530,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 			      PCI_DEV_DEV(pCir->PciInfo),
 			      PCI_DEV_FUNC(pCir->PciInfo));
 
-    if (xf86LoadSubModule(pScrn, "int10")) {
+    if (!xf86IsPc98() && xf86LoadSubModule(pScrn, "int10")) {
 	xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n");
 	pInt = xf86InitInt10(pCir->pEnt->index);
 	xf86FreeInt10(pInt);
@@ -607,6 +621,16 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 
 	from = X_DEFAULT;
 	pCir->HWCursor = FALSE;
+
+	switch (pCir->Chipset) {
+	case PCI_CHIP_GD7555:
+	case PCI_CHIP_GD7556:
+	  pCir->HWCursor = TRUE;
+	  break;
+	default:
+	  break;
+	}
+
 	if (xf86GetOptValBool(pCir->Options, OPTION_HW_CURSOR, &pCir->HWCursor))
 		from = X_CONFIG;
 
@@ -894,6 +918,12 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 		case PCI_CHIP_GD7548:
 		        p = gd7548_MaxClocks;
                         break;
+		case PCI_CHIP_GD7555:
+		        p = gd7555_MaxClocks;
+                        break;
+		case PCI_CHIP_GD7556:
+		        p = gd7556_MaxClocks;
+                        break;
 		}
 		if (!p)
 			return FALSE;
@@ -1378,6 +1408,9 @@ AlpModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 
 	vgaHWProtect(pScrn, FALSE);
 
+	if (xf86IsPc98())
+		PC98CIRRUS755xEnable(pScrn);
+
 	return TRUE;
 }
 
@@ -1800,6 +1833,9 @@ AlpLeaveVT(int scrnIndex, int flags)
 
 	AlpRestore(pScrn);
 	vgaHWLock(hwp);
+
+	if (xf86IsPc98())
+		PC98CIRRUS755xDisable(pScrn);
 }
 
 
@@ -1837,6 +1873,9 @@ AlpCloseScreen(int scrnIndex, ScreenPtr pScreen)
 
 	pScrn->vtSema = FALSE;
 
+	if (xf86IsPc98())
+		PC98CIRRUS755xDisable(pScrn);
+
 	pScreen->CloseScreen = pCir->CloseScreen;
 	return (*pScreen->CloseScreen)(scrnIndex, pScreen);
 }
@@ -2099,3 +2138,52 @@ AlpOffscreenAccelInit(ScrnInfoPtr pScrn)
 		   box.y2 - pScrn->virtualY);
     }
 }
+
+static void
+PC98CIRRUS755xEnable(ScrnInfoPtr pScrn)  /*  enter_aile()  */
+{
+   unsigned int  index,data;
+   vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+   outb(0xfac, 0x02);
+
+   outb(0x68, 0x0e);
+   outb(0x6a, 0x07);
+   outb(0x6a, 0x8f);
+   outb(0x6a, 0x06);
+
+   outw(VGA_SEQ_INDEX, 0x1206);         /*  unlock cirrus special  */
+
+   index = hwp->IOBase + VGA_CRTC_INDEX_OFFSET;
+   data  = hwp->IOBase + VGA_CRTC_DATA_OFFSET;
+   outb(index, 0x3c);
+   outb(data,  inb(data) & 0xef);
+   outb(index, 0x1a);
+   outb(data,  inb(data) & 0xf3);
+}
+
+static void
+PC98CIRRUS755xDisable(ScrnInfoPtr pScrn)  /*  leave_aile()  */
+{
+   unsigned int  index,data;
+   vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+   outw(VGA_SEQ_INDEX, 0x1206);         /*  unlock cirrus special  */
+
+   index = hwp->IOBase + VGA_CRTC_INDEX_OFFSET;
+   data  = hwp->IOBase + VGA_CRTC_DATA_OFFSET;
+   outb(index, 0x3c);
+   outb(data,  0x71);
+   outb(index, 0x1a);
+   outb(data,  inb(data) | 0x0c);
+
+   outb(0xfac,0x00);
+
+   outb(0x68, 0x0f);
+   outb(0x6a, 0x07);
+   outb(0x6a, 0x8e);
+   outb(0x6a, 0x21);
+   outb(0x6a, 0x69);
+   outb(0x6a, 0x06);
+}
+
diff --git a/src/cir_driver.c b/src/cir_driver.c
index e427700..7e470bb 100644
--- a/src/cir_driver.c
+++ b/src/cir_driver.c
@@ -27,6 +27,10 @@
 /* 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"
 
@@ -88,6 +92,8 @@ SymTabRec CIRChipsets[] = {
 	{ PCI_CHIP_GD5464BD,	"CL-GD5464BD" },
 	{ PCI_CHIP_GD5465,		"CL-GD5465" },
 	{ PCI_CHIP_GD7548,              "CL-GD7548" },
+	{ PCI_CHIP_GD7555,              "CL-GD7555" },
+	{ PCI_CHIP_GD7556,              "CL-GD7556" },
 	{-1,					NULL }
 };
 
@@ -105,6 +111,8 @@ _X_EXPORT PciChipsets CIRPciChipsets[] = {
 	{ PCI_CHIP_GD5464BD,PCI_CHIP_GD5464BD,	RES_SHARED_VGA },
 	{ PCI_CHIP_GD5465,	PCI_CHIP_GD5465,	RES_SHARED_VGA },
 	{ PCI_CHIP_GD7548,	PCI_CHIP_GD7548,	RES_SHARED_VGA },
+	{ PCI_CHIP_GD7555,	PCI_CHIP_GD7555,	RES_SHARED_VGA },
+	{ PCI_CHIP_GD7556,	PCI_CHIP_GD7556,	RES_SHARED_VGA },
 	{ -1,				-1,					RES_UNDEFINED}
 };
 

commit f5a8080f149a2f2658b7773ae7db7c67c52c4199
Author: Stefan Potyra <sistpoty@ubuntu.com>
Date:   Thu Oct 20 14:44:44 2011 -0700

    Limit the maximul pitch of GD5436 and GD5446
    
    Limit the maximum supported pitch of the GD5446 to 4088, since the internal
    pitch register is only 9 bit (and contains the pitch left shifted by 3).
    
    See https://bugs.freedesktop.org/show_bug.cgi?id=23775
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index e773471..3153484 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -405,6 +405,8 @@ GetAccelPitchValues(ScrnInfoPtr pScrn)
 {
 	int *linePitches = NULL;
 	int i, n = 0;
+	int max_pitch;
+
 	CirPtr pCir = CIRPTR(pScrn);
 
 	/* XXX ajv - 512, 576, and 1536 may not be supported
@@ -421,8 +423,21 @@ GetAccelPitchValues(ScrnInfoPtr pScrn)
 							1280, 1536, 1600, 1920, 2048, 0 };
 #endif
 
+	switch (pCir->Chipset) {
+	case PCI_CHIP_GD5436:
+	case PCI_CHIP_GD5446:
+		max_pitch = 0x1ff << 3;
+		break;
+
+	default:
+		/* FIXME max_pitch for other chipsets? */
+		max_pitch = (pScrn->bitsPerPixel / 8) * 2048;
+		break;
+	}
+
 	for (i = 0; accelWidths[i] != 0; i++) {
-		if (accelWidths[i] % pCir->Rounding == 0) {
+		if ((accelWidths[i] % pCir->Rounding == 0)
+		 && ((accelWidths[i] * pScrn->bitsPerPixel / 8) <= max_pitch)) {
 			n++;
 			linePitches = xnfrealloc(linePitches, n * sizeof(int));
 			linePitches[n - 1] = accelWidths[i];

commit 9fcfd1aa760023e449cbb8c1eebd0bb570a6aacb
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Oct 19 00:12:15 2011 -0700

    Build fix for ABI Version 12
    
    ABI Version 12 removes support for multiple PCI domains.  If you need to
    use this driver on a system with more than one PCI domain, you should
    either port this driver to using libpciaccess directly or stick with an
    older server.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index edcaef3..e773471 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -480,7 +480,12 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 
 	pCir = CIRPTR(pScrn);
 	pCir->pScrn = pScrn;
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	pCir->PIOReg = hwp->PIOOffset + 0x3CE;
+#else
+	pCir->PIOReg = 0x3CE;
+#endif
 
 	/* Get the entity, and make sure it is PCI. */
 	pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
diff --git a/src/cir.h b/src/cir.h
index 64531f5..861966d 100644
--- a/src/cir.h
+++ b/src/cir.h
@@ -21,7 +21,7 @@ typedef struct {
 	CARD32			properties;
 	pciVideoPtr		PciInfo;
 	PCITAG			PciTag;
-	IOADDRESS		PIOReg;
+	unsigned long		PIOReg;
     union {
 	struct lgRec		*lg;
 	struct alpRec		*alp;
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 0f9f1f6..fc864f8 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -372,7 +372,12 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 
 	pCir = CIRPTR(pScrn);
 	pCir->pScrn = pScrn;
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
 	pCir->PIOReg = hwp->PIOOffset + 0x3CE;
+#else
+	pCir->PIOReg = 0x3CE;
+#endif
 
 	/* Get the entity, and make sure it is PCI. */
 	pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);

commit 80f60e4af0e0b124335c5a09cad0b1eb42583536
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Oct 17 01:42:00 2011 -0700

    Use malloc/calloc/realloc/free directly
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index d73eab8..edcaef3 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -246,7 +246,7 @@ AlpFreeRec(ScrnInfoPtr pScrn)
 {
 	if (pScrn->driverPrivate == NULL)
 		return;
-	xfree(pScrn->driverPrivate);
+	free(pScrn->driverPrivate);
 	pScrn->driverPrivate = NULL;
 }
 
@@ -485,7 +485,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	/* Get the entity, and make sure it is PCI. */
 	pCir->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
 	if (pCir->pEnt->location.type != BUS_PCI) {
-		xfree(pCir->pEnt);
+		free(pCir->pEnt);
 		return FALSE;
 	}
 
@@ -572,7 +572,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 	xf86CollectOptions(pScrn, NULL);
 
 	/* Process the options */
-	if (!(pCir->Options = xalloc(sizeof(CirOptions))))
+	if (!(pCir->Options = malloc(sizeof(CirOptions))))
 		return FALSE;
 	memcpy(pCir->Options, CirOptions, sizeof(CirOptions));
 	xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCir->Options);
@@ -1487,7 +1487,7 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	
 	if(pCir->shadowFB) {
 	    pCir->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
-	    pCir->ShadowPtr = xalloc(pCir->ShadowPitch * height);
+	    pCir->ShadowPtr = malloc(pCir->ShadowPitch * height);
 	    displayWidth = pCir->ShadowPitch / (pScrn->bitsPerPixel >> 3);
 	    FbBase = pCir->ShadowPtr;
 	} else {
@@ -1811,7 +1811,7 @@ AlpCloseScreen(int scrnIndex, ScreenPtr pScreen)
 		xf86DestroyCursorInfoRec(pCir->CursorInfoRec);
 	pCir->CursorInfoRec = NULL;
 	if (pCir->DGAModes)
-		xfree(pCir->DGAModes);
+		free(pCir->DGAModes);
 	pCir->DGAnumModes = 0;
 	pCir->DGAModes = NULL;
 
diff --git a/src/cir_dga.c b/src/cir_dga.c
index de2e38c..f930231 100644
--- a/src/cir_dga.c
+++ b/src/cir_dga.c
@@ -82,9 +82,9 @@ CirDGAInit(ScreenPtr pScreen)
   if (!pCir->DGAnumModes) {
     pMode = firstMode = pScrn->modes;
     while (pMode) {
-      newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec));
+      newmodes = realloc(modes, (num + 1) * sizeof (DGAModeRec));
       if (!newmodes) {
-	xfree(modes);
+	free(modes);
 	return FALSE;
       }
       modes = newmodes;
diff --git a/src/cir_driver.c b/src/cir_driver.c
index fe75cb8..e427700 100644
--- a/src/cir_driver.c
+++ b/src/cir_driver.c
@@ -236,7 +236,7 @@ CIRProbe(DriverPtr drv, int flags)
 				    CIRChipsets, CIRPciChipsets, devSections,
  				    numDevSections, drv, &usedChips);
     /* Free it since we don't need that list after this */
-    xfree(devSections);
+    free(devSections);
     if (numUsed <= 0)
  	return FALSE;
     if (flags & PROBE_DETECT)
@@ -278,7 +278,7 @@ CIRProbe(DriverPtr drv, int flags)
  	    pScrn->Probe	 = NULL;
  	}
     }
-    xfree(usedChips);
+    free(usedChips);
      
     return foundScreen;
 }
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 718454a..0f9f1f6 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -258,7 +258,7 @@ LgFreeRec(ScrnInfoPtr pScrn)
 {
 	if (pScrn->driverPrivate == NULL)
 		return;
-	xfree(pScrn->driverPrivate);
+	free(pScrn->driverPrivate);
 	pScrn->driverPrivate = NULL;
 }
 
@@ -453,7 +453,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
 	xf86CollectOptions(pScrn, NULL);
 
 	/* Process the options */
-	if (!(pCir->Options = xalloc(sizeof(LgOptions))))
+	if (!(pCir->Options = malloc(sizeof(LgOptions))))
 		return FALSE;
 	memcpy(pCir->Options, LgOptions, sizeof(LgOptions));
 	xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCir->Options);
@@ -1313,7 +1313,7 @@ LgScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 	
 	if(pCir->shadowFB) {
 	    pCir->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
-	    pCir->ShadowPtr = xalloc(pCir->ShadowPitch * height);
+	    pCir->ShadowPtr = malloc(pCir->ShadowPitch * height);
 	    displayWidth = pCir->ShadowPitch / (pScrn->bitsPerPixel >> 3);
 	    FbBase = pCir->ShadowPtr;
 	} else {
@@ -1616,7 +1616,7 @@ LgCloseScreen(int scrnIndex, ScreenPtr pScreen)
 		xf86DestroyCursorInfoRec(pCir->CursorInfoRec);
 	pCir->CursorInfoRec = NULL;
 	if (pCir->DGAModes)
-		xfree(pCir->DGAModes);
+		free(pCir->DGAModes);
 	pCir->DGAnumModes = 0;
 	pCir->DGAModes = NULL;
 

commit 3e5ebc4c1b9c2f751e50415b0d1bbb670c659eac
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Oct 17 01:40:17 2011 -0700

    GD5436 timings are the same as GD5446
    
    Based on information from http://www.xfree86.org/3.3.6/cirrus1.html
    See: https://bugs.freedesktop.org/show_bug.cgi?id=4169
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/src/alp_driver.c b/src/alp_driver.c
index b72dfeb..d73eab8 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -861,10 +861,10 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
 		case PCI_CHIP_GD5430:
 		case PCI_CHIP_GD5434_4:
 		case PCI_CHIP_GD5434_8:
-		case PCI_CHIP_GD5436:
 	/*	case PCI_CHIP_GD5440: */
 			p = gd5430_MaxClocks;
 			break;
+		case PCI_CHIP_GD5436:
 		case PCI_CHIP_GD5446:
 			p = gd5446_MaxClocks;
 			break;

commit e4f80ffd9dbcc08f361cda560036584f19386e0a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Oct 30 09:34:26 2010 -0700

    Sun's copyrights now belong to Oracle
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/man/Makefile.am b/man/Makefile.am
index b3688ce..1ea26b3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,5 +1,5 @@
 #
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -19,7 +19,7 @@
 # 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.
-# 
+#
 
 drivermandir = $(DRIVER_MAN_DIR)
 

commit 366a025a3f3d90e526c639c9048bf5eb2a150d09
Author: Jesse Adkins <jesserayadkins@gmail.com>
Date:   Tue Sep 28 13:29:50 2010 -0700

    Purge cvs tags.
    
    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/man/cirrus.man b/man/cirrus.man
index 009011e..af46248 100644
--- a/man/cirrus.man
+++ b/man/cirrus.man
@@ -1,4 +1,3 @@
-.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cirrus.man,v 1.2 2001/01/27 18:20:47 dawes Exp $ 
 .\" shorthand for double quote that works everywhere.
 .ds q \N'34'
 .TH CIRRUS __drivermansuffix__ __vendorversion__
diff --git a/src/CirrusClk.c b/src/CirrusClk.c
index a3590c9..6fd6270 100644
--- a/src/CirrusClk.c
+++ b/src/CirrusClk.c
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/CirrusClk.c,v 1.8 1998/12/06 06:08:28 dawes Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/alp.h b/src/alp.h
index 01c5301..a182d0c 100644
--- a/src/alp.h
+++ b/src/alp.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h,v 1.8 2001/10/01 13:44:05 eich Exp $ */
-
 /* (c) Itai Nahshon */
 
 #ifndef ALP_H
diff --git a/src/alp_driver.c b/src/alp_driver.c
index fe81757..b72dfeb 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -15,8 +15,6 @@
 #include "config.h"
 #endif
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.35 2003/11/03 05:11:09 tsi Exp $ */
-
 /* All drivers should typically include these */
 #include "xf86.h"
 #include "xf86_OSproc.h"
diff --git a/src/alp_hwcurs.c b/src/alp_hwcurs.c
index 79dfce7..9891eb4 100644
--- a/src/alp_hwcurs.c
+++ b/src/alp_hwcurs.c
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_hwcurs.c,v 1.4 2000/12/06 15:35:15 eich Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/src/alp_i2c.c b/src/alp_i2c.c
index 9e6ae67..7365215 100644
--- a/src/alp_i2c.c
+++ b/src/alp_i2c.c
@@ -4,8 +4,6 @@
 #include "config.h"
 #endif
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_i2c.c,v 1.6 1999/02/28 11:19:38 dawes Exp $ */
-
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "compiler.h"
diff --git a/src/alp_xaa.c b/src/alp_xaa.c
index 95741fc..7a96e1a 100644
--- a/src/alp_xaa.c
+++ b/src/alp_xaa.c
@@ -4,8 +4,6 @@
 #include "config.h"
 #endif
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c,v 1.7 2001/10/01 13:44:05 eich Exp $ */
-
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "compiler.h"
diff --git a/src/alp_xaam.c b/src/alp_xaam.c
index 0193a43..3ecc7de 100644
--- a/src/alp_xaam.c
+++ b/src/alp_xaam.c
@@ -1,6 +1,5 @@
 /* (c) Itai Nahshon */
 /* #define DEBUG */
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c,v 1.7 2001/10/01 13:44:05 eich Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
diff --git a/src/cir.h b/src/cir.h
index 904d9cc..64531f5 100644
--- a/src/cir.h
+++ b/src/cir.h
@@ -1,5 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir.h,v 1.20 2002/01/04 21:26:54 tsi Exp $ */
-
 /* (c) Itai Nahshon */
 
 #ifndef CIR_H
diff --git a/src/cir_dga.c b/src/cir_dga.c
index bc98df6..de2e38c 100644
--- a/src/cir_dga.c
+++ b/src/cir_dga.c
@@ -1,4 +1,3 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_dga.c,v 1.5 2001/02/15 17:39:27 eich Exp $ */
 /*
  * Copyright 2000 by Egbert Eich
  *
diff --git a/src/cir_driver.c b/src/cir_driver.c
index 5466c48..fe75cb8 100644
--- a/src/cir_driver.c
+++ b/src/cir_driver.c
@@ -15,8 +15,6 @@
 #include "config.h"
 #endif
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c,v 1.67 2001/05/15 10:19:37 eich Exp $ */
-
 /* All drivers should typically include these */
 #include "xf86.h"
 #include "xf86_OSproc.h"
diff --git a/src/cir_shadow.c b/src/cir_shadow.c
index b89890a..0716a64 100644
--- a/src/cir_shadow.c
+++ b/src/cir_shadow.c
@@ -1,5 +1,3 @@
-/* $XFree86: Exp $ */
-
 /*
    Copyright (c) 1999,2000  The XFree86 Project Inc. 
    based on code written by Mark Vojkovich <markv@valinux.com>
diff --git a/src/lg.h b/src/lg.h
index 9d91053..985f634 100644
--- a/src/lg.h
+++ b/src/lg.h
@@ -10,8 +10,6 @@
  *  Inspired by cir.h
  */
 
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg.h,v 1.12 2001/05/04 19:05:36 dawes Exp $ */
-
 #ifndef LG_H
 #define LG_H
 #define LG_DEBUG
diff --git a/src/lg_driver.c b/src/lg_driver.c
index cfc3e65..718454a 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -13,7 +13,6 @@
  *	David Dawes, Andrew E. Mileski, Leonard N. Zubkoff,
  *	Guy DESBIEF, Itai Nahshon.
  */


Reply to: