Virgl relies on callbacks provided by the OpenGL display, and such a
display may rely on eglMakeCurrent. eglMakeCurrent will fail if the
given context is current to some other thread. The easiest way to avoid
such a failure is to call the OpenGL display in a single thread. As all
operations except virtio_gpu_virgl_reset happens in the main thread,
this change makes virtio_gpu_virgl_reset happen only in the main thread.
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
hw/display/virtio-gpu-gl.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index d971b480806..57d6537120f 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -90,17 +90,12 @@ static void virtio_gpu_gl_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
static void virtio_gpu_gl_reset(VirtIODevice *vdev)
{
- VirtIOGPU *g = VIRTIO_GPU(vdev);
VirtIOGPUGL *gl = VIRTIO_GPU_GL(vdev);
virtio_gpu_reset(vdev);
if (gl->renderer_inited) {
- if (g->parent_obj.renderer_blocked) {
- gl->renderer_reset = true;
- } else {
- virtio_gpu_virgl_reset(g);
- }
+ gl->renderer_reset = true;
}
}
--
2.30.1 (Apple Git-130)