diff options
author | John Baldwin <jhb@FreeBSD.org> | 2006-02-01 15:45:29 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2006-02-01 15:45:29 +0000 |
commit | cb46523df0e162c56e4a867d5a9ed9df513b7493 (patch) | |
tree | 7f7e63d69e06c87fd4f488209e042af6d504d377 /sys/pci/agp_i810.c | |
parent | 2867c5c8b0e9b971be31ca8e7b486dd87e2fe8e3 (diff) | |
download | src-cb46523df0e162c56e4a867d5a9ed9df513b7493.tar.gz src-cb46523df0e162c56e4a867d5a9ed9df513b7493.zip |
Don't add an agp child in vgapci's attach routine if the PCIY_AGP
capability is present as not all devices supported by the agp_i810 driver
(such as i915) have the AGP capability. Instead, add an identify routine
to the agp_i810 driver that uses the PCI ID to determine if it should
create an agp child device.
Notes
Notes:
svn path=/head/; revision=155186
Diffstat (limited to 'sys/pci/agp_i810.c')
-rw-r--r-- | sys/pci/agp_i810.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c index 1aa187beaa68..7b21a41edf1f 100644 --- a/sys/pci/agp_i810.c +++ b/sys/pci/agp_i810.c @@ -194,6 +194,15 @@ agp_i810_find_bridge(device_t dev) return 0; } +static void +agp_i810_identify(driver_t *driver, device_t parent) +{ + + if (device_find_child(parent, "agp", -1) == NULL && + agp_i810_match(parent)) + device_add_child(parent, "agp", -1); +} + static int agp_i810_probe(device_t dev) { @@ -799,6 +808,7 @@ agp_i810_unbind_memory(device_t dev, struct agp_memory *mem) static device_method_t agp_i810_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, agp_i810_identify), DEVMETHOD(device_probe, agp_i810_probe), DEVMETHOD(device_attach, agp_i810_attach), DEVMETHOD(device_detach, agp_i810_detach), |