diff options
author | Marc-André Lureau | 2021-02-04 11:52:29 +0100 |
---|---|---|
committer | Gerd Hoffmann | 2021-02-04 15:58:54 +0100 |
commit | f8f3c2719e11145d4f2902c562f7979df741daf0 (patch) | |
tree | 15239f7244b5f499a44e1abc5a5ef3f8f68e3ae6 /hw | |
parent | ui: add egl dmabuf import to gtkglarea (diff) | |
download | qemu-f8f3c2719e11145d4f2902c562f7979df741daf0.tar.gz qemu-f8f3c2719e11145d4f2902c562f7979df741daf0.tar.xz qemu-f8f3c2719e11145d4f2902c562f7979df741daf0.zip |
virtio-gpu: avoid re-entering cmdq processing
The next patch will notify the GL context got flush, which will resume
the queue processing. However, if this happens within the caller
context, it will end up with a stack overflow flush/update loop.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210204105232.834642-18-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/virtio-gpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 0e833a462b..7eb4265a6d 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -814,6 +814,10 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g) { struct virtio_gpu_ctrl_command *cmd; + if (g->processing_cmdq) { + return; + } + g->processing_cmdq = true; while (!QTAILQ_EMPTY(&g->cmdq)) { cmd = QTAILQ_FIRST(&g->cmdq); @@ -843,6 +847,7 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g) g_free(cmd); } } + g->processing_cmdq = false; } static void virtio_gpu_gl_unblock(VirtIOGPUBase *b) |