Skip to contentSkip to conversation

vhost-user-gpu: fix import of DMABUF

PATCH In review [email protected] 2 participants 2 messages May 15, 2024 – Jun 3, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 vhost-user-gpu: fix import of DMABUF

From: Marc-André Lureau <[email protected]>

When using vhost-user-gpu with GL, qemu -display gtk doesn't show output and prints: qemu: eglCreateImageKHR failed

Since commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties"), egl_dmabuf_import_texture() uses backing_{width,height} for the texture dimension.

Fixes commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties")
---
 hw/display/vhost-user-gpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
hw/display/vhost-user-gpu.c +3 -2
index e4b398d26c..63c64ddde6 100644
@@ -281,8 +281,9 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
             modifier = m2->modifier;
         }
 
-        dmabuf = qemu_dmabuf_new(m->fd_width, m->fd_height,
-                                 m->fd_stride, 0, 0, 0, 0,
+        dmabuf = qemu_dmabuf_new(m->width, m->height,
+                                 m->fd_stride, 0, 0,
+                                 m->fd_width, m->fd_height,
                                  m->fd_drm_fourcc, modifier,
                                  fd, false, m->fd_flags &
                                  VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP);
Signature · 1 line
2.41.0.28.gd7d8841f67
#1 lore raw
Quoted 10 lines · On Wed, May 15, 2024 at 02:52:37PM +0400, [email protected] wrote:

From: Marc-André Lureau <[email protected]>

When using vhost-user-gpu with GL, qemu -display gtk doesn't show output and prints: qemu: eglCreateImageKHR failed

Since commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties"), egl_dmabuf_import_texture() uses backing_{width,height} for the texture dimension.

Fixes commit 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties")

should be:

Fixes 9ac06df8b ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties")
Quoted 23 lines
---
 hw/display/vhost-user-gpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
hw/display/vhost-user-gpu.c +3 -2
index e4b398d26c..63c64ddde6 100644
@@ -281,8 +281,9 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
             modifier = m2->modifier;
         }
 
-        dmabuf = qemu_dmabuf_new(m->fd_width, m->fd_height,
-                                 m->fd_stride, 0, 0, 0, 0,
+        dmabuf = qemu_dmabuf_new(m->width, m->height,
+                                 m->fd_stride, 0, 0,
+                                 m->fd_width, m->fd_height,
                                  m->fd_drm_fourcc, modifier,
                                  fd, false, m->fd_flags &
                                  VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP);
Signature · 1 line
2.41.0.28.gd7d8841f67