summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristopher Kersey <augustus@gentoo.org>2006-01-10 19:59:18 +0000
committerKristopher Kersey <augustus@gentoo.org>2006-01-10 19:59:18 +0000
commit034a212f6aa732e1b073a48eed0e090138a38f3c (patch)
tree2c648b392364d6a45e9fea2bd8563c749655ed77 /media-video/nvidia-kernel
parentAdded modular X dependencies. (diff)
downloadhistorical-034a212f6aa732e1b073a48eed0e090138a38f3c.tar.gz
historical-034a212f6aa732e1b073a48eed0e090138a38f3c.tar.bz2
historical-034a212f6aa732e1b073a48eed0e090138a38f3c.zip
New ebuild nvidia-kernel-1.0.6629-r5 to fix Bug #113466. New ebuild nvidia-kernel-1.0.8178-r1 to fix Bug #115417 and Bug #117996.
Package-Manager: portage-2.0.53
Diffstat (limited to 'media-video/nvidia-kernel')
-rw-r--r--media-video/nvidia-kernel/ChangeLog14
-rw-r--r--media-video/nvidia-kernel/Manifest90
-rw-r--r--media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-7174-1296092.diff97
-rw-r--r--media-video/nvidia-kernel/files/1.0.8178/NVIDIA_kernel-1.0-8178-U122205.diff509
-rw-r--r--media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r52
-rw-r--r--media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.8178-r12
-rw-r--r--media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r5.ebuild148
-rw-r--r--media-video/nvidia-kernel/nvidia-kernel-1.0.8178-r1.ebuild122
8 files changed, 940 insertions, 44 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog
index f64a59be4de2..9337276abfdd 100644
--- a/media-video/nvidia-kernel/ChangeLog
+++ b/media-video/nvidia-kernel/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for media-video/nvidia-kernel
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.127 2005/12/23 15:32:17 augustus Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.128 2006/01/10 19:59:18 augustus Exp $
+
+*nvidia-kernel-1.0.8178-r1 (10 Jan 2006)
+*nvidia-kernel-1.0.6629-r5 (10 Jan 2006)
+
+ 10 Jan 2006; Kristopher Kersey <augustus@gentoo.org>
+ +files/1.0.6629/NVIDIA_kernel-1.0-7174-1296092.diff,
+ +files/1.0.8178/NVIDIA_kernel-1.0-8178-U122205.diff,
+ +nvidia-kernel-1.0.6629-r5.ebuild, +nvidia-kernel-1.0.8178-r1.ebuild:
+ New ebuild nvidia-kernel-1.0.6629-r5 to fix Bug #113466.
+ New ebuild nvidia-kernel-1.0.8178-r1 to fix Bug #115417 and Bug #117996.
*nvidia-kernel-1.0.8178 (23 Dec 2005)
diff --git a/media-video/nvidia-kernel/Manifest b/media-video/nvidia-kernel/Manifest
index 48087350afca..935a49b70b6d 100644
--- a/media-video/nvidia-kernel/Manifest
+++ b/media-video/nvidia-kernel/Manifest
@@ -1,60 +1,66 @@
-MD5 10d0ea339c94b760ccf365b7cde88991 nvidia-kernel-1.0.8174.ebuild 3502
-MD5 b44523732e779c46cebed035eb62cbfc nvidia-kernel-1.0.7167-r1.ebuild 3982
-MD5 2e12cd6f21aaabd1424b51b10d2c0c34 nvidia-kernel-1.0.7174.ebuild 4025
-MD5 29777a7a6934d750d1f2743d384267d2 nvidia-kernel-1.0.6629-r4.ebuild 4600
-MD5 166ed8e5137e5ad84f772780cbb4e1ad nvidia-kernel-1.0.8178.ebuild 3592
-MD5 6912838fee04de491aa184c309e274a9 nvidia-kernel-1.0.6111-r3.ebuild 4523
-MD5 f5f6cf9c514db21c168cee477d22c68a ChangeLog 32555
-MD5 6e28642fae4a75a66584dd04910cbac4 nvidia-kernel-1.0.7676-r1.ebuild 4669
-MD5 044c61105ab94548ebf0d98a8482eec6 nvidia-kernel-1.0.7676.ebuild 4549
-MD5 37df0e5dfe53647a35ffd1166d5311e8 nvidia-kernel-1.0.8174-r1.ebuild 3584
-MD5 075fe48a4f1fc90d2c3814e7bcd1d1ab metadata.xml 313
-MD5 0da986517ab8d7beb13c5d1fe5a4c1c6 nvidia-kernel-1.0.7667.ebuild 4538
-MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r3 163
-MD5 8a4687b0fc3e7cc0b36c247697d94701 files/digest-nvidia-kernel-1.0.6629-r4 163
-MD5 97b3ec5488fb7f7f6cdde31ee42e45af files/digest-nvidia-kernel-1.0.7167-r1 163
-MD5 4ea42a34abde5c81fe828b09afab7651 files/digest-nvidia-kernel-1.0.7676-r1 163
-MD5 eafb3ff0c01e832a5a4abc80f9e7eec7 files/digest-nvidia-kernel-1.0.8174-r1 164
-MD5 61c3ebdd8604c971bf969ea03040d170 files/digest-nvidia-kernel-1.0.7174 163
-MD5 ef2c4ecedb45b67d79b43ffe58c660cf files/digest-nvidia-kernel-1.0.7667 163
-MD5 4ea42a34abde5c81fe828b09afab7651 files/digest-nvidia-kernel-1.0.7676 163
-MD5 eafb3ff0c01e832a5a4abc80f9e7eec7 files/digest-nvidia-kernel-1.0.8174 164
-MD5 2052e159a0f171feb2af48a8cafecc99 files/digest-nvidia-kernel-1.0.8178 164
-MD5 d8fcf2021aa68584d4a4d9e96b671da0 files/nvidia 501
-MD5 762e6f6e16aa6dd5b2469e99fe8decd3 files/1.0.6111/nv-pci_find_class.patch 2903
+MD5 e34e70ad5bc69da0fa477ae72dc1748f ChangeLog 33010
MD5 b5b7f947ffb9e6c19f7457ff7c14d0db files/1.0.6111/conftest_koutput_includes.patch 1082
+MD5 762e6f6e16aa6dd5b2469e99fe8decd3 files/1.0.6111/nv-pci_find_class.patch 2903
+MD5 c2b155f40d7b904f07550e8e326969c2 files/1.0.6111/nv-remap-range.patch 5715
+MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640
MD5 14924b09123b075f910c73316baff848 files/1.0.6111/power-suspend-2.6.9-changes.patch 856
MD5 5177339888e44bb5f4b6124fa5830e7f files/1.0.6111/vmalloc-reserve.patch 542
-MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640
-MD5 c2b155f40d7b904f07550e8e326969c2 files/1.0.6111/nv-remap-range.patch 5715
+MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/NVIDIA_kernel-1.0-6629-1155389.patch 1518
MD5 ddeae194df6bb2112d7de723df8d84c2 files/1.0.6629/NVIDIA_kernel-1.0-6629-1161283.patch 18398
-MD5 64d76075a90dedc83f1dc971389c910e files/1.0.6629/nv-shutup-warnings.patch 712
+MD5 5a17c3fa427b4d0ff8e38f82e57cd817 files/1.0.6629/NVIDIA_kernel-1.0-6629-1162524.patch 9417
MD5 ada7d22def202e56c01c1e72c8000d45 files/1.0.6629/NVIDIA_kernel-1.0-6629-1165235.patch 581
-MD5 c039797780f78262baa02ff488e822ff files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch 435
+MD5 f1a5a01593ef996b38fe70bc93fa7440 files/1.0.6629/NVIDIA_kernel-1.0-6629-1171869.patch 2160
+MD5 59c5fa8340585303cd18362bbeb0086f files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch 1877
+MD5 d4e8ffdb0cc67c56884e6055d2045e51 files/1.0.6629/NVIDIA_kernel-1.0-6629-1182399.patch 2608
+MD5 e210d99cae87c3f60120ea474b97fca7 files/1.0.6629/NVIDIA_kernel-1.0-6629-1189413.patch 8072
+MD5 da7644fcc801d40c26fb22b570a88835 files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff 9445
+MD5 bca6ad85efa6071a949bdcb24fce1733 files/1.0.6629/NVIDIA_kernel-1.0-6629-agp_bridge_data.patch 7860
+MD5 0983a2cbdacbaa3ae1a9ac1759a37706 files/1.0.6629/NVIDIA_kernel-1.0-7174-1296092.diff 3663
MD5 dbf80a2cbaf69a10521429e1b2a7e10c files/1.0.6629/conftest_koutput_includes.patch 1082
MD5 5aef5c6a394896bbb8392816f6795147 files/1.0.6629/nv-amd64-shutup-warnings.patch 902
-MD5 e210d99cae87c3f60120ea474b97fca7 files/1.0.6629/NVIDIA_kernel-1.0-6629-1189413.patch 8072
-MD5 59c5fa8340585303cd18362bbeb0086f files/1.0.6629/NVIDIA_kernel-1.0-6629-1175225.patch 1877
+MD5 c039797780f78262baa02ff488e822ff files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch 435
MD5 ddeae194df6bb2112d7de723df8d84c2 files/1.0.6629/nv-fix-memory-limit.patch 18398
-MD5 5a17c3fa427b4d0ff8e38f82e57cd817 files/1.0.6629/NVIDIA_kernel-1.0-6629-1162524.patch 9417
-MD5 bca6ad85efa6071a949bdcb24fce1733 files/1.0.6629/NVIDIA_kernel-1.0-6629-agp_bridge_data.patch 7860
-MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/nv-pgprot-speedup.patch 1518
-MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/NVIDIA_kernel-1.0-6629-1155389.patch 1518
MD5 e70739410861defb6bf3d40f2706d554 files/1.0.6629/nv-pgd_offset.patch 3139
-MD5 d4e8ffdb0cc67c56884e6055d2045e51 files/1.0.6629/NVIDIA_kernel-1.0-6629-1182399.patch 2608
-MD5 f1a5a01593ef996b38fe70bc93fa7440 files/1.0.6629/NVIDIA_kernel-1.0-6629-1171869.patch 2160
+MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/nv-pgprot-speedup.patch 1518
+MD5 64d76075a90dedc83f1dc971389c910e files/1.0.6629/nv-shutup-warnings.patch 712
MD5 7c9db721d244f6ca709e2b8003ce4e0d files/1.0.6629/nv-vm_flags-no-VM_LOCKED.patch 677
-MD5 da7644fcc801d40c26fb22b570a88835 files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff 9445
MD5 70bb10b2da2423a6be2a4c2bce38d807 files/1.0.7167/NVIDIA_kernel-1.0-7167-1233959.patch 490
-MD5 9df3fbed7af6fcb4ad13b1b5c3851381 files/1.0.7167/NVIDIA_kernel-1.0-7167-disable-preempt-on-smp_processor_id.patch 419
MD5 e2625e9e0a6679c38783b5d8985fdaf6 files/1.0.7167/NVIDIA_kernel-1.0-7167-1237815.patch 1100
+MD5 82d99e72fddbc1b0447708afd84dc8c5 files/1.0.7167/NVIDIA_kernel-1.0-7167-amd64-shutup-warnings.patch 770
MD5 7ae487fba8a81fb91d53f35b9066512f files/1.0.7167/NVIDIA_kernel-1.0-7167-conftest-koutput-includes.patch 1082
+MD5 9df3fbed7af6fcb4ad13b1b5c3851381 files/1.0.7167/NVIDIA_kernel-1.0-7167-disable-preempt-on-smp_processor_id.patch 419
MD5 6c6bd7d2e4589cf3f4725082bb413a43 files/1.0.7167/NVIDIA_kernel-1.0-7167-x86-shutup-warnings.patch 742
-MD5 82d99e72fddbc1b0447708afd84dc8c5 files/1.0.7167/NVIDIA_kernel-1.0-7167-amd64-shutup-warnings.patch 770
MD5 e1718c0414288a04c27b70a124947613 files/1.0.7667/NVIDIA_kernel-1.0-7667-KERNEL_VERSION-moved.patch 1764
-MD5 5eaf8c4597d2f0b2670caa1303b2a4bc files/1.0.7676/NVIDIA_kernel-1.0-7676-1392404.diff 2359
-MD5 5125c6d55ae72122144771ef1697db53 files/1.0.7676/NVIDIA_kernel-1.0-7676-1361053.diff 2989
-MD5 196649a84a2396a6588f27457a39d1fa files/1.0.7676/NVIDIA_kernel-1.0-7676-1386866.diff 2491
MD5 99b630e5a1d4b732e930781f25187194 files/1.0.7676/NVIDIA_kernel-1.0-7676-1321905.diff 1047
MD5 c0495ec827a938afcb807dd618e03945 files/1.0.7676/NVIDIA_kernel-1.0-7676-1359015.diff 3294
+MD5 5125c6d55ae72122144771ef1697db53 files/1.0.7676/NVIDIA_kernel-1.0-7676-1361053.diff 2989
+MD5 196649a84a2396a6588f27457a39d1fa files/1.0.7676/NVIDIA_kernel-1.0-7676-1386866.diff 2491
+MD5 5eaf8c4597d2f0b2670caa1303b2a4bc files/1.0.7676/NVIDIA_kernel-1.0-7676-1392404.diff 2359
MD5 1cac21325aacb18a199949ee20979165 files/1.0.8174/NVIDIA_kernel-1.0-8174-1423627.diff 11631
+MD5 3b5a2525633e88b9d78c4721190542e6 files/1.0.8178/NVIDIA_kernel-1.0-8178-U122205.diff 16010
+MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r3 163
+MD5 8a4687b0fc3e7cc0b36c247697d94701 files/digest-nvidia-kernel-1.0.6629-r4 163
+MD5 8a4687b0fc3e7cc0b36c247697d94701 files/digest-nvidia-kernel-1.0.6629-r5 163
+MD5 97b3ec5488fb7f7f6cdde31ee42e45af files/digest-nvidia-kernel-1.0.7167-r1 163
+MD5 61c3ebdd8604c971bf969ea03040d170 files/digest-nvidia-kernel-1.0.7174 163
+MD5 ef2c4ecedb45b67d79b43ffe58c660cf files/digest-nvidia-kernel-1.0.7667 163
+MD5 4ea42a34abde5c81fe828b09afab7651 files/digest-nvidia-kernel-1.0.7676 163
+MD5 4ea42a34abde5c81fe828b09afab7651 files/digest-nvidia-kernel-1.0.7676-r1 163
+MD5 eafb3ff0c01e832a5a4abc80f9e7eec7 files/digest-nvidia-kernel-1.0.8174 164
+MD5 eafb3ff0c01e832a5a4abc80f9e7eec7 files/digest-nvidia-kernel-1.0.8174-r1 164
+MD5 2052e159a0f171feb2af48a8cafecc99 files/digest-nvidia-kernel-1.0.8178 164
+MD5 2052e159a0f171feb2af48a8cafecc99 files/digest-nvidia-kernel-1.0.8178-r1 164
+MD5 d8fcf2021aa68584d4a4d9e96b671da0 files/nvidia 501
+MD5 075fe48a4f1fc90d2c3814e7bcd1d1ab metadata.xml 313
+MD5 6912838fee04de491aa184c309e274a9 nvidia-kernel-1.0.6111-r3.ebuild 4523
+MD5 29777a7a6934d750d1f2743d384267d2 nvidia-kernel-1.0.6629-r4.ebuild 4600
+MD5 8aac41beeb1f441bb1dc5fe1aaabbd84 nvidia-kernel-1.0.6629-r5.ebuild 4772
+MD5 b44523732e779c46cebed035eb62cbfc nvidia-kernel-1.0.7167-r1.ebuild 3982
+MD5 2e12cd6f21aaabd1424b51b10d2c0c34 nvidia-kernel-1.0.7174.ebuild 4025
+MD5 0da986517ab8d7beb13c5d1fe5a4c1c6 nvidia-kernel-1.0.7667.ebuild 4538
+MD5 6e28642fae4a75a66584dd04910cbac4 nvidia-kernel-1.0.7676-r1.ebuild 4669
+MD5 044c61105ab94548ebf0d98a8482eec6 nvidia-kernel-1.0.7676.ebuild 4549
+MD5 37df0e5dfe53647a35ffd1166d5311e8 nvidia-kernel-1.0.8174-r1.ebuild 3584
+MD5 10d0ea339c94b760ccf365b7cde88991 nvidia-kernel-1.0.8174.ebuild 3502
+MD5 f34cdda25ec8e0a57be58b320cbf59b1 nvidia-kernel-1.0.8178-r1.ebuild 3584
+MD5 166ed8e5137e5ad84f772780cbb4e1ad nvidia-kernel-1.0.8178.ebuild 3592
diff --git a/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-7174-1296092.diff b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-7174-1296092.diff
new file mode 100644
index 000000000000..049c954383bf
--- /dev/null
+++ b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-7174-1296092.diff
@@ -0,0 +1,97 @@
+diff -ru usr/src/nv/nv-linux.h usr/src/nv.1296092/nv-linux.h
+--- usr/src/nv/nv-linux.h 2005-03-22 16:19:09.000000000 +0100
++++ usr/src/nv.1296092/nv-linux.h 2005-06-14 16:55:30.416687848 +0200
+@@ -76,7 +76,7 @@
+ #include <asm/page.h> /* PAGE_OFFSET */
+ #include <asm/pgtable.h> /* pte bit definitions */
+
+-#if defined(NVCPU_X86_64) && defined(KERNEL_2_6)
++#if defined(NVCPU_X86_64) && defined(KERNEL_2_6) && !defined(HAVE_COMPAT_IOCTL)
+ #include <linux/syscalls.h> /* sys_ioctl() */
+ #include <linux/ioctl32.h> /* register_ioctl32_conversion() */
+ #endif
+diff -ru usr/src/nv/nv.c usr/src/nv.1296092/nv.c
+--- usr/src/nv/nv.c 2005-03-22 16:19:09.000000000 +0100
++++ usr/src/nv.1296092/nv.c 2005-06-14 16:55:16.745766144 +0200
+@@ -153,6 +153,7 @@
+ int nv_kern_mmap(struct file *, struct vm_area_struct *);
+ unsigned int nv_kern_poll(struct file *, poll_table *);
+ int nv_kern_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
++long nv_kern_compat_ioctl(struct file *, unsigned int, unsigned long);
+ void nv_kern_isr_bh(unsigned long);
+ irqreturn_t nv_kern_isr(int, void *, struct pt_regs *);
+ void nv_kern_rc_timer(unsigned long);
+@@ -209,6 +210,9 @@
+ .owner = THIS_MODULE,
+ .poll = nv_kern_poll,
+ .ioctl = nv_kern_ioctl,
++#if defined(NVCPU_X86_64) && defined(HAVE_COMPAT_IOCTL)
++ .compat_ioctl = nv_kern_compat_ioctl,
++#endif
+ .mmap = nv_kern_mmap,
+ .open = nv_kern_open,
+ .release = nv_kern_close,
+@@ -993,8 +997,10 @@
+ inter_module_register("nv_linux_devices", THIS_MODULE, nv_linux_devices);
+ #endif
+
++#if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION) && !defined(HAVE_COMPAT_IOCTL)
+ /* Register ioctl conversions for 32 bit clients */
+ rm_register_ioctl_conversions();
++#endif
+
+ #ifdef NV_SWIOTLB
+ // may need a better test than this eventually
+@@ -1154,8 +1160,10 @@
+ #endif
+ }
+
++#if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION) && !defined(HAVE_COMPAT_IOCTL)
+ /* Unregister ioctl conversions for 32 bit clients */
+ rm_unregister_ioctl_conversions();
++#endif
+
+ #if defined(NV_BUILD_NV_PAT_SUPPORT)
+ if (nv_pat_enabled)
+@@ -1930,6 +1938,15 @@
+ return status;
+ }
+
++long nv_kern_compat_ioctl(
++ struct file *file,
++ unsigned int cmd,
++ unsigned long i_arg
++)
++{
++ return nv_kern_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
++}
++
+ /*
+ * driver receives an interrupt
+ * if someone waiting, then hand it off.
+diff -ru usr/src/nv/os-interface.c usr/src/nv.1296092/os-interface.c
+--- usr/src/nv/os-interface.c 2005-03-22 16:19:09.000000000 +0100
++++ usr/src/nv.1296092/os-interface.c 2005-06-14 16:55:21.366063752 +0200
+@@ -1227,18 +1227,18 @@
+
+ void NV_API_CALL os_register_ioctl32_conversion(U032 cmd, U032 size)
+ {
+-#if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION)
++#if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION) && !defined(HAVE_COMPAT_IOCTL)
+ unsigned int request = _IOWR(NV_IOCTL_MAGIC, cmd, char[size]);
+ register_ioctl32_conversion(request, (void *)sys_ioctl);
+-#endif /* NVCPU_X86_64 */
++#endif
+ }
+
+ void NV_API_CALL os_unregister_ioctl32_conversion(U032 cmd, U032 size)
+ {
+-#if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION)
++#if defined(NVCPU_X86_64) && defined(CONFIG_IA32_EMULATION) && !defined(HAVE_COMPAT_IOCTL)
+ unsigned int request = _IOWR(NV_IOCTL_MAGIC, cmd, char[size]);
+ unregister_ioctl32_conversion(request);
+-#endif /* NVCPU_X86_64 */
++#endif
+ }
+
+ BOOL NV_API_CALL os_pat_supported(void)
diff --git a/media-video/nvidia-kernel/files/1.0.8178/NVIDIA_kernel-1.0-8178-U122205.diff b/media-video/nvidia-kernel/files/1.0.8178/NVIDIA_kernel-1.0-8178-U122205.diff
new file mode 100644
index 000000000000..4a672cbe49c5
--- /dev/null
+++ b/media-video/nvidia-kernel/files/1.0.8178/NVIDIA_kernel-1.0-8178-U122205.diff
@@ -0,0 +1,509 @@
+diff -ru usr/src/nv/Makefile.kbuild usr/src/nv.U122205/Makefile.kbuild
+--- usr/src/nv/Makefile.kbuild 2005-12-15 01:57:35.000000000 +0100
++++ usr/src/nv.U122205/Makefile.kbuild 2005-12-22 18:49:02.746376250 +0100
+@@ -186,6 +186,18 @@
+ ifeq ($(shell $(CONFTEST) sysctl_max_map_count), 1)
+ EXTRA_CFLAGS += -DNV_SYSCTL_MAX_MAP_COUNT_PRESENT
+ endif
++
++ ifeq ($(shell $(CONFTEST) pm_message_t), 1)
++ EXTRA_CFLAGS += -DNV_PM_MESSAGE_T_PRESENT
++ endif
++
++ ifeq ($(shell $(CONFTEST) pci_choose_state), 1)
++ EXTRA_CFLAGS += -DNV_PCI_CHOOSE_STATE_PRESENT
++ endif
++
++ ifeq ($(shell $(CONFTEST) vm_insert_page), 1)
++ EXTRA_CFLAGS += -DNV_VM_INSERT_PAGE_PRESENT
++ endif
+ endif
+
+ ifeq ($(shell $(CONFTEST) remap_pfn_range), 1)
+diff -ru usr/src/nv/conftest.sh usr/src/nv.U122205/conftest.sh
+--- usr/src/nv/conftest.sh 2005-12-15 01:57:35.000000000 +0100
++++ usr/src/nv.U122205/conftest.sh 2005-12-22 18:49:02.746376250 +0100
+@@ -42,7 +42,7 @@
+ echo "#include <linux/mm.h>
+ int nv_remap_page_range(void) {
+ pgprot_t pgprot = __pgprot(0);
+- remap_page_range(NULL, 0L, 0L, 0L, pgprot);
++ return remap_page_range(NULL, 0L, 0L, 0L, pgprot);
+ }" > conftest$$.c
+
+ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+@@ -57,7 +57,7 @@
+ echo "#include <linux/mm.h>
+ int nv_remap_page_range(void) {
+ pgprot_t pgprot = __pgprot(0);
+- remap_page_range(0L, 0L, 0L, pgprot);
++ return remap_page_range(0L, 0L, 0L, pgprot);
+ }" > conftest$$.c
+
+ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+@@ -528,7 +528,7 @@
+ echo "#include <linux/mm.h>
+ int nv_remap_pfn_range(void) {
+ pgprot_t pgprot = __pgprot(0);
+- remap_pfn_range(NULL, 0L, 0L, 0L, pgprot);
++ return remap_pfn_range(NULL, 0L, 0L, 0L, pgprot);
+ }" > conftest$$.c
+
+ $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+@@ -644,4 +644,69 @@
+ fi
+ ;;
+
++ pm_message_t)
++ #
++ # Does linux/pm.h declare the pm_message_t type?
++ #
++
++ echo "#include <linux/pm.h>
++ void nv_test_pm_message_t(pm_message_t state) {
++ pm_message_t *p = &state;
++ }" > conftest$$.c
++
++ $CC $CFLAGS -Wno-error -c conftest$$.c > /dev/null 2>&1
++ rm -f conftest$$.c
++
++ if [ -f conftest$$.o ]; then
++ rm -f conftest$$.o
++ echo 1
++ else
++ echo 0
++ fi
++ ;;
++
++ pci_choose_state)
++ #
++ # Determine if pci_choose_state() is present.
++ #
++
++ echo "#include <linux/pci.h>
++ pci_power_t
++ nv_pci_choose_state(struct pci_dev *dev, pm_message_t state) {
++ return pci_choose_state(dev, state);
++ }" > 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 1
++ else
++ echo 0
++ fi
++ ;;
++
++ vm_insert_page)
++ #
++ # Determine if vm_insert_page() is present.
++ #
++
++ echo "#include <linux/mm.h>
++ int nv_vm_insert_page(void) {
++ struct page *page;
++ return vm_insert_page(NULL, 0L, page);
++ }" > 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 1
++ else
++ echo 0
++ fi
++ ;;
++
+ esac
+diff -ru usr/src/nv/nv-linux.h usr/src/nv.U122205/nv-linux.h
+--- usr/src/nv/nv-linux.h 2005-12-15 01:57:35.000000000 +0100
++++ usr/src/nv.U122205/nv-linux.h 2005-12-22 18:49:02.746376250 +0100
+@@ -642,15 +642,49 @@
+ #define NV_PRINT_AT(at)
+ #endif
+
+-// acpi support has been back-ported to the 2.4 kernel, but the 2.4 driver
+-// model is not sufficient for full acpi support. it may work in some cases,
+-// but not enough for us to officially support this configuration.
+-#if defined(CONFIG_ACPI) && defined(KERNEL_2_6)
+-#define NV_PM_SUPPORT_ACPI
++/*
++ * On Linux 2.6, we support both APM and ACPI power management. On Linux
++ * 2.4, we support APM, only. ACPI support has been back-ported to the
++ * Linux 2.4 kernel, but the Linux 2.4 driver model is not sufficient for
++ * full ACPI support: it may work with some systems, but not reliably
++ * enough for us to officially support this configuration.
++ *
++ * We support two Linux kernel power managment interfaces: the original
++ * pm_register()/pm_unregister() on Linux 2.4 and the device driver model
++ * backed PCI driver power management callbacks introduced with Linux
++ * 2.6.
++ *
++ * The code below determines which interface to support on this kernel
++ * version, if any; if built for Linux 2.6, it will also determine if the
++ * kernel comes with ACPI or APM power management support.
++ */
++#if defined(KERNEL_2_6) && (defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) || defined(CONFIG_ACPI))
++#define NV_PM_SUPPORT_DEVICE_DRIVER_MODEL
++#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
++#define NV_PM_SUPPORT_NEW_STYLE_APM
++#endif
+ #endif
+
+-#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
+-#define NV_PM_SUPPORT_APM
++/*
++ * On Linux 2.6 kernels >= 2.6.11, the PCI subsystem provides a new
++ * interface that allows PCI drivers to determine the correct power state
++ * for a given system power state; our suspend/resume callbacks now use
++ * this interface and operate on PCI power state defines.
++ *
++ * Define these new PCI power state #define's here for compatibility with
++ * older Linux 2.6 kernels.
++ */
++#if defined(KERNEL_2_6) && !defined(PCI_D0)
++#define PCI_D0 PM_SUSPEND_ON
++#define PCI_D3hot PM_SUSPEND_MEM
++#endif
++
++#if defined(KERNEL_2_6) && !defined(NV_PM_MESSAGE_T_PRESENT)
++typedef u32 pm_message_t;
++#endif
++
++#if defined(KERNEL_2_4) && (defined(CONFIG_APM) || defined(CONFIG_APM_MODULE))
++#define NV_PM_SUPPORT_OLD_STYLE_APM
+ #endif
+
+ #ifndef minor
+@@ -666,9 +700,13 @@
+ #define PCI_CAP_ID_EXP 0x10
+ #endif
+
++#if defined(NV_VM_INSERT_PAGE_PRESENT)
++#define NV_VM_INSERT_PAGE(vma, addr, page) \
++ vm_insert_page(vma, addr, page)
++#endif
+ #if defined(NV_REMAP_PFN_RANGE_PRESENT)
+ #define NV_REMAP_PAGE_RANGE(from, offset, x...) \
+- remap_pfn_range(vma, from, ((offset) >> PAGE_SHIFT), x)
++ remap_pfn_range(vma, from, ((offset) >> PAGE_SHIFT), x)
+ #elif defined(NV_REMAP_PAGE_RANGE_5_PRESENT)
+ #define NV_REMAP_PAGE_RANGE(x...) remap_page_range(vma, x)
+ #elif defined(NV_REMAP_PAGE_RANGE_4_PRESENT)
+diff -ru usr/src/nv/nv-vm.c usr/src/nv.U122205/nv-vm.c
+--- usr/src/nv/nv-vm.c 2005-12-15 01:57:35.000000000 +0100
++++ usr/src/nv.U122205/nv-vm.c 2005-12-22 18:49:02.746376250 +0100
+@@ -105,6 +105,15 @@
+ #endif
+ }
+
++static inline BOOL nv_page_locked(nv_pte_t *page_ptr)
++{
++ BOOL locked = FALSE;
++#if defined(PageReserved)
++ locked = PageReserved(NV_GET_PAGE_STRUCT(page_ptr->phys_addr));
++#endif
++ return locked;
++}
++
+ #if defined(NV_SG_MAP_BUFFERS)
+
+ /* track how much memory has been remapped through the iommu/swiotlb */
+@@ -704,7 +713,7 @@
+ if (!NV_ALLOC_MAPPING_CONTIG(at->flags))
+ nv_sg_unmap_buffer(dev, &page_ptr->sg_list, page_ptr);
+ #endif
+- if (!NV_ALLOC_MAPPING_CONTIG(at->flags) && !NV_ALLOC_MAPPING_VMALLOC(at->flags))
++ if (!NV_ALLOC_MAPPING_CONTIG(at->flags) && !NV_ALLOC_MAPPING_VMALLOC(at->flags) && !nv_page_locked(page_ptr))
+ NV_FREE_PAGES(page_ptr->virt_addr, 0);
+ }
+ nv_flush_caches();
+diff -ru usr/src/nv/nv.c usr/src/nv.U122205/nv.c
+--- usr/src/nv/nv.c 2005-12-15 01:57:35.000000000 +0100
++++ usr/src/nv.U122205/nv.c 2005-12-22 18:49:05.822568500 +0100
+@@ -29,7 +29,7 @@
+
+ static nv_linux_state_t nv_linux_devices[NV_MAX_DEVICES];
+
+-#if defined(NV_PM_SUPPORT_APM)
++#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
+ static struct pm_dev *apm_nv_dev[NV_MAX_DEVICES] = { 0 };
+ #endif
+
+@@ -244,8 +244,8 @@
+ void nv_kern_isr_bh(unsigned long);
+ irqreturn_t nv_kern_isr(int, void *, struct pt_regs *);
+ void nv_kern_rc_timer(unsigned long);
+-#if defined(NV_PM_SUPPORT_APM)
+-int nv_kern_apm_event(struct pm_dev *dev, pm_request_t rqst, void *data);
++#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
++static int nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
+ #endif
+
+ static int nv_kern_read_cardinfo(char *, char **, off_t off, int, int *, void *);
+@@ -265,9 +265,10 @@
+ unsigned int nv_kern_ctl_poll(struct file *, poll_table *);
+
+ int nv_kern_probe(struct pci_dev *, const struct pci_device_id *);
+-#if defined(NV_PM_SUPPORT_ACPI)
+-int nv_kern_acpi_standby(struct pci_dev *, u32);
+-int nv_kern_acpi_resume(struct pci_dev *);
++
++#if defined(NV_PM_SUPPORT_DEVICE_DRIVER_MODEL)
++static int nv_kern_suspend(struct pci_dev *, pm_message_t);
++static int nv_kern_resume(struct pci_dev *);
+ #endif
+
+ /***
+@@ -292,9 +293,9 @@
+ .name = "nvidia",
+ .id_table = nv_pci_table,
+ .probe = nv_kern_probe,
+-#if defined(NV_PM_SUPPORT_ACPI)
+- .suspend = nv_kern_acpi_standby,
+- .resume = nv_kern_acpi_resume,
++#if defined(NV_PM_SUPPORT_DEVICE_DRIVER_MODEL)
++ .suspend = nv_kern_suspend,
++ .resume = nv_kern_resume,
+ #endif
+ };
+
+@@ -1084,9 +1085,12 @@
+
+ // broken kernels may get confused after splitting the page and
+ // restore the page before returning to us. detect that case.
+- if ( (pte_val(*kpte) == kpte_val) &&
+- (pte_val(*kpte) & _PAGE_PSE))
++ if (((pte_val(*kpte) & ~_PAGE_NX) == kpte_val) &&
++ (pte_val(*kpte) & _PAGE_PSE))
+ {
++ if ((pte_val(*kpte) & _PAGE_NX) &&
++ (__nv_supported_pte_mask & _PAGE_NX) == 0)
++ clear_bit(_PAGE_BIT_NX, kpte);
+ spin_unlock(&init_mm.page_table_lock);
+ // don't change the page back, as it's already been reverted
+ put_page(kpte_page);
+@@ -1299,7 +1303,7 @@
+ nv_lock_init_locks(nv_ctl);
+ }
+
+-#if defined(NV_PM_SUPPORT_APM)
++#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
+ for (i = 0; i < num_nv_devices; i++)
+ {
+ apm_nv_dev[i] = pm_register(PM_PCI_DEV, PM_SYS_VGA, nv_kern_apm_event);
+@@ -1418,7 +1422,7 @@
+ if (nv_pte_t_cache != NULL)
+ NV_KMEM_CACHE_DESTROY(nv_pte_t_cache);
+
+-#if defined(NV_PM_SUPPORT_APM)
++#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
+ for (i = 0; i < num_nv_devices; i++)
+ if (apm_nv_dev[i] != NULL) pm_unregister(apm_nv_dev[i]);
+ #endif
+@@ -1473,10 +1477,10 @@
+ inter_module_unregister("nv_linux_devices");
+ #endif
+
+-#if defined(NV_PM_SUPPORT_APM)
++#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
+ for (i = 0; i < num_nv_devices; i++)
+ {
+- pm_unregister(apm_nv_dev[i]);
++ if (apm_nv_dev[i] != NULL) pm_unregister(apm_nv_dev[i]);
+ }
+ #endif
+
+@@ -2118,8 +2122,13 @@
+ for (j = i; j < (i + pages); j++)
+ {
+ nv_verify_page_mappings(at->page_table[j], NV_ALLOC_MAPPING(at->flags));
++#if defined(NV_VM_INSERT_PAGE_PRESENT)
++ if (NV_VM_INSERT_PAGE(vma, start,
++ NV_GET_PAGE_STRUCT(at->page_table[j]->phys_addr)))
++#else
+ if (NV_REMAP_PAGE_RANGE(start, at->page_table[j]->phys_addr,
+ PAGE_SIZE, vma->vm_page_prot))
++#endif
+ {
+ NV_ATOMIC_DEC(at->usage_count);
+ return -EAGAIN;
+@@ -2429,9 +2438,9 @@
+ mod_timer(&nvl->rc_timer, jiffies + HZ); /* set another timeout in 1 second */
+ }
+
+-#if defined(NV_PM_SUPPORT_APM)
++#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
+ /* kernel calls us with a power management event */
+-int
++static int
+ nv_kern_apm_event(
+ struct pm_dev *dev,
+ pm_request_t rqst,
+@@ -2466,7 +2475,6 @@
+
+ switch (rqst)
+ {
+-#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
+ case PM_RESUME:
+ nv_printf(NV_DBG_INFO, "NVRM: APM: received resume event\n");
+ status = rm_power_management(nv, 0, NV_PM_APM_RESUME);
+@@ -2476,15 +2484,12 @@
+ nv_printf(NV_DBG_INFO, "NVRM: APM: received suspend event\n");
+ status = rm_power_management(nv, 0, NV_PM_APM_SUSPEND);
+ break;
+-#endif
+
+-#if defined(KERNEL_2_4)
+ // 2.4 kernels sent a PM_SAVE_STATE request when powering down via
+ // ACPI. just ignore it and return success so the power down works
+ case PM_SAVE_STATE:
+ status = RM_OK;
+ break;
+-#endif
+
+ default:
+ nv_printf(NV_DBG_WARNINGS, "NVRM: APM: unsupported event: %d\n", rqst);
+@@ -2496,7 +2501,7 @@
+
+ return status;
+ }
+-#endif
++#endif /* defined(NV_PM_SUPPORT_OLD_STYLE_APM) */
+
+ /*
+ ** nv_kern_ctl_open
+@@ -3739,6 +3744,7 @@
+ nvl = &nv_linux_devices[num_nv_devices];
+ nv = NV_STATE_PTR(nvl);
+
++ pci_set_drvdata(dev, (void *)nvl);
+ nvl->dev = dev;
+ nv->vendor_id = dev->vendor;
+ nv->device_id = dev->device;
+@@ -3816,11 +3822,10 @@
+ #endif
+ }
+
+-#if defined(NV_PM_SUPPORT_ACPI)
++#if defined(NV_PM_SUPPORT_DEVICE_DRIVER_MODEL)
+
+-int
+-nv_acpi_event
+-(
++static int
++nv_power_management(
+ struct pci_dev *dev,
+ u32 state
+ )
+@@ -3828,70 +3833,77 @@
+ nv_state_t *nv;
+ nv_linux_state_t *lnv = NULL;
+ int status = RM_OK;
+- U032 i;
+
+- nv_printf(NV_DBG_INFO, "NVRM: nv_acpi_event: %d\n", state);
+-
+- for (i = 0; i < num_nv_devices; i++)
+- {
+- if (nv_linux_devices[i].dev == dev)
+- {
+- lnv = &nv_linux_devices[i];
+- break;
+- }
+- }
++ nv_printf(NV_DBG_INFO, "NVRM: nv_power_management: %d\n", state);
++ lnv = pci_get_drvdata(dev);
+
+ if ((!lnv) || (lnv->dev != dev))
+ {
+- nv_printf(NV_DBG_WARNINGS, "NVRM: ACPI: invalid device!\n");
++ nv_printf(NV_DBG_WARNINGS, "NVRM: PM: invalid device!\n");
+ return -1;
+ }
+
+ nv = NV_STATE_PTR(lnv);
++ nv_verify_pci_config(NV_STATE_PTR(lnv), TRUE);
+
+ switch (state)
+ {
+- case PM_SUSPEND_MEM:
++#if defined(NV_PM_SUPPORT_NEW_STYLE_APM)
++ case PCI_D3hot:
++ nv_printf(NV_DBG_INFO, "NVRM: APM: received suspend event\n");
++ status = rm_power_management(nv, 0, NV_PM_APM_SUSPEND);
++ break;
++
++ case PCI_D0:
++ nv_printf(NV_DBG_INFO, "NVRM: APM: received resume event\n");
++ status = rm_power_management(nv, 0, NV_PM_APM_RESUME);
++ break;
++#else
++ case PCI_D3hot:
+ nv_printf(NV_DBG_INFO, "NVRM: ACPI: received suspend event\n");
+ status = rm_power_management(nv, 0, NV_PM_ACPI_STANDBY);
+ break;
+
+- case PM_SUSPEND_ON:
++ case PCI_D0:
+ nv_printf(NV_DBG_INFO, "NVRM: ACPI: received resume event\n");
+ status = rm_power_management(nv, 0, NV_PM_ACPI_RESUME);
+ break;
+-
++#endif
+ default:
+- nv_printf(NV_DBG_WARNINGS, "NVRM: ACPI: unsupported event: %d\n", state);
++ nv_printf(NV_DBG_WARNINGS, "NVRM: PM: unsupported event: %d\n", state);
+ return -1;
+ }
+
+ if (status != RM_OK)
+- nv_printf(NV_DBG_ERRORS, "NVRM: ACPI: failed event: %d\n", state);
++ nv_printf(NV_DBG_ERRORS, "NVRM: PM: failed event: %d\n", state);
+
+ return status;
+ }
+
+-int
+-nv_kern_acpi_standby
+-(
+- struct pci_dev *dev,
+- u32 state
++static int nv_kern_suspend(
++ struct pci_dev *dev,
++ pm_message_t state
+ )
+ {
+- return nv_acpi_event(dev, state);
++ int power_state = -1;
++
++#if !defined(NV_PM_MESSAGE_T_PRESENT)
++ power_state = state;
++#elif defined(NV_PCI_CHOOSE_STATE_PRESENT)
++ power_state = pci_choose_state(dev, state);
++#endif
++
++ return nv_power_management(dev, power_state);
+ }
+
+-int
+-nv_kern_acpi_resume
+-(
++static int nv_kern_resume(
+ struct pci_dev *dev
+ )
+ {
+- return nv_acpi_event(dev, PM_SUSPEND_ON);
++ return nv_power_management(dev, PCI_D0);
+ }
+
+-#endif
++#endif /* defined(NV_PM_SUPPORT_DEVICE_DRIVER_MODEL) */
+
+ void* NV_API_CALL nv_get_adapter_state(
+ U016 bus,
diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r5 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r5
new file mode 100644
index 000000000000..9324510b4ef9
--- /dev/null
+++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r5
@@ -0,0 +1,2 @@
+MD5 f7737c1e95371f37a4fd30da2f11e72c NVIDIA-Linux-x86-1.0-6629-pkg1.run 8725221
+MD5 652e69f549c81a7a3f2806daa74b9c36 NVIDIA-Linux-x86_64-1.0-6629-pkg2.run 7777882
diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.8178-r1 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.8178-r1
new file mode 100644
index 000000000000..8ab8ad6fa543
--- /dev/null
+++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.8178-r1
@@ -0,0 +1,2 @@
+MD5 bc9d459bfeee93735e3959de041635df NVIDIA-Linux-x86-1.0-8178-pkg1.run 12004641
+MD5 524acaed325910bed26e880ce65e7405 NVIDIA-Linux-x86_64-1.0-8178-pkg2.run 9560594
diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r5.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r5.ebuild
new file mode 100644
index 000000000000..e0e6a3dbe06c
--- /dev/null
+++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r5.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r5.ebuild,v 1.1 2006/01/10 19:59:18 augustus Exp $
+
+inherit eutils linux-mod
+
+X86_PKG_V="pkg1"
+AMD64_PKG_V="pkg2"
+NV_V="${PV/1.0./1.0-}"
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}"
+
+DESCRIPTION="Linux kernel module for the NVIDIA X11 driver"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run )"
+
+if use x86; then
+ PKG_V="${X86_PKG_V}"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="${AMD64_PKG_V}"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* x86 amd64"
+RESTRICT="nostrip"
+IUSE=""
+
+RDEPEND="virtual/modutils"
+DEPEND="virtual/linux-sources"
+export _POSIX2_VERSION="199209"
+
+MODULE_NAMES="nvidia(video:${S})"
+BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [ "$?" != 0 ]
+ then
+ eerror "This version needs MTRR support for most chipsets!"
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ mtrr_check;
+}
+
+src_unpack() {
+ if [ ${KV_MINOR} -ge 6 -a ${KV_PATCH} -lt 7 ]
+ then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ cd ${WORKDIR}
+ bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only
+
+ # Add patches below, with a breif description.
+ cd ${S}
+ # Any general patches should go here
+ # Shutup pointer arith warnings
+ use x86 && epatch ${FILESDIR}/${PV}/nv-shutup-warnings.patch
+ use amd64 && epatch ${FILESDIR}/${PV}/nv-amd64-shutup-warnings.patch
+
+ # Patches from Zander (http://www.minion.de/files/1.0-6629/)
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1155389.patch
+ #epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1162524.patch
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1165235.patch
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1171869.patch
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1175225.patch
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1182399.patch
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1189413.patch
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1201042.diff
+ # Yes this is the wrong version but it's needed to fix problems with
+ # 6629 and 7174 is no longer in portage.
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-7174-1296092.diff
+
+ # Now any patches specific to the 2.6 kernel should go here
+ if kernel_is 2 6
+ then
+ einfo "Applying 2.6 kernel patches"
+ # Fix the /usr/src/linux/include/asm not existing on koutput issue #58294
+ epatch ${FILESDIR}/${PV}/conftest_koutput_includes.patch
+ # Fix calling of smp_processor_id() when preempt is enabled
+ epatch ${FILESDIR}/${PV}/nv-disable-preempt-on-smp_processor_id.patch
+ # Fix a limitation on available video memory bug #71684
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1161283.patch
+ # New multi-agp support with newer -mm kernels
+ # http://lkml.org/lkml/2005/1/25/349
+ [[ -n $(grep agp_bridge_data "${KV_DIR}/include/linux/agp_backend.h") ]] && \
+ epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-agp_bridge_data.patch
+ fi
+
+ # if you set this then it's your own fault when stuff breaks :)
+ [ -n "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile.*
+
+ # if greater than 2.6.5 use M= instead of SUBDIR=
+ convert_to_m ${S}/Makefile.kbuild
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # Add the aliases
+ sed -e 's:\${PACKAGE}:'${PF}':g' ${FILESDIR}/nvidia > ${WORKDIR}/nvidia
+ insinto /etc/modules.d
+ newins ${WORKDIR}/nvidia nvidia
+
+ # Docs
+ dodoc ${S}/../../share/doc/README
+
+ # The device creation script
+ into /
+ newsbin ${S}/makedevices.sh NVmakedevices.sh
+}
+
+pkg_postinst() {
+ if [ "${ROOT}" = "/" ] && \
+ [ ! -e /dev/.devfsd ] && \
+ [ ! -e /dev/.udev ] && \
+ [ -x /sbin/NVmakedevices.sh ]
+ then
+ /sbin/NVmakedevices.sh >/dev/null 2>&1
+ fi
+
+ linux-mod_pkg_postinst
+}
diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.8178-r1.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.8178-r1.ebuild
new file mode 100644
index 000000000000..ac3d8e1eaf0e
--- /dev/null
+++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.8178-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.8178-r1.ebuild,v 1.1 2006/01/10 19:59:18 augustus Exp $
+
+inherit eutils linux-mod
+
+X86_PKG_V="pkg1"
+AMD64_PKG_V="pkg2"
+NV_V="${PV/1.0./1.0-}"
+X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}"
+AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}"
+
+DESCRIPTION="Linux kernel module for the NVIDIA X11 driver"
+HOMEPAGE="http://www.nvidia.com/"
+SRC_URI="x86? ( ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run )
+ amd64? ( http://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run )"
+
+if use x86; then
+ PKG_V="${X86_PKG_V}"
+ NV_PACKAGE="${X86_NV_PACKAGE}"
+elif use amd64; then
+ PKG_V="${AMD64_PKG_V}"
+ NV_PACKAGE="${AMD64_NV_PACKAGE}"
+fi
+
+S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv"
+
+LICENSE="NVIDIA"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+RESTRICT="nostrip"
+IUSE=""
+
+RDEPEND="virtual/modutils"
+DEPEND="virtual/linux-sources"
+export _POSIX2_VERSION="199209"
+
+mtrr_check() {
+ ebegin "Checking for MTRR support"
+ linux_chkconfig_present MTRR
+ eend $?
+
+ if [[ $? -ne 0 ]] ; then
+ eerror "This version needs MTRR support for most chipsets!"
+ eerror "Please enable MTRR support in your kernel config, found at:"
+ eerror
+ eerror " Processor type and features"
+ eerror " [*] MTRR (Memory Type Range Register) support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "MTRR support not detected!"
+ fi
+}
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ MODULE_NAMES="nvidia(video:${S})"
+ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}"
+ mtrr_check
+}
+
+src_unpack() {
+ local NV_PATCH_PREFIX="${FILESDIR}/${PV}/NVIDIA_kernel-1.0-${PV##*.}"
+
+ if [[ ${KV_MINOR} -eq 6 && ${KV_PATCH} -lt 7 ]] ; then
+ echo
+ ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
+ ewarn "This is not officially supported for ${P}. It is likely you"
+ ewarn "will not be able to compile or use the kernel module."
+ ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7"
+ echo
+ ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored."
+ fi
+
+ cd ${WORKDIR}
+ bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only
+
+ # Add patches below, with a breif description.
+ cd ${S}
+ # Any general patches should go here
+
+ # Patches from Zander goes here
+ epatch ${NV_PATCH_PREFIX}-U122205.diff
+
+ # Now any patches specific to the 2.6 kernel should go here
+ if kernel_is 2 6 ; then
+ einfo "Applying 2.6 kernel patches"
+ # Fix calling of smp_processor_id() when preempt is enabled
+ epatch ${NV_PATCH_PREFIX//8178/7167}-disable-preempt-on-smp_processor_id.patch
+ fi
+
+ # Quiet down warnings the user do not need to see
+ sed -i \
+ -e 's:-Wpointer-arith::g' \
+ -e 's:-Wsign-compare::g' \
+ ${S}/Makefile.kbuild
+
+ # If you set this then it's your own fault when stuff breaks :)
+ [[ -n ${USE_CRAZY_OPTS} ]] && sed -i "s:-O:${CFLAGS}:" Makefile.*
+
+ # If greater than 2.6.5 use M= instead of SUBDIR=
+ cd ${S}; convert_to_m Makefile.kbuild
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # Add the aliases
+ sed -e 's:\${PACKAGE}:'${PF}':g' ${FILESDIR}/nvidia > ${WORKDIR}/nvidia
+ insinto /etc/modules.d
+ newins ${WORKDIR}/nvidia nvidia
+
+ # Docs
+ # Bug #97768: Install README correctly and install Changelog.
+ newdoc ${S}/../../share/doc/README.txt README
+ dodoc ${S}/../../share/doc/NVIDIA_Changelog
+ dodoc ${S}/../../share/doc/Copyrights
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+}