|
| From: | Yonit Halperin |
| Subject: | Re: [Qemu-devel] [PATCH] qxl: don't render stuff when the vm is stopped. |
| Date: | Wed, 15 Feb 2012 15:22:40 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
Hi, On 02/15/2012 03:11 PM, Gerd Hoffmann wrote:
hmm...When the vm is stopped we render only commands that we already read. We don't do more reading from the command ring. So there may be other pending commands that were not rendered. That is why I suggested allowing rendering when the vm is stopped. But not allowing it during loading the vm during migration.This patch fixes the local qxl renderer to not kick spice-server in case the vm is stopped. First it is pointless because we render evevything when the vm is stopped. Thus there is nothing to render anyway because a stopped guest can hardly queue more commands.
Regards, Yonit. Second we avoid
triggering an assert in spice-server.
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<address@hidden>
---
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;
| [Prev in Thread] | Current Thread | [Next in Thread] |