Patchwork [1/3] sun4u: add a video card only when requested

login
register
mail settings
Submitter Aurelien Jarno
Date Sept. 7, 2012, 3:27 p.m.
Message ID <1347031634-12526-1-git-send-email-aurelien@aurel32.net>
Download mbox | patch
Permalink /patch/182411/
State New
Headers show

Comments

Aurelien Jarno - Sept. 7, 2012, 3:27 p.m.
The sun4u machine always add a video card, even when "-vga none" is
passed. Fix that by checking if it is enabled or not before
instanciating it.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/sun4u.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/sun4u.c b/hw/sun4u.c
index 07cd042..c6bf6eb 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -821,7 +821,9 @@  static void sun4uv_init(MemoryRegion *address_space_mem,
     ivec_irqs = qemu_allocate_irqs(cpu_set_ivec_irq, env, IVEC_MAX);
     pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, ivec_irqs, &pci_bus2,
                            &pci_bus3, &pbm_irqs);
-    pci_vga_init(pci_bus);
+    if (std_vga_enabled) {
+        pci_vga_init(pci_bus);
+    }
 
     // XXX Should be pci_bus3
     isa_bus = pci_ebus_init(pci_bus, -1, pbm_irqs);