summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/ati-drivers/ChangeLog7
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-11.5.ebuild11
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch96
3 files changed, 110 insertions, 4 deletions
diff --git a/x11-drivers/ati-drivers/ChangeLog b/x11-drivers/ati-drivers/ChangeLog
index f20087c26c0b..b6fc316e5761 100644
--- a/x11-drivers/ati-drivers/ChangeLog
+++ b/x11-drivers/ati-drivers/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for x11-drivers/ati-drivers
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.250 2011/05/17 15:27:37 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.251 2011/05/26 20:17:09 chithanh Exp $
+
+ 26 May 2011; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+ +files/ati-drivers-2.6.39.patch, ati-drivers-11.5.ebuild:
+ Import 2.6.39 patch and Enrico Tagliavini's ebuild from the x11 overlay, bug
+ #368081.
*ati-drivers-11.5 (17 May 2011)
diff --git a/x11-drivers/ati-drivers/ati-drivers-11.5.ebuild b/x11-drivers/ati-drivers/ati-drivers-11.5.ebuild
index 6117f6012e2b..9fdbfa0241b2 100644
--- a/x11-drivers/ati-drivers/ati-drivers-11.5.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-11.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-11.5.ebuild,v 1.1 2011/05/17 15:27:37 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-11.5.ebuild,v 1.2 2011/05/26 20:17:09 chithanh Exp $
EAPI=4
@@ -84,7 +84,7 @@ QA_WX_LOAD="
QA_PRESTRIPPED="
usr/lib\(32\|64\)\?/libXvBAW.so.1.0
usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
- usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
+ usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
usr/lib\(32\|64\)\?/xorg/modules/glesx.so
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
usr/lib\(32\|64\)\?/libaticaldd.so
@@ -200,7 +200,7 @@ _check_kernel_config() {
failed=1
fi
- kernel_is ge 2 6 37 && if ! linux_chkconfig_present BKL ; then
+ kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then
eerror "${P} requires BKL."
eerror "Please enable the Big Kernel Lock:"
eerror "Kernel hacking --->"
@@ -293,6 +293,11 @@ src_prepare() {
# Fix a known compilation error
epatch "${FILESDIR}"/ati-drivers-fix_compilation-bug-297322.patch
+ # Experimental 2.6.39 support
+ if kernel_is -ge 2 6 39 ; then
+ epatch "${FILESDIR}"/ati-drivers-2.6.39.patch || die "epatch failed"
+ fi
+
# These are the userspace utilities that we also have source for.
# We rebuild these later.
rm \
diff --git a/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
new file mode 100644
index 000000000000..6f3940ca9b48
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/ati-drivers-2.6.39.patch
@@ -0,0 +1,96 @@
+Description: add support for missing kernel lock
+Author: Pascal Giard <evilynux@gmail.com>
+
+diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:30:08.000000000 +0200
++++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:29:27.000000000 +0200
+@@ -1902,13 +1902,17 @@
+ /** \brief Grab global kernel lock */
+ void ATI_API_CALL KCL_GlobalKernelLock(void)
+ {
++#ifdef CONFIG_KERNEL_LOCK
+ lock_kernel();
++#endif
+ }
+
+ /** \brief Release global kernel lock */
+ void ATI_API_CALL KCL_GlobalKernelUnlock(void)
+ {
++#ifdef CONFIG_KERNEL_LOCK
+ unlock_kernel();
++#endif
+ }
+
+ /*****************************************************************************/
+# Do not include smp_lock.h if the Kernel is built without BKL.
+# Closes: #619952
+
+diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h
+--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h 2011-03-24 17:00:28.000000000 +0100
++++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h 2011-03-29 20:39:05.000000000 +0200
+@@ -57,7 +57,11 @@
+ #include <linux/pci.h>
+ #include <linux/version.h>
+ #include <linux/sched.h>
++/* with no Big Kernel Lock and linux 2.6.38
++ and higher smp_lock.h is removed */
++#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
+ #include <linux/smp_lock.h> /* For (un)lock_kernel */
++#endif
+ #include <linux/mm.h>
+ #include <linux/pagemap.h>
+ #if defined(__alpha__) || defined(__powerpc__)
+diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-03-29 20:37:04.000000000 +0200
++++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-03-29 20:39:05.000000000 +0200
+@@ -116,7 +116,16 @@
+ #include <linux/pci.h>
+ #include <linux/wait.h>
+ #include <linux/miscdevice.h>
+-#include <linux/smp_lock.h>
++
++/* with no Big Kernel Lock and linux 2.6.38
++ and higher is smp_lock.h removed.
++ instead of smp_lock.h is sched.h required */
++#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
++#include <linux/smp_lock.h> /* For (un)lock_kernel */
++#else
++#include <linux/sched.h>
++#endif
++
+ // newer SuSE kernels need this
+ #include <linux/highmem.h>
+
+Description: Add Linux 2.6.39 support
+ <linux/spinlock_types.h> had the following comment until 2.6.38:
+ .
+ /*
+ * SPIN_LOCK_UNLOCKED defeats lockdep state tracking and is hence
+ * deprecated.
+ * Please use DEFINE_SPINLOCK() or __SPIN_LOCK_UNLOCKED() as
+ * appropriate.
+ */
+ #define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init)
+ .
+ This definition got removed in 2.6.39. Restore it locally until it gets fixed
+ upstream.
+Author: Miguel Colon <debian.micove@gmail.com>
+Forwarded: no
+Last-Update: 2011-03-30
+
+diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:48:43.000000000 +0200
++++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:49:36.000000000 +0200
+@@ -1060,7 +1060,12 @@
+ dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
+
+ for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
+ dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
++#else
++ dev->spinlock[i] = __SPIN_LOCK_UNLOCKED(old_style_spin_init);
++#endif
++
+
+ for (i=0; i < __KE_MAX_SEMAPHORES; i++)
+ sema_init(&dev->struct_sem[i], 1);