[arch-commits] Commit in nvidia/repos (14 files)
Tobias Powalowski
tpowa at archlinux.org
Thu Aug 11 18:16:18 UTC 2016
Date: Thursday, August 11, 2016 @ 18:16:18
Author: tpowa
Revision: 273610
db-move: moved nvidia from [testing] to [extra] (i686, x86_64)
Added:
nvidia/repos/extra-i686/0001-linux-4.7-i686.patch
(from rev 273609, nvidia/repos/testing-i686/0001-linux-4.7-i686.patch)
nvidia/repos/extra-i686/0001-linux-4.7-x86_64.patch
(from rev 273609, nvidia/repos/testing-i686/0001-linux-4.7-x86_64.patch)
nvidia/repos/extra-i686/PKGBUILD
(from rev 273609, nvidia/repos/testing-i686/PKGBUILD)
nvidia/repos/extra-i686/nvidia.install
(from rev 273609, nvidia/repos/testing-i686/nvidia.install)
nvidia/repos/extra-x86_64/0001-linux-4.7-i686.patch
(from rev 273609, nvidia/repos/testing-x86_64/0001-linux-4.7-i686.patch)
nvidia/repos/extra-x86_64/0001-linux-4.7-x86_64.patch
(from rev 273609, nvidia/repos/testing-x86_64/0001-linux-4.7-x86_64.patch)
nvidia/repos/extra-x86_64/PKGBUILD
(from rev 273609, nvidia/repos/testing-x86_64/PKGBUILD)
nvidia/repos/extra-x86_64/nvidia.install
(from rev 273609, nvidia/repos/testing-x86_64/nvidia.install)
Deleted:
nvidia/repos/extra-i686/PKGBUILD
nvidia/repos/extra-i686/nvidia.install
nvidia/repos/extra-x86_64/PKGBUILD
nvidia/repos/extra-x86_64/nvidia.install
nvidia/repos/testing-i686/
nvidia/repos/testing-x86_64/
------------------------------------------+
/PKGBUILD | 178 +++++++++++++++++++++++++++++
/nvidia.install | 26 ++++
extra-i686/0001-linux-4.7-i686.patch | 46 +++++++
extra-i686/0001-linux-4.7-x86_64.patch | 64 ++++++++++
extra-i686/PKGBUILD | 84 -------------
extra-i686/nvidia.install | 13 --
extra-x86_64/0001-linux-4.7-i686.patch | 46 +++++++
extra-x86_64/0001-linux-4.7-x86_64.patch | 64 ++++++++++
extra-x86_64/PKGBUILD | 84 -------------
extra-x86_64/nvidia.install | 13 --
10 files changed, 424 insertions(+), 194 deletions(-)
Copied: nvidia/repos/extra-i686/0001-linux-4.7-i686.patch (from rev 273609, nvidia/repos/testing-i686/0001-linux-4.7-i686.patch)
===================================================================
--- extra-i686/0001-linux-4.7-i686.patch (rev 0)
+++ extra-i686/0001-linux-4.7-i686.patch 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,46 @@
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c nvidia-367.35/nvidia-drm/nvidia-drm-fb.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-fb.c 2016-08-06 00:38:00.550651165 +0200
+@@ -31,6 +31,7 @@
+ #include "nvidia-drm-gem.h"
+
+ #include <drm/drm_crtc_helper.h>
++#include <linux/version.h>
+
+ static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb)
+ {
+@@ -114,7 +115,11 @@
+ * We don't support any planar format, pick up first buffer only.
+ */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, cmd->handles[0]);
++#else
+ gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
++#endif
+
+ if (gem == NULL)
+ {
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c nvidia-367.35/nvidia-drm/nvidia-drm-gem.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-gem.c 2016-08-06 00:37:47.237546102 +0200
+@@ -27,6 +27,7 @@
+ #include "nvidia-drm-priv.h"
+ #include "nvidia-drm-ioctl.h"
+ #include "nvidia-drm-gem.h"
++#include <linux/version.h>
+
+ static struct nvidia_drm_gem_object *nvidia_drm_gem_new
+ (
+@@ -408,7 +409,11 @@
+
+ mutex_lock(&dev->struct_mutex);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, handle);
++#else
+ gem = drm_gem_object_lookup(dev, file, handle);
++#endif
+
+ if (gem == NULL)
+ {
Copied: nvidia/repos/extra-i686/0001-linux-4.7-x86_64.patch (from rev 273609, nvidia/repos/testing-i686/0001-linux-4.7-x86_64.patch)
===================================================================
--- extra-i686/0001-linux-4.7-x86_64.patch (rev 0)
+++ extra-i686/0001-linux-4.7-x86_64.patch 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,64 @@
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c nvidia-367.35/nvidia-drm/nvidia-drm-fb.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-fb.c 2016-08-06 00:38:00.550651165 +0200
+@@ -31,6 +31,7 @@
+ #include "nvidia-drm-gem.h"
+
+ #include <drm/drm_crtc_helper.h>
++#include <linux/version.h>
+
+ static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb)
+ {
+@@ -114,7 +115,11 @@
+ * We don't support any planar format, pick up first buffer only.
+ */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, cmd->handles[0]);
++#else
+ gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
++#endif
+
+ if (gem == NULL)
+ {
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c nvidia-367.35/nvidia-drm/nvidia-drm-gem.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-gem.c 2016-08-06 00:37:47.237546102 +0200
+@@ -27,6 +27,7 @@
+ #include "nvidia-drm-priv.h"
+ #include "nvidia-drm-ioctl.h"
+ #include "nvidia-drm-gem.h"
++#include <linux/version.h>
+
+ static struct nvidia_drm_gem_object *nvidia_drm_gem_new
+ (
+@@ -408,7 +409,11 @@
+
+ mutex_lock(&dev->struct_mutex);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, handle);
++#else
+ gem = drm_gem_object_lookup(dev, file, handle);
++#endif
+
+ if (gem == NULL)
+ {
+diff -u -r nvidia-367.35-orig/nvidia-uvm/uvm_linux.h nvidia-367.35/nvidia-uvm/uvm_linux.h
+--- nvidia-367.35-orig/nvidia-uvm/uvm_linux.h 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-uvm/uvm_linux.h 2016-08-06 00:27:09.796678527 +0200
+@@ -554,12 +554,13 @@
+ INIT_RADIX_TREE(tree, GFP_NOWAIT);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ static bool radix_tree_empty(struct radix_tree_root *tree)
+ {
+ void *dummy;
+ return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
+ }
+-
++#endif
+
+ #if !defined(NV_USLEEP_RANGE_PRESENT)
+ static void __sched usleep_range(unsigned long min, unsigned long max)
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2016-08-11 18:16:17 UTC (rev 273609)
+++ extra-i686/PKGBUILD 2016-08-11 18:16:18 UTC (rev 273610)
@@ -1,84 +0,0 @@
-# $Id$
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Thomas Baechler <thomas at archlinux.org>
-
-pkgbase=nvidia
-pkgname=(nvidia nvidia-dkms)
-pkgver=367.35
-_extramodules=extramodules-4.6-ARCH
-pkgrel=1
-pkgdesc="NVIDIA drivers for linux"
-arch=('i686' 'x86_64')
-url="http://www.nvidia.com/"
-makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.6' 'linux-headers<4.7')
-license=('custom')
-options=('!strip')
-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")
-md5sums_i686=('42db6f6485c3c337c7c756380ec64b7a')
-md5sums_x86_64=('24f1fc19fe10bcc6ff264fb5034c4ccc')
-
-[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
-[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
-
-prepare() {
- sh "${_pkg}.run" --extract-only
- cd "${_pkg}"
-
- cp -a kernel kernel-dkms
- cd kernel-dkms
- sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
- sed -i 's/__JOBS/`nproc`/' dkms.conf
- sed -i 's/__DKMS_MODULES//' dkms.conf
- sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
-DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
-BUILT_MODULE_NAME[1]="nvidia-uvm"\
-DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
-BUILT_MODULE_NAME[2]="nvidia-modeset"\
-DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
-BUILT_MODULE_NAME[3]="nvidia-drm"\
-DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
-}
-
-build() {
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
- cd "${_pkg}"/kernel
- make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
-}
-
-package_nvidia() {
- pkgdesc="NVIDIA drivers for linux"
- depends=('linux>=4.6' 'linux<4.7' "nvidia-utils=${pkgver}" 'libgl')
- install=nvidia.install
-
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
-
- if [[ "$CARCH" = "x86_64" ]]; then
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
- fi
-
- gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
- install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
-
- echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
-}
-
-package_nvidia-dkms() {
- pkgdesc="NVIDIA driver sources for linux"
- depends=('dkms' "nvidia-utils=$pkgver" 'libgl')
- optdepends=('linux-headers: Build the module for Arch kernel'
- 'linux-lts-headers: Build the module for LTS Arch kernel')
- conflicts+=('nvidia')
-
- cd ${_pkg}
- install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
- cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
- echo 'blacklist nouveau' > "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
-}
Copied: nvidia/repos/extra-i686/PKGBUILD (from rev 273609, nvidia/repos/testing-i686/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,89 @@
+# $Id$
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgbase=nvidia
+pkgname=(nvidia nvidia-dkms)
+pkgver=367.35
+_extramodules=extramodules-4.7-ARCH
+pkgrel=2
+pkgdesc="NVIDIA drivers for linux"
+arch=('i686' 'x86_64')
+url="http://www.nvidia.com/"
+makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.7' 'linux-headers<4.8')
+license=('custom')
+options=('!strip')
+source_i686=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
+ "0001-linux-4.7-i686.patch")
+source_x86_64=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
+ "0001-linux-4.7-x86_64.patch")
+md5sums_i686=('42db6f6485c3c337c7c756380ec64b7a'
+ '0ceb49f5c537ae60743fdf7177eb996e')
+md5sums_x86_64=('24f1fc19fe10bcc6ff264fb5034c4ccc'
+ 'b1e6760dca837e8685fd02be15aa4f51')
+
+[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
+[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
+
+prepare() {
+ sh "${_pkg}.run" --extract-only
+ cd "${_pkg}"
+
+ patch -Np1 -d kernel < ../0001-linux-4.7-${CARCH}.patch
+ cp -a kernel kernel-dkms
+ cd kernel-dkms
+ sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
+ sed -i 's/__JOBS/`nproc`/' dkms.conf
+ sed -i 's/__DKMS_MODULES//' dkms.conf
+ sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
+DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[1]="nvidia-uvm"\
+DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[2]="nvidia-modeset"\
+DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[3]="nvidia-drm"\
+DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
+}
+
+build() {
+ _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+ cd "${_pkg}"/kernel
+ make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+}
+
+package_nvidia() {
+ pkgdesc="NVIDIA drivers for linux"
+ depends=('linux>=4.7' 'linux<4.8' "nvidia-utils=${pkgver}" 'libgl')
+ install=nvidia.install
+
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
+
+ if [[ "$CARCH" = "x86_64" ]]; then
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
+ fi
+
+ gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
+ install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
+
+ echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
+}
+
+package_nvidia-dkms() {
+ pkgdesc="NVIDIA driver sources for linux"
+ depends=('dkms' "nvidia-utils=$pkgver" 'libgl')
+ optdepends=('linux-headers: Build the module for Arch kernel'
+ 'linux-lts-headers: Build the module for LTS Arch kernel')
+ conflicts+=('nvidia')
+
+ cd ${_pkg}
+ install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
+ cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
+ echo 'blacklist nouveau' > "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
+}
Deleted: extra-i686/nvidia.install
===================================================================
--- extra-i686/nvidia.install 2016-08-11 18:16:17 UTC (rev 273609)
+++ extra-i686/nvidia.install 2016-08-11 18:16:18 UTC (rev 273610)
@@ -1,13 +0,0 @@
-post_install() {
- EXTRAMODULES='extramodules-4.6-ARCH'
- depmod $(cat /usr/lib/modules/${EXTRAMODULES}/version)
- echo 'In order to use nvidia module, reboot the system.'
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
Copied: nvidia/repos/extra-i686/nvidia.install (from rev 273609, nvidia/repos/testing-i686/nvidia.install)
===================================================================
--- extra-i686/nvidia.install (rev 0)
+++ extra-i686/nvidia.install 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,13 @@
+post_install() {
+ EXTRAMODULES='extramodules-4.7-ARCH'
+ depmod $(cat /usr/lib/modules/${EXTRAMODULES}/version)
+ echo 'In order to use nvidia module, reboot the system.'
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
Copied: nvidia/repos/extra-x86_64/0001-linux-4.7-i686.patch (from rev 273609, nvidia/repos/testing-x86_64/0001-linux-4.7-i686.patch)
===================================================================
--- extra-x86_64/0001-linux-4.7-i686.patch (rev 0)
+++ extra-x86_64/0001-linux-4.7-i686.patch 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,46 @@
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c nvidia-367.35/nvidia-drm/nvidia-drm-fb.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-fb.c 2016-08-06 00:38:00.550651165 +0200
+@@ -31,6 +31,7 @@
+ #include "nvidia-drm-gem.h"
+
+ #include <drm/drm_crtc_helper.h>
++#include <linux/version.h>
+
+ static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb)
+ {
+@@ -114,7 +115,11 @@
+ * We don't support any planar format, pick up first buffer only.
+ */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, cmd->handles[0]);
++#else
+ gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
++#endif
+
+ if (gem == NULL)
+ {
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c nvidia-367.35/nvidia-drm/nvidia-drm-gem.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-gem.c 2016-08-06 00:37:47.237546102 +0200
+@@ -27,6 +27,7 @@
+ #include "nvidia-drm-priv.h"
+ #include "nvidia-drm-ioctl.h"
+ #include "nvidia-drm-gem.h"
++#include <linux/version.h>
+
+ static struct nvidia_drm_gem_object *nvidia_drm_gem_new
+ (
+@@ -408,7 +409,11 @@
+
+ mutex_lock(&dev->struct_mutex);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, handle);
++#else
+ gem = drm_gem_object_lookup(dev, file, handle);
++#endif
+
+ if (gem == NULL)
+ {
Copied: nvidia/repos/extra-x86_64/0001-linux-4.7-x86_64.patch (from rev 273609, nvidia/repos/testing-x86_64/0001-linux-4.7-x86_64.patch)
===================================================================
--- extra-x86_64/0001-linux-4.7-x86_64.patch (rev 0)
+++ extra-x86_64/0001-linux-4.7-x86_64.patch 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,64 @@
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c nvidia-367.35/nvidia-drm/nvidia-drm-fb.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-fb.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-fb.c 2016-08-06 00:38:00.550651165 +0200
+@@ -31,6 +31,7 @@
+ #include "nvidia-drm-gem.h"
+
+ #include <drm/drm_crtc_helper.h>
++#include <linux/version.h>
+
+ static void nvidia_framebuffer_destroy(struct drm_framebuffer *fb)
+ {
+@@ -114,7 +115,11 @@
+ * We don't support any planar format, pick up first buffer only.
+ */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, cmd->handles[0]);
++#else
+ gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
++#endif
+
+ if (gem == NULL)
+ {
+diff -u -r nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c nvidia-367.35/nvidia-drm/nvidia-drm-gem.c
+--- nvidia-367.35-orig/nvidia-drm/nvidia-drm-gem.c 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-drm/nvidia-drm-gem.c 2016-08-06 00:37:47.237546102 +0200
+@@ -27,6 +27,7 @@
+ #include "nvidia-drm-priv.h"
+ #include "nvidia-drm-ioctl.h"
+ #include "nvidia-drm-gem.h"
++#include <linux/version.h>
+
+ static struct nvidia_drm_gem_object *nvidia_drm_gem_new
+ (
+@@ -408,7 +409,11 @@
+
+ mutex_lock(&dev->struct_mutex);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ gem = drm_gem_object_lookup(file, handle);
++#else
+ gem = drm_gem_object_lookup(dev, file, handle);
++#endif
+
+ if (gem == NULL)
+ {
+diff -u -r nvidia-367.35-orig/nvidia-uvm/uvm_linux.h nvidia-367.35/nvidia-uvm/uvm_linux.h
+--- nvidia-367.35-orig/nvidia-uvm/uvm_linux.h 2016-07-15 18:58:50.000000000 +0200
++++ nvidia-367.35/nvidia-uvm/uvm_linux.h 2016-08-06 00:27:09.796678527 +0200
+@@ -554,12 +554,13 @@
+ INIT_RADIX_TREE(tree, GFP_NOWAIT);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ static bool radix_tree_empty(struct radix_tree_root *tree)
+ {
+ void *dummy;
+ return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
+ }
+-
++#endif
+
+ #if !defined(NV_USLEEP_RANGE_PRESENT)
+ static void __sched usleep_range(unsigned long min, unsigned long max)
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2016-08-11 18:16:17 UTC (rev 273609)
+++ extra-x86_64/PKGBUILD 2016-08-11 18:16:18 UTC (rev 273610)
@@ -1,84 +0,0 @@
-# $Id$
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Thomas Baechler <thomas at archlinux.org>
-
-pkgbase=nvidia
-pkgname=(nvidia nvidia-dkms)
-pkgver=367.35
-_extramodules=extramodules-4.6-ARCH
-pkgrel=1
-pkgdesc="NVIDIA drivers for linux"
-arch=('i686' 'x86_64')
-url="http://www.nvidia.com/"
-makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.6' 'linux-headers<4.7')
-license=('custom')
-options=('!strip')
-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")
-md5sums_i686=('42db6f6485c3c337c7c756380ec64b7a')
-md5sums_x86_64=('24f1fc19fe10bcc6ff264fb5034c4ccc')
-
-[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
-[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
-
-prepare() {
- sh "${_pkg}.run" --extract-only
- cd "${_pkg}"
-
- cp -a kernel kernel-dkms
- cd kernel-dkms
- sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
- sed -i 's/__JOBS/`nproc`/' dkms.conf
- sed -i 's/__DKMS_MODULES//' dkms.conf
- sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
-DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
-BUILT_MODULE_NAME[1]="nvidia-uvm"\
-DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
-BUILT_MODULE_NAME[2]="nvidia-modeset"\
-DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
-BUILT_MODULE_NAME[3]="nvidia-drm"\
-DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
-}
-
-build() {
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
- cd "${_pkg}"/kernel
- make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
-}
-
-package_nvidia() {
- pkgdesc="NVIDIA drivers for linux"
- depends=('linux>=4.6' 'linux<4.7' "nvidia-utils=${pkgver}" 'libgl')
- install=nvidia.install
-
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
-
- if [[ "$CARCH" = "x86_64" ]]; then
- install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
- "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
- fi
-
- gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
- install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
-
- echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
-}
-
-package_nvidia-dkms() {
- pkgdesc="NVIDIA driver sources for linux"
- depends=('dkms' "nvidia-utils=$pkgver" 'libgl')
- optdepends=('linux-headers: Build the module for Arch kernel'
- 'linux-lts-headers: Build the module for LTS Arch kernel')
- conflicts+=('nvidia')
-
- cd ${_pkg}
- install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
- cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
- echo 'blacklist nouveau' > "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
-}
Copied: nvidia/repos/extra-x86_64/PKGBUILD (from rev 273609, nvidia/repos/testing-x86_64/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,89 @@
+# $Id$
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Baechler <thomas at archlinux.org>
+
+pkgbase=nvidia
+pkgname=(nvidia nvidia-dkms)
+pkgver=367.35
+_extramodules=extramodules-4.7-ARCH
+pkgrel=2
+pkgdesc="NVIDIA drivers for linux"
+arch=('i686' 'x86_64')
+url="http://www.nvidia.com/"
+makedepends=('nvidia-libgl' "nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.7' 'linux-headers<4.8')
+license=('custom')
+options=('!strip')
+source_i686=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
+ "0001-linux-4.7-i686.patch")
+source_x86_64=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
+ "0001-linux-4.7-x86_64.patch")
+md5sums_i686=('42db6f6485c3c337c7c756380ec64b7a'
+ '0ceb49f5c537ae60743fdf7177eb996e')
+md5sums_x86_64=('24f1fc19fe10bcc6ff264fb5034c4ccc'
+ 'b1e6760dca837e8685fd02be15aa4f51')
+
+[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
+[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
+
+prepare() {
+ sh "${_pkg}.run" --extract-only
+ cd "${_pkg}"
+
+ patch -Np1 -d kernel < ../0001-linux-4.7-${CARCH}.patch
+ cp -a kernel kernel-dkms
+ cd kernel-dkms
+ sed -i "s/__VERSION_STRING/${pkgver}/" dkms.conf
+ sed -i 's/__JOBS/`nproc`/' dkms.conf
+ sed -i 's/__DKMS_MODULES//' dkms.conf
+ sed -i '$iBUILT_MODULE_NAME[0]="nvidia"\
+DEST_MODULE_LOCATION[0]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[1]="nvidia-uvm"\
+DEST_MODULE_LOCATION[1]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[2]="nvidia-modeset"\
+DEST_MODULE_LOCATION[2]="/kernel/drivers/video"\
+BUILT_MODULE_NAME[3]="nvidia-drm"\
+DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
+}
+
+build() {
+ _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
+ cd "${_pkg}"/kernel
+ make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+}
+
+package_nvidia() {
+ pkgdesc="NVIDIA drivers for linux"
+ depends=('linux>=4.7' 'linux<4.8' "nvidia-utils=${pkgver}" 'libgl')
+ install=nvidia.install
+
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
+
+ if [[ "$CARCH" = "x86_64" ]]; then
+ install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
+ "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
+ fi
+
+ gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
+ install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
+
+ echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
+}
+
+package_nvidia-dkms() {
+ pkgdesc="NVIDIA driver sources for linux"
+ depends=('dkms' "nvidia-utils=$pkgver" 'libgl')
+ optdepends=('linux-headers: Build the module for Arch kernel'
+ 'linux-lts-headers: Build the module for LTS Arch kernel')
+ conflicts+=('nvidia')
+
+ cd ${_pkg}
+ install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
+ cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
+ echo 'blacklist nouveau' > "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
+}
Deleted: extra-x86_64/nvidia.install
===================================================================
--- extra-x86_64/nvidia.install 2016-08-11 18:16:17 UTC (rev 273609)
+++ extra-x86_64/nvidia.install 2016-08-11 18:16:18 UTC (rev 273610)
@@ -1,13 +0,0 @@
-post_install() {
- EXTRAMODULES='extramodules-4.6-ARCH'
- depmod $(cat /usr/lib/modules/${EXTRAMODULES}/version)
- echo 'In order to use nvidia module, reboot the system.'
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
Copied: nvidia/repos/extra-x86_64/nvidia.install (from rev 273609, nvidia/repos/testing-x86_64/nvidia.install)
===================================================================
--- extra-x86_64/nvidia.install (rev 0)
+++ extra-x86_64/nvidia.install 2016-08-11 18:16:18 UTC (rev 273610)
@@ -0,0 +1,13 @@
+post_install() {
+ EXTRAMODULES='extramodules-4.7-ARCH'
+ depmod $(cat /usr/lib/modules/${EXTRAMODULES}/version)
+ echo 'In order to use nvidia module, reboot the system.'
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
More information about the arch-commits
mailing list