All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/9] sysemu: add defines for sparc & ppc graphics_*
Date: Tue, 28 Feb 2017 15:50:55 +0100	[thread overview]
Message-ID: <7ba0b043-f299-1d35-a699-b41740248287@redhat.com> (raw)
In-Reply-To: <1487715299-21102-2-git-send-email-kraxel@redhat.com>

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 <kraxel@redhat.com>
> ---
>  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

  reply	other threads:[~2017-02-28 14:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 22:14 [Qemu-devel] [PATCH 0/9] wire up -g <width>x<height> switch for virtio and qxl Gerd Hoffmann
2017-02-21 22:14 ` [Qemu-devel] [PATCH 1/9] sysemu: add defines for sparc & ppc graphics_* Gerd Hoffmann
2017-02-28 14:50   ` Thomas Huth [this message]
2017-02-21 22:14 ` [Qemu-devel] [PATCH 2/9] sparc: use sparc_graphic_* defines Gerd Hoffmann
2017-02-21 22:14 ` [Qemu-devel] [PATCH 3/9] ppc: use ppc_graphic_* defines Gerd Hoffmann
2017-02-21 22:45   ` Hervé Poussineau
2017-02-22  1:11   ` David Gibson
2017-02-21 22:14 ` [Qemu-devel] [PATCH 4/9] drop arch-specific graphic_* initialization Gerd Hoffmann
2017-02-21 22:14 ` [Qemu-devel] [PATCH 5/9] enable -g command line switch for all archs Gerd Hoffmann
2017-02-28 14:53   ` Thomas Huth
2017-02-21 22:14 ` [Qemu-devel] [PATCH 6/9] virtio-gpu: use graphic_* variables Gerd Hoffmann
2017-02-24  9:21   ` Paolo Bonzini
2017-02-24 14:15     ` Gerd Hoffmann
2017-02-21 22:14 ` [Qemu-devel] [PATCH 7/9] qxl: " Gerd Hoffmann
2017-02-24  9:21   ` Paolo Bonzini
2017-02-21 22:14 ` [Qemu-devel] [PATCH 8/9] update -g command line switch documentation Gerd Hoffmann
2017-02-22  0:37   ` Laszlo Ersek
2017-02-21 22:14 ` [Qemu-devel] [PATCH 9/9] [RfC] stdvga: use graphic_* variables Gerd Hoffmann
2017-02-24  8:40 ` [Qemu-devel] [PATCH 0/9] wire up -g <width>x<height> switch for virtio and qxl Mark Cave-Ayland
2017-02-24 13:30   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ba0b043-f299-1d35-a699-b41740248287@redhat.com \
    --to=thuth@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.