[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/12] pc: use the new pci_vga_init() function
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [PATCH 11/12] pc: use the new pci_vga_init() function |
Date: |
Sat, 8 Sep 2012 13:26:23 +0200 |
The CONFIG_SPICE is now tested in vl.c and thus not needed anymore. The
various tests are still needed for the ISA cases.
Cc: Anthony Liguori <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
---
hw/pc.c | 41 +++++++++++++++--------------------------
1 file changed, 15 insertions(+), 26 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 8736a30..8cdbd9e 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -27,7 +27,6 @@
#include "fdc.h"
#include "ide.h"
#include "pci.h"
-#include "vmware_vga.h"
#include "monitor.h"
#include "fw_cfg.h"
#include "hpet_emul.h"
@@ -51,7 +50,6 @@
#include "exec-memory.h"
#include "arch_init.h"
#include "bitmap.h"
-#include "vga-pci.h"
/* output Bochs bios info messages */
//#define DEBUG_BIOS
@@ -1019,34 +1017,25 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus
*pci_bus)
{
DeviceState *dev = NULL;
- if (cirrus_vga_enabled) {
- if (pci_bus) {
- dev = pci_cirrus_vga_init(pci_bus);
- } else {
+ if (pci_bus) {
+ PCIDevice *pcidev = pci_vga_init(pci_bus);
+ dev = pcidev ? &pcidev->qdev : NULL;
+ } else {
+ switch (vga_interface_type) {
+ case VGA_CIRRUS:
dev = &isa_create_simple(isa_bus, "isa-cirrus-vga")->qdev;
- }
- } else if (vmsvga_enabled) {
- if (pci_bus) {
- dev = pci_vmsvga_init(pci_bus);
- } else {
- fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
- }
-#ifdef CONFIG_SPICE
- } else if (qxl_enabled) {
- if (pci_bus) {
- dev = &pci_create_simple(pci_bus, -1, "qxl-vga")->qdev;
- } else {
- fprintf(stderr, "%s: qxl: no PCI bus\n", __FUNCTION__);
- }
-#endif
- } else if (std_vga_enabled) {
- if (pci_bus) {
- dev = pci_std_vga_init(pci_bus);
- } else {
+ break;
+ case VGA_QXL:
+ fprintf(stderr, "%s: qxl: no PCI bus\n", __func__);
+ break;
+ case VGA_STD:
dev = isa_vga_init(isa_bus);
+ break;
+ case VGA_VMWARE:
+ fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __func__);
+ break;
}
}
-
return dev;
}
--
1.7.10.4
- [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 09/12] ppc/pSeries: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 03/12] pci: add a pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 08/12] ppc/prep: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 11/12] pc: use the new pci_vga_init() function,
Aurelien Jarno <=
- [Qemu-devel] [PATCH 06/12] ppc/newworld: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init(), Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 04/12] mips/malta: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08
- [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/08