diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-12-02 23:41:47 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-12-02 23:41:47 +0000 |
commit | 20fcbae5ac86b2d10b23253245f5e88b78d2c76f (patch) | |
tree | 59d02e44e74befd2e71c3b830f0fc5fa9b9852fa | |
parent | 422002dc8434061729b1558ac846648041c46ab3 (diff) |
Finish the last bits necessary to get the i915 DRM port working on FreeBSD
Submitted by: Alexey Popov <llp@iteranet.com>
-rw-r--r-- | bsd-core/drm_drv.c | 13 | ||||
-rw-r--r-- | bsd-core/i915_drv.c | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 032821f6..92d5700d 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -150,9 +150,14 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist) { 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) { @@ -187,8 +192,8 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist) 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); diff --git a/bsd-core/i915_drv.c b/bsd-core/i915_drv.c index c571b389..029fec2a 100644 --- a/bsd-core/i915_drv.c +++ b/bsd-core/i915_drv.c @@ -101,7 +101,7 @@ static driver_t i915_driver = { }; 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__) |