diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-04-30 13:35:39 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-05-10 13:55:28 +0200 |
commit | 2f47691a0f8dbb4661216cba2c687efc28b1bcf5 (patch) | |
tree | 5ae88ca656272fbc9b2b29206f7a258359843535 /hw/display/virtio-gpu.c | |
parent | 3e48b7a31a755b570851090904c4d0f4d0906832 (diff) | |
download | qemu-2f47691a0f8dbb4661216cba2c687efc28b1bcf5.zip qemu-2f47691a0f8dbb4661216cba2c687efc28b1bcf5.tar.gz qemu-2f47691a0f8dbb4661216cba2c687efc28b1bcf5.tar.bz2 |
virtio-gpu: move virgl process_cmd
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20210430113547.1816178-1-kraxel@redhat.com
Message-Id: <20210430113547.1816178-9-kraxel@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r-- | hw/display/virtio-gpu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 9be486b..7c65c3f 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -763,8 +763,8 @@ virtio_gpu_resource_detach_backing(VirtIOGPU *g, virtio_gpu_cleanup_mapping(g, res); } -static void virtio_gpu_simple_process_cmd(VirtIOGPU *g, - struct virtio_gpu_ctrl_command *cmd) +void virtio_gpu_simple_process_cmd(VirtIOGPU *g, + struct virtio_gpu_ctrl_command *cmd) { VIRTIO_GPU_FILL_CMD(cmd->cmd_hdr); virtio_gpu_ctrl_hdr_bswap(&cmd->cmd_hdr); @@ -822,6 +822,7 @@ static void virtio_gpu_handle_cursor_cb(VirtIODevice *vdev, VirtQueue *vq) void virtio_gpu_process_cmdq(VirtIOGPU *g) { struct virtio_gpu_ctrl_command *cmd; + VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g); if (g->processing_cmdq) { return; @@ -835,8 +836,7 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g) } /* process command */ - VIRGL(g, virtio_gpu_virgl_process_cmd, virtio_gpu_simple_process_cmd, - g, cmd); + vgc->process_cmd(g, cmd); QTAILQ_REMOVE(&g->cmdq, cmd, next); if (virtio_gpu_stats_enabled(g->parent_obj.conf)) { @@ -1205,6 +1205,7 @@ static void virtio_gpu_class_init(ObjectClass *klass, void *data) VirtIOGPUClass *vgc = VIRTIO_GPU_CLASS(klass); vgc->handle_ctrl = virtio_gpu_handle_ctrl; + vgc->process_cmd = virtio_gpu_simple_process_cmd; vdc->realize = virtio_gpu_device_realize; vdc->reset = virtio_gpu_reset; |