Debian GNU/Linux stretch (backports) の NVIDIA のドライバ,古いデバイスと新しいデバイスの混在環境(計算機としては別) で以下を利用していたのだが,418.56 から GeForce GT 430 のサポートがなくなった様子.
ii nvidia-kernel-dkms 418.56-2~bpo9+1 amd64 NVIDIA binary kernel module DKMS source
ii nvidia-legacy-340xx-kernel-dkms 340.107-2~bpo9+1 amd64 NVIDIA binary kernel module DKMS source (340xx legacy version)
nvidia-current のドライバを modprobe すると以下のように怒られる.
NVRM: The NVIDIA GeForce GT 430 GPU installed in this system is
NVRM: supported through the NVIDIA 390.xx Legacy drivers. Please
NVRM: visit http://www.nvidia.com/object/unix.html for more
NVRM: information. The 418.74 NVIDIA driver will ignore
NVRM: this GPU. Continuing probe...
ということで nvidia-legacy-340xx-kernel-dkms を purge して nvidia-legacy-390xx-kernel-dkms 390.116-1~bpo9+1 を install.結構コードが 418.56 と似たような感じになっていて,5.1.15 向け patch は以下のような感じ.nvidia-kernel-dkms 410.104-1~bpo9+1 の Linux 5.1 向け patch とほぼ同じ (行数が若干ずれる程度).
diff --git a/common/inc/nv-list-helpers.h b/common/inc/nv-list-helpers.h
index 0aed851..81c2d4e 100644
--- a/common/inc/nv-list-helpers.h
+++ b/common/inc/nv-list-helpers.h
@@ -91,10 +91,12 @@
list_entry((pos)->member.next, typeof(*(pos)), member)
#endif
+/*
static inline int list_is_first(const struct list_head *list,
const struct list_head *head)
{
return list->prev == head;
}
+*/
#endif // __NV_LIST_HELPERS_H__
diff --git a/nvidia-drm/nvidia-drm-connector.c b/nvidia-drm/nvidia-drm-connector.c
index 24631c0..e64b9fe 100644
--- a/nvidia-drm/nvidia-drm-connector.c
+++ b/nvidia-drm/nvidia-drm-connector.c
@@ -30,7 +30,7 @@
#include "nvidia-drm-utils.h"
#include "nvidia-drm-encoder.h"
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index 1c2db68..90ce30b 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -41,7 +41,7 @@
#include <drm/drmP.h>
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#if defined(NV_DRM_DRM_GEM_H_PRESENT)
#include <drm/drm_gem.h>
diff --git a/nvidia-drm/nvidia-drm-encoder.c b/nvidia-drm/nvidia-drm-encoder.c
index f66bbd7..0e5e2a8 100644
--- a/nvidia-drm/nvidia-drm-encoder.c
+++ b/nvidia-drm/nvidia-drm-encoder.c
@@ -31,7 +31,7 @@
#include "nvidia-drm-crtc.h"
#include "nvidia-drm-helper.h"
-#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
diff --git a/nvidia-drm/nvidia-drm-gem-nvkms-memory.c b/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
index 8636eff..01c6ce4 100644
--- a/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
+++ b/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
@@ -222,7 +222,7 @@ done:
/* XXX Move these vma operations to os layer */
-static int __nv_drm_vma_fault(struct vm_area_struct *vma,
+static vm_fault_t __nv_drm_vma_fault(struct vm_area_struct *vma,
struct vm_fault *vmf)
{
unsigned long address = nv_page_fault_va(vmf);
@@ -268,7 +268,7 @@ static int __nv_drm_vma_fault(struct vm_area_struct *vma,
*/
#if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG)
-static int nv_drm_vma_fault(struct vm_fault *vmf)
+static vm_fault_t nv_drm_vma_fault(struct vm_fault *vmf)
{
return __nv_drm_vma_fault(vmf->vma, vmf);
}
diff --git a/nvidia-uvm/uvm8.c b/nvidia-uvm/uvm8.c
index e00923d..7278415 100644
--- a/nvidia-uvm/uvm8.c
+++ b/nvidia-uvm/uvm8.c
@@ -166,13 +166,13 @@ static void uvm_destroy_vma_semaphore_pool(struct vm_area_struct *vma)
// If a fault handler is not set, paths like handle_pte_fault in older kernels
// assume the memory is anonymous. That would make debugging this failure harder
// so we force it to fail instead.
-static int uvm_vm_fault_sigbus(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault_sigbus(struct vm_area_struct *vma, struct vm_fault *vmf)
{
UVM_DBG_PRINT_RL("Fault to address 0x%lx in disabled vma\n", nv_page_fault_va(vmf));
return VM_FAULT_SIGBUS;
}
-static int uvm_vm_fault_sigbus_wrapper(struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault_sigbus_wrapper(struct vm_fault *vmf)
{
#if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG)
return uvm_vm_fault_sigbus(vmf->vma, vmf);
@@ -390,7 +390,7 @@ static void uvm_vm_close_managed(struct vm_area_struct *vma)
uvm_record_unlock_mmap_sem_write(¤t->mm->mmap_sem);
}
-static int uvm_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
{
uvm_va_space_t *va_space = uvm_va_space_get(vma->vm_file);
uvm_va_block_t *va_block;
@@ -507,7 +507,7 @@ convert_error:
}
}
-static int uvm_vm_fault_wrapper(struct vm_fault *vmf)
+static vm_fault_t uvm_vm_fault_wrapper(struct vm_fault *vmf)
{
#if defined(NV_VM_OPS_FAULT_REMOVED_VMA_ARG)
return uvm_vm_fault(vmf->vma, vmf);