diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-14 15:42:23 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-15 14:11:49 +0200 |
commit | 3b593b3fe406c04d34a7e896c364a17b034fcf4f (patch) | |
tree | 20d680f9a8c2283c2a196e9dfc956761f0d7043a /hw/display/virtio-gpu-base.c | |
parent | 64f7aece8ea0745c0990f7ba20189341e70f123c (diff) | |
download | qemu-3b593b3fe406c04d34a7e896c364a17b034fcf4f.zip qemu-3b593b3fe406c04d34a7e896c364a17b034fcf4f.tar.gz qemu-3b593b3fe406c04d34a7e896c364a17b034fcf4f.tar.bz2 |
virtio-gpu: make virtio_gpu_ops static
Reference it via ops pointer instead, simliar to the vga one.
Removes hard symbol reference, needed to build virtio-gpu modular.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200914134224.29769-6-kraxel@redhat.com
Diffstat (limited to 'hw/display/virtio-gpu-base.c')
-rw-r--r-- | hw/display/virtio-gpu-base.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index 7961308..aeb8723 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); |