[arch-commits] Commit in xf86-video-ark/repos (8 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Thu Feb 9 16:12:21 EST 2012


    Date: Thursday, February 9, 2012 @ 16:12:21
  Author: andyrtr
Revision: 149741

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  xf86-video-ark/repos/staging-i686/PKGBUILD
    (from rev 149740, xf86-video-ark/trunk/PKGBUILD)
  xf86-video-ark/repos/staging-i686/git-fixes.patch
    (from rev 149740, xf86-video-ark/trunk/git-fixes.patch)
  xf86-video-ark/repos/staging-x86_64/PKGBUILD
    (from rev 149740, xf86-video-ark/trunk/PKGBUILD)
  xf86-video-ark/repos/staging-x86_64/git-fixes.patch
    (from rev 149740, xf86-video-ark/trunk/git-fixes.patch)
Deleted:
  xf86-video-ark/repos/staging-i686/PKGBUILD
  xf86-video-ark/repos/staging-i686/git-fixes.patch
  xf86-video-ark/repos/staging-x86_64/PKGBUILD
  xf86-video-ark/repos/staging-x86_64/git-fixes.patch

--------------------------------+
 staging-i686/PKGBUILD          |   68 +++++------
 staging-i686/git-fixes.patch   |  236 +++++++++++++++++++--------------------
 staging-x86_64/PKGBUILD        |   68 +++++------
 staging-x86_64/git-fixes.patch |  236 +++++++++++++++++++--------------------
 4 files changed, 304 insertions(+), 304 deletions(-)

Deleted: staging-i686/PKGBUILD
===================================================================
--- staging-i686/PKGBUILD	2012-02-09 21:10:23 UTC (rev 149740)
+++ staging-i686/PKGBUILD	2012-02-09 21:12:21 UTC (rev 149741)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgname=xf86-video-ark
-pkgver=0.7.4
-pkgrel=1
-pkgdesc="X.org ark video driver"
-arch=(i686 x86_64)
-url="http://xorg.freedesktop.org/"
-license=('custom')
-depends=('glibc')
-makedepends=('xorg-server-devel>=1.11.0')
-conflicts=('xorg-server<1.11.0')
-options=('!libtool')
-groups=('xorg-drivers' 'xorg')
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
-        #git-fixes.patch
-        )
-sha1sums=('d95cb9aa56e7db542b3ac8fed9cb519b11f77556')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  #patch -Np1 -i "${srcdir}/git-fixes.patch"
-  ./configure --prefix=/usr
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-}

Copied: xf86-video-ark/repos/staging-i686/PKGBUILD (from rev 149740, xf86-video-ark/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2012-02-09 21:12:21 UTC (rev 149741)
@@ -0,0 +1,34 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=xf86-video-ark
+pkgver=0.7.4
+pkgrel=1
+pkgdesc="X.org ark video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel>=1.11.99.902')
+conflicts=('xorg-server<1.11.99.902')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+        #git-fixes.patch
+        )
+sha1sums=('d95cb9aa56e7db542b3ac8fed9cb519b11f77556')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  #patch -Np1 -i "${srcdir}/git-fixes.patch"
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}

Deleted: staging-i686/git-fixes.patch
===================================================================
--- staging-i686/git-fixes.patch	2012-02-09 21:10:23 UTC (rev 149740)
+++ staging-i686/git-fixes.patch	2012-02-09 21:12:21 UTC (rev 149741)
@@ -1,118 +0,0 @@
-From 9d3769bed020e9796e51411c63de337da5073bb4 Mon Sep 17 00:00:00 2001
-From: Ondrej Zary <linux at rainbow-software.org>
-Date: Sat, 04 Dec 2010 00:23:51 +0000
-Subject: Don't assume that FB address registers are initialized properly
-
-https://bugs.freedesktop.org/show_bug.cgi?id=28249
-
-ark driver does not work with Hercules Stingray 64 card (ark2000pv).
-X fails to start with:
-
-[...]
-(II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is
-0x0000
-(II) ark(0): Creating default Display subsection in Screen section
-        "Default Screen Section" for depth/fbbpp 24/32
-(==) ark(0): Depth 24, (--) framebuffer bpp 32
-(==) ark(0): RGB weight 888
-(==) ark(0): Default visual is TrueColor
-(**) ark(0): Chipset: "ark2000pv"
-(--) ark(0): Framebuffer @ 0xe5e50000
-(==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
-(--) ark(0): Detected 2048 bytes video ram
-[...]
-Fatal server error:
-AddScreen/ScreenInit failed for driver 0
-
-Comparing with lspci, the framebuffer address is wrong:
-00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] (prog-if 00 [VGA controller])
-	Flags: medium devsel
-	Memory at e5000000 (32-bit, prefetchable) [size=4M]
-	[virtual] Expansion ROM at 1c000000 [disabled] [size=64K]
-
-Reviewed-by: Adam Jackson <ajax at redhat.com>
----
-diff --git a/src/ark.h b/src/ark.h
-index de301dc..077f93b 100644
---- a/src/ark.h
-+++ b/src/ark.h
-@@ -34,7 +34,6 @@ typedef struct _ARKRec {
- #endif
- 	EntityInfoPtr		pEnt;
- 	CARD32			IOAddress;
--	CARD32			FBAddress;
- 	unsigned char *		FBBase;
- 	unsigned char *		MMIOBase;
- 	unsigned long		videoRam;
-diff --git a/src/ark_driver.c b/src/ark_driver.c
-index 5de3b9a..fec3e1a 100644
---- a/src/ark_driver.c
-+++ b/src/ark_driver.c
-@@ -363,14 +363,14 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
- 	outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f);
- 	modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01);
- 
--	/* use membase's later on ??? */
--	pARK->FBAddress = (rdinx(hwp->PIOOffset + 0x3c4, 0x13) << 16) +
--			  (rdinx(hwp->PIOOffset + 0x3c4, 0x14) << 24);
--
--	pScrn->memPhysBase = pARK->FBAddress;
-+#ifndef XSERVER_LIBPCIACCESS
-+	pScrn->memPhysBase = pARK->PciInfo->memBase[0];
-+#else
-+	pScrn->memPhysBase = pARK->PciInfo->regions[0].base_addr;
-+#endif
- 
- 	xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Framebuffer @ 0x%lx\n",
--		   (unsigned long)pARK->FBAddress);
-+		   (unsigned long)pScrn->memPhysBase);
- 
- 	if (!xf86SetGamma(pScrn, gzeros))
- 		return FALSE;
-@@ -748,8 +748,13 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
- 	new->sr10 = rdinx(isaIOBase + 0x3c4, 0x10) & ~0x1f;
- 	new->sr10 |= 0x1f;
- 
--	new->sr13 = pARK->FBAddress >> 16;
--	new->sr14 = pARK->FBAddress >> 24;
-+#ifndef XSERVER_LIBPCIACCESS
-+	new->sr13 = pARK->PciInfo->memBase[0] >> 16;
-+	new->sr14 = pARK->PciInfo->memBase[0] >> 24;
-+#else
-+	new->sr13 = pARK->PciInfo->regions[0].base_addr >> 16;
-+	new->sr14 = pARK->PciInfo->regions[0].base_addr >> 24;
-+#endif
- 
- 	new->sr12 = rdinx(isaIOBase + 0x3c4, 0x12) & ~0x03;
- 	switch (pScrn->videoRam) {
-@@ -1022,7 +1027,7 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
- 					     pARK->PciTag, 0xb8000, 0x8000);
- 
- 	pARK->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
--				     pARK->PciTag, pARK->FBAddress,
-+				     pARK->PciTag, pARK->PciInfo->memBase[0],
- 				     pScrn->videoRam * 1024);
- #else
- 
-@@ -1032,14 +1037,17 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
- 	{
- 		void** result = (void**)&pARK->FBBase;
- 		int err = pci_device_map_range(pARK->PciInfo,
--					       pARK->FBAddress,
-+					       pARK->PciInfo->regions[0].base_addr,
- 					       pScrn->videoRam * 1024,
- 					       PCI_DEV_MAP_FLAG_WRITABLE |
- 					       PCI_DEV_MAP_FLAG_WRITE_COMBINE,
- 					       result);
- 		
--		if (err) 
-+		if (err) {
-+			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-+			   "Cound not map framebuffer: %d\n", err);
- 			return FALSE;
-+		}
- 	}
- #endif
- 
---
-cgit v0.9.0.2-2-gbebe

Copied: xf86-video-ark/repos/staging-i686/git-fixes.patch (from rev 149740, xf86-video-ark/trunk/git-fixes.patch)
===================================================================
--- staging-i686/git-fixes.patch	                        (rev 0)
+++ staging-i686/git-fixes.patch	2012-02-09 21:12:21 UTC (rev 149741)
@@ -0,0 +1,118 @@
+From 9d3769bed020e9796e51411c63de337da5073bb4 Mon Sep 17 00:00:00 2001
+From: Ondrej Zary <linux at rainbow-software.org>
+Date: Sat, 04 Dec 2010 00:23:51 +0000
+Subject: Don't assume that FB address registers are initialized properly
+
+https://bugs.freedesktop.org/show_bug.cgi?id=28249
+
+ark driver does not work with Hercules Stingray 64 card (ark2000pv).
+X fails to start with:
+
+[...]
+(II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is
+0x0000
+(II) ark(0): Creating default Display subsection in Screen section
+        "Default Screen Section" for depth/fbbpp 24/32
+(==) ark(0): Depth 24, (--) framebuffer bpp 32
+(==) ark(0): RGB weight 888
+(==) ark(0): Default visual is TrueColor
+(**) ark(0): Chipset: "ark2000pv"
+(--) ark(0): Framebuffer @ 0xe5e50000
+(==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
+(--) ark(0): Detected 2048 bytes video ram
+[...]
+Fatal server error:
+AddScreen/ScreenInit failed for driver 0
+
+Comparing with lspci, the framebuffer address is wrong:
+00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] (prog-if 00 [VGA controller])
+	Flags: medium devsel
+	Memory at e5000000 (32-bit, prefetchable) [size=4M]
+	[virtual] Expansion ROM at 1c000000 [disabled] [size=64K]
+
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+---
+diff --git a/src/ark.h b/src/ark.h
+index de301dc..077f93b 100644
+--- a/src/ark.h
++++ b/src/ark.h
+@@ -34,7 +34,6 @@ typedef struct _ARKRec {
+ #endif
+ 	EntityInfoPtr		pEnt;
+ 	CARD32			IOAddress;
+-	CARD32			FBAddress;
+ 	unsigned char *		FBBase;
+ 	unsigned char *		MMIOBase;
+ 	unsigned long		videoRam;
+diff --git a/src/ark_driver.c b/src/ark_driver.c
+index 5de3b9a..fec3e1a 100644
+--- a/src/ark_driver.c
++++ b/src/ark_driver.c
+@@ -363,14 +363,14 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
+ 	outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f);
+ 	modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01);
+ 
+-	/* use membase's later on ??? */
+-	pARK->FBAddress = (rdinx(hwp->PIOOffset + 0x3c4, 0x13) << 16) +
+-			  (rdinx(hwp->PIOOffset + 0x3c4, 0x14) << 24);
+-
+-	pScrn->memPhysBase = pARK->FBAddress;
++#ifndef XSERVER_LIBPCIACCESS
++	pScrn->memPhysBase = pARK->PciInfo->memBase[0];
++#else
++	pScrn->memPhysBase = pARK->PciInfo->regions[0].base_addr;
++#endif
+ 
+ 	xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Framebuffer @ 0x%lx\n",
+-		   (unsigned long)pARK->FBAddress);
++		   (unsigned long)pScrn->memPhysBase);
+ 
+ 	if (!xf86SetGamma(pScrn, gzeros))
+ 		return FALSE;
+@@ -748,8 +748,13 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ 	new->sr10 = rdinx(isaIOBase + 0x3c4, 0x10) & ~0x1f;
+ 	new->sr10 |= 0x1f;
+ 
+-	new->sr13 = pARK->FBAddress >> 16;
+-	new->sr14 = pARK->FBAddress >> 24;
++#ifndef XSERVER_LIBPCIACCESS
++	new->sr13 = pARK->PciInfo->memBase[0] >> 16;
++	new->sr14 = pARK->PciInfo->memBase[0] >> 24;
++#else
++	new->sr13 = pARK->PciInfo->regions[0].base_addr >> 16;
++	new->sr14 = pARK->PciInfo->regions[0].base_addr >> 24;
++#endif
+ 
+ 	new->sr12 = rdinx(isaIOBase + 0x3c4, 0x12) & ~0x03;
+ 	switch (pScrn->videoRam) {
+@@ -1022,7 +1027,7 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
+ 					     pARK->PciTag, 0xb8000, 0x8000);
+ 
+ 	pARK->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
+-				     pARK->PciTag, pARK->FBAddress,
++				     pARK->PciTag, pARK->PciInfo->memBase[0],
+ 				     pScrn->videoRam * 1024);
+ #else
+ 
+@@ -1032,14 +1037,17 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
+ 	{
+ 		void** result = (void**)&pARK->FBBase;
+ 		int err = pci_device_map_range(pARK->PciInfo,
+-					       pARK->FBAddress,
++					       pARK->PciInfo->regions[0].base_addr,
+ 					       pScrn->videoRam * 1024,
+ 					       PCI_DEV_MAP_FLAG_WRITABLE |
+ 					       PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+ 					       result);
+ 		
+-		if (err) 
++		if (err) {
++			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++			   "Cound not map framebuffer: %d\n", err);
+ 			return FALSE;
++		}
+ 	}
+ #endif
+ 
+--
+cgit v0.9.0.2-2-gbebe

Deleted: staging-x86_64/PKGBUILD
===================================================================
--- staging-x86_64/PKGBUILD	2012-02-09 21:10:23 UTC (rev 149740)
+++ staging-x86_64/PKGBUILD	2012-02-09 21:12:21 UTC (rev 149741)
@@ -1,34 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-
-pkgname=xf86-video-ark
-pkgver=0.7.4
-pkgrel=1
-pkgdesc="X.org ark video driver"
-arch=(i686 x86_64)
-url="http://xorg.freedesktop.org/"
-license=('custom')
-depends=('glibc')
-makedepends=('xorg-server-devel>=1.11.0')
-conflicts=('xorg-server<1.11.0')
-options=('!libtool')
-groups=('xorg-drivers' 'xorg')
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
-        #git-fixes.patch
-        )
-sha1sums=('d95cb9aa56e7db542b3ac8fed9cb519b11f77556')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  #patch -Np1 -i "${srcdir}/git-fixes.patch"
-  ./configure --prefix=/usr
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-
-  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
-}

Copied: xf86-video-ark/repos/staging-x86_64/PKGBUILD (from rev 149740, xf86-video-ark/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2012-02-09 21:12:21 UTC (rev 149741)
@@ -0,0 +1,34 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=xf86-video-ark
+pkgver=0.7.4
+pkgrel=1
+pkgdesc="X.org ark video driver"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('glibc')
+makedepends=('xorg-server-devel>=1.11.99.902')
+conflicts=('xorg-server<1.11.99.902')
+options=('!libtool')
+groups=('xorg-drivers' 'xorg')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
+        #git-fixes.patch
+        )
+sha1sums=('d95cb9aa56e7db542b3ac8fed9cb519b11f77556')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  #patch -Np1 -i "${srcdir}/git-fixes.patch"
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}

Deleted: staging-x86_64/git-fixes.patch
===================================================================
--- staging-x86_64/git-fixes.patch	2012-02-09 21:10:23 UTC (rev 149740)
+++ staging-x86_64/git-fixes.patch	2012-02-09 21:12:21 UTC (rev 149741)
@@ -1,118 +0,0 @@
-From 9d3769bed020e9796e51411c63de337da5073bb4 Mon Sep 17 00:00:00 2001
-From: Ondrej Zary <linux at rainbow-software.org>
-Date: Sat, 04 Dec 2010 00:23:51 +0000
-Subject: Don't assume that FB address registers are initialized properly
-
-https://bugs.freedesktop.org/show_bug.cgi?id=28249
-
-ark driver does not work with Hercules Stingray 64 card (ark2000pv).
-X fails to start with:
-
-[...]
-(II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is
-0x0000
-(II) ark(0): Creating default Display subsection in Screen section
-        "Default Screen Section" for depth/fbbpp 24/32
-(==) ark(0): Depth 24, (--) framebuffer bpp 32
-(==) ark(0): RGB weight 888
-(==) ark(0): Default visual is TrueColor
-(**) ark(0): Chipset: "ark2000pv"
-(--) ark(0): Framebuffer @ 0xe5e50000
-(==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
-(--) ark(0): Detected 2048 bytes video ram
-[...]
-Fatal server error:
-AddScreen/ScreenInit failed for driver 0
-
-Comparing with lspci, the framebuffer address is wrong:
-00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] (prog-if 00 [VGA controller])
-	Flags: medium devsel
-	Memory at e5000000 (32-bit, prefetchable) [size=4M]
-	[virtual] Expansion ROM at 1c000000 [disabled] [size=64K]
-
-Reviewed-by: Adam Jackson <ajax at redhat.com>
----
-diff --git a/src/ark.h b/src/ark.h
-index de301dc..077f93b 100644
---- a/src/ark.h
-+++ b/src/ark.h
-@@ -34,7 +34,6 @@ typedef struct _ARKRec {
- #endif
- 	EntityInfoPtr		pEnt;
- 	CARD32			IOAddress;
--	CARD32			FBAddress;
- 	unsigned char *		FBBase;
- 	unsigned char *		MMIOBase;
- 	unsigned long		videoRam;
-diff --git a/src/ark_driver.c b/src/ark_driver.c
-index 5de3b9a..fec3e1a 100644
---- a/src/ark_driver.c
-+++ b/src/ark_driver.c
-@@ -363,14 +363,14 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
- 	outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f);
- 	modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01);
- 
--	/* use membase's later on ??? */
--	pARK->FBAddress = (rdinx(hwp->PIOOffset + 0x3c4, 0x13) << 16) +
--			  (rdinx(hwp->PIOOffset + 0x3c4, 0x14) << 24);
--
--	pScrn->memPhysBase = pARK->FBAddress;
-+#ifndef XSERVER_LIBPCIACCESS
-+	pScrn->memPhysBase = pARK->PciInfo->memBase[0];
-+#else
-+	pScrn->memPhysBase = pARK->PciInfo->regions[0].base_addr;
-+#endif
- 
- 	xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Framebuffer @ 0x%lx\n",
--		   (unsigned long)pARK->FBAddress);
-+		   (unsigned long)pScrn->memPhysBase);
- 
- 	if (!xf86SetGamma(pScrn, gzeros))
- 		return FALSE;
-@@ -748,8 +748,13 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
- 	new->sr10 = rdinx(isaIOBase + 0x3c4, 0x10) & ~0x1f;
- 	new->sr10 |= 0x1f;
- 
--	new->sr13 = pARK->FBAddress >> 16;
--	new->sr14 = pARK->FBAddress >> 24;
-+#ifndef XSERVER_LIBPCIACCESS
-+	new->sr13 = pARK->PciInfo->memBase[0] >> 16;
-+	new->sr14 = pARK->PciInfo->memBase[0] >> 24;
-+#else
-+	new->sr13 = pARK->PciInfo->regions[0].base_addr >> 16;
-+	new->sr14 = pARK->PciInfo->regions[0].base_addr >> 24;
-+#endif
- 
- 	new->sr12 = rdinx(isaIOBase + 0x3c4, 0x12) & ~0x03;
- 	switch (pScrn->videoRam) {
-@@ -1022,7 +1027,7 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
- 					     pARK->PciTag, 0xb8000, 0x8000);
- 
- 	pARK->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
--				     pARK->PciTag, pARK->FBAddress,
-+				     pARK->PciTag, pARK->PciInfo->memBase[0],
- 				     pScrn->videoRam * 1024);
- #else
- 
-@@ -1032,14 +1037,17 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
- 	{
- 		void** result = (void**)&pARK->FBBase;
- 		int err = pci_device_map_range(pARK->PciInfo,
--					       pARK->FBAddress,
-+					       pARK->PciInfo->regions[0].base_addr,
- 					       pScrn->videoRam * 1024,
- 					       PCI_DEV_MAP_FLAG_WRITABLE |
- 					       PCI_DEV_MAP_FLAG_WRITE_COMBINE,
- 					       result);
- 		
--		if (err) 
-+		if (err) {
-+			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-+			   "Cound not map framebuffer: %d\n", err);
- 			return FALSE;
-+		}
- 	}
- #endif
- 
---
-cgit v0.9.0.2-2-gbebe

Copied: xf86-video-ark/repos/staging-x86_64/git-fixes.patch (from rev 149740, xf86-video-ark/trunk/git-fixes.patch)
===================================================================
--- staging-x86_64/git-fixes.patch	                        (rev 0)
+++ staging-x86_64/git-fixes.patch	2012-02-09 21:12:21 UTC (rev 149741)
@@ -0,0 +1,118 @@
+From 9d3769bed020e9796e51411c63de337da5073bb4 Mon Sep 17 00:00:00 2001
+From: Ondrej Zary <linux at rainbow-software.org>
+Date: Sat, 04 Dec 2010 00:23:51 +0000
+Subject: Don't assume that FB address registers are initialized properly
+
+https://bugs.freedesktop.org/show_bug.cgi?id=28249
+
+ark driver does not work with Hercules Stingray 64 card (ark2000pv).
+X fails to start with:
+
+[...]
+(II) ark(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is
+0x0000
+(II) ark(0): Creating default Display subsection in Screen section
+        "Default Screen Section" for depth/fbbpp 24/32
+(==) ark(0): Depth 24, (--) framebuffer bpp 32
+(==) ark(0): RGB weight 888
+(==) ark(0): Default visual is TrueColor
+(**) ark(0): Chipset: "ark2000pv"
+(--) ark(0): Framebuffer @ 0xe5e50000
+(==) ark(0): Using gamma correction (1.0, 1.0, 1.0)
+(--) ark(0): Detected 2048 bytes video ram
+[...]
+Fatal server error:
+AddScreen/ScreenInit failed for driver 0
+
+Comparing with lspci, the framebuffer address is wrong:
+00:0f.0 VGA compatible controller: ARK Logic Inc 2000PV [Stingray] (prog-if 00 [VGA controller])
+	Flags: medium devsel
+	Memory at e5000000 (32-bit, prefetchable) [size=4M]
+	[virtual] Expansion ROM at 1c000000 [disabled] [size=64K]
+
+Reviewed-by: Adam Jackson <ajax at redhat.com>
+---
+diff --git a/src/ark.h b/src/ark.h
+index de301dc..077f93b 100644
+--- a/src/ark.h
++++ b/src/ark.h
+@@ -34,7 +34,6 @@ typedef struct _ARKRec {
+ #endif
+ 	EntityInfoPtr		pEnt;
+ 	CARD32			IOAddress;
+-	CARD32			FBAddress;
+ 	unsigned char *		FBBase;
+ 	unsigned char *		MMIOBase;
+ 	unsigned long		videoRam;
+diff --git a/src/ark_driver.c b/src/ark_driver.c
+index 5de3b9a..fec3e1a 100644
+--- a/src/ark_driver.c
++++ b/src/ark_driver.c
+@@ -363,14 +363,14 @@ static Bool ARKPreInit(ScrnInfoPtr pScrn, int flags)
+ 	outb(hwp->PIOOffset + hwp->IOBase + 5, tmp & 0x7f);
+ 	modinx(hwp->PIOOffset + 0x3c4, 0x1d, 0x01, 0x01);
+ 
+-	/* use membase's later on ??? */
+-	pARK->FBAddress = (rdinx(hwp->PIOOffset + 0x3c4, 0x13) << 16) +
+-			  (rdinx(hwp->PIOOffset + 0x3c4, 0x14) << 24);
+-
+-	pScrn->memPhysBase = pARK->FBAddress;
++#ifndef XSERVER_LIBPCIACCESS
++	pScrn->memPhysBase = pARK->PciInfo->memBase[0];
++#else
++	pScrn->memPhysBase = pARK->PciInfo->regions[0].base_addr;
++#endif
+ 
+ 	xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Framebuffer @ 0x%lx\n",
+-		   (unsigned long)pARK->FBAddress);
++		   (unsigned long)pScrn->memPhysBase);
+ 
+ 	if (!xf86SetGamma(pScrn, gzeros))
+ 		return FALSE;
+@@ -748,8 +748,13 @@ static Bool ARKModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
+ 	new->sr10 = rdinx(isaIOBase + 0x3c4, 0x10) & ~0x1f;
+ 	new->sr10 |= 0x1f;
+ 
+-	new->sr13 = pARK->FBAddress >> 16;
+-	new->sr14 = pARK->FBAddress >> 24;
++#ifndef XSERVER_LIBPCIACCESS
++	new->sr13 = pARK->PciInfo->memBase[0] >> 16;
++	new->sr14 = pARK->PciInfo->memBase[0] >> 24;
++#else
++	new->sr13 = pARK->PciInfo->regions[0].base_addr >> 16;
++	new->sr14 = pARK->PciInfo->regions[0].base_addr >> 24;
++#endif
+ 
+ 	new->sr12 = rdinx(isaIOBase + 0x3c4, 0x12) & ~0x03;
+ 	switch (pScrn->videoRam) {
+@@ -1022,7 +1027,7 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
+ 					     pARK->PciTag, 0xb8000, 0x8000);
+ 
+ 	pARK->FBBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
+-				     pARK->PciTag, pARK->FBAddress,
++				     pARK->PciTag, pARK->PciInfo->memBase[0],
+ 				     pScrn->videoRam * 1024);
+ #else
+ 
+@@ -1032,14 +1037,17 @@ static Bool ARKMapMem(ScrnInfoPtr pScrn)
+ 	{
+ 		void** result = (void**)&pARK->FBBase;
+ 		int err = pci_device_map_range(pARK->PciInfo,
+-					       pARK->FBAddress,
++					       pARK->PciInfo->regions[0].base_addr,
+ 					       pScrn->videoRam * 1024,
+ 					       PCI_DEV_MAP_FLAG_WRITABLE |
+ 					       PCI_DEV_MAP_FLAG_WRITE_COMBINE,
+ 					       result);
+ 		
+-		if (err) 
++		if (err) {
++			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++			   "Cound not map framebuffer: %d\n", err);
+ 			return FALSE;
++		}
+ 	}
+ #endif
+ 
+--
+cgit v0.9.0.2-2-gbebe



More information about the arch-commits mailing list