| * Virtio vhost-user GPU Device |
| * This work is licensed under the terms of the GNU GPL, version 2 or later. |
| * See the COPYING file in the top-level directory. |
| #ifndef VHOST_USER_GPU_VUGBM_H |
| #define VHOST_USER_GPU_VUGBM_H |
| bool (*alloc_bo)(struct vugbm_buffer *buf); |
| void (*free_bo)(struct vugbm_buffer *buf); |
| bool (*get_fd)(struct vugbm_buffer *buf, int *fd); |
| bool (*map_bo)(struct vugbm_buffer *buf); |
| void (*unmap_bo)(struct vugbm_buffer *buf); |
| void (*device_destroy)(struct vugbm_device *dev); |
| struct vugbm_device *dev; |
| bool vugbm_device_init(struct vugbm_device *dev, int fd); |
| void vugbm_device_destroy(struct vugbm_device *dev); |
| bool vugbm_buffer_create(struct vugbm_buffer *buffer, struct vugbm_device *dev, |
| uint32_t width, uint32_t height); |
| bool vugbm_buffer_can_get_dmabuf_fd(struct vugbm_buffer *buffer); |
| bool vugbm_buffer_get_dmabuf_fd(struct vugbm_buffer *buffer, int *fd); |
| void vugbm_buffer_destroy(struct vugbm_buffer *buffer); |