rpms/xorg-x11-drv-ati/devel mach64-ia64-pagesize.patch, NONE, 1.1 xorg-x11-drv-ati.spec, 1.85, 1.86

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Wed Mar 26 06:31:37 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3533

Modified Files:
	xorg-x11-drv-ati.spec 
Added Files:
	mach64-ia64-pagesize.patch 
Log Message:
* Wed Mar 26 2008 Dave Airlie <airlied at redhat.com> 6.8.0-5
- Fix mach64 on ia64 with 16k pagesize (#438947)


mach64-ia64-pagesize.patch:

--- NEW FILE mach64-ia64-pagesize.patch ---
>From 89a9ad75f3e50e25275b803617d5e74709ead269 Mon Sep 17 00:00:00 2001
From: Yi Zhan <yi.zhan at intel.com>
Date: Wed, 26 Mar 2008 16:13:08 +1000
Subject: [PATCH] mach64: on IA64 systems the pciaccess page size mapping was getting E2BIG

As the ia64 pagesize was 16k, and aperture was only 4k, this was messing up
on ia64 machines.

Modified fix from RH BZ 438947 - airlied
---
 src/atividmem.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/atividmem.c b/src/atividmem.c
index 986ac0f..8950f84 100644
--- a/src/atividmem.c
+++ b/src/atividmem.c
@@ -146,7 +146,12 @@ ATIUnmapMMIO
 #ifndef XSERVER_LIBPCIACCESS
         xf86UnMapVidMem(iScreen, pATI->pMMIO, getpagesize());
 #else
-        pci_device_unmap_range(pATI->PCIInfo, pATI->pMMIO, getpagesize());
+        unsigned long size;
+
+        size = PCI_REGION_SIZE(pATI->PCIInfo, 2);
+        if (!size || size > getpagesize())
+                size = getpagesize();
+        pci_device_unmap_range(pATI->PCIInfo, pATI->pMMIO, size);
 #endif
     }
 
@@ -340,10 +345,15 @@ ATIMapApertures
 
         int mode = PCI_DEV_MAP_FLAG_WRITABLE;
 
-        int err = pci_device_map_range(pVideo,
-                                       MMIOBase,
-                                       PageSize,
-                                       mode, &pATI->pMMIO);
+        int err;
+        int size;
+
+        size = PCI_REGION_SIZE(pVideo, 2);
+        if (!size || size > PageSize)
+               size = PageSize;
+
+	err = pci_device_map_range(pVideo, MMIOBase,
+                                   size, mode, &pATI->pMMIO);
 
         if (err)
         {
-- 
1.5.4.4



Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/xorg-x11-drv-ati.spec,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- xorg-x11-drv-ati.spec	11 Mar 2008 20:11:30 -0000	1.85
+++ xorg-x11-drv-ati.spec	26 Mar 2008 06:30:49 -0000	1.86
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.8.0
-Release:   4%{?dist}
+Release:   5%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -24,6 +24,7 @@
 # Rage 128 patches (100-199)
 
 # mach64 patches (200-299)
+Patch200: mach64-ia64-pagesize.patch
 
 # ati wrapperloader patches (300-399)
 
@@ -48,6 +49,8 @@
 %patch4 -p1 -b .ddc
 %patch5 -p1 -b .duallink
 
+%patch200 -p1 -b .mach64-ia64
+
 %build
 aclocal ; automake -a ; autoconf
 %configure --disable-static
@@ -86,6 +89,9 @@
 %{_mandir}/man4/radeon.4*
 
 %changelog
+* Wed Mar 26 2008 Dave Airlie <airlied at redhat.com> 6.8.0-5
+- Fix mach64 on ia64 with 16k pagesize (#438947)
+
 * Tue Mar 11 2008 Adam Jackson <ajax at redhat.com> 6.8.0-4
 - r500-dual-link-love.patch: Make R300+ max CRTC size guess big enough
   for a 30" monitor.




More information about the fedora-extras-commits mailing list