qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qxl: Fix initial screenshot with spice


From: Cole Robinson
Subject: [Qemu-devel] [PATCH] qxl: Fix initial screenshot with spice
Date: Thu, 24 Apr 2014 13:20:44 -0400

1) Start an f20 VM with -device qxl-vga + spice, connect with remote-viewer
2) Wait till it boots to gdm
3) (qemu) screendump foo.ppm
4) (qemu) screendump bar.ppm

foo.ppm will actually show the last screen contents before the VM
switched out of VGA mode (right before switching to plymouth). bar.ppm
will show the correct contents.

The root issue is that the DisplaySurface tracked in QemuConsole is out
of date, once qxl transitions out of vga mode nothing calls
qxl_render_update which would update the console surface.

ui/console.c:qmp_screendump attempts to handle this by calling
graphic_hw_update, but qxl handle's that asynchronously, and it isn't
run until after the first screendump is performed. That's why the second
screendump is correct.

Fix this by triggering qxl_render_update whenever a non-vga surface is
created.

Signed-off-by: Cole Robinson <address@hidden>
---
All that said, I'm not sure if this is the correct solution, maybe
something else should be responsible for kicking qxl_render_update,
yet isn't.

 hw/display/qxl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 47bbf1f..8d3645f 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1355,6 +1355,7 @@ static void 
qxl_create_guest_primary_complete(PCIQXLDevice *qxl)
 {
     /* for local rendering */
     qxl_render_resize(qxl);
+    qxl_render_update(qxl);
 }
 
 static void qxl_create_guest_primary(PCIQXLDevice *qxl, int loadvm,
-- 
1.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]