[arch-commits] Commit in nvidia-304xx/trunk (6 files)
Laurent Carlier
lcarlier at archlinux.org
Sun Sep 24 10:27:22 UTC 2017
Date: Sunday, September 24, 2017 @ 10:27:21
Author: lcarlier
Revision: 306180
upgpkg: nvidia-304xx 304.137-1
upstream update 304.137
Modified:
nvidia-304xx/trunk/PKGBUILD
nvidia-304xx/trunk/nvidia-304xx.install
Deleted:
nvidia-304xx/trunk/drm-driver-legacy.patch
nvidia-304xx/trunk/kernel_4.10.patch
nvidia-304xx/trunk/kernel_4.11.patch
nvidia-304xx/trunk/kernel_4.12.patch
-------------------------+
PKGBUILD | 29 +++---------
drm-driver-legacy.patch | 20 --------
kernel_4.10.patch | 105 ----------------------------------------------
kernel_4.11.patch | 44 -------------------
kernel_4.12.patch | 56 ------------------------
nvidia-304xx.install | 2
6 files changed, 9 insertions(+), 247 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-09-24 10:09:47 UTC (rev 306179)
+++ PKGBUILD 2017-09-24 10:27:21 UTC (rev 306180)
@@ -4,29 +4,21 @@
pkgbase=nvidia-304xx
pkgname=(nvidia-304xx nvidia-304xx-dkms)
-pkgver=304.135
-_extramodules=extramodules-4.13-ARCH
-pkgrel=17
+pkgver=304.137
+_extramodules=extramodules-4.12-ARCH
+pkgrel=1
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
-makedepends=('linux' 'linux-headers>=4.13' 'linux-headers<4.14')
+makedepends=('linux' 'linux-headers>=4.12' 'linux-headers<4.13')
conflicts=('nvidia')
license=('custom')
options=('!strip')
-source=('disable-mtrr.patch'
- 'drm-driver-legacy.patch'
- 'kernel_4.10.patch'
- 'kernel_4.11.patch'
- 'kernel_4.12.patch')
+source=('disable-mtrr.patch')
source_i686+=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run")
source_x86_64+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
-sha512sums=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774'
- 'fa39dee5c9f1ea98286c87165f683ee194b2cb4056aa6b556e822b9ee760dcf3683ea001c3704e79b9ac9712314d7df5690dc7f68440cda7a96791f94425455d'
- '68dabbf6ad889c46bd0c01ebb697b80f4aa526ef1cdc53de008343a243adefc6ce7f2778be7005f2d79f3d23c0a3ff69f67ecdb9f97c0feb0ec99405a0c1046a'
- 'da3d1698af8b97e8fc3b6d3c690925e0258f8b6ad26a24f8d32c04a5a82701655208021f9f5af0ce44cb397a7422e2776a05193204bc7e4ac2b98f6e173984ea'
- '49aa15fb7321bb9e0ab2a5361b9830ad95c2a8e22cf7b9aaf9777745fad88b419e791edb8e833849e7846373a1b76ececfcdac8803faed21729c89a3ff0a2d74')
-sha512sums_i686=('c2645cc9a6f23641d8b6da51e72e203980068c05e365fcc73b32322a6875ce95e81f4e0d893276e14e84e93464488539c16db6b3be04f5324cf7d7a12bb557f8')
-sha512sums_x86_64=('a5aa48baa75eb267bd193e59328aa5fbc15d41045bb7e97aa1b96b918b9e68a1c1bf95624d9d494336256e0af2c41e188d30fe91be4967084de3387f50d3805c')
+sha512sums=('54e8825e523f11706890e09e476498f3a30f75ce4e350ff2ff8a1e1c3af574d9ccfb8903543766b6863d94cdfbf46e68cd3d33380867dd976cafc8dd2dd78774')
+sha512sums_i686=('021c5a88d50489aa0a1c7eac14259e23542b93578ae339995a2e38b786d06d239968c07933cab3fb78a922cffc7e213d6fa3fe07e34065a9c7f03e24f8729370')
+sha512sums_x86_64=('4ab648647e4f3e2c352b2eab6454c264fe4728d8eb1264fafee2a4ab1a4ce59516abcf8490044d31e35309ea951e564cc217e13f7139a48bbf650a4238c5b87c')
[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
@@ -35,14 +27,9 @@
cd "${srcdir}"
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
- # patches here
- patch -Np1 --no-backup-if-mismatch -i ../kernel_4.10.patch
- patch -Np1 --no-backup-if-mismatch -i ../kernel_4.11.patch
- patch -Np1 --no-backup-if-mismatch -i ../kernel_4.12.patch
# FS#47092
#(cd kernel; patch -p1 --no-backup-if-mismatch -i "$srcdir"/disable-mtrr.patch)
- (cd kernel; patch -p1 --no-backup-if-mismatch -i "$srcdir"/drm-driver-legacy.patch)
cp -a kernel kernel-dkms
}
Deleted: drm-driver-legacy.patch
===================================================================
--- drm-driver-legacy.patch 2017-09-24 10:09:47 UTC (rev 306179)
+++ drm-driver-legacy.patch 2017-09-24 10:27:21 UTC (rev 306180)
@@ -1,20 +0,0 @@
-Author: Luca Boccassi <luca.boccassi at gmail.com>
-Description: Fix kernel module load on 4.9 and greater
- From kernel 4.9 and newer (commit fa5386459f06) non-modesetting drivers have
- to use the DRM flag DRIVER_LEGACY. Without this flag the kernel module does
- not load correctly.
-
---- a/nv-drm.c
-+++ b/nv-drm.c
-@@ -71,7 +71,11 @@
- };
-
- static struct drm_driver nv_drm_driver = {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
- .driver_features = 0,
-+#else
-+ .driver_features = DRIVER_LEGACY,
-+#endif
- .load = nv_drm_load,
- .unload = nv_drm_unload,
- .fops = &nv_drm_fops,
Deleted: kernel_4.10.patch
===================================================================
--- kernel_4.10.patch 2017-09-24 10:09:47 UTC (rev 306179)
+++ kernel_4.10.patch 2017-09-24 10:27:21 UTC (rev 306180)
@@ -1,105 +0,0 @@
-From d270372bf8abcf45409b30cdb33069280527b0ff Mon Sep 17 00:00:00 2001
-From: Alberto Milone <alberto.milone at canonical.com>
-Date: Wed, 15 Feb 2017 18:01:02 +0100
-Subject: [PATCH 1/1] Add support for Linux 4.10
-
----
- nv-linux.h | 5 +++++
- nv-pat.c | 40 ++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 45 insertions(+)
-
-diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h
-index b46e71f..3081c06 100644
---- a/kernel/nv-linux.h
-+++ b/kernel/nv-linux.h
-@@ -1895,8 +1895,13 @@ static inline NvU64 nv_node_end_pfn(int nid)
-
- #else
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
- return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
- pages, vmas);
-+#else
-+ return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
-+ pages, vmas, NULL);
-+#endif
-
- #endif
-
-diff --git a/kernel/nv-pat.c b/kernel/nv-pat.c
-index e71e81c..d742789 100644
---- a/kernel/nv-pat.c
-+++ b/kernel/nv-pat.c
-@@ -203,6 +203,7 @@ void nv_disable_pat_support(void)
- }
-
- #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
- static int
- nv_kern_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
- {
-@@ -234,6 +235,34 @@ static struct notifier_block nv_hotcpu_nfb = {
- .notifier_call = nv_kern_cpu_callback,
- .priority = 0
- };
-+#else
-+static int nvidia_cpu_online(unsigned int hcpu)
-+{
-+ unsigned int cpu = get_cpu();
-+ if (cpu == hcpu)
-+ nv_setup_pat_entries(NULL);
-+ else
-+ NV_SMP_CALL_FUNCTION(nv_setup_pat_entries, (void *)(long int)hcpu, 1);
-+
-+ put_cpu();
-+
-+ return 0;
-+}
-+
-+static int nvidia_cpu_down_prep(unsigned int hcpu)
-+{
-+ unsigned int cpu = get_cpu();
-+ if (cpu == hcpu)
-+ nv_restore_pat_entries(NULL);
-+ else
-+ NV_SMP_CALL_FUNCTION(nv_restore_pat_entries, (void *)(long int)hcpu, 1);
-+
-+ put_cpu();
-+
-+ return 0;
-+}
-+#endif
-+
- #endif
-
- int nv_init_pat_support(nv_stack_t *sp)
-@@ -255,7 +284,14 @@ int nv_init_pat_support(nv_stack_t *sp)
- #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
- if (nv_pat_mode == NV_PAT_MODE_BUILTIN)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
- if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
-+#else
-+ if (cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
-+ "gpu/nvidia:online",
-+ nvidia_cpu_online,
-+ nvidia_cpu_down_prep) != 0)
-+#endif
- {
- nv_disable_pat_support();
- nv_printf(NV_DBG_ERRORS,
-@@ -280,7 +316,11 @@ void nv_teardown_pat_support(void)
- {
- nv_disable_pat_support();
- #if defined(NV_ENABLE_PAT_SUPPORT) && defined(NV_ENABLE_HOTPLUG_CPU)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
- unregister_hotcpu_notifier(&nv_hotcpu_nfb);
-+#else
-+ cpuhp_remove_state_nocalls(CPUHP_AP_ONLINE_DYN);
-+#endif
- #endif
- }
- }
---
-2.7.4
-
Deleted: kernel_4.11.patch
===================================================================
--- kernel_4.11.patch 2017-09-24 10:09:47 UTC (rev 306179)
+++ kernel_4.11.patch 2017-09-24 10:27:21 UTC (rev 306180)
@@ -1,44 +0,0 @@
---- a/kernel/nv-drm.c
-+++ b/kernel/nv-drm.c
-@@ -22,6 +22,8 @@
- #include <drm/drm_gem.h>
- #endif
-
-+#include <linux/version.h>
-+
- extern nv_linux_state_t *nv_linux_devices;
-
- static int nv_drm_load(
-@@ -42,7 +44,11 @@
- return -ENODEV;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- static int nv_drm_unload(
-+#else
-+static void nv_drm_unload(
-+#endif
- struct drm_device *dev
- )
- {
-@@ -52,11 +58,19 @@
- {
- if (nvl->dev == dev->pdev)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- return 0;
-+#else
-+ return;
-+#endif
- }
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
- return -ENODEV;
-+#else
-+ return;
-+#endif
- }
-
- static const struct file_operations nv_drm_fops = {
-
Deleted: kernel_4.12.patch
===================================================================
--- kernel_4.12.patch 2017-09-24 10:09:47 UTC (rev 306179)
+++ kernel_4.12.patch 2017-09-24 10:27:21 UTC (rev 306180)
@@ -1,56 +0,0 @@
-diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh
---- NVIDIA-Linux-x86_64-340.102-old/kernel/conftest.sh 2017-01-16 21:15:32.000000000 +0100
-+++ NVIDIA-Linux-x86_64-340.102-new/kernel/conftest.sh 2017-07-05 20:58:45.283333334 +0200
-@@ -362,7 +362,11 @@
- # Determine if the set_memory_uc() function is present.
- #
- CODE="
-- #include <asm/cacheflush.h>
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ #include <asm/set_memory.h>
-+ #else
-+ #include <asm/cacheflush.h>
-+ #endif
- void conftest_set_memory_uc(void) {
- set_memory_uc();
- }"
-@@ -375,7 +379,11 @@
- # Determine if the set_memory_array_uc() function is present.
- #
- CODE="
-- #include <asm/cacheflush.h>
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ #include <asm/set_memory.h>
-+ #else
-+ #include <asm/cacheflush.h>
-+ #endif
- void conftest_set_memory_array_uc(void) {
- set_memory_array_uc();
- }"
-@@ -388,7 +396,11 @@
- # Determine if the set_pages_uc() function is present.
- #
- CODE="
-- #include <asm/cacheflush.h>
-+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ #include <asm/set_memory.h>
-+ #else
-+ #include <asm/cacheflush.h>
-+ #endif
- void conftest_set_pages_uc(void) {
- set_pages_uc();
- }"
-diff -Naur NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c
---- NVIDIA-Linux-x86_64-340.102-old/kernel/nv-vm.c 2017-01-16 21:15:32.000000000 +0100
-+++ NVIDIA-Linux-x86_64-340.102-new/kernel/nv-vm.c 2017-07-05 20:58:45.286666667 +0200
-@@ -13,6 +13,10 @@
- #include "nv.h"
- #include "nv-linux.h"
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-+ #include <asm/set_memory.h>
-+#endif
-+
- static inline void nv_set_contig_memory_uc(nv_pte_t *page_ptr, NvU32 num_pages)
- {
- if (nv_update_memory_types)
Modified: nvidia-304xx.install
===================================================================
--- nvidia-304xx.install 2017-09-24 10:09:47 UTC (rev 306179)
+++ nvidia-304xx.install 2017-09-24 10:27:21 UTC (rev 306180)
@@ -1,5 +1,5 @@
post_install() {
- EXTRAMODULES='extramodules-4.13-ARCH'
+ EXTRAMODULES='extramodules-4.12-ARCH'
depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
More information about the arch-commits
mailing list