OSDN Git Service

vfio/display: set dmabuf modifier field
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 29 May 2019 07:21:42 +0000 (09:21 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 7 Jun 2019 09:52:35 +0000 (11:52 +0200)
Fill the new QemuDmaBuf->modifier field properly from plane info.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Message-id: 20190529072144.26737-3-kraxel@redhat.com

hw/vfio/display.c

index 2c2d3e5..a5a608c 100644 (file)
@@ -248,6 +248,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
     dmabuf->buf.height = plane.height;
     dmabuf->buf.stride = plane.stride;
     dmabuf->buf.fourcc = plane.drm_format;
+    dmabuf->buf.modifier = plane.drm_format_mod;
     dmabuf->buf.fd     = fd;
     if (plane_type == DRM_PLANE_TYPE_CURSOR) {
         vfio_display_update_cursor(dmabuf, &plane);