Skip to contentSkip to conversation

pciinit: Enable default VGA device

PATCH Superseded Alex Williamson 1 participant 1 message Mar 5, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pciinit: Enable default VGA device

As QEMU gains PCI bridge and PCIe root port support, we won't always find the VGA device on the root bus. We therefore need to add support to find and enable a VGA device and the path to it through the VGA Enable support in the PCI bridge control register.

---
 src/optionroms.c |    2 +-
 src/pciinit.c    |   45 +++++++++++++++++++++++++++++++++++++++++++++
 src/util.h       |    1 +
 3 files changed, 47 insertions(+), 1 deletion(-)
src/optionroms.c +1 -1
index caa2151..ac92613 100644
@@ -213,7 +213,7 @@ run_file_roms(const char *prefix, int isvga, u64 *sources)
  ****************************************************************/
 
 // Verify device is a vga device with legacy address decoding enabled.
-static int
+int
 is_pci_vga(struct pci_device *pci)
 {
     if (pci->class != PCI_CLASS_DISPLAY_VGA)
src/pciinit.c +45 -0

55 lines not on this page · raw message

src/util.h +1 -0
index 306a8bf..e1df295 100644
@@ -343,6 +343,7 @@ void vgahook_setup(struct pci_device *pci);
 
 // optionroms.c
 void call_bcv(u16 seg, u16 ip);
+int is_pci_vga(struct pci_device *pci);
 void optionrom_setup(void);
 void vgarom_setup(void);
 void s3_resume_vga(void);