mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
00195ba710
commit
8b818e059b
2 changed files with 194 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue