There are two separate issues with compiling against latest linux/master tree:
Firstly, VM_FAULT_MINOR was removed from headers, temporary hack is to change it to 0 albeit I didn’t investigate whether this won’t broke something in long turn. Patch:
--- NVIDIA-Linux-x86_64-364.12/kernel/nvidia-uvm/uvm_full_fault_handler.c 2016-03-17 03:59:59.000000000 +0100
+++ NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-uvm/uvm_full_fault_handler.c 2016-03-22 14:52:58.847247949 +0100
@@ -3095,7 +3095,7 @@
pg = pfn_to_page(cpuPfn);
UVM_PANIC_ON(!pg);
- ret = VM_FAULT_MINOR;
+ ret = 0;
}
// Update the gpu state for the given cpu fault only if we have some GPU
diff -ur NVIDIA-Linux-x86_64-364.12/kernel/nvidia-uvm/uvm_lite.c NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-uvm/uvm_lite.c
--- NVIDIA-Linux-x86_64-364.12/kernel/nvidia-uvm/uvm_lite.c 2016-03-17 03:59:59.000000000 +0100
+++ NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-uvm/uvm_lite.c 2016-03-22 14:52:58.847247949 +0100
@@ -1283,7 +1283,7 @@
// If we already have the page, then we must have earlier copied in the
// data from the GPU. Therefore, avoid migrating.
//
- retValue = VM_FAULT_MINOR;
+ retValue = 0;
}
Secondly, drm_mode_fb_cmd2 parameter was constified in upstream. Patch:
diff -ur NVIDIA-Linux-x86_64-364.12/kernel/nvidia-drm/nvidia-drm-fb.c NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-drm/nvidia-drm-fb.c
--- NVIDIA-Linux-x86_64-364.12/kernel/nvidia-drm/nvidia-drm-fb.c 2016-03-17 03:57:24.000000000 +0100
+++ NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-drm/nvidia-drm-fb.c 2016-03-26 22:49:05.949366359 +0100
@@ -199,7 +199,8 @@
struct drm_framebuffer *nvidia_drm_framebuffer_create
(
struct drm_device *dev,
- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd
+ struct drm_file *file,
+ const struct drm_mode_fb_cmd2 *cmd
)
{
return internal_framebuffer_create(dev, file, cmd, 0, 0);
diff -ur NVIDIA-Linux-x86_64-364.12/kernel/nvidia-drm/nvidia-drm-fb.h NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-drm/nvidia-drm-fb.h
--- NVIDIA-Linux-x86_64-364.12/kernel/nvidia-drm/nvidia-drm-fb.h 2016-03-17 03:57:24.000000000 +0100
+++ NVIDIA-Linux-x86_64-364.12b/kernel/nvidia-drm/nvidia-drm-fb.h 2016-03-26 21:48:58.261462832 +0100
@@ -45,7 +45,8 @@
struct drm_framebuffer *nvidia_drm_framebuffer_create
(
struct drm_device *dev,
- struct drm_file *file, struct drm_mode_fb_cmd2 *cmd
+ struct drm_file *file,
+ const struct drm_mode_fb_cmd2 *cmd
);
int nvidia_drm_add_nvkms_fb(
As far I can tell nothing broke by these dirty fixes, feel free to test.