vgabios: Compare PCI ids against pci rom struct instead of config settings.
[seabios.git] / vgasrc / vgabios.c
index 2f24e7828c91a99e16a8ac0f414754c2dc034473..e69c6c511a0138cc3c90e7c9a928333c7d4ad429 100644 (file)
@@ -1279,8 +1279,10 @@ vga_post(struct bregs *regs)
 
     if (CONFIG_VGA_PCI) {
         u16 bdf = regs->ax;
-        if (pci_config_readw(bdf, PCI_VENDOR_ID) == CONFIG_VGA_VID
-            && pci_config_readw(bdf, PCI_DEVICE_ID) == CONFIG_VGA_DID)
+        if ((pci_config_readw(bdf, PCI_VENDOR_ID)
+             == GET_GLOBAL(rom_pci_data.vendor))
+            && (pci_config_readw(bdf, PCI_DEVICE_ID)
+                == GET_GLOBAL(rom_pci_data.device)))
             SET_VGA(VgaBDF, bdf);
     }