aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-12-02 08:17:24 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-02-03 10:41:36 +0100
commit321c9adba5a64a1a9de2dd7db5433b62a5433439 (patch)
treef2d8113970dad26531c6e3e682e9255fd1d01c87 /hw/display/virtio-gpu.c
parent0c55a1cfd35c1f1b10cc448d05c1e4ef3a0768d1 (diff)
virtio-gpu: block any rendering until client (ui) is done
Wire up gl_block callback, so ui code can request to stop virtio-gpu rendering. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r--hw/display/virtio-gpu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index af9b757d20..1cb4002e0e 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -897,11 +897,22 @@ static int virtio_gpu_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info)
return 0;
}
+static void virtio_gpu_gl_block(void *opaque, bool block)
+{
+ VirtIOGPU *g = opaque;
+
+ g->renderer_blocked = block;
+ if (!block) {
+ virtio_gpu_process_cmdq(g);
+ }
+}
+
const GraphicHwOps virtio_gpu_ops = {
.invalidate = virtio_gpu_invalidate_display,
.gfx_update = virtio_gpu_update_display,
.text_update = virtio_gpu_text_update,
.ui_info = virtio_gpu_ui_info,
+ .gl_block = virtio_gpu_gl_block,
};
static void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)