summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-12-25 10:16:47 +0000
committerMike Frysinger <vapier@gentoo.org>2008-12-25 10:16:47 +0000
commit9156e9e3b44203d002a328d27b073994d1c97e7a (patch)
tree6a2472f8fe6e88b978fbcbc64600b951cd5b7826 /x11-drivers
parentamd64/x86 stable, bug #252416 (diff)
downloadgentoo-2-9156e9e3b44203d002a328d27b073994d1c97e7a.tar.gz
gentoo-2-9156e9e3b44203d002a328d27b073994d1c97e7a.tar.bz2
gentoo-2-9156e9e3b44203d002a328d27b073994d1c97e7a.zip
Add patch from upstream for linux 2.6.28 support.
(Portage version: 2.2_rc17/cvs/Linux 2.6.27.8 x86_64)
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/ChangeLog6
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-2.6.28.patch180
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild4
3 files changed, 188 insertions, 2 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog
index 7c10008ed4a0..1dd61ba926a0 100644
--- a/x11-drivers/nvidia-drivers/ChangeLog
+++ b/x11-drivers/nvidia-drivers/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-drivers/nvidia-drivers
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.124 2008/12/19 01:43:05 ricmm Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.125 2008/12/25 10:16:46 vapier Exp $
+
+ 25 Dec 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/nvidia-2.6.28.patch, nvidia-drivers-177.82.ebuild:
+ Add patch from upstream for linux 2.6.28 support.
*nvidia-drivers-173.14.15 (19 Dec 2008)
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-2.6.28.patch b/x11-drivers/nvidia-drivers/files/nvidia-2.6.28.patch
new file mode 100644
index 000000000000..594de674d372
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-2.6.28.patch
@@ -0,0 +1,180 @@
+http://www.nvnews.net/vbulletin/showthread.php?t=121790&page=2#post1823327
+http://www.nvnews.net/vbulletin/showthread.php?t=121790&page=3#post1843626
+
+--- usr/src/nv/Makefile.kbuild
++++ usr/src/nv.2990799/Makefile.kbuild
+@@ -185,14 +185,16 @@
+ acquire_console_sem \
+ kmem_cache_create \
+ on_each_cpu \
+- smp_call_function
++ smp_call_function \
++ acpi_evaluate_integer
+ else
+ COMPILE_TESTS = \
+ remap_page_range \
+ vmap \
+ change_page_attr \
+ i2c_adapter \
+- smp_call_function
++ smp_call_function \
++ acpi_evaluate_integer
+ endif
+
+ #
+--- usr/src/nv/Makefile.nvidia
++++ usr/src/nv.2990799/Makefile.nvidia
+@@ -59,7 +59,8 @@
+ vmap \
+ change_page_attr \
+ i2c_adapter \
+- smp_call_function
++ smp_call_function \
++ acpi_evaluate_integer
+
+ DEFINES+=$(EXTRA_DEFINES)
+
+--- usr/src/nv/conftest.sh
++++ usr/src/nv.2990799/conftest.sh
+@@ -67,6 +67,8 @@
+ }
+
+ build_cflags() {
++ ARCH=`uname -m | sed -e 's/i.86/i386/'`
++
+ BASE_CFLAGS="-D__KERNEL__ \
+ -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
+ -nostdinc -isystem $ISYSTEM"
+@@ -80,16 +82,20 @@
+ test_xen
+
+ if [ "$OUTPUT" != "$SOURCES" ]; then
+- ARCH=`uname -m | sed -e 's/i.86/i386/'`
+ MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-default"
+ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
+ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
++ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
+ fi
+ if [ "$XEN_PRESENT" != "0" ]; then
+ MACH_CFLAGS="-I$HEADERS/asm-$ARCH/mach-xen $MACH_CFLAGS"
+ fi
+ else
+ MACH_CFLAGS="-I$HEADERS/asm/mach-default"
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ MACH_CFLAGS="$MACH_CFLAGS -I$HEADERS/asm-x86/mach-default"
++ MACH_CFLAGS="$MACH_CFLAGS -I$SOURCES/arch/x86/include/asm/mach-default"
++ fi
+ if [ "$XEN_PRESENT" != "0" ]; then
+ MACH_CFLAGS="-I$HEADERS/asm/mach-xen $MACH_CFLAGS"
+ fi
+@@ -97,6 +103,9 @@
+
+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS"
+
++ if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
++ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include"
++ fi
+ if [ -n "$BUILD_PARAMS" ]; then
+ CFLAGS="$CFLAGS -D$BUILD_PARAMS"
+ fi
+@@ -858,7 +867,7 @@
+
+ if [ -f conftest$$.o ]; then
+ rm -f conftest$$.o
+- echo "#undef NV_ON_EACH_CPU" >> conftest.h
++ echo "#undef NV_ON_EACH_CPU_PRESENT" >> conftest.h
+ return
+ fi
+
+@@ -897,6 +906,57 @@
+ fi
+ ;;
+
++ acpi_evaluate_integer)
++ #
++ # Determine if the acpi_evaluate_integer() function is
++ # present and the type of its 'data' argument.
++ #
++
++ echo "$CONFTEST_PREAMBLE
++ #include <acpi/acpi_bus.h>
++ acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s,
++ struct acpi_object_list *l, unsigned long long *d) {
++ return AE_OK;
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
++ echo "typedef unsigned long long nv_acpi_integer_t;" >> conftest.h
++ return
++ fi
++
++ echo "$CONFTEST_PREAMBLE
++ #include <acpi/acpi_bus.h>
++ acpi_status acpi_evaluate_integer(acpi_handle h, acpi_string s,
++ struct acpi_object_list *l, unsigned long *d) {
++ return AE_OK;
++ }" > conftest$$.c
++
++ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo "#define NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
++ echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h
++ return
++ else
++ #
++ # We can't report a compile test failure here because
++ # this is a catch-all for both kernels that don't
++ # have acpi_evaluate_integer() and kernels that have
++ # broken header files that make it impossible to
++ # tell if the function is present.
++ #
++ echo "#undef NV_ACPI_EVALUATE_INTEGER_PRESENT" >> conftest.h
++ echo "typedef unsigned long nv_acpi_integer_t;" >> conftest.h
++ fi
++ ;;
++
+ esac
+ }
+
+--- usr/src/nv/nvacpi.c
++++ usr/src/nv.2990799/nvacpi.c
+@@ -136,7 +136,7 @@
+ struct acpi_object_list control_argument_list = { 0, NULL };
+ nv_stack_t *sp = NULL;
+ struct list_head *node, *next;
+- unsigned long device_id = 0;
++ nv_acpi_integer_t device_id = 0;
+ int device_counter = 0;
+
+ NV_KMEM_CACHE_ALLOC_STACK(sp);
+@@ -158,11 +158,9 @@
+
+ os_mem_set((void *)pNvAcpiObject, 0, sizeof(nv_acpi_t));
+
+- // assign driver data structure ptr to this device
+- acpi_driver_data(device) = pNvAcpiObject;
+-
+- // store a device reference in our object
++ device->driver_data = pNvAcpiObject;
+ pNvAcpiObject->device = device;
++
+ pNvAcpiObject->sp = sp;
+
+ // grab handles to all the important nodes representing devices
+@@ -306,7 +304,7 @@
+ */
+ nv_acpi_t *pNvAcpiObject = data;
+ u32 event_val = 0;
+- unsigned long state;
++ nv_acpi_integer_t state;
+ int status = 0;
+ int device_counter = 0;
+
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild
index f0eb7f02ad56..afac6ab19e25 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild,v 1.4 2008/12/18 18:36:31 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-177.82.ebuild,v 1.5 2008/12/25 10:16:46 vapier Exp $
inherit eutils multilib versionator linux-mod flag-o-matic nvidia-driver
@@ -204,6 +204,8 @@ src_unpack() {
# Use some more sensible gl headers and make way for new glext.h
epatch "${FILESDIR}"/NVIDIA_glx-glheader.patch
+ epatch "${FILESDIR}"/nvidia-2.6.28.patch
+
# allow on board sensors to work with lm_sensors
if use kernel_linux; then
epatch "${FILESDIR}"/NVIDIA_i2c-hwmon.patch