aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2023-07-06 17:26:24 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2023-07-06 17:26:24 +0000
commite8404a72c5df939cd9ad869b12cf038c6846440a (patch)
tree50877d03a32358d758d6bd1cd24356e9d6850abd
parentacfd26152424b39f99cc0224c970eb5cf8ce93f0 (diff)
downloadsrc-e8404a72c5df939cd9ad869b12cf038c6846440a.tar.gz
src-e8404a72c5df939cd9ad869b12cf038c6846440a.zip
vgapci: Don't create a drm helper
Simply speaking, being started the drm-kmod driver should create sysfs helpers, which is «drm» class devices, with the unit number 0, 128 and, perhaps 64. If a drm helper created by vgapci driver with the corresponding unit number exists then the drm-kmod driver initialize it by the device_initialize() lkpi method, otherwise drm-kmod driver create new «drm» device. For hw, where two or more different GPU installed, it's not guaranteed that the order of loading GPU drivers will be the same as the vgapci devices numbered. I.e., on hw where vgapci0 is Nvidia GPU and vgapci1 is Intel GPU, when drm-kmod loaded first it will use drm0 helper of vgapci0 device. There is no problem for drm-kmod driver unless we do not traverse device tree, as needed for https://reviews.freebsd.org/D38545. drm-kmod is ok for this change as it has fallback to create corresponding drm device. Reviewed by: Differential Revision: https://reviews.freebsd.org/D38546
-rw-r--r--sys/dev/pci/vga_pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 12a4057a474c..64847d37f0f6 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -373,8 +373,7 @@ vga_pci_attach(device_t dev)
bus_generic_probe(dev);
- /* Always create a drm child for now to make it easier on drm. */
- device_add_child(dev, "drm", -1);
+ /* Always create a drmn child for now to make it easier on drm. */
device_add_child(dev, "drmn", -1);
bus_generic_attach(dev);