diff options
author | rnoland <rnoland@FreeBSD.org> | 2008-12-18 21:58:57 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2008-12-18 21:58:57 +0000 |
commit | 1b619f003f0ae3753c45e1ac9f611f963c55fdfa (patch) | |
tree | 5d5d17dbfa906c0204b3a0b45d8edbbe2c8be665 /sys/dev | |
parent | 982a9ea01c07de2341d7967f7d0978eec307c9af (diff) | |
download | FreeBSD-src-1b619f003f0ae3753c45e1ac9f611f963c55fdfa.zip FreeBSD-src-1b619f003f0ae3753c45e1ac9f611f963c55fdfa.tar.gz |
We only want drm to ever attach to the primary pci device.
Intel 855 chips present the same pci id for both heads. This prevents
us from attaching to the dummy second head. All other chips that I
am aware of either only present a single pci id, or different ids
for each head so that we only match on the correct head.
Approved by: kib@
MFC after: 2 weeks
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/drm/drmP.h | 1 | ||||
-rw-r--r-- | sys/dev/drm/drm_drv.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index 9fb29f9..18fc8b7 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -87,6 +87,7 @@ struct drm_file; #include <sys/agpio.h> #include <sys/mutex.h> #include <dev/pci/pcivar.h> +#include <dev/pci/pcireg.h> #include <sys/selinfo.h> #include <sys/bus.h> diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index 8a0cdf4..63be19b 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -152,6 +152,10 @@ int drm_probe(device_t dev, drm_pci_id_list_t *idlist) device = pci_get_device(dev); #endif + if (pci_get_class(dev) != PCIC_DISPLAY + || pci_get_subclass(dev) != PCIS_DISPLAY_VGA) + return ENXIO; + id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { device_set_desc(dev, id_entry->name); |