[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/9] sysemu: add defines for sparc &
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/9] sysemu: add defines for sparc & ppc graphics_* |
Date: |
Tue, 28 Feb 2017 15:50:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 21.02.2017 23:14, Gerd Hoffmann wrote:
> Add defines for the sparc and ppc arch specific graphics defaults.
> They return the graphic_* values these variables are non-zero, and
> the default values otherwise.
>
> After switching over ppc and sparc to use these we don't need the
> arch-specific initialization for the graphic_* variables any more.
>
> Signed-off-by: Gerd Hoffmann <address@hidden>
> ---
> include/sysemu/sysemu.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index 576c7ce..9450788 100644
> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -142,9 +142,16 @@ typedef enum {
> extern int vga_interface_type;
> #define xenfb_enabled (vga_interface_type == VGA_XENFB)
>
> +#define sparc_graphic_width (graphic_width ? graphic_width : 1024)
> +#define sparc_graphic_height (graphic_height ? graphic_height : 768)
> +#define sparc_graphic_depth (graphic_depth ? graphic_depth : 8)
> +#define ppc_graphic_width (graphic_width ? graphic_width : 800)
> +#define ppc_graphic_height (graphic_height ? graphic_height : 600)
> +#define ppc_graphic_depth (graphic_depth ? graphic_depth : 32)
I have to say that I really dislike the idea to hide this logic in such
macros. Could we please do it without such macros, i.e. by just adding
some code a la
if (!graphic_width) {
graphic_width = 800;
}
to the right machine_init() functions instead?
Thomas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/9] sysemu: add defines for sparc & ppc graphics_*,
Thomas Huth <=