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-vga.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-vga.c')
-rw-r--r-- | hw/display/virtio-vga.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 573e7d5..f9410a0 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -13,7 +13,7 @@ static void virtio_vga_base_invalidate_display(void *opaque) VirtIOGPUBase *g = vvga->vgpu; if (g->enable) { - virtio_gpu_ops.invalidate(g); + g->hw_ops->invalidate(g); } else { vvga->vga.hw_ops->invalidate(&vvga->vga); } @@ -25,7 +25,7 @@ static void virtio_vga_base_update_display(void *opaque) VirtIOGPUBase *g = vvga->vgpu; if (g->enable) { - virtio_gpu_ops.gfx_update(g); + g->hw_ops->gfx_update(g); } else { vvga->vga.hw_ops->gfx_update(&vvga->vga); } @@ -37,8 +37,8 @@ static void virtio_vga_base_text_update(void *opaque, console_ch_t *chardata) VirtIOGPUBase *g = vvga->vgpu; if (g->enable) { - if (virtio_gpu_ops.text_update) { - virtio_gpu_ops.text_update(g, chardata); + if (g->hw_ops->text_update) { + g->hw_ops->text_update(g, chardata); } } else { if (vvga->vga.hw_ops->text_update) { @@ -52,8 +52,8 @@ static int virtio_vga_base_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info) VirtIOVGABase *vvga = opaque; VirtIOGPUBase *g = vvga->vgpu; - if (virtio_gpu_ops.ui_info) { - return virtio_gpu_ops.ui_info(g, idx, info); + if (g->hw_ops->ui_info) { + return g->hw_ops->ui_info(g, idx, info); } return -1; } @@ -63,8 +63,8 @@ static void virtio_vga_base_gl_block(void *opaque, bool block) VirtIOVGABase *vvga = opaque; VirtIOGPUBase *g = vvga->vgpu; - if (virtio_gpu_ops.gl_block) { - virtio_gpu_ops.gl_block(g, block); + if (g->hw_ops->gl_block) { + g->hw_ops->gl_block(g, block); } } |