From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 6/9] virtio-gpu: use graphic_* variables.
Date: Tue, 21 Feb 2017 23:14:56 +0100 [thread overview]
Message-ID: <1487715299-21102-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1487715299-21102-1-git-send-email-kraxel@redhat.com>
If graphic_* variables are set (via -g switch), pass on
that information to the guest so the driver can use it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/virtio-gpu.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 9b530ab..04ba221 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1170,8 +1170,13 @@ static void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)
virtio_init(VIRTIO_DEVICE(g), "virtio-gpu", VIRTIO_ID_GPU,
g->config_size);
- g->req_state[0].width = 1024;
- g->req_state[0].height = 768;
+ if (graphic_width && graphic_height) {
+ g->req_state[0].width = graphic_width;
+ g->req_state[0].height = graphic_height;
+ } else {
+ g->req_state[0].width = 1024;
+ g->req_state[0].height = 768;
+ }
if (virtio_gpu_virgl_enabled(g->conf)) {
/* use larger control queue in 3d mode */
--
1.8.3.1
next prev parent reply other threads:[~2017-02-21 22:15 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
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 ` Gerd Hoffmann [this message]
2017-02-24 9:21 ` [Qemu-devel] [PATCH 6/9] virtio-gpu: use graphic_* variables 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=1487715299-21102-7-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).