summaryrefslogtreecommitdiffstats
path: root/hw/vfio/display.c
diff options
context:
space:
mode:
authorMarc-André Lureau2021-02-04 11:52:23 +0100
committerGerd Hoffmann2021-02-04 15:58:54 +0100
commita7dfbe289ede8adb253d735daef88a39709053dc (patch)
tree5b4b4cf2783f8a85ae45d05ca12d04a1b2e05d21 /hw/vfio/display.c
parentvhost-user-gpu: add a configuration flag for dmabuf usage (diff)
downloadqemu-a7dfbe289ede8adb253d735daef88a39709053dc.tar.gz
qemu-a7dfbe289ede8adb253d735daef88a39709053dc.tar.xz
qemu-a7dfbe289ede8adb253d735daef88a39709053dc.zip
ui: add an optional get_flags callback to GraphicHwOps
Those flags can be used to express different requirements for the display or other needs. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-12-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/vfio/display.c')
-rw-r--r--hw/vfio/display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index 42d67e870b..f04473e3ce 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -335,7 +335,13 @@ static void vfio_display_dmabuf_update(void *opaque)
}
}
+static int vfio_display_get_flags(void *opaque)
+{
+ return GRAPHIC_FLAGS_GL | GRAPHIC_FLAGS_DMABUF;
+}
+
static const GraphicHwOps vfio_display_dmabuf_ops = {
+ .get_flags = vfio_display_get_flags,
.gfx_update = vfio_display_dmabuf_update,
.ui_info = vfio_display_edid_ui_info,
};