From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/9] qxl: don't render stuff when the vm is stopped.
Date: Tue, 21 Feb 2012 11:59:06 +0100 [thread overview]
Message-ID: <1329821953-32446-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1329821953-32446-1-git-send-email-kraxel@redhat.com>
This patch fixes the local qxl renderer to not kick spice-server
in case the vm is stopped. First it is largely pointless because
we ask spice-server to process all not-yet processed commands when
the vm is stopped, so there isn't much do do anyway. Second we
avoid triggering an assert in spice-server.
The patch makes sure we still honor redraw requests, even if we don't
ask spice-server for updates. This is needed to handle displaysurface
changes with a stopped vm correctly.
With this patch applied it is possible to take screen shots (via
screendump monitor command) from a qxl gpu even in case the guest
is stopped.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/qxl-render.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/qxl-render.c b/hw/qxl-render.c
index 133d093..7084143 100644
--- a/hw/qxl-render.c
+++ b/hw/qxl-render.c
@@ -121,19 +121,17 @@ void qxl_render_update(PCIQXLDevice *qxl)
dpy_resize(vga->ds);
}
- if (!qxl->guest_primary.commands) {
- return;
- }
- qxl->guest_primary.commands = 0;
-
update.left = 0;
update.right = qxl->guest_primary.surface.width;
update.top = 0;
update.bottom = qxl->guest_primary.surface.height;
memset(dirty, 0, sizeof(dirty));
- qxl_spice_update_area(qxl, 0, &update,
- dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC);
+ if (runstate_is_running() && qxl->guest_primary.commands) {
+ qxl->guest_primary.commands = 0;
+ qxl_spice_update_area(qxl, 0, &update,
+ dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC);
+ }
if (redraw) {
memset(dirty, 0, sizeof(dirty));
dirty[0] = update;
--
1.7.1
next prev parent reply other threads:[~2012-02-21 10:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 10:59 [Qemu-devel] [PULL] spice patch queue Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 1/9] qxl: fix warnings on 32bit Gerd Hoffmann
2012-02-21 10:59 ` Gerd Hoffmann [this message]
2012-02-21 10:59 ` [Qemu-devel] [PATCH 3/9] qxl: set only off-screen surfaces dirty instead of the whole vram Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 4/9] qxl: make sure primary surface is saved on migration also in compat mode Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 5/9] Add SPICE support to add_client monitor command Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 6/9] spice: support ipv6 channel address in monitor events and in spice info Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 7/9] qxl: drop vram bar minimum size Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 8/9] qxl: move ram size init to new function Gerd Hoffmann
2012-02-21 10:59 ` [Qemu-devel] [PATCH 9/9] qxl: add user-friendly bar size properties Gerd Hoffmann
2012-02-22 14:44 ` [Qemu-devel] [PULL] spice patch queue Anthony Liguori
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=1329821953-32446-3-git-send-email-kraxel@redhat.com \
--to=kraxel@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).