Yeah, it’s no wonder an -rc1 has got the odd bug in it. My local build went fine, although I’ve not actually booted with it yet.
As for configs, Arch, at least, doesn’t have CONFIG_DRM_LEGACY enabled, no; and at this point, most others probably don’t either, it being deprecated and marked as “DANGEROUS” and all – although, I’ve not exactly checked.
Also, sorry if you’ve tried it already, but I took at stab at trying to compile the driver with the following hack:
diff --git a/kernel/nv-drm.c b/kernel/nv-drm.c
index 0d1cdbf..2e4b867 100644
--- a/kernel/nv-drm.c
+++ b/kernel/nv-drm.c
@@ -50,6 +50,60 @@
#if defined(NV_DRM_LEGACY_PCI_INIT_PRESENT)
#define nv_drm_pci_init drm_legacy_pci_init
#define nv_drm_pci_exit drm_legacy_pci_exit
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+int nv_drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)
+{
+ struct pci_dev *pdev = NULL;
+ const struct pci_device_id *pid;
+ int i;
+
+ DRM_DEBUG("\n");
+
+ if (WARN_ON(!(driver->driver_features & DRIVER_LEGACY)))
+ return -EINVAL;
+
+ /* If not using KMS, fall back to stealth mode manual scanning. */
+ INIT_LIST_HEAD(&driver->legacy_dev_list);
+ for (i = 0; pdriver->id_table[i].vendor != 0; i++) {
+ pid = &pdriver->id_table[i];
+
+ /* Loop around setting up a DRM device for each PCI device
+ * matching our ID and device class. If we had the internal
+ * function that pci_get_subsys and pci_get_class used, we'd
+ * be able to just pass pid in instead of doing a two-stage
+ * thing.
+ */
+ pdev = NULL;
+ while ((pdev =
+ pci_get_subsys(pid->vendor, pid->device, pid->subvendor,
+ pid->subdevice, pdev)) != NULL) {
+ if ((pdev->class & pid->class_mask) != pid->class)
+ continue;
+
+ /* stealth mode requires a manual probe */
+ pci_dev_get(pdev);
+ drm_get_pci_dev(pdev, pid, driver);
+ }
+ }
+ return 0;
+}
+
+void nv_drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
+{
+ struct drm_device *dev, *tmp;
+ DRM_DEBUG("\n");
+
+ if (!(driver->driver_features & DRIVER_LEGACY)) {
+ WARN_ON(1);
+ } else {
+ list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
+ legacy_dev_list) {
+ list_del(&dev->legacy_dev_list);
+ drm_put_dev(dev);
+ }
+ }
+ DRM_INFO("Module unloaded\n");
+}
#else
#define nv_drm_pci_init drm_pci_init
#define nv_drm_pci_exit drm_pci_exit
It’s code taken directly from the drm_legacy_pci_{init,exit} kernel functions. And it does compile, but I can’t really load it to test.