I have an old HP 8760W laptop, which needs the NVIDIA ‘legacy’ 390.xx driver series, and Nouveau is (yet again) not working as it should..
From the patch for kernel 5.17 support and driver 470.94, at https://gist.github.com/joanbm/6c7b027b9436bf31ce979927e544e9d5 it seemed that the changes necessary should be simple..
In fact this patch can be used, with the following change..
Change ~/common/inc/nv-procfs-utils.h to ~/common/inc/nv-procfs.h (2 occurrences).
Then the patch will apply to driver 390.147 (with some fuzz..)
patching file a/common/inc/nv-procfs.h
Hunk #1 succeeded at 10 with fuzz 2.
Hunk #2 succeeded at 115 (offset 27 lines).
And the driver compiles OK and loads/runs (tested with kernel 5.17-rc2)
Robert Gadsdon. February 2nd 2022.