[PATCH v2 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN

marcandre.lureau@redhat.com posted 18 patches 1 year, 1 month ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Dr. David Alan Gilbert" <dave@treblig.org>, Peter Maydell <peter.maydell@linaro.org>, BALATON Zoltan <balaton@eik.bme.hu>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
[PATCH v2 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN
Posted by marcandre.lureau@redhat.com 1 year, 1 month ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

This simply means that 2d drawing updates won't be handled, but 3d
should work.

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

diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 1150521d9d..709c8a02a1 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -307,6 +307,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
         dpy_gl_update(con, m->x, m->y, m->width, m->height);
         break;
     }
+#ifdef CONFIG_PIXMAN
     case VHOST_USER_GPU_UPDATE: {
         VhostUserGpuUpdate *m = &msg->payload.update;
 
@@ -334,6 +335,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
         }
         break;
     }
+#endif
     default:
         g_warning("unhandled message %d %d", msg->request, msg->size);
     }
-- 
2.41.0


Re: [PATCH v2 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN
Posted by Paolo Bonzini 1 year, 1 month ago
On 9/18/23 15:51, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> This simply means that 2d drawing updates won't be handled, but 3d
> should work.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

How bad is this?  Is it worth making the device dependent on pixman 
altogether?

Paolo

> ---
>   hw/display/vhost-user-gpu.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
> index 1150521d9d..709c8a02a1 100644
> --- a/hw/display/vhost-user-gpu.c
> +++ b/hw/display/vhost-user-gpu.c
> @@ -307,6 +307,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
>           dpy_gl_update(con, m->x, m->y, m->width, m->height);
>           break;
>       }
> +#ifdef CONFIG_PIXMAN
>       case VHOST_USER_GPU_UPDATE: {
>           VhostUserGpuUpdate *m = &msg->payload.update;
>   
> @@ -334,6 +335,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
>           }
>           break;
>       }
> +#endif
>       default:
>           g_warning("unhandled message %d %d", msg->request, msg->size);
>       }


Re: [PATCH v2 09/18] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN
Posted by Marc-André Lureau 1 year, 1 month ago
Hi

On Tue, Sep 19, 2023 at 4:56 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 9/18/23 15:51, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > This simply means that 2d drawing updates won't be handled, but 3d
> > should work.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> How bad is this?  Is it worth making the device dependent on pixman
> altogether?
>

It will issue warnings for 2d commands, and display a blank output.
But 3d / dmabuf will be displayed.

(ideally, some day when QEMU won't do any graphics/ui, the
GPU/renderer process will issue the draw commands to a client
directly, without going through the QEMU process - using
org.qemu.Display1.Listener DBus interface)

-- 
Marc-André Lureau