virtio-gpu: delay virglrenderer reset when blocked.
commit9032e3d71c9950e48a204dd15b8d2e24254ffd7c
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 14 Mar 2019 11:53:57 +0000 (14 12:53 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 18 Mar 2019 12:10:57 +0000 (18 13:10 +0100)
treebc198116a3f74ebbe5e6e74322fa8bdb9c3b6051
parenta223b478cb5bb940481b16be891e4b51279b642c
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
hw/display/virtio-gpu.c
include/hw/virtio/virtio-gpu.h