Paste #130639 |
pasted on 20.12.2019 11:58
- Edit to this paste
- Raw
- The following pastes replied to this paste: # 278725
- Show paste tree
-
Compare with paste
#
Text paste
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | diff -Npur NVIDIA-Linux-x86-340.107.orig/kernel/nv-drm.c NVIDIA-Linux-x86-340.107/kernel/nv-drm.c --- NVIDIA-Linux-x86-340.107.orig/kernel/nv-drm.c 2018-05-25 06:23:05.000000000 +0200 +++ NVIDIA-Linux-x86-340.107/kernel/nv-drm.c 2019-11-27 05:23:51.525088963 +0100 @@ -22,6 +22,10 @@ #include <drm/drm_gem.h> #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) +#include <linux/version.h> +#endif + #if defined(NV_DRM_LEGACY_PCI_INIT_PRESENT) #define nv_drm_pci_init drm_legacy_pci_init #define nv_drm_pci_exit drm_legacy_pci_exit @@ -161,6 +161,9 @@ static struct drm_driver nv_drm_driver = #else .driver_features = DRIVER_GEM | DRIVER_PRIME, #endif +#if defined(DRIVER_LEGACY) || LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) + .driver_features = DRIVER_GEM | DRIVER_LEGACY, +#endif .load = nv_drm_load, .unload = nv_drm_unload, .fops = &nv_drm_fops, |