* [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init()
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 12:33 ` Blue Swirl
2012-09-08 12:35 ` Andreas Färber
2012-09-08 11:26 ` [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability Aurelien Jarno
` (11 subsequent siblings)
12 siblings, 2 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel
Cc: Anthony Liguori, Alexander Graf, Blue Swirl, Andreas Färber,
Richard Henderson, Aurelien Jarno, David Gibson
This better explains what is this function about. Adjust all callers.
Cc: Richard Henderson <rth@twiddle.net>
Cc: Alexander Graf <agraf@suse.de>
Cc: Andreas Färber <andreas.faerber@web.de>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/alpha_pci.c | 2 +-
hw/mips_malta.c | 2 +-
hw/pc.c | 2 +-
hw/ppc_newworld.c | 2 +-
hw/ppc_oldworld.c | 2 +-
hw/ppc_prep.c | 2 +-
hw/spapr.c | 2 +-
hw/sun4u.c | 2 +-
hw/vga-pci.c | 6 +++---
hw/vga-pci.h | 2 +-
10 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
index ea546f8..0352e72 100644
--- a/hw/alpha_pci.c
+++ b/hw/alpha_pci.c
@@ -128,6 +128,6 @@ void alpha_pci_vga_setup(PCIBus *pci_bus)
/* If VGA is enabled at all, and one of the above didn't work, then
fallback to Standard VGA. */
if (vga_interface_type != VGA_NONE) {
- pci_vga_init(pci_bus);
+ pci_std_vga_init(pci_bus);
}
}
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index ad23f26..c39dee5 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -992,7 +992,7 @@ void mips_malta_init (ram_addr_t ram_size,
} else if (vmsvga_enabled) {
pci_vmsvga_init(pci_bus);
} else if (std_vga_enabled) {
- pci_vga_init(pci_bus);
+ pci_std_vga_init(pci_bus);
}
}
diff --git a/hw/pc.c b/hw/pc.c
index 112739a..8736a30 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1041,7 +1041,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
#endif
} else if (std_vga_enabled) {
if (pci_bus) {
- dev = pci_vga_init(pci_bus);
+ dev = pci_std_vga_init(pci_bus);
} else {
dev = isa_vga_init(isa_bus);
}
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index e95cfe8..84af948 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -330,7 +330,7 @@ static void ppc_core99_init (ram_addr_t ram_size,
machine_arch = ARCH_MAC99;
}
/* init basic PC hardware */
- pci_vga_init(pci_bus);
+ pci_std_vga_init(pci_bus);
escc_mem = escc_init(0, pic[0x25], pic[0x24],
serial_hds[0], serial_hds[1], ESCC_CLOCK, 4);
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 1dcd8a6..8267eb4 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -250,7 +250,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
pci_bus = pci_grackle_init(0xfec00000, pic,
get_system_memory(),
get_system_io());
- pci_vga_init(pci_bus);
+ pci_std_vga_init(pci_bus);
escc_mem = escc_init(0, pic[0x0f], pic[0x10], serial_hds[0],
serial_hds[1], ESCC_CLOCK, 4);
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 592b7b2..1fa7609 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -611,7 +611,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
memory_region_add_subregion(sysmem, 0x80000000, PPC_io_memory);
/* init basic PC hardware */
- pci_vga_init(pci_bus);
+ pci_std_vga_init(pci_bus);
if (serial_hds[0])
serial_isa_init(isa_bus, 0, serial_hds[0]);
diff --git a/hw/spapr.c b/hw/spapr.c
index c34b767..80735d6 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -590,7 +590,7 @@ static int spapr_vga_init(PCIBus *pci_bus)
{
switch (vga_interface_type) {
case VGA_STD:
- pci_vga_init(pci_bus);
+ pci_std_vga_init(pci_bus);
return 1;
case VGA_NONE:
return 0;
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 07cd042..cca090f 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -821,7 +821,7 @@ 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);
+ pci_std_vga_init(pci_bus);
// XXX Should be pci_bus3
isa_bus = pci_ebus_init(pci_bus, -1, pbm_irqs);
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 9abbada..992ffd9 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -47,7 +47,7 @@ static const VMStateDescription vmstate_vga_pci = {
}
};
-static int pci_vga_initfn(PCIDevice *dev)
+static int pci_std_vga_initfn(PCIDevice *dev)
{
PCIVGAState *d = DO_UPCAST(PCIVGAState, dev, dev);
VGACommonState *s = &d->vga;
@@ -70,7 +70,7 @@ static int pci_vga_initfn(PCIDevice *dev)
return 0;
}
-DeviceState *pci_vga_init(PCIBus *bus)
+DeviceState *pci_std_vga_init(PCIBus *bus)
{
return &pci_create_simple(bus, -1, "VGA")->qdev;
}
@@ -86,7 +86,7 @@ static void vga_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->no_hotplug = 1;
- k->init = pci_vga_initfn;
+ k->init = pci_std_vga_initfn;
k->romfile = "vgabios-stdvga.bin";
k->vendor_id = PCI_VENDOR_ID_QEMU;
k->device_id = PCI_DEVICE_ID_QEMU_VGA;
diff --git a/hw/vga-pci.h b/hw/vga-pci.h
index 49abf13..d111cdc 100644
--- a/hw/vga-pci.h
+++ b/hw/vga-pci.h
@@ -4,7 +4,7 @@
#include "qemu-common.h"
/* vga-pci.c */
-DeviceState *pci_vga_init(PCIBus *bus);
+DeviceState *pci_std_vga_init(PCIBus *bus);
/* cirrus_vga.c */
DeviceState *pci_cirrus_vga_init(PCIBus *bus);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init()
2012-09-08 11:26 ` [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init() Aurelien Jarno
@ 2012-09-08 12:33 ` Blue Swirl
2012-09-08 12:35 ` Andreas Färber
1 sibling, 0 replies; 25+ messages in thread
From: Blue Swirl @ 2012-09-08 12:33 UTC (permalink / raw)
To: Aurelien Jarno
Cc: Anthony Liguori, Alexander Graf, qemu-devel, Andreas Färber,
Richard Henderson, David Gibson
On Sat, Sep 8, 2012 at 11:26 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> This better explains what is this function about. Adjust all callers.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Andreas Färber <andreas.faerber@web.de>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Blue Swirl <blauwirbel@gmail.com>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> hw/alpha_pci.c | 2 +-
> hw/mips_malta.c | 2 +-
> hw/pc.c | 2 +-
> hw/ppc_newworld.c | 2 +-
> hw/ppc_oldworld.c | 2 +-
> hw/ppc_prep.c | 2 +-
> hw/spapr.c | 2 +-
> hw/sun4u.c | 2 +-
> hw/vga-pci.c | 6 +++---
> hw/vga-pci.h | 2 +-
> 10 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
> index ea546f8..0352e72 100644
> --- a/hw/alpha_pci.c
> +++ b/hw/alpha_pci.c
> @@ -128,6 +128,6 @@ void alpha_pci_vga_setup(PCIBus *pci_bus)
> /* If VGA is enabled at all, and one of the above didn't work, then
> fallback to Standard VGA. */
> if (vga_interface_type != VGA_NONE) {
> - pci_vga_init(pci_bus);
> + pci_std_vga_init(pci_bus);
> }
> }
> diff --git a/hw/mips_malta.c b/hw/mips_malta.c
> index ad23f26..c39dee5 100644
> --- a/hw/mips_malta.c
> +++ b/hw/mips_malta.c
> @@ -992,7 +992,7 @@ void mips_malta_init (ram_addr_t ram_size,
> } else if (vmsvga_enabled) {
> pci_vmsvga_init(pci_bus);
> } else if (std_vga_enabled) {
> - pci_vga_init(pci_bus);
> + pci_std_vga_init(pci_bus);
> }
> }
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 112739a..8736a30 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -1041,7 +1041,7 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
> #endif
> } else if (std_vga_enabled) {
> if (pci_bus) {
> - dev = pci_vga_init(pci_bus);
> + dev = pci_std_vga_init(pci_bus);
> } else {
> dev = isa_vga_init(isa_bus);
> }
> diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
> index e95cfe8..84af948 100644
> --- a/hw/ppc_newworld.c
> +++ b/hw/ppc_newworld.c
> @@ -330,7 +330,7 @@ static void ppc_core99_init (ram_addr_t ram_size,
> machine_arch = ARCH_MAC99;
> }
> /* init basic PC hardware */
> - pci_vga_init(pci_bus);
> + pci_std_vga_init(pci_bus);
>
> escc_mem = escc_init(0, pic[0x25], pic[0x24],
> serial_hds[0], serial_hds[1], ESCC_CLOCK, 4);
> diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
> index 1dcd8a6..8267eb4 100644
> --- a/hw/ppc_oldworld.c
> +++ b/hw/ppc_oldworld.c
> @@ -250,7 +250,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
> pci_bus = pci_grackle_init(0xfec00000, pic,
> get_system_memory(),
> get_system_io());
> - pci_vga_init(pci_bus);
> + pci_std_vga_init(pci_bus);
>
> escc_mem = escc_init(0, pic[0x0f], pic[0x10], serial_hds[0],
> serial_hds[1], ESCC_CLOCK, 4);
> diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
> index 592b7b2..1fa7609 100644
> --- a/hw/ppc_prep.c
> +++ b/hw/ppc_prep.c
> @@ -611,7 +611,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
> memory_region_add_subregion(sysmem, 0x80000000, PPC_io_memory);
>
> /* init basic PC hardware */
> - pci_vga_init(pci_bus);
> + pci_std_vga_init(pci_bus);
>
> if (serial_hds[0])
> serial_isa_init(isa_bus, 0, serial_hds[0]);
> diff --git a/hw/spapr.c b/hw/spapr.c
> index c34b767..80735d6 100644
> --- a/hw/spapr.c
> +++ b/hw/spapr.c
> @@ -590,7 +590,7 @@ static int spapr_vga_init(PCIBus *pci_bus)
> {
> switch (vga_interface_type) {
> case VGA_STD:
> - pci_vga_init(pci_bus);
> + pci_std_vga_init(pci_bus);
> return 1;
> case VGA_NONE:
> return 0;
> diff --git a/hw/sun4u.c b/hw/sun4u.c
> index 07cd042..cca090f 100644
> --- a/hw/sun4u.c
> +++ b/hw/sun4u.c
> @@ -821,7 +821,7 @@ 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);
> + pci_std_vga_init(pci_bus);
>
> // XXX Should be pci_bus3
> isa_bus = pci_ebus_init(pci_bus, -1, pbm_irqs);
> diff --git a/hw/vga-pci.c b/hw/vga-pci.c
> index 9abbada..992ffd9 100644
> --- a/hw/vga-pci.c
> +++ b/hw/vga-pci.c
> @@ -47,7 +47,7 @@ static const VMStateDescription vmstate_vga_pci = {
> }
> };
>
> -static int pci_vga_initfn(PCIDevice *dev)
> +static int pci_std_vga_initfn(PCIDevice *dev)
> {
> PCIVGAState *d = DO_UPCAST(PCIVGAState, dev, dev);
> VGACommonState *s = &d->vga;
> @@ -70,7 +70,7 @@ static int pci_vga_initfn(PCIDevice *dev)
> return 0;
> }
>
> -DeviceState *pci_vga_init(PCIBus *bus)
> +DeviceState *pci_std_vga_init(PCIBus *bus)
> {
> return &pci_create_simple(bus, -1, "VGA")->qdev;
> }
> @@ -86,7 +86,7 @@ static void vga_class_init(ObjectClass *klass, void *data)
> PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
>
> k->no_hotplug = 1;
> - k->init = pci_vga_initfn;
> + k->init = pci_std_vga_initfn;
> k->romfile = "vgabios-stdvga.bin";
> k->vendor_id = PCI_VENDOR_ID_QEMU;
> k->device_id = PCI_DEVICE_ID_QEMU_VGA;
> diff --git a/hw/vga-pci.h b/hw/vga-pci.h
> index 49abf13..d111cdc 100644
> --- a/hw/vga-pci.h
> +++ b/hw/vga-pci.h
> @@ -4,7 +4,7 @@
> #include "qemu-common.h"
>
> /* vga-pci.c */
> -DeviceState *pci_vga_init(PCIBus *bus);
> +DeviceState *pci_std_vga_init(PCIBus *bus);
>
> /* cirrus_vga.c */
> DeviceState *pci_cirrus_vga_init(PCIBus *bus);
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init()
2012-09-08 11:26 ` [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init() Aurelien Jarno
2012-09-08 12:33 ` Blue Swirl
@ 2012-09-08 12:35 ` Andreas Färber
1 sibling, 0 replies; 25+ messages in thread
From: Andreas Färber @ 2012-09-08 12:35 UTC (permalink / raw)
To: Aurelien Jarno
Cc: Anthony Liguori, Alexander Graf, qemu-devel, Blue Swirl,
Richard Henderson, David Gibson
Am 08.09.2012 13:26, schrieb Aurelien Jarno:
> This better explains what is this function about. Adjust all callers.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Andreas Färber <andreas.faerber@web.de>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Looks fine,
Acked-by: Andreas Färber <andreas.faerber@web.de>
Andreas
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init() Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 12:40 ` Andreas Färber
2012-09-08 11:26 ` [Qemu-devel] [PATCH 03/12] pci: add a pci_vga_init() function Aurelien Jarno
` (10 subsequent siblings)
12 siblings, 1 reply; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Gerd Hoffmann, Aurelien Jarno
Check for qxl availability in vl.c. This will allow to remove #ifdef
CONFIG_SPICE .. #endif later in this series
Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
vl.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/vl.c b/vl.c
index 7c577fa..6363915 100644
--- a/vl.c
+++ b/vl.c
@@ -1703,6 +1703,11 @@ static bool vmware_vga_available(void)
return qdev_exists("vmware-svga");
}
+static bool qxl_vga_available(void)
+{
+ return qdev_exists("qxl-vga");
+}
+
static void select_vgahw (const char *p)
{
const char *opts;
@@ -1732,7 +1737,12 @@ static void select_vgahw (const char *p)
} else if (strstart(p, "xenfb", &opts)) {
vga_interface_type = VGA_XENFB;
} else if (strstart(p, "qxl", &opts)) {
- vga_interface_type = VGA_QXL;
+ if (qxl_vga_available()) {
+ vga_interface_type = VGA_QXL;
+ } else {
+ fprintf(stderr, "Error: QXL VGA not available\n");
+ exit(0);
+ }
} else if (!strstart(p, "none", &opts)) {
invalid_vga:
fprintf(stderr, "Unknown vga type: %s\n", p);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability
2012-09-08 11:26 ` [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability Aurelien Jarno
@ 2012-09-08 12:40 ` Andreas Färber
0 siblings, 0 replies; 25+ messages in thread
From: Andreas Färber @ 2012-09-08 12:40 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: Anthony Liguori, qemu-devel, Gerd Hoffmann
Am 08.09.2012 13:26, schrieb Aurelien Jarno:
> Check for qxl availability in vl.c. This will allow to remove #ifdef
> CONFIG_SPICE .. #endif later in this series
>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> vl.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index 7c577fa..6363915 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1703,6 +1703,11 @@ static bool vmware_vga_available(void)
> return qdev_exists("vmware-svga");
> }
>
> +static bool qxl_vga_available(void)
> +{
> + return qdev_exists("qxl-vga");
I'd suggest to use the QOM equivalent:
object_class_by_name("qxl-vga")
Andreas
> +}
> +
> static void select_vgahw (const char *p)
> {
> const char *opts;
> @@ -1732,7 +1737,12 @@ static void select_vgahw (const char *p)
> } else if (strstart(p, "xenfb", &opts)) {
> vga_interface_type = VGA_XENFB;
> } else if (strstart(p, "qxl", &opts)) {
> - vga_interface_type = VGA_QXL;
> + if (qxl_vga_available()) {
> + vga_interface_type = VGA_QXL;
> + } else {
> + fprintf(stderr, "Error: QXL VGA not available\n");
> + exit(0);
> + }
> } else if (!strstart(p, "none", &opts)) {
> invalid_vga:
> fprintf(stderr, "Unknown vga type: %s\n", p);
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 03/12] pci: add a pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 01/12] vga: rename pci_vga_init() into pci_std_vga_init() Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 02/12] vl.c: check for qxl availability Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 04/12] mips/malta: use the new " Aurelien Jarno
` (9 subsequent siblings)
12 siblings, 0 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Aurelien Jarno
This function create a PCI VGA device according to the value of
vga_interface_type. It returns a PCIDevice (and not a DeviceState).
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/pci.c | 18 ++++++++++++++++++
hw/pci.h | 3 +++
2 files changed, 21 insertions(+)
diff --git a/hw/pci.c b/hw/pci.c
index 4d95984..1b775b6 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1474,6 +1474,24 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, const char *default_model,
return res;
}
+PCIDevice *pci_vga_init(PCIBus *bus)
+{
+ switch (vga_interface_type) {
+ case VGA_CIRRUS:
+ return pci_create_simple(bus, -1, "cirrus-vga");
+ case VGA_QXL:
+ return pci_create_simple(bus, -1, "qxl-vga");
+ case VGA_STD:
+ return pci_create_simple(bus, -1, "VGA");
+ case VGA_VMWARE:
+ return pci_create_simple(bus, -1, "vmware-svga");
+ case VGA_NONE:
+ default: /* Other non-PCI types. Checking for unsupported types is already
+ done in vl.c. */
+ return NULL;
+ }
+}
+
/* Whether a given bus number is in range of the secondary
* bus of the given bridge device. */
static bool pci_secondary_bus_in_range(PCIDevice *dev, int bus_num)
diff --git a/hw/pci.h b/hw/pci.h
index 4b6ab3d..84b43b2 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -334,6 +334,9 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
const char *default_devaddr);
PCIDevice *pci_nic_init_nofail(NICInfo *nd, const char *default_model,
const char *default_devaddr);
+
+PCIDevice *pci_vga_init(PCIBus *bus);
+
int pci_bus_num(PCIBus *s);
void pci_for_each_device(PCIBus *bus, int bus_num,
void (*fn)(PCIBus *bus, PCIDevice *d, void *opaque),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 04/12] mips/malta: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (2 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 03/12] pci: add a pci_vga_init() function Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 05/12] alpha: " Aurelien Jarno
` (8 subsequent siblings)
12 siblings, 0 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Aurelien Jarno
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/mips_malta.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index c39dee5..632b466 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -33,7 +33,6 @@
#include "mips.h"
#include "mips_cpudevs.h"
#include "pci.h"
-#include "vmware_vga.h"
#include "qemu-char.h"
#include "sysemu.h"
#include "arch_init.h"
@@ -48,7 +47,6 @@
#include "blockdev.h"
#include "exec-memory.h"
#include "sysbus.h" /* SysBusDevice */
-#include "vga-pci.h"
//#define DEBUG_BOARD_INIT
@@ -987,13 +985,7 @@ void mips_malta_init (ram_addr_t ram_size,
network_init();
/* Optional PCI video card */
- if (cirrus_vga_enabled) {
- pci_cirrus_vga_init(pci_bus);
- } else if (vmsvga_enabled) {
- pci_vmsvga_init(pci_bus);
- } else if (std_vga_enabled) {
- pci_std_vga_init(pci_bus);
- }
+ pci_vga_init(pci_bus);
}
static int mips_malta_sysbus_device_init(SysBusDevice *sysbusdev)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (3 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 04/12] mips/malta: use the new " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 14:47 ` Alexander Graf
2012-09-10 15:56 ` Richard Henderson
2012-09-08 11:26 ` [Qemu-devel] [PATCH 06/12] ppc/newworld: " Aurelien Jarno
` (7 subsequent siblings)
12 siblings, 2 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Aurelien Jarno, Richard Henderson
This remove the fallback to std-vga in case, as availability of the
requested vga device is now tested in vl.c, and returns an error message
to the user.
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/alpha_dp264.c | 2 +-
hw/alpha_pci.c | 24 ------------------------
hw/alpha_sys.h | 2 --
3 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
index 9eb939f..5ea04c7 100644
--- a/hw/alpha_dp264.c
+++ b/hw/alpha_dp264.c
@@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size,
isa_create_simple(isa_bus, "i8042");
/* VGA setup. Don't bother loading the bios. */
- alpha_pci_vga_setup(pci_bus);
+ pci_vga_init(pci_bus);
/* Serial code setup. */
for (i = 0; i < MAX_SERIAL_PORTS; ++i) {
diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
index 0352e72..8079a46 100644
--- a/hw/alpha_pci.c
+++ b/hw/alpha_pci.c
@@ -10,8 +10,6 @@
#include "alpha_sys.h"
#include "qemu-log.h"
#include "sysemu.h"
-#include "vmware_vga.h"
-#include "vga-pci.h"
/* PCI IO reads/writes, to byte-word addressable memory. */
@@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = {
.max_access_size = 4,
},
};
-\f
-void alpha_pci_vga_setup(PCIBus *pci_bus)
-{
- switch (vga_interface_type) {
-#ifdef CONFIG_SPICE
- case VGA_QXL:
- pci_create_simple(pci_bus, -1, "qxl-vga");
- return;
-#endif
- case VGA_CIRRUS:
- pci_cirrus_vga_init(pci_bus);
- return;
- case VGA_VMWARE:
- pci_vmsvga_init(pci_bus);
- return;
- }
- /* If VGA is enabled at all, and one of the above didn't work, then
- fallback to Standard VGA. */
- if (vga_interface_type != VGA_NONE) {
- pci_std_vga_init(pci_bus);
- }
-}
diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h
index de40f8b..7604d09 100644
--- a/hw/alpha_sys.h
+++ b/hw/alpha_sys.h
@@ -19,6 +19,4 @@ extern const MemoryRegionOps alpha_pci_bw_io_ops;
extern const MemoryRegionOps alpha_pci_conf1_ops;
extern const MemoryRegionOps alpha_pci_iack_ops;
-void alpha_pci_vga_setup(PCIBus *pci_bus);
-
#endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function
2012-09-08 11:26 ` [Qemu-devel] [PATCH 05/12] alpha: " Aurelien Jarno
@ 2012-09-08 14:47 ` Alexander Graf
2012-09-08 14:57 ` Aurelien Jarno
2012-09-10 15:56 ` Richard Henderson
1 sibling, 1 reply; 25+ messages in thread
From: Alexander Graf @ 2012-09-08 14:47 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel@nongnu.org, Richard Henderson
On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote:
> This remove the fallback to std-vga in case, as availability of the
> requested vga device is now tested in vl.c, and returns an error message
> to the user.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> hw/alpha_dp264.c | 2 +-
> hw/alpha_pci.c | 24 ------------------------
> hw/alpha_sys.h | 2 --
> 3 files changed, 1 insertion(+), 27 deletions(-)
>
> diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
> index 9eb939f..5ea04c7 100644
> --- a/hw/alpha_dp264.c
> +++ b/hw/alpha_dp264.c
> @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size,
> isa_create_simple(isa_bus, "i8042");
>
> /* VGA setup. Don't bother loading the bios. */
> - alpha_pci_vga_setup(pci_bus);
> + pci_vga_init(pci_bus);
>
> /* Serial code setup. */
> for (i = 0; i < MAX_SERIAL_PORTS; ++i) {
> diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
> index 0352e72..8079a46 100644
> --- a/hw/alpha_pci.c
> +++ b/hw/alpha_pci.c
> @@ -10,8 +10,6 @@
> #include "alpha_sys.h"
> #include "qemu-log.h"
> #include "sysemu.h"
> -#include "vmware_vga.h"
> -#include "vga-pci.h"
>
>
> /* PCI IO reads/writes, to byte-word addressable memory. */
> @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = {
> .max_access_size = 4,
> },
> };
> -\f
> -void alpha_pci_vga_setup(PCIBus *pci_bus)
> -{
> - switch (vga_interface_type) {
> -#ifdef CONFIG_SPICE
> - case VGA_QXL:
> - pci_create_simple(pci_bus, -1, "qxl-vga");
> - return;
> -#endif
> - case VGA_CIRRUS:
> - pci_cirrus_vga_init(pci_bus);
> - return;
> - case VGA_VMWARE:
> - pci_vmsvga_init(pci_bus);
> - return;
> - }
> - /* If VGA is enabled at all, and one of the above didn't work, then
> - fallback to Standard VGA. */
> - if (vga_interface_type != VGA_NONE) {
> - pci_std_vga_init(pci_bus);
> - }
You're removing the fallback logic here, no?
Alex
> -}
> diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h
> index de40f8b..7604d09 100644
> --- a/hw/alpha_sys.h
> +++ b/hw/alpha_sys.h
> @@ -19,6 +19,4 @@ extern const MemoryRegionOps alpha_pci_bw_io_ops;
> extern const MemoryRegionOps alpha_pci_conf1_ops;
> extern const MemoryRegionOps alpha_pci_iack_ops;
>
> -void alpha_pci_vga_setup(PCIBus *pci_bus);
> -
> #endif
> --
> 1.7.10.4
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function
2012-09-08 14:47 ` Alexander Graf
@ 2012-09-08 14:57 ` Aurelien Jarno
2012-09-08 15:00 ` Alexander Graf
0 siblings, 1 reply; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 14:57 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel@nongnu.org, Richard Henderson
On Sat, Sep 08, 2012 at 04:47:43PM +0200, Alexander Graf wrote:
>
>
> On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote:
>
> > This remove the fallback to std-vga in case, as availability of the
> > requested vga device is now tested in vl.c, and returns an error message
> > to the user.
> >
> > Cc: Richard Henderson <rth@twiddle.net>
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > hw/alpha_dp264.c | 2 +-
> > hw/alpha_pci.c | 24 ------------------------
> > hw/alpha_sys.h | 2 --
> > 3 files changed, 1 insertion(+), 27 deletions(-)
> >
> > diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
> > index 9eb939f..5ea04c7 100644
> > --- a/hw/alpha_dp264.c
> > +++ b/hw/alpha_dp264.c
> > @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size,
> > isa_create_simple(isa_bus, "i8042");
> >
> > /* VGA setup. Don't bother loading the bios. */
> > - alpha_pci_vga_setup(pci_bus);
> > + pci_vga_init(pci_bus);
> >
> > /* Serial code setup. */
> > for (i = 0; i < MAX_SERIAL_PORTS; ++i) {
> > diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
> > index 0352e72..8079a46 100644
> > --- a/hw/alpha_pci.c
> > +++ b/hw/alpha_pci.c
> > @@ -10,8 +10,6 @@
> > #include "alpha_sys.h"
> > #include "qemu-log.h"
> > #include "sysemu.h"
> > -#include "vmware_vga.h"
> > -#include "vga-pci.h"
> >
> >
> > /* PCI IO reads/writes, to byte-word addressable memory. */
> > @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = {
> > .max_access_size = 4,
> > },
> > };
> > -\f
> > -void alpha_pci_vga_setup(PCIBus *pci_bus)
> > -{
> > - switch (vga_interface_type) {
> > -#ifdef CONFIG_SPICE
> > - case VGA_QXL:
> > - pci_create_simple(pci_bus, -1, "qxl-vga");
> > - return;
> > -#endif
> > - case VGA_CIRRUS:
> > - pci_cirrus_vga_init(pci_bus);
> > - return;
> > - case VGA_VMWARE:
> > - pci_vmsvga_init(pci_bus);
> > - return;
> > - }
> > - /* If VGA is enabled at all, and one of the above didn't work, then
> > - fallback to Standard VGA. */
> > - if (vga_interface_type != VGA_NONE) {
> > - pci_std_vga_init(pci_bus);
> > - }
>
> You're removing the fallback logic here, no?
>
Yes, because the availability of the other type is now checked in vl.c
so that pci_vga_init() is able to create the requested card. That way
the users get an error message instead of having a card different to what
they request.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function
2012-09-08 14:57 ` Aurelien Jarno
@ 2012-09-08 15:00 ` Alexander Graf
2012-09-08 15:04 ` Alexander Graf
0 siblings, 1 reply; 25+ messages in thread
From: Alexander Graf @ 2012-09-08 15:00 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel@nongnu.org, Richard Henderson
On 08.09.2012, at 16:57, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Sat, Sep 08, 2012 at 04:47:43PM +0200, Alexander Graf wrote:
>>
>>
>> On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>
>>> This remove the fallback to std-vga in case, as availability of the
>>> requested vga device is now tested in vl.c, and returns an error message
>>> to the user.
>>>
>>> Cc: Richard Henderson <rth@twiddle.net>
>>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>>> ---
>>> hw/alpha_dp264.c | 2 +-
>>> hw/alpha_pci.c | 24 ------------------------
>>> hw/alpha_sys.h | 2 --
>>> 3 files changed, 1 insertion(+), 27 deletions(-)
>>>
>>> diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
>>> index 9eb939f..5ea04c7 100644
>>> --- a/hw/alpha_dp264.c
>>> +++ b/hw/alpha_dp264.c
>>> @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size,
>>> isa_create_simple(isa_bus, "i8042");
>>>
>>> /* VGA setup. Don't bother loading the bios. */
>>> - alpha_pci_vga_setup(pci_bus);
>>> + pci_vga_init(pci_bus);
>>>
>>> /* Serial code setup. */
>>> for (i = 0; i < MAX_SERIAL_PORTS; ++i) {
>>> diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
>>> index 0352e72..8079a46 100644
>>> --- a/hw/alpha_pci.c
>>> +++ b/hw/alpha_pci.c
>>> @@ -10,8 +10,6 @@
>>> #include "alpha_sys.h"
>>> #include "qemu-log.h"
>>> #include "sysemu.h"
>>> -#include "vmware_vga.h"
>>> -#include "vga-pci.h"
>>>
>>>
>>> /* PCI IO reads/writes, to byte-word addressable memory. */
>>> @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = {
>>> .max_access_size = 4,
>>> },
>>> };
>>> -\f
>>> -void alpha_pci_vga_setup(PCIBus *pci_bus)
>>> -{
>>> - switch (vga_interface_type) {
>>> -#ifdef CONFIG_SPICE
>>> - case VGA_QXL:
>>> - pci_create_simple(pci_bus, -1, "qxl-vga");
>>> - return;
>>> -#endif
>>> - case VGA_CIRRUS:
>>> - pci_cirrus_vga_init(pci_bus);
>>> - return;
>>> - case VGA_VMWARE:
>>> - pci_vmsvga_init(pci_bus);
>>> - return;
>>> - }
>>> - /* If VGA is enabled at all, and one of the above didn't work, then
>>> - fallback to Standard VGA. */
>>> - if (vga_interface_type != VGA_NONE) {
>>> - pci_std_vga_init(pci_bus);
>>> - }
>>
>> You're removing the fallback logic here, no?
>>
>
> Yes, because the availability of the other type is now checked in vl.c
> so that pci_vga_init() is able to create the requested card. That way
> the users get an error message instead of having a card different to what
> they request.
But this is alpha and you're calling pci_vga_init, not pc_vga_init :).
Alex
>
> --
> Aurelien Jarno GPG: 1024D/F1BCDB73
> aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function
2012-09-08 15:00 ` Alexander Graf
@ 2012-09-08 15:04 ` Alexander Graf
0 siblings, 0 replies; 25+ messages in thread
From: Alexander Graf @ 2012-09-08 15:04 UTC (permalink / raw)
To: Alexander Graf; +Cc: qemu-devel@nongnu.org, Aurelien Jarno, Richard Henderson
On 08.09.2012, at 17:00, Alexander Graf <agraf@suse.de> wrote:
>
>
> On 08.09.2012, at 16:57, Aurelien Jarno <aurelien@aurel32.net> wrote:
>
>> On Sat, Sep 08, 2012 at 04:47:43PM +0200, Alexander Graf wrote:
>>>
>>>
>>> On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>>
>>>> This remove the fallback to std-vga in case, as availability of the
>>>> requested vga device is now tested in vl.c, and returns an error message
>>>> to the user.
>>>>
>>>> Cc: Richard Henderson <rth@twiddle.net>
>>>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>>>> ---
>>>> hw/alpha_dp264.c | 2 +-
>>>> hw/alpha_pci.c | 24 ------------------------
>>>> hw/alpha_sys.h | 2 --
>>>> 3 files changed, 1 insertion(+), 27 deletions(-)
>>>>
>>>> diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
>>>> index 9eb939f..5ea04c7 100644
>>>> --- a/hw/alpha_dp264.c
>>>> +++ b/hw/alpha_dp264.c
>>>> @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size,
>>>> isa_create_simple(isa_bus, "i8042");
>>>>
>>>> /* VGA setup. Don't bother loading the bios. */
>>>> - alpha_pci_vga_setup(pci_bus);
>>>> + pci_vga_init(pci_bus);
>>>>
>>>> /* Serial code setup. */
>>>> for (i = 0; i < MAX_SERIAL_PORTS; ++i) {
>>>> diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
>>>> index 0352e72..8079a46 100644
>>>> --- a/hw/alpha_pci.c
>>>> +++ b/hw/alpha_pci.c
>>>> @@ -10,8 +10,6 @@
>>>> #include "alpha_sys.h"
>>>> #include "qemu-log.h"
>>>> #include "sysemu.h"
>>>> -#include "vmware_vga.h"
>>>> -#include "vga-pci.h"
>>>>
>>>>
>>>> /* PCI IO reads/writes, to byte-word addressable memory. */
>>>> @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = {
>>>> .max_access_size = 4,
>>>> },
>>>> };
>>>> -\f
>>>> -void alpha_pci_vga_setup(PCIBus *pci_bus)
>>>> -{
>>>> - switch (vga_interface_type) {
>>>> -#ifdef CONFIG_SPICE
>>>> - case VGA_QXL:
>>>> - pci_create_simple(pci_bus, -1, "qxl-vga");
>>>> - return;
>>>> -#endif
>>>> - case VGA_CIRRUS:
>>>> - pci_cirrus_vga_init(pci_bus);
>>>> - return;
>>>> - case VGA_VMWARE:
>>>> - pci_vmsvga_init(pci_bus);
>>>> - return;
>>>> - }
>>>> - /* If VGA is enabled at all, and one of the above didn't work, then
>>>> - fallback to Standard VGA. */
>>>> - if (vga_interface_type != VGA_NONE) {
>>>> - pci_std_vga_init(pci_bus);
>>>> - }
>>>
>>> You're removing the fallback logic here, no?
>>>
>>
>> Yes, because the availability of the other type is now checked in vl.c
>> so that pci_vga_init() is able to create the requested card. That way
>> the users get an error message instead of having a card different to what
>> they request.
>
> But this is alpha and you're calling pci_vga_init, not pc_vga_init :).
Ah, I misread the code. It's creating a pci std vga adapter as fallback. Then it's all fine :)
Alex
>
> Alex
>
>>
>> --
>> Aurelien Jarno GPG: 1024D/F1BCDB73
>> aurelien@aurel32.net http://www.aurel32.net
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 05/12] alpha: use the new pci_vga_init() function
2012-09-08 11:26 ` [Qemu-devel] [PATCH 05/12] alpha: " Aurelien Jarno
2012-09-08 14:47 ` Alexander Graf
@ 2012-09-10 15:56 ` Richard Henderson
1 sibling, 0 replies; 25+ messages in thread
From: Richard Henderson @ 2012-09-10 15:56 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 09/08/2012 04:26 AM, Aurelien Jarno wrote:
> This remove the fallback to std-vga in case, as availability of the
> requested vga device is now tested in vl.c, and returns an error message
> to the user.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Richard Henderson <rth@twiddle.net>
r~
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 06/12] ppc/newworld: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (4 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 05/12] alpha: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 07/12] ppc/oldworld: " Aurelien Jarno
` (6 subsequent siblings)
12 siblings, 0 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Graf, Aurelien Jarno
As a bonus it allows new vga card types (including none).
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/ppc_newworld.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index 84af948..b8d3c9c 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -67,7 +67,6 @@
#include "hw/usb.h"
#include "blockdev.h"
#include "exec-memory.h"
-#include "vga-pci.h"
#define MAX_IDE_BUS 2
#define CFG_ADDR 0xf0000510
@@ -330,7 +329,7 @@ static void ppc_core99_init (ram_addr_t ram_size,
machine_arch = ARCH_MAC99;
}
/* init basic PC hardware */
- pci_std_vga_init(pci_bus);
+ pci_vga_init(pci_bus);
escc_mem = escc_init(0, pic[0x25], pic[0x24],
serial_hds[0], serial_hds[1], ESCC_CLOCK, 4);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 07/12] ppc/oldworld: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (5 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 06/12] ppc/newworld: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 08/12] ppc/prep: " Aurelien Jarno
` (5 subsequent siblings)
12 siblings, 0 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Graf, Aurelien Jarno
As a bonus it allows new vga card types (including none).
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/ppc_oldworld.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 8267eb4..2c4a478 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -43,7 +43,6 @@
#include "kvm_ppc.h"
#include "blockdev.h"
#include "exec-memory.h"
-#include "vga-pci.h"
#define MAX_IDE_BUS 2
#define CFG_ADDR 0xf0000510
@@ -250,7 +249,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
pci_bus = pci_grackle_init(0xfec00000, pic,
get_system_memory(),
get_system_io());
- pci_std_vga_init(pci_bus);
+ pci_vga_init(pci_bus);
escc_mem = escc_init(0, pic[0x0f], pic[0x10], serial_hds[0],
serial_hds[1], ESCC_CLOCK, 4);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 08/12] ppc/prep: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (6 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 07/12] ppc/oldworld: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 12:50 ` Andreas Färber
2012-09-08 11:26 ` [Qemu-devel] [PATCH 09/12] ppc/pSeries: " Aurelien Jarno
` (4 subsequent siblings)
12 siblings, 1 reply; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Färber, Aurelien Jarno
As a bonus it allows new vga card types (including none).
Cc: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/ppc_prep.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 1fa7609..1544430 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -39,7 +39,6 @@
#include "blockdev.h"
#include "arch_init.h"
#include "exec-memory.h"
-#include "vga-pci.h"
//#define HARD_DEBUG_PPC_IO
//#define DEBUG_PPC_IO
@@ -611,7 +610,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
memory_region_add_subregion(sysmem, 0x80000000, PPC_io_memory);
/* init basic PC hardware */
- pci_std_vga_init(pci_bus);
+ pci_vga_init(pci_bus);
if (serial_hds[0])
serial_isa_init(isa_bus, 0, serial_hds[0]);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 09/12] ppc/pSeries: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (7 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 08/12] ppc/prep: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 11:26 ` [Qemu-devel] [PATCH 10/12] sun/sun4u: " Aurelien Jarno
` (3 subsequent siblings)
12 siblings, 0 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Graf, Aurelien Jarno, David Gibson
Keep the case to prevent some vga card to be selected.
Cc: Alexander Graf <agraf@suse.de>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/spapr.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/spapr.c b/hw/spapr.c
index 80735d6..8b0c390 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -46,7 +46,6 @@
#include "kvm.h"
#include "kvm_ppc.h"
#include "pci.h"
-#include "vga-pci.h"
#include "exec-memory.h"
#include "hw/usb.h"
@@ -589,11 +588,9 @@ static void spapr_cpu_reset(void *opaque)
static int spapr_vga_init(PCIBus *pci_bus)
{
switch (vga_interface_type) {
- case VGA_STD:
- pci_std_vga_init(pci_bus);
- return 1;
case VGA_NONE:
- return 0;
+ case VGA_STD:
+ return pci_vga_init(pci_bus) != NULL;
default:
fprintf(stderr, "This vga model is not supported,"
"currently it only supports -vga std\n");
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 10/12] sun/sun4u: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (8 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 09/12] ppc/pSeries: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 12:32 ` Blue Swirl
2012-09-08 11:26 ` [Qemu-devel] [PATCH 11/12] pc: " Aurelien Jarno
` (2 subsequent siblings)
12 siblings, 1 reply; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Aurelien Jarno
As a bonus it allows new vga card types (including none).
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/sun4u.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/sun4u.c b/hw/sun4u.c
index cca090f..137a7c6 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -39,7 +39,6 @@
#include "elf.h"
#include "blockdev.h"
#include "exec-memory.h"
-#include "vga-pci.h"
//#define DEBUG_IRQ
//#define DEBUG_EBUS
@@ -821,7 +820,7 @@ 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_std_vga_init(pci_bus);
+ pci_vga_init(pci_bus);
// XXX Should be pci_bus3
isa_bus = pci_ebus_init(pci_bus, -1, pbm_irqs);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 10/12] sun/sun4u: use the new pci_vga_init() function
2012-09-08 11:26 ` [Qemu-devel] [PATCH 10/12] sun/sun4u: " Aurelien Jarno
@ 2012-09-08 12:32 ` Blue Swirl
0 siblings, 0 replies; 25+ messages in thread
From: Blue Swirl @ 2012-09-08 12:32 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On Sat, Sep 8, 2012 at 11:26 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> As a bonus it allows new vga card types (including none).
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> hw/sun4u.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/hw/sun4u.c b/hw/sun4u.c
> index cca090f..137a7c6 100644
> --- a/hw/sun4u.c
> +++ b/hw/sun4u.c
> @@ -39,7 +39,6 @@
> #include "elf.h"
> #include "blockdev.h"
> #include "exec-memory.h"
> -#include "vga-pci.h"
>
> //#define DEBUG_IRQ
> //#define DEBUG_EBUS
> @@ -821,7 +820,7 @@ 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_std_vga_init(pci_bus);
> + pci_vga_init(pci_bus);
>
> // XXX Should be pci_bus3
> isa_bus = pci_ebus_init(pci_bus, -1, pbm_irqs);
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 11/12] pc: use the new pci_vga_init() function
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (9 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 10/12] sun/sun4u: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 12:35 ` Blue Swirl
2012-09-08 11:26 ` [Qemu-devel] [PATCH 12/12] vga: cleanup after pci_vga_init() conversion Aurelien Jarno
2012-09-08 14:53 ` [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Alexander Graf
12 siblings, 1 reply; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Aurelien Jarno
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 <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
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
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 11/12] pc: use the new pci_vga_init() function
2012-09-08 11:26 ` [Qemu-devel] [PATCH 11/12] pc: " Aurelien Jarno
@ 2012-09-08 12:35 ` Blue Swirl
0 siblings, 0 replies; 25+ messages in thread
From: Blue Swirl @ 2012-09-08 12:35 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: Anthony Liguori, qemu-devel
On Sat, Sep 8, 2012 at 11:26 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> 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 <aliguori@us.ibm.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> 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;
Please move this to isa.[ch] (like PCI case), so other ISA bus users
(actually just MIPS r4k) benefit also.
> }
> }
> -
> return dev;
> }
>
> --
> 1.7.10.4
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread
* [Qemu-devel] [PATCH 12/12] vga: cleanup after pci_vga_init() conversion
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (10 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 11/12] pc: " Aurelien Jarno
@ 2012-09-08 11:26 ` Aurelien Jarno
2012-09-08 14:53 ` [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Alexander Graf
12 siblings, 0 replies; 25+ messages in thread
From: Aurelien Jarno @ 2012-09-08 11:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Aurelien Jarno
Now that all machines call pci_vga_init(), some unused code can be
removed.
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
hw/cirrus_vga.c | 6 ------
hw/vga-pci.c | 6 ------
hw/vga-pci.h | 12 ------------
hw/vmware_vga.c | 1 -
hw/vmware_vga.h | 15 ---------------
sysemu.h | 4 ----
6 files changed, 44 deletions(-)
delete mode 100644 hw/vga-pci.h
delete mode 100644 hw/vmware_vga.h
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index e8dcc6b..5d1d42f 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -28,7 +28,6 @@
*/
#include "hw.h"
#include "pci.h"
-#include "vga-pci.h"
#include "console.h"
#include "vga_int.h"
#include "loader.h"
@@ -2963,11 +2962,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
return 0;
}
-DeviceState *pci_cirrus_vga_init(PCIBus *bus)
-{
- return &pci_create_simple(bus, -1, "cirrus-vga")->qdev;
-}
-
static void cirrus_vga_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 992ffd9..996d47f 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -24,7 +24,6 @@
#include "hw.h"
#include "console.h"
#include "pci.h"
-#include "vga-pci.h"
#include "vga_int.h"
#include "pixel_ops.h"
#include "qemu-timer.h"
@@ -70,11 +69,6 @@ static int pci_std_vga_initfn(PCIDevice *dev)
return 0;
}
-DeviceState *pci_std_vga_init(PCIBus *bus)
-{
- return &pci_create_simple(bus, -1, "VGA")->qdev;
-}
-
static Property vga_pci_properties[] = {
DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/vga-pci.h b/hw/vga-pci.h
deleted file mode 100644
index d111cdc..0000000
--- a/hw/vga-pci.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef VGA_PCI_H
-#define VGA_PCI_H
-
-#include "qemu-common.h"
-
-/* vga-pci.c */
-DeviceState *pci_std_vga_init(PCIBus *bus);
-
-/* cirrus_vga.c */
-DeviceState *pci_cirrus_vga_init(PCIBus *bus);
-
-#endif
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index f5e4f44..5796d89 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -25,7 +25,6 @@
#include "loader.h"
#include "console.h"
#include "pci.h"
-#include "vmware_vga.h"
#undef VERBOSE
#define HW_RECT_ACCEL
diff --git a/hw/vmware_vga.h b/hw/vmware_vga.h
deleted file mode 100644
index 000fbdd..0000000
--- a/hw/vmware_vga.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef QEMU_VMWARE_VGA_H
-#define QEMU_VMWARE_VGA_H
-
-#include "qemu-common.h"
-
-/* vmware_vga.c */
-static inline DeviceState *pci_vmsvga_init(PCIBus *bus)
-{
- PCIDevice *dev;
-
- dev = pci_create_simple(bus, -1, "vmware-svga");
- return &dev->qdev;
-}
-
-#endif
diff --git a/sysemu.h b/sysemu.h
index 65552ac..0587b38 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -105,11 +105,7 @@ typedef enum {
} VGAInterfaceType;
extern int vga_interface_type;
-#define cirrus_vga_enabled (vga_interface_type == VGA_CIRRUS)
-#define std_vga_enabled (vga_interface_type == VGA_STD)
#define xenfb_enabled (vga_interface_type == VGA_XENFB)
-#define vmsvga_enabled (vga_interface_type == VGA_VMWARE)
-#define qxl_enabled (vga_interface_type == VGA_QXL)
extern int graphic_width;
extern int graphic_height;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization
2012-09-08 11:26 [Qemu-devel] [PATCH 00/12] Rework PCI video card initialization Aurelien Jarno
` (11 preceding siblings ...)
2012-09-08 11:26 ` [Qemu-devel] [PATCH 12/12] vga: cleanup after pci_vga_init() conversion Aurelien Jarno
@ 2012-09-08 14:53 ` Alexander Graf
12 siblings, 0 replies; 25+ messages in thread
From: Alexander Graf @ 2012-09-08 14:53 UTC (permalink / raw)
To: Aurelien Jarno
Cc: Anthony Liguori, qemu-devel@nongnu.org, Blue Swirl,
Andreas Färber, Gerd Hoffmann, David Gibson,
Richard Henderson
On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote:
> This patch series is technically a new version of the "add a video
> card only when requested" series I sent yesterday. It uses a different
> approach though.
>
> It creates a new pci_vga_init() function that takes care of initializing
> the requested PCI video card. This way there is no need to duplicate
> code in the various machines QEMU supports, and has the advantage that
> the newly added PCI video cards are available to all machines without
> having to touch machine specific code.
>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Andreas Färber <andreas.faerber@web.de>
> Cc: Anthony Liguori <aliguori@us.ibm.com>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Richard Henderson <rth@twiddle.net>
Apart from my comment and the bits already mentioned, the series looks very good. It's certainly a trenendous cleanup + simplification of the vga code.
Alex
>
> Aurelien Jarno (12):
> vga: rename pci_vga_init() into pci_std_vga_init()
> vl.c: check for qxl availability
> pci: add a pci_vga_init() function
> mips/malta: use the new pci_vga_init() function
> alpha: use the new pci_vga_init() function
> ppc/newworld: use the new pci_vga_init() function
> ppc/oldworld: use the new pci_vga_init() function
> ppc/prep: use the new pci_vga_init() function
> ppc/pSeries: use the new pci_vga_init() function
> sun/sun4u: use the new pci_vga_init() function
> pc: use the new pci_vga_init() function
> vga: cleanup after pci_vga_init() conversion
>
> hw/alpha_dp264.c | 2 +-
> hw/alpha_pci.c | 24 ------------------------
> hw/alpha_sys.h | 2 --
> hw/cirrus_vga.c | 6 ------
> hw/mips_malta.c | 10 +---------
> hw/pc.c | 41 +++++++++++++++--------------------------
> hw/pci.c | 18 ++++++++++++++++++
> hw/pci.h | 3 +++
> hw/ppc_newworld.c | 1 -
> hw/ppc_oldworld.c | 1 -
> hw/ppc_prep.c | 1 -
> hw/spapr.c | 7 ++-----
> hw/sun4u.c | 1 -
> hw/vga-pci.c | 10 ++--------
> hw/vga-pci.h | 12 ------------
> hw/vmware_vga.c | 1 -
> hw/vmware_vga.h | 15 ---------------
> sysemu.h | 4 ----
> vl.c | 12 +++++++++++-
> 19 files changed, 53 insertions(+), 118 deletions(-)
> delete mode 100644 hw/vga-pci.h
> delete mode 100644 hw/vmware_vga.h
>
> --
> 1.7.10.4
>
>
^ permalink raw reply [flat|nested] 25+ messages in thread