diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index 9fb29f93ea0..18fc8b71fd2 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -87,6 +87,7 @@ struct drm_file; #include #include #include +#include #include #include diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index 8a0cdf42e7a..63be19bfdfd 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);