diff options
author | Manos Pitsidianakis <manos.pitsidianakis@linaro.org> | 2024-01-30 16:59:20 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-02-14 06:09:33 -0500 |
commit | 330399bd8935c9c2100c40e168781f405545d05a (patch) | |
tree | d204bdfa0bb2602313762ce5525039c2ee3b6fb8 /include | |
parent | 8b162082cb2d495f8661b7ee3239a36936dab2ee (diff) | |
download | qemu-330399bd8935c9c2100c40e168781f405545d05a.zip qemu-330399bd8935c9c2100c40e168781f405545d05a.tar.gz qemu-330399bd8935c9c2100c40e168781f405545d05a.tar.bz2 |
virtio-gpu.c: add resource_destroy class method
When destroying/unrefing resources, devices such as virtio-gpu-rutabaga
need to do their own bookkeeping (free rutabaga resources that are
associated with the virtio_gpu_simple_resource).
This commit adds a class method so that virtio-gpu-rutabaga can override
it in the next commit.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <b0a86630c4d601f3a269fd7e08cfefc13bd4e219.1706626470.git.manos.pitsidianakis@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/virtio-gpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 584ba2e..b28e7ef 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -219,6 +219,9 @@ struct VirtIOGPUClass { void (*update_cursor_data)(VirtIOGPU *g, struct virtio_gpu_scanout *s, uint32_t resource_id); + void (*resource_destroy)(VirtIOGPU *g, + struct virtio_gpu_simple_resource *res, + Error **errp); }; struct VirtIOGPUGL { |