From 8b818e059bf071749f96fa4a10934eb533777f9a Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 13 Mar 2018 11:17:30 -0600 Subject: vfio/display: adding dmabuf support Wire up dmabuf-based display. Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Williamson --- include/hw/vfio/vfio-common.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/hw/vfio') diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index fc8ae14fb7..c5efa32750 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -26,6 +26,7 @@ #include "exec/memory.h" #include "qemu/queue.h" #include "qemu/notify.h" +#include "ui/console.h" #ifdef CONFIG_LINUX #include #endif @@ -142,12 +143,25 @@ typedef struct VFIOGroup { QLIST_ENTRY(VFIOGroup) container_next; } VFIOGroup; +typedef struct VFIODMABuf { + QemuDmaBuf buf; + uint32_t pos_x, pos_y, pos_updates; + uint32_t hot_x, hot_y, hot_updates; + int dmabuf_id; + QTAILQ_ENTRY(VFIODMABuf) next; +} VFIODMABuf; + typedef struct VFIODisplay { QemuConsole *con; struct { VFIORegion buffer; DisplaySurface *surface; } region; + struct { + QTAILQ_HEAD(, VFIODMABuf) bufs; + VFIODMABuf *primary; + VFIODMABuf *cursor; + } dmabuf; } VFIODisplay; void vfio_put_base_device(VFIODevice *vbasedev); -- cgit v1.2.3-55-g7522