nvidia304: patch to fix loading on >=4.9 kernel (#5896)

This commit is contained in:
Alessio Sergi 2017-03-05 01:45:35 +01:00
parent 4ebb08f7e4
commit 83e72dfe40
2 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,20 @@
Author: Luca Boccassi <luca.boccassi@gmail.com>
Description: Fix kernel module load on 4.9 and greater
From kernel 4.9 and newer (commit fa5386459f06) non-modesetting drivers have
to use the DRM flag DRIVER_LEGACY. Without this flag the kernel module does
not load correctly.
--- kernel/nv-drm.c
+++ kernel/nv-drm.c
@@ -71,7 +71,11 @@
};
static struct drm_driver nv_drm_driver = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
.driver_features = 0,
+#else
+ .driver_features = DRIVER_LEGACY,
+#endif
.load = nv_drm_load,
.unload = nv_drm_unload,
.fops = &nv_drm_fops,

View file

@ -3,7 +3,7 @@ _desc="NVIDIA drivers (For GeForce 5 FX, 6, 7, 8 series)"
pkgname=nvidia304
version=304.135
revision=2
revision=3
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="Proprietary NVIDIA license"
homepage="http://www.nvidia.com"
@ -38,6 +38,7 @@ do_extract() {
do_configure() {
cd ${_pkg}
patch -sNp0 -i ${FILESDIR}/disable-mtrr.patch
patch -sNp0 -i ${FILESDIR}/drm-driver-legacy.patch
patch -sNp0 -i ${FILESDIR}/kernel_4.10.patch
}
do_install() {