340.102/340.104 + 4.14-rc1 - anyone got a patch?

Currently this driver (including latest 340.104) fails with 4.14-rc1 as follows:

/home/neil/projects/scratch/alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/xf86-video-nvidia-legacy-340.104/kernel/nv-drm.c: In function 'nv_drm_init':
/home/neil/projects/scratch/alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/xf86-video-nvidia-legacy-340.104/kernel/nv-drm.c:176:11: error: implicit declaration of function 'drm_pci_init'; did you mean 'drm_dev_init'? [-Werror=implicit-function-declaration]
     ret = drm_pci_init(&nv_drm_driver, pci_driver);
           ^~~~~~~~~~~~
           drm_dev_init
/home/neil/projects/scratch/alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/xf86-video-nvidia-legacy-340.104/kernel/nv-drm.c: In function 'nv_drm_exit':
/home/neil/projects/scratch/alternates/LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel-next/xf86-video-nvidia-legacy-340.104/kernel/nv-drm.c:186:5: error: implicit declaration of function 'drm_pci_exit'; did you mean 'drm_pci_free'? [-Werror=implicit-function-declaration]
     drm_pci_exit(&nv_drm_driver, pci_driver);
     ^~~~~~~~~~~~
     drm_pci_free

OK, so fixing 340.104 actually turned out to be quite trivial with 4.14-rc1: patch

I have downloaded new drvier 340-104 file,but When I install it ,it says that unified memory module build failed,I can only install complete with option --no-unified-memory. sorry for my poor english.

Are you able to build 340.104 with the 4.13.3 kernel?

I’m just asking to make sure the issue you are having is something different with 4.14-rc1 rather than some quirk with your build environment as I don’t have this problem. I could build 340.104 and 4.13.3 without any issues (no additional patches required), and I can build 340.104 with 4.14-rc1 using the patch linked in post #2.

I think I get errors because I’am using Fedora-27 Beta that is not released.It’s gcc version is not supported by nvidia installer.

I am unable to normally use nvidia-340.104 driver,even I don’t know if my system periodic crashing is caused by this driver.I can’t install the driver in normal manner(don’t use additional options,build DKMS module).Now i am using fedora 27,kernel version is 4.13.4.

That patch link is dead, anyone got a copy to share?

https://github.com/LibreELEC/LibreELEC.tv/pull/1991/commits/0909663139a5314958c0a138226f25bf951f828a

Or just use 340.106, which doesn’t require patching.