split kernel 4.7 compatibility patch into non-uvm and uvm parts
[packages/xorg-driver-video-nvidia.git] / linux-4.7.patch
CommitLineData
f6380d29
JP
1--- a/kernel/nvidia-drm/nvidia-drm-fb.c
2+++ b/kernel/nvidia-drm/nvidia-drm-fb.c
3@@ -20,6 +20,7 @@
4 * DEALINGS IN THE SOFTWARE.
5 */
6
7+#include <linux/version.h>
8 #include "conftest.h" /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
9
10 #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
11@@ -114,7 +115,11 @@
12 * We don't support any planar format, pick up first buffer only.
13 */
14
15+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
16+ gem = drm_gem_object_lookup(file, cmd->handles[0]);
17+#else
18 gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
19+#endif
20
21 if (gem == NULL)
22 {
23--- a/kernel/nvidia-drm/nvidia-drm-gem.c
24+++ b/kernel/nvidia-drm/nvidia-drm-gem.c
25@@ -24,6 +24,7 @@
26
27 #if defined(NV_DRM_AVAILABLE)
28
29+#include <linux/version.h>
30 #include "nvidia-drm-priv.h"
31 #include "nvidia-drm-ioctl.h"
32 #include "nvidia-drm-gem.h"
33@@ -405,7 +406,11 @@
34
35 mutex_lock(&dev->struct_mutex);
36
37+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
38+ gem = drm_gem_object_lookup(file, handle);
39+#else
40 gem = drm_gem_object_lookup(dev, file, handle);
41+#endif
42
43 if (gem == NULL)
44 {
45
This page took 0.07939 seconds and 4 git commands to generate.