dmabuf: add y0_top, pass it to spice
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 13 Jul 2018 13:08:51 +0000 (15:08 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 24 Aug 2018 06:40:11 +0000 (08:40 +0200)
Some scanouts during boot are top-down without it.

y0_top is set from VHOST_USER_GPU_DMABUF_SCANOUT code path in the last
patch of this series.

In current QEMU code base, only vfio/display uses dmabuf API. But the
VFIO query interface doesn't provide or need that detail so far.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180713130916.4153-5-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
include/ui/console.h
ui/spice-display.c

index 981b519ddec456596d9d9a5fcb3d4de4dd0a87a3..fb969caf70ed6dbfa921195afc3ac446c43e147c 100644 (file)
@@ -186,6 +186,7 @@ struct QemuDmaBuf {
     uint32_t  stride;
     uint32_t  fourcc;
     uint32_t  texture;
+    bool      y0_top;
 };
 
 typedef struct DisplayChangeListenerOps {
index 7b230987dcb7bf2da86fa0695c2ec10e348dc425..2f8adb6b9fad067b41303ed6804f43850eb58a4d 100644 (file)
@@ -1056,7 +1056,8 @@ static void qemu_spice_gl_update(DisplayChangeListener *dcl,
             /* note: spice server will close the fd, so hand over a dup */
             spice_qxl_gl_scanout(&ssd->qxl, dup(dmabuf->fd),
                                  dmabuf->width, dmabuf->height,
-                                 dmabuf->stride, dmabuf->fourcc, false);
+                                 dmabuf->stride, dmabuf->fourcc,
+                                 dmabuf->y0_top);
         }
         qemu_spice_gl_monitor_config(ssd, 0, 0, dmabuf->width, dmabuf->height);
         ssd->guest_dmabuf_refresh = false;