diff mbox series

[v2,2/4] vfio/display: set dmabuf modifier field

Message ID 20190524070118.30157-3-kraxel@redhat.com
State New
Headers show
Series add drm modifier support for dmabufs. | expand

Commit Message

Gerd Hoffmann May 24, 2019, 7:01 a.m. UTC
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>
---
 hw/vfio/display.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alex Williamson May 24, 2019, 1:54 p.m. UTC | #1
On Fri, 24 May 2019 09:01:16 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:

> 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>
> ---
>  hw/vfio/display.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/vfio/display.c b/hw/vfio/display.c
> index a3d9c8f5beac..13969180b2dd 100644
> --- a/hw/vfio/display.c
> +++ b/hw/vfio/display.c
> @@ -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);

Acked-by: Alex Williamson <alex.williamson@redhat.com>
diff mbox series

Patch

diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index a3d9c8f5beac..13969180b2dd 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -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);