void-packages/srcpkgs/nvidia340/files/patch_nv1.diff
Helmut Pozimski 08b9d48fa7 nvidia340: add patch to add DRIVER_LEGACY to nv-drm.c (#5575)
The nvidia340 legacy driver fails to load on the 4.9 kernel.
This commit adds a patch written by ejmarkow, taken from
https://devtalk.nvidia.com/default/topic/982052/linux/latest-nvidia-driver-340-101-builds-compiles-properly-but-fails-to-load-has-errors-with-linux-kernel-4-9-resolved-with-patch-/
that adds DRIVER_LEGACY to the driver features in nv-drm.c.
2017-01-23 12:47:42 +01:00

14 lines
450 B
Diff

--- kernel/nv-drm.c 2016-12-15 12:41:26.000000000 +0100
+++ kernel/nv-drm.c 2016-12-15 12:58:48.000000000 +0100
@@ -115,7 +115,11 @@
};
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,