Bug#994860: nvidia-driver: Does not build against new kernel 5.14.0-1-amd64

Raphael Robatsch raphael at tapesoftware.net
Thu Sep 30 17:32:06 BST 2021


I hit this on Debian testing. Use the following patch at your own peril, it "works for me". Thanks for not upstreaming your driver nvidia, can't wait for GPU prices to crash so I can replace it with a card from a sane vendor.

Raphael

Fixes build on 5.14.6 kernels.
Index: nvidia-current-470.57.02/common/inc/nv-time.h
===================================================================
--- nvidia-current-470.57.02.orig/common/inc/nv-time.h
+++ nvidia-current-470.57.02/common/inc/nv-time.h
@@ -214,7 +214,7 @@ static inline NV_STATUS nv_sleep_ms(unsi
         // the requested timeout has expired, loop until less
         // than a jiffie of the desired delay remains.
         //
-        current->state = TASK_INTERRUPTIBLE;
+        current->__state = TASK_INTERRUPTIBLE;
         do
         {
             schedule_timeout(jiffies);
Index: nvidia-current-470.57.02/nvidia-drm/nvidia-drm-drv.c
===================================================================
--- nvidia-current-470.57.02.orig/nvidia-drm/nvidia-drm-drv.c
+++ nvidia-current-470.57.02/nvidia-drm/nvidia-drm-drv.c
@@ -922,7 +922,7 @@ static void nv_drm_register_drm_device(c
     dev->dev_private = nv_dev;
     nv_dev->dev = dev;
     if (device->bus == &pci_bus_type) {
-        dev->pdev = to_pci_dev(device);
+        dev->dev = device;
     }

     /* Register DRM device to DRM sub-system */



More information about the pkg-nvidia-devel mailing list