dmabuf: add y0_top, pass it to spice

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>
This commit is contained in:
Marc-André Lureau 2018-07-13 15:08:51 +02:00 committed by Gerd Hoffmann
parent 949ed4c227
commit 242d01336d
2 changed files with 3 additions and 1 deletions

View File

@ -186,6 +186,7 @@ struct QemuDmaBuf {
uint32_t stride;
uint32_t fourcc;
uint32_t texture;
bool y0_top;
};
typedef struct DisplayChangeListenerOps {

View 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;