aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display/virtio-gpu-base.c')
-rw-r--r--hw/display/virtio-gpu-base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index 7961308606..aeb8723542 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -112,7 +112,7 @@ virtio_gpu_gl_block(void *opaque, bool block)
}
}
-const GraphicHwOps virtio_gpu_ops = {
+static const GraphicHwOps virtio_gpu_ops = {
.invalidate = virtio_gpu_invalidate_display,
.gfx_update = virtio_gpu_update_display,
.text_update = virtio_gpu_text_update,
@@ -162,6 +162,7 @@ virtio_gpu_base_device_realize(DeviceState *qdev,
g->req_state[0].width = g->conf.xres;
g->req_state[0].height = g->conf.yres;
+ g->hw_ops = &virtio_gpu_ops;
for (i = 0; i < g->conf.max_outputs; i++) {
g->scanout[i].con =
graphic_console_init(DEVICE(g), i, &virtio_gpu_ops, g);