Error compiling with recent mainline kernel linux-6.4-rc1

Hello dear Maintainers…

The latest driver compiles fine on the 6.3 kernel series but fails on the newest 6.4.

Can you give me a hint on how to patch this ?

/var/lib/dkms/nvidia-current/530.41.03/build/nvidia-drm/nvidia-drm-drv.c:1439:18: error: ‘struct drm_driver’ has no member named ‘dumb_destroy’

nvidia-smi
Tue May 9 11:07:41 2023
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.41.03 Driver Version: 530.41.03 CUDA Version: 12.1 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3070 L… On | 00000000:01:00.0 On | N/A |
| N/A 44C P8 18W / N/A| 921MiB / 8192MiB | 19% Default |
| | | N/A |
±----------------------------------------±---------------------±---------------------+

±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 6766 G /usr/lib/xorg/Xorg 453MiB |
| 0 N/A N/A 7135 G /usr/bin/gnome-shell 53MiB |
| 0 N/A N/A 7156 G /usr/libexec/mutter-x11-frames 128MiB |
| 0 N/A N/A 8046 G …tionPermissions,SystemNotifications 100MiB |
| 0 N/A N/A 8147 G …ures=SpareRendererForSitePerProcess 39MiB |
| 0 N/A N/A 9807 G gjs 45MiB |
| 0 N/A N/A 13688 C+G /usr/lib/vmware/bin/mksSandbox 95MiB |
±--------------------------------------------------------------------------------------+

Thanks

online I found this patch I will test it

https://gist.github.com/joanbm/77f0650d45747b9a4dc8e330ade2bf5c

I confirm that the patch works please insert it into the main code

dkms install nvidia-current/530.41.03 -k 6.4.0-rc1

nvidia-current.ko:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.4.0-rc1/updates/dkms/

nvidia-current-modeset.ko:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.4.0-rc1/updates/dkms/

nvidia-current-drm.ko:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.4.0-rc1/updates/dkms/

nvidia-current-uvm.ko:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.4.0-rc1/updates/dkms/

nvidia-current-peermem.ko:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.4.0-rc1/updates/dkms/
      depmod…

I leave this open for others that are having the same problem to find