aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/display/vhost-user-gpu.c2
-rw-r--r--hw/display/virtio-gpu-base.c5
-rw-r--r--hw/display/virtio-vga.c11
3 files changed, 5 insertions, 13 deletions
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 49df56c..0981823 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -254,8 +254,8 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
vhost_user_gpu_unblock(g);
break;
}
- dpy_gl_update(con, m->x, m->y, m->width, m->height);
g->backend_blocked = true;
+ dpy_gl_update(con, m->x, m->y, m->width, m->height);
break;
}
case VHOST_USER_GPU_UPDATE: {
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index c8da480..fff0fb4 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -117,6 +117,10 @@ virtio_gpu_gl_block(void *opaque, bool block)
g->renderer_blocked--;
}
assert(g->renderer_blocked >= 0);
+
+ if (!block && g->renderer_blocked == 0) {
+ virtio_gpu_gl_flushed(g);
+ }
}
static int
@@ -143,7 +147,6 @@ static const GraphicHwOps virtio_gpu_ops = {
.text_update = virtio_gpu_text_update,
.ui_info = virtio_gpu_ui_info,
.gl_block = virtio_gpu_gl_block,
- .gl_flushed = virtio_gpu_gl_flushed,
};
bool
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index 9e57f61..b23a75a 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -68,16 +68,6 @@ static void virtio_vga_base_gl_block(void *opaque, bool block)
}
}
-static void virtio_vga_base_gl_flushed(void *opaque)
-{
- VirtIOVGABase *vvga = opaque;
- VirtIOGPUBase *g = vvga->vgpu;
-
- if (g->hw_ops->gl_flushed) {
- g->hw_ops->gl_flushed(g);
- }
-}
-
static int virtio_vga_base_get_flags(void *opaque)
{
VirtIOVGABase *vvga = opaque;
@@ -93,7 +83,6 @@ static const GraphicHwOps virtio_vga_base_ops = {
.text_update = virtio_vga_base_text_update,
.ui_info = virtio_vga_base_ui_info,
.gl_block = virtio_vga_base_gl_block,
- .gl_flushed = virtio_vga_base_gl_flushed,
};
static const VMStateDescription vmstate_virtio_vga_base = {