summary refs log tree commit diff stats
path: root/hw/display/virtio-gpu-udmabuf.c
diff options
context:
space:
mode:
authorQiang Yu <yuq825@gmail.com>2025-03-27 10:58:45 +0800
committerMarc-André Lureau <marcandre.lureau@redhat.com>2025-05-06 11:57:38 +0400
commitac70568902c3fb77516d93b169cddd0bcaabfb4e (patch)
tree5a10fe95c75518ff393c633214b8283d627163f1 /hw/display/virtio-gpu-udmabuf.c
parent806c861dc6b92019765aed09a016db460cd345fb (diff)
downloadfocaccia-qemu-ac70568902c3fb77516d93b169cddd0bcaabfb4e.tar.gz
focaccia-qemu-ac70568902c3fb77516d93b169cddd0bcaabfb4e.zip
ui/egl: use DRM_FORMAT_MOD_INVALID as default modifier
0 is used as DRM_FORMAT_MOD_LINEAR already.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Message-ID: <20250327025848.46962-4-yuq825@gmail.com>
Diffstat (limited to 'hw/display/virtio-gpu-udmabuf.c')
-rw-r--r--hw/display/virtio-gpu-udmabuf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c
index 01b0024ead..d804f321aa 100644
--- a/hw/display/virtio-gpu-udmabuf.c
+++ b/hw/display/virtio-gpu-udmabuf.c
@@ -25,6 +25,7 @@
 #include <linux/memfd.h>
 #include "qemu/memfd.h"
 #include "standard-headers/linux/udmabuf.h"
+#include "standard-headers/drm/drm_fourcc.h"
 
 static void virtio_gpu_create_udmabuf(struct virtio_gpu_simple_resource *res)
 {
@@ -187,7 +188,8 @@ static VGPUDMABuf
                                   &offset, &fb->stride,
                                   r->x, r->y, fb->width, fb->height,
                                   qemu_pixman_to_drm_format(fb->format),
-                                  0, &res->dmabuf_fd, 1, true, false);
+                                  DRM_FORMAT_MOD_INVALID, &res->dmabuf_fd,
+                                  1, true, false);
     dmabuf->scanout_id = scanout_id;
     QTAILQ_INSERT_HEAD(&g->dmabuf.bufs, dmabuf, next);