From: Robert Noland Date: Thu, 5 Mar 2009 06:44:56 +0000 (-0600) Subject: FreeBSD: We only want drm to ever attach to the primary pci device. X-Git-Tag: submit/1.0/20121108.012404~535 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=222dc6582e7afad0cd397452a0c4bcea23efeb04;p=profile%2Fivi%2Flibdrm.git FreeBSD: 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. --- diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index 79998e8..a8227c2 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -83,6 +83,7 @@ struct drm_file; #include #include #include +#include #include #include diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index d4d50e6..85e86d3 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -173,6 +173,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);