aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-03-14 12:53:57 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-18 13:10:57 +0100
commit9032e3d71c9950e48a204dd15b8d2e24254ffd7c (patch)
treebc198116a3f74ebbe5e6e74322fa8bdb9c3b6051 /hw/display
parenta223b478cb5bb940481b16be891e4b51279b642c (diff)
virtio-gpu: delay virglrenderer reset when blocked.
If renderer_blocked is set do not call virtio_gpu_virgl_reset(). Instead set a flag indicating that virglrenderer needs a reset. When renderer_blocked gets cleared do the actual reset call. Without this we can trigger an assert in spice due to calling spice_qxl_gl_scanout() while another operation is still running: spice_qxl_gl_scanout: condition `qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID' failed Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20190314115358.26678-2-kraxel@redhat.com
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/virtio-gpu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 4dbf48e424..fbd8d908ad 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1084,6 +1084,12 @@ static void virtio_gpu_gl_block(void *opaque, bool block)
assert(g->renderer_blocked >= 0);
if (g->renderer_blocked == 0) {
+#ifdef CONFIG_VIRGL
+ if (g->renderer_reset) {
+ g->renderer_reset = false;
+ virtio_gpu_virgl_reset(g);
+ }
+#endif
virtio_gpu_process_cmdq(g);
}
}
@@ -1368,7 +1374,11 @@ static void virtio_gpu_reset(VirtIODevice *vdev)
#ifdef CONFIG_VIRGL
if (g->use_virgl_renderer) {
- virtio_gpu_virgl_reset(g);
+ if (g->renderer_blocked) {
+ g->renderer_reset = true;
+ } else {
+ virtio_gpu_virgl_reset(g);
+ }
g->use_virgl_renderer = 0;
}
#endif