summaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-12-01 13:18:38 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-02-03 10:41:36 +0100
commit0c55a1cfd35c1f1b10cc448d05c1e4ef3a0768d1 (patch)
treef5fd764077da3b3d02870ea9eef706ffecd7ad30 /hw/display/virtio-gpu.c
parent3eb769fd1cf15f16ca796ab5618efe89b23aa625 (diff)
downloadqemu-0c55a1cfd35c1f1b10cc448d05c1e4ef3a0768d1.zip
virtio-gpu: add support to enable/disable command processing
So we can stop rendering for a while in case we have to. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r--hw/display/virtio-gpu.c5
1 files changed, 4 insertions, 1 deletions
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++;