aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/display/virtio-gpu-3d.c3
-rw-r--r--hw/display/virtio-gpu.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index e13122dd1e..6f646b1eb3 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -554,7 +554,8 @@ static void virtio_gpu_fence_poll(void *opaque)
VirtIOGPU *g = opaque;
virgl_renderer_poll();
- if (g->inflight) {
+ virtio_gpu_process_cmdq(g);
+ if (!QTAILQ_EMPTY(&g->cmdq) || !QTAILQ_EMPTY(&g->fenceq)) {
timer_mod(g->fence_poll, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 10);
}
}
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index a2ec7cb24a..af9b757d20 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -755,7 +755,7 @@ static void virtio_gpu_handle_cursor_cb(VirtIODevice *vdev, VirtQueue *vq)
qemu_bh_schedule(g->cursor_bh);
}
-static void virtio_gpu_process_cmdq(VirtIOGPU *g)
+void virtio_gpu_process_cmdq(VirtIOGPU *g)
{
struct virtio_gpu_ctrl_command *cmd;
@@ -765,6 +765,9 @@ static void virtio_gpu_process_cmdq(VirtIOGPU *g)
/* process command */
VIRGL(g, virtio_gpu_virgl_process_cmd, virtio_gpu_simple_process_cmd,
g, cmd);
+ if (cmd->waiting) {
+ break;
+ }
QTAILQ_REMOVE(&g->cmdq, cmd, next);
if (virtio_gpu_stats_enabled(g->conf)) {
g->stats.requests++;