From 0c55a1cfd35c1f1b10cc448d05c1e4ef3a0768d1 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 1 Dec 2015 13:18:38 +0100 Subject: virtio-gpu: add support to enable/disable command processing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So we can stop rendering for a while in case we have to. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hw/display/virtio-gpu.c') 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++; -- cgit v1.2.3