* PCIS_DISPLAY_VGA really corresponds to the first graphic device
initialized by the BIOS at boot time.
* Recent Intel chips contain both AGP and graphic hardware, identified by
the same PCI ids
* The agp device thus has no associated PCIS_DISPLAY_VGA flag when the
Intel graphic device is not set as primary display in BIOS
* Tested with:
- ATI Radeon X550 (primary graphic card)
- Intel Xeon E3-1245v2 (agp device)
device_get_children(bus, &kids, &numkids);
for (i = 0; i < numkids; i++) {
dev = kids[i];
- if (pci_get_class(dev) == PCIC_DISPLAY
- && pci_get_subclass(dev) == PCIS_DISPLAY_VGA)
+ if (pci_get_class(dev) == PCIC_DISPLAY)
if (agp_find_caps(dev)) {
kfree(kids, M_TEMP);
return dev;
{
int i, devid;
- if (pci_get_class(dev) != PCIC_DISPLAY
- || pci_get_subclass(dev) != PCIS_DISPLAY_VGA)
+ if (pci_get_class(dev) != PCIC_DISPLAY)
return (NULL);
devid = pci_get_devid(dev);