qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RfC PATCH] vga: wire up -g <width>x<height> switch for


From: Thomas Huth
Subject: Re: [Qemu-devel] [RfC PATCH] vga: wire up -g <width>x<height> switch for virtio and qxl
Date: Mon, 20 Feb 2017 16:54:46 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 20.02.2017 16:16, Gerd Hoffmann wrote:
> FIXME: qxl not working yet.

I think the basic idea of the patch is good, but I'd remove the qxl
FIXMEs for the final version of the patch (spice is likely not working
on Sparc and PPC anyway yet).

> Cc: Dr. David Alan Gilbert <address@hidden>
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
>  arch_init.c             |  8 ++++++--
>  hw/display/qxl.c        | 18 ++++++++++++++++++
>  hw/display/virtio-gpu.c |  9 +++++++--
>  qemu-options.hx         |  6 ++++--
>  4 files changed, 35 insertions(+), 6 deletions(-)
> 
> diff --git a/arch_init.c b/arch_init.c
> index 0810116..9cd3dfc 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -34,14 +34,18 @@
>  #include "hw/acpi/acpi.h"
>  #include "qemu/help_option.h"
>  
> -#ifdef TARGET_SPARC
> +#if defined(TARGET_SPARC)
>  int graphic_width = 1024;
>  int graphic_height = 768;
>  int graphic_depth = 8;
> -#else
> +#elif defined(TARGET_PPC)
>  int graphic_width = 800;
>  int graphic_height = 600;
>  int graphic_depth = 32;
> +#else
> +int graphic_width;
> +int graphic_height;
> +int graphic_depth;
>  #endif

IMHO we could also switch the default resolution on ppc to 1024x768, so
you could simplify that code to something like that:

int graphic_width = 1024;
int graphic_height = 768;
#ifdef TARGET_SPARC
int graphic_depth = 8;
#else
int graphic_depth = 32;
#endif

You likely also don't need if-statement in virtio-gpu.c anymore in that
case.

And maybe Sparc can even work fine with 32 bpp nowadays, too, so you
could completely get rid of the ifdefery here?

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]