From c19f4fbce1c2293b7a9bddadddd7a1b69953f534 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 5 May 2017 12:40:56 +0200 Subject: virtio-gpu: move virtio_gpu_gl_block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move to virtio-gpu-3d.c where all the other virgl code lives too. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20170505104101.30589-2-kraxel@redhat.com --- hw/display/virtio-gpu-3d.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'hw/display/virtio-gpu-3d.c') 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; -- cgit v1.2.3