summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/drm_drv.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-12-20 22:44:36 +0000
committerjhb <jhb@FreeBSD.org>2005-12-20 22:44:36 +0000
commit1bbc1eaa87c45b5c1bc65557a95d2553b795c9b2 (patch)
treebf1b884ed397ca7de689d6b0df49906526678361 /sys/dev/drm/drm_drv.c
parent55a8727781ca978c1a0e2799e1c0e7b2eaa99957 (diff)
downloadFreeBSD-src-1bbc1eaa87c45b5c1bc65557a95d2553b795c9b2.zip
FreeBSD-src-1bbc1eaa87c45b5c1bc65557a95d2553b795c9b2.tar.gz
- Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well as
the addition of pci_find_extcap(). - Change the drm drivers to attach to vgapci. This is #ifdef'd so the code can be shared across branches. - Use pci_find_extcap() to look for AGP and PCIE capabilities in drm. - GC all the drmsub stuff for i810/i830/i915. The agp and drm devices are now both children of vgapci.
Diffstat (limited to 'sys/dev/drm/drm_drv.c')
-rw-r--r--sys/dev/drm/drm_drv.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c
index eb9c644..19c92b2 100644
--- a/sys/dev/drm/drm_drv.c
+++ b/sys/dev/drm/drm_drv.c
@@ -153,6 +153,7 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist)
{
drm_pci_id_list_t *id_entry;
int vendor, device;
+#if __FreeBSD_version < 700010
device_t realdev;
if (!strcmp(device_get_name(dev), "drmsub"))
@@ -161,6 +162,10 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist)
realdev = dev;
vendor = pci_get_vendor(realdev);
device = pci_get_device(realdev);
+#else
+ vendor = pci_get_vendor(dev);
+ device = pci_get_device(dev);
+#endif
id_entry = drm_find_description(vendor, device, idlist);
if (id_entry != NULL) {
@@ -180,11 +185,14 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist)
unit = device_get_unit(nbdev);
dev = device_get_softc(nbdev);
+#if __FreeBSD_version < 700010
if (!strcmp(device_get_name(nbdev), "drmsub"))
dev->device = device_get_parent(nbdev);
else
dev->device = nbdev;
-
+#else
+ dev->device = nbdev;
+#endif
dev->devnode = make_dev(&drm_cdevsw,
unit,
DRM_DEV_UID,
OpenPOWER on IntegriCloud