nvidia_340/nvidia_340-340.102-kernel-4.9-2.patch

29 lines
782 B
Diff
Raw Permalink Normal View History

From 19996a25efb250a1b8c7d06fdb85b5462e2a7797 Mon Sep 17 00:00:00 2001
From: leigh123linux <leigh123linux@googlemail.com>
Date: Sun, 30 Jul 2017 12:16:14 +0100
Subject: [PATCH 1/4] 4.9.0_kernel
---
kernel/nv-drm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/nv-drm.c b/kernel/nv-drm.c
index 4c1a3ae..ea9f17e 100644
--- a/kernel/nv-drm.c
+++ b/kernel/nv-drm.c
@@ -115,7 +115,11 @@ static const struct file_operations nv_drm_fops = {
};
static struct drm_driver nv_drm_driver = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_LEGACY,
+#else
.driver_features = DRIVER_GEM | DRIVER_PRIME,
+#endif
.load = nv_drm_load,
.unload = nv_drm_unload,
.fops = &nv_drm_fops,
--
2.13.3