aboutsummaryrefslogtreecommitdiff
path: root/include/hw/vfio
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-03-13 11:17:30 -0600
committerAlex Williamson <alex.williamson@redhat.com>2018-03-13 11:17:30 -0600
commit8b818e059bf071749f96fa4a10934eb533777f9a (patch)
tree69d699a1d3e2a2d40c9fda1e346ae3eb7f602258 /include/hw/vfio
parent00195ba710a004af02a711239324d7137f0b189a (diff)
downloadqemu-8b818e059bf071749f96fa4a10934eb533777f9a.zip
qemu-8b818e059bf071749f96fa4a10934eb533777f9a.tar.gz
qemu-8b818e059bf071749f96fa4a10934eb533777f9a.tar.bz2
vfio/display: adding dmabuf support
Wire up dmabuf-based display. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/hw/vfio')
-rw-r--r--include/hw/vfio/vfio-common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index fc8ae14..c5efa32 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 <linux/vfio.h>
#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);