qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] vhost-user-gpu: fix import of DMABUF
@ 2024-05-15 10:52 marcandre.lureau
  2024-06-02 14:36 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: marcandre.lureau @ 2024-05-15 10:52 UTC (permalink / raw)
  To: qemu-devel
  Cc: dongwon.kim, Marc-André Lureau, Michael S. Tsirkin,
	Gerd Hoffmann

From: Marc-André Lureau <marcandre.lureau@redhat.com>

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")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/display/vhost-user-gpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index e4b398d26c..63c64ddde6 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -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);
-- 
2.41.0.28.gd7d8841f67



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] vhost-user-gpu: fix import of DMABUF
  2024-05-15 10:52 [PATCH v3] vhost-user-gpu: fix import of DMABUF marcandre.lureau
@ 2024-06-02 14:36 ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2024-06-02 14:36 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel, dongwon.kim, Gerd Hoffmann

On Wed, May 15, 2024 at 02:52:37PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> 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")


> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  hw/display/vhost-user-gpu.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
> index e4b398d26c..63c64ddde6 100644
> --- a/hw/display/vhost-user-gpu.c
> +++ b/hw/display/vhost-user-gpu.c
> @@ -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);
> -- 
> 2.41.0.28.gd7d8841f67



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-03  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15 10:52 [PATCH v3] vhost-user-gpu: fix import of DMABUF marcandre.lureau
2024-06-02 14:36 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).