All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] ppc: Include vga cirrus card into the compiling process
@ 2018-07-02 19:13 Sebastian Bauer
  2018-07-03  1:33 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Bauer @ 2018-07-02 19:13 UTC (permalink / raw)
  To: mail; +Cc: qemu-devel, david, thuth, balaton, qemu-ppc

Drivers for this card exists on PPC-based AmigaOS guests so it is useful to
allow users to emulate the graphics card for PPC machines.

As cirrus vga is currently preferred over std(vga) in absence of any user
choice, this change also sets the default display of spapr machines to
std as otherwise qemu refuses to start these machines. Not specifying an
explicit graphics mode is for instance done by 'make check'.

Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info>

---

v2
Adds std as default display for spapr machines

Notes
This change will make all other ppc machines to use cirrusgd as default
display because QEMU internally prefers that card. If this is considered
as being too risky, setting the default mode for the other machines as it
has been done for spapr would bring them back to the previous level.
However, this is rarely used in the exiting code base.

Alternatively, using the cirrusgd is possibly considered more an exception
than the rule these days, so altering the code to prefer stdvga over
cirrusgd may be the better solution (this should also render the changes
of v2 obsolete).

Feedback on how to proceed is welcome.

The patch applies to current ppc-for-3.0 minus v1 of the patch.
---
 default-configs/ppc-softmmu.mak | 1 +
 hw/ppc/spapr.c                  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 7e1a3d8135..6f12bf84f0 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -29,6 +29,7 @@ CONFIG_IDE_SII3112=y
 CONFIG_I2C=y
 CONFIG_BITBANG_I2C=y
 CONFIG_M41T80=y
+CONFIG_VGA_CIRRUS=y
 
 # For Macs
 CONFIG_MAC=y
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index b2baec026f..0c12c404d4 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3962,6 +3962,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
     mc->no_parallel = 1;
     mc->default_boot_order = "";
     mc->default_ram_size = 512 * M_BYTE;
+    mc->default_display = "std";
     mc->kvm_type = spapr_kvm_type;
     machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SPAPR_PCI_HOST_BRIDGE);
     mc->pci_allow_0_address = true;
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v2] ppc: Include vga cirrus card into the compiling process
  2018-07-02 19:13 [Qemu-devel] [PATCH v2] ppc: Include vga cirrus card into the compiling process Sebastian Bauer
@ 2018-07-03  1:33 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2018-07-03  1:33 UTC (permalink / raw)
  To: Sebastian Bauer; +Cc: qemu-devel, thuth, balaton, qemu-ppc

[-- Attachment #1: Type: text/plain, Size: 2642 bytes --]

On Mon, Jul 02, 2018 at 09:13:45PM +0200, Sebastian Bauer wrote:
> Drivers for this card exists on PPC-based AmigaOS guests so it is useful to
> allow users to emulate the graphics card for PPC machines.
> 
> As cirrus vga is currently preferred over std(vga) in absence of any user
> choice, this change also sets the default display of spapr machines to
> std as otherwise qemu refuses to start these machines. Not specifying an
> explicit graphics mode is for instance done by 'make check'.
> 
> Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info>

Applied to ppc-for-3.0, thanks.

> 
> ---
> 
> v2
> Adds std as default display for spapr machines
> 
> Notes
> This change will make all other ppc machines to use cirrusgd as default
> display because QEMU internally prefers that card. If this is considered
> as being too risky, setting the default mode for the other machines as it
> has been done for spapr would bring them back to the previous level.
> However, this is rarely used in the exiting code base.
> 
> Alternatively, using the cirrusgd is possibly considered more an exception
> than the rule these days, so altering the code to prefer stdvga over
> cirrusgd may be the better solution (this should also render the changes
> of v2 obsolete).
> 
> Feedback on how to proceed is welcome.
> 
> The patch applies to current ppc-for-3.0 minus v1 of the patch.
> ---
>  default-configs/ppc-softmmu.mak | 1 +
>  hw/ppc/spapr.c                  | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 7e1a3d8135..6f12bf84f0 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -29,6 +29,7 @@ CONFIG_IDE_SII3112=y
>  CONFIG_I2C=y
>  CONFIG_BITBANG_I2C=y
>  CONFIG_M41T80=y
> +CONFIG_VGA_CIRRUS=y
>  
>  # For Macs
>  CONFIG_MAC=y
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index b2baec026f..0c12c404d4 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -3962,6 +3962,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
>      mc->no_parallel = 1;
>      mc->default_boot_order = "";
>      mc->default_ram_size = 512 * M_BYTE;
> +    mc->default_display = "std";
>      mc->kvm_type = spapr_kvm_type;
>      machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SPAPR_PCI_HOST_BRIDGE);
>      mc->pci_allow_0_address = true;

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-03  1:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 19:13 [Qemu-devel] [PATCH v2] ppc: Include vga cirrus card into the compiling process Sebastian Bauer
2018-07-03  1:33 ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.