kernel 4.7 compatibility patch
authorJan Palus <atler@pld-linux.org>
Tue, 2 Aug 2016 20:24:27 +0000 (22:24 +0200)
committerJan Palus <atler@pld-linux.org>
Tue, 2 Aug 2016 20:24:27 +0000 (22:24 +0200)
- rel 2

linux-4.7.patch [new file with mode: 0644]
xorg-driver-video-nvidia.spec

diff --git a/linux-4.7.patch b/linux-4.7.patch
new file mode 100644 (file)
index 0000000..0dc12c8
--- /dev/null
@@ -0,0 +1,60 @@
+--- a/kernel/nvidia-drm/nvidia-drm-fb.c
++++ b/kernel/nvidia-drm/nvidia-drm-fb.c
+@@ -20,6 +20,7 @@
+  * DEALINGS IN THE SOFTWARE.
+  */
++#include <linux/version.h>
+ #include "conftest.h" /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+@@ -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)
+     {
+--- a/kernel/nvidia-drm/nvidia-drm-gem.c
++++ b/kernel/nvidia-drm/nvidia-drm-gem.c
+@@ -24,6 +24,7 @@
+ #if defined(NV_DRM_AVAILABLE)
++#include <linux/version.h>
+ #include "nvidia-drm-priv.h"
+ #include "nvidia-drm-ioctl.h"
+ #include "nvidia-drm-gem.h"
+@@ -405,7 +406,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)
+     {
+
+--- a/kernel/nvidia-uvm/uvm_linux.h
++++ b/kernel/nvidia-uvm/uvm_linux.h
+@@ -547,7 +547,11 @@
+     INIT_RADIX_TREE(tree, GFP_NOWAIT);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++static bool radix_tree_is_empty(struct radix_tree_root *tree)
++#else
+ static bool radix_tree_empty(struct radix_tree_root *tree)
++#endif
+ {
+     void *dummy;
+     return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
+
index e64ddf5a7052af175e1a573d1260f83be1fc7c22..f6f6de2a16e0d2e792d7e89658ec6884c3a5bbb3 100644 (file)
@@ -25,7 +25,7 @@ exit 1
 
 %define                no_install_post_check_so 1
 
-%define                rel     1
+%define                rel     2
 %define                pname   xorg-driver-video-nvidia
 Summary:       Linux Drivers for nVidia GeForce/Quadro Chips
 Summary(hu.UTF-8):     Linux meghajt√≥k nVidia GeForce/Quadro chipekhez
@@ -47,6 +47,7 @@ Source4:      10-nvidia.conf
 Source5:       10-nvidia-modules.conf
 Patch0:                X11-driver-nvidia-GL.patch
 Patch1:                X11-driver-nvidia-desktop.patch
+Patch2:                linux-4.7.patch
 URL:           http://www.nvidia.com/object/unix.html
 BuildRequires: rpmbuild(macros) >= 1.701
 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -251,6 +252,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
 %endif
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
 
 %build
This page took 1.835125 seconds and 4 git commands to generate.