[arch-commits] CVS update of unstable/x11/fglrx-mm (3 files)

Travis Willard travis at archlinux.org
Tue Aug 14 08:50:04 EDT 2007


    Date: Tuesday, August 14, 2007 @ 08:50:04
  Author: travis
    Path: /home/cvs-unstable/unstable/x11/fglrx-mm

   Added: firegl_public-2-6-23.patch (1.1)
Modified: PKGBUILD (1.4 -> 1.5) fglrx-mm.install (1.1 -> 1.2)

upgpkg: fglrx-mm 8.40.4-1
Found a patch on phoronix - band-aid solution, most likely, but it seems to work.


----------------------------+
 PKGBUILD                   |   12 ++++--
 fglrx-mm.install           |    6 +--
 firegl_public-2-6-23.patch |   86 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 7 deletions(-)


Index: unstable/x11/fglrx-mm/PKGBUILD
diff -u unstable/x11/fglrx-mm/PKGBUILD:1.4 unstable/x11/fglrx-mm/PKGBUILD:1.5
--- unstable/x11/fglrx-mm/PKGBUILD:1.4	Tue Aug 14 07:38:00 2007
+++ unstable/x11/fglrx-mm/PKGBUILD	Tue Aug 14 08:50:02 2007
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD,v 1.4 2007/08/14 11:38:00 travis Exp $
+# $Id: PKGBUILD,v 1.5 2007/08/14 12:50:02 travis Exp $
 # Maintainer: Travis Willard <travisw at wmpub.ca>
 # Contributor: amdviaman
 
@@ -15,9 +15,7 @@
 makedepends=()
 replaces=('ati-fglrx-mm')
 install=${pkgname}.install
-source=(http://www2.ati.com/drivers/linux/ati-driver-installer-$pkgver-x86.x86_64.run)
-md5sums=('d02add61ee36a4183510317c3c42b147')
-sha1sums=('6260c8596529eac34fabe3437678afe6e2761490')
+source=(http://www2.ati.com/drivers/linux/ati-driver-installer-$pkgver-x86.x86_64.run firegl_public-2-6-23.patch)
 
 _kernver=${_kernel_version}-mm
 
@@ -42,6 +40,8 @@
     cd $startdir/src
     cd $startdir/src/lib/modules/fglrx/build_mod/
 
+    patch -Np0 -i $startdir/src/firegl_public-2-6-23.patch
+
     # Build the kernel module
     cp 2.6.x/Makefile .
     make -C /lib/modules/${_kernver}/build SUBDIRS="`pwd`" modules || return 1
@@ -54,3 +54,7 @@
 
 }
 
+md5sums=('d02add61ee36a4183510317c3c42b147'
+         '3bcb3038a0905942f61418d69b8b895b')
+sha1sums=('6260c8596529eac34fabe3437678afe6e2761490'
+          'c1e29b25712e0f0cbd0047ced5d9d501ea9ed0aa')
Index: unstable/x11/fglrx-mm/fglrx-mm.install
diff -u unstable/x11/fglrx-mm/fglrx-mm.install:1.1 unstable/x11/fglrx-mm/fglrx-mm.install:1.2
--- unstable/x11/fglrx-mm/fglrx-mm.install:1.1	Sun Apr 22 23:50:03 2007
+++ unstable/x11/fglrx-mm/fglrx-mm.install	Tue Aug 14 08:50:04 2007
@@ -13,20 +13,20 @@
   echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
   echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
   echo "--------------------------------------------------------------"
-  KERNEL_VERSION=2.6.21-mm
+  KERNEL_VERSION=2.6.23-mm
   depmod -v $KERNEL_VERSION > /dev/null 2>&1
 }
 
 # arg 1:  the new package version
 # arg 2:  the old package version
 post_upgrade() {
-  KERNEL_VERSION=2.6.21-mm
+  KERNEL_VERSION=2.6.23-mm
   depmod -v $KERNEL_VERSION > /dev/null 2>&1
 }
 
 # arg 1:  the old package version
 post_remove() {
-  KERNEL_VERSION=2.6.21-mm
+  KERNEL_VERSION=2.6.23-mm
   depmod -v $KERNEL_VERSION > /dev/null 2>&1
 }
 
Index: unstable/x11/fglrx-mm/firegl_public-2-6-23.patch
diff -u /dev/null unstable/x11/fglrx-mm/firegl_public-2-6-23.patch:1.1
--- /dev/null	Tue Aug 14 08:50:04 2007
+++ unstable/x11/fglrx-mm/firegl_public-2-6-23.patch	Tue Aug 14 08:50:04 2007
@@ -0,0 +1,86 @@
+--- firegl_public.c.orig	2007-08-10 23:59:21.000000000 +0200
++++ firegl_public.c	2007-08-13 20:00:26.000000000 +0200
+@@ -214,6 +214,56 @@
+ #define preempt_enable()
+ #endif
+ 
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)
++#if defined(__i386__)
++#define ptep_test_and_clear_dirty(vma, addr, ptep) ({                  \
++       int __ret = 0;                                                  \
++       if (pte_dirty(*(ptep)))                                         \
++               __ret = test_and_clear_bit(_PAGE_BIT_DIRTY,             \
++                                               &(ptep)->pte_low);      \
++       if (__ret)                                                      \
++               pte_update((vma)->vm_mm, addr, ptep);                   \
++       __ret;                                                          \
++})
++
++static inline int pte_read(pte_t pte)	{ return (pte).pte_low & _PAGE_USER; }
++static inline int pte_user(pte_t pte)	{ return (pte).pte_low & _PAGE_USER; }
++#ifdef CONFIG_X86_PAE
++/*
++ * Is the pte executable?
++ */
++static inline int pte_x(pte_t pte)
++{
++        return !(pte_val(pte) & _PAGE_NX);
++}
++ 
++/*
++ * All present user-pages with !NX bit are user-executable:
++ */
++static inline int pte_exec(pte_t pte)
++{
++        return pte_user(pte) && pte_x(pte);
++}
++#else
++static inline int pte_exec(pte_t pte)
++{
++        return pte_user(pte);
++}
++#endif	/* PAE */
++
++#elif defined(__x86_64__)
++static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma,
++					unsigned long addr, pte_t *ptep)
++{
++	if (!pte_dirty(*ptep))
++		return 0;
++	return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
++}
++static inline int pte_read(pte_t pte)	{ return pte_val(pte) & _PAGE_USER; }
++static inline int pte_exec(pte_t pte)	{ return !(pte_val(pte) & _PAGE_NX); }
++#endif
++#endif
++
+ // ============================================================
+ /* globals */
+ 
+@@ -2356,7 +2406,7 @@ void ATI_API_CALL __ke_put_vm_page_table
+ #ifndef ptep_clear_flush_dirty
+ #define ptep_clear_flush_dirty(__vma, __address, __ptep) \
+ ({							 \
+-    int __dirty = ptep_test_and_clear_dirty(__ptep);	 \
++    int __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep);	 \
+     if (__dirty)					 \
+         flush_tlb_page(__vma, __address);		 \
+     __dirty;						 \
+@@ -5303,7 +5353,7 @@ unsigned int ATI_API_CALL KAS_Spinlock_R
+ /** \brief Type definition of the structure describing Slab Cache object */
+ typedef struct tag_kasSlabCache_t
+ {
+-    kmem_cache_t* cache;        /* OS slab cache object */
++    struct kmem_cache *cache;	/* OS slab cache object */
+     spinlock_t lock;            /* OS spinlock object protecting the cache */
+     unsigned int routine_type;  /* Type of routine the cache might be accessed from */
+     char name[14];              /* Cache object name (kernel 2.4 restricts its length to 19 chars) */
+@@ -5349,7 +5399,7 @@ unsigned int ATI_API_CALL KAS_SlabCache_
+     DBG_TRACE("creating slab object '%s'", slabcache_obj->name);
+ 
+     if ((slabcache_obj->cache =
+-            kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL)))
++            kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL)))
+     {
+         ret = 1;
+     }




More information about the arch-commits mailing list