[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 12/24] PPC: spapr: Rework VGA select logic
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 12/24] PPC: spapr: Rework VGA select logic |
Date: |
Wed, 15 Aug 2012 11:58:50 +0200 |
When selecting our VGA adapter, we want to:
* fail completely when we can't satisfy the user's request
* support -nographic where no VGA adapter should be spawned
This patch reworks the logic so we fulfill the two conditions above.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/spapr.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/spapr.c b/hw/spapr.c
index 494c412..709673e 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -563,16 +563,21 @@ static void spapr_cpu_reset(void *opaque)
cpu_reset(CPU(cpu));
}
+/* Returns whether we want to use VGA or not */
static int spapr_vga_init(PCIBus *pci_bus)
{
- if (std_vga_enabled) {
+ switch (vga_interface_type) {
+ case VGA_STD:
pci_vga_init(pci_bus);
- } else {
+ return 1;
+ case VGA_NONE:
+ return 0;
+ default:
fprintf(stderr, "This vga model is not supported,"
"currently it only supports -vga std\n");
- return 0;
+ exit(0);
+ break;
}
- return 1;
}
/* pSeries LPAR / sPAPR hardware init */
--
1.6.0.2
- [Qemu-ppc] [PATCH 04/24] PPC: e500: change internal references away from mpc8544ds, (continued)
- [Qemu-ppc] [PATCH 04/24] PPC: e500: change internal references away from mpc8544ds, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 01/24] pseries pci: removed redundant busdev, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 02/24] pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dt, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 07/24] ppc: Fix bug in handling of PAPR hypercall exits, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 03/24] PPC: e500: rename mpc8544ds into generic file, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 08/24] Revert "PPC: e500: Use new MPIC dt format", Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 06/24] PPC: e500: add generic e500 platform, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 05/24] PPC: e500: split mpc8544ds machine from generic e500 code, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 11/24] xbzrle: fix compilation on ppc32, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 12/24] PPC: spapr: Rework VGA select logic,
Alexander Graf <=
- [Qemu-ppc] [PATCH 10/24] spapr: Add support for -vga option, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 09/24] Add one new file vga-pci.h and cleanup on all platforms, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 13/24] PPC: spapr: Remove global variable, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 15/24] pseries: Remove extraneous prints, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 17/24] pseries: Separate PCI RTAS setup from common from emulation specific PCI setup, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 19/24] pseries: Export find_phb() utility function for PCI code, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 16/24] pseries: Rework irq assignment to avoid carrying qemu_irqs around, Alexander Graf, 2012/08/15
- [Qemu-ppc] [PATCH 21/24] pseries: Add PCI MSI/MSI-X support, Alexander Graf, 2012/08/15