diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-05-05 12:40:56 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-05-12 12:02:48 +0200 |
commit | c19f4fbce1c2293b7a9bddadddd7a1b69953f534 (patch) | |
tree | 2b9da2f6b19262567dbdb9a11c8a6a49f1bedbc1 /hw/display/virtio-gpu-3d.c | |
parent | d755defd5d779d96a9a204cdd559458798c4a36a (diff) | |
download | qemu-c19f4fbce1c2293b7a9bddadddd7a1b69953f534.zip |
virtio-gpu: move virtio_gpu_gl_block
Move to virtio-gpu-3d.c where all the other virgl code lives too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170505104101.30589-2-kraxel@redhat.com
Diffstat (limited to 'hw/display/virtio-gpu-3d.c')
-rw-r--r-- | hw/display/virtio-gpu-3d.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index f49b7fe8cd..8c106a662d 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -600,6 +600,22 @@ void virtio_gpu_virgl_reset(VirtIOGPU *g) } } +void virtio_gpu_gl_block(void *opaque, bool block) +{ + VirtIOGPU *g = opaque; + + if (block) { + g->renderer_blocked++; + } else { + g->renderer_blocked--; + } + assert(g->renderer_blocked >= 0); + + if (g->renderer_blocked == 0) { + virtio_gpu_process_cmdq(g); + } +} + int virtio_gpu_virgl_init(VirtIOGPU *g) { int ret; |