{
drm_pci_id_list_t *id_entry;
int vendor, device;
+ device_t realdev;
- vendor = pci_get_vendor(dev);
- device = pci_get_device(dev);
+ if (!strcmp(device_get_name(dev), "drmsub"))
+ realdev = device_get_parent(dev);
+ else
+ realdev = dev;
+ vendor = pci_get_vendor(realdev);
+ device = pci_get_device(realdev);
id_entry = drm_find_description(vendor, device, idlist);
if (id_entry != NULL) {
mtx_init(&dev->dev_lock, "drm device", NULL, MTX_DEF);
#endif
- id_entry = drm_find_description(pci_get_vendor(nbdev),
- pci_get_device(nbdev), idlist);
+ id_entry = drm_find_description(pci_get_vendor(dev->device),
+ pci_get_device(dev->device), idlist);
dev->id_entry = id_entry;
return drm_load(dev);
};
extern devclass_t drm_devclass;
-DRIVER_MODULE(i915, pci, i915_driver, drm_devclass, 0, 0);
+DRIVER_MODULE(i915, agp, i915_driver, drm_devclass, 0, 0);
MODULE_DEPEND(i915, drm, 1, 1, 1);
#elif defined(__NetBSD__) || defined(__OpenBSD__)