diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
| commit | 2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch) | |
| tree | 25f0138e1af8902b92dacc8cce09b267447c17db /graphics/nvidia-drm-latest-kmod/files/patch-nvidia-drm-freebsd-lkpi.c-20250918-01 | |
| parent | f85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff) | |
| parent | 1a30da80670973368b399f2b01fe9c04b91a1273 (diff) | |
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'graphics/nvidia-drm-latest-kmod/files/patch-nvidia-drm-freebsd-lkpi.c-20250918-01')
| -rw-r--r-- | graphics/nvidia-drm-latest-kmod/files/patch-nvidia-drm-freebsd-lkpi.c-20250918-01 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/graphics/nvidia-drm-latest-kmod/files/patch-nvidia-drm-freebsd-lkpi.c-20250918-01 b/graphics/nvidia-drm-latest-kmod/files/patch-nvidia-drm-freebsd-lkpi.c-20250918-01 new file mode 100644 index 000000000000..c703950a0c88 --- /dev/null +++ b/graphics/nvidia-drm-latest-kmod/files/patch-nvidia-drm-freebsd-lkpi.c-20250918-01 @@ -0,0 +1,47 @@ +--- nvidia-drm-freebsd-lkpi.c.orig 2025-08-27 17:59:14 UTC ++++ nvidia-drm-freebsd-lkpi.c +@@ -104,6 +104,35 @@ lkpinew_pci_dev(device_t dev) + * FreeBSD linuxkpi based loading support code. + *************************************************************************/ + ++static int ++dummy_nv_pci_probe(struct pci_dev *pci_dev __unused, ++ const struct pci_device_id *id_table __unused) ++{ ++ return (0); ++} ++ ++static void ++dummy_nv_pci_remove(struct pci_dev *pci_dev __unused) ++{ ++} ++ ++static void ++dummy_nv_pci_shutdown(struct pci_dev *pci_dev __unused) ++{ ++} ++ ++struct pci_driver nv_pci_driver = { ++ .name = "drmn", ++ .id_table = nv_pci_table, ++ .probe = dummy_nv_pci_probe, ++ .remove = dummy_nv_pci_remove, ++ .shutdown = dummy_nv_pci_shutdown, ++#if defined(__FreeBSD__) ++ /* FreeBSD internal/specifc. */ ++ .isdrm = true, ++#endif ++}; ++ + static struct pci_dev *nv_lkpi_pci_devs[NV_MAX_DEVICES]; + + int nv_drm_probe_devices(void) +@@ -153,7 +182,7 @@ int nv_drm_probe_devices(void) + return -ENOMEM; + } + +- if (linux_pci_attach_device(sc->dev, NULL, NULL, pdev)) { ++ if (linux_pci_attach_device(sc->dev, &nv_pci_driver, NULL, pdev)) { + NV_DRM_LOG_ERR("Failed to attach linuxkpi PCI device"); + free(pdev, M_DEVBUF); + return -ENOMEM; |
