mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 18:32:58 +02:00
nvidia304: patch to fix loading on >=4.9 kernel (#5896)
This commit is contained in:
parent
4ebb08f7e4
commit
83e72dfe40
2 changed files with 22 additions and 1 deletions
20
srcpkgs/nvidia304/files/drm-driver-legacy.patch
Normal file
20
srcpkgs/nvidia304/files/drm-driver-legacy.patch
Normal 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,
|
|
@ -3,7 +3,7 @@ _desc="NVIDIA drivers (For GeForce 5 FX, 6, 7, 8 series)"
|
||||||
|
|
||||||
pkgname=nvidia304
|
pkgname=nvidia304
|
||||||
version=304.135
|
version=304.135
|
||||||
revision=2
|
revision=3
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
license="Proprietary NVIDIA license"
|
license="Proprietary NVIDIA license"
|
||||||
homepage="http://www.nvidia.com"
|
homepage="http://www.nvidia.com"
|
||||||
|
@ -38,6 +38,7 @@ do_extract() {
|
||||||
do_configure() {
|
do_configure() {
|
||||||
cd ${_pkg}
|
cd ${_pkg}
|
||||||
patch -sNp0 -i ${FILESDIR}/disable-mtrr.patch
|
patch -sNp0 -i ${FILESDIR}/disable-mtrr.patch
|
||||||
|
patch -sNp0 -i ${FILESDIR}/drm-driver-legacy.patch
|
||||||
patch -sNp0 -i ${FILESDIR}/kernel_4.10.patch
|
patch -sNp0 -i ${FILESDIR}/kernel_4.10.patch
|
||||||
}
|
}
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue