diff mbox series

[v6,14/23] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN

Message ID 20231025190818.3278423-15-marcandre.lureau@redhat.com
State Handled Elsewhere
Headers show
Series Make Pixman an optional dependency | expand

Commit Message

Marc-André Lureau Oct. 25, 2023, 7:08 p.m. UTC
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>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/display/vhost-user-gpu.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

BALATON Zoltan Oct. 25, 2023, 8:58 p.m. UTC | #1
On Wed, 25 Oct 2023, 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.

Does this silently break guest display when !PIXMAN or I don't understand 
what this means (I don't know how this device works). If it causes missing 
display without PIXMAN should this need pixman or print a warning about 
that?

Regards,
BALATON Zoltan

> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Acked-by: Michael S. Tsirkin <mst@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);
>     }
>
Marc-André Lureau Oct. 26, 2023, 8:03 a.m. UTC | #2
Hi

On Thu, Oct 26, 2023 at 12:58 AM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> On Wed, 25 Oct 2023, 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.
>
> Does this silently break guest display when !PIXMAN or I don't understand
> what this means (I don't know how this device works). If it causes missing
> display without PIXMAN should this need pixman or print a warning about
> that?

The 2D updates will not be displayed. There will be a warning of
"unhandled message 8" for each update.

3D updates are still handled, so you could skip the boot phase until
the guest 3d driver is loaded, or you could have a vhost-user-gpu
backend that only provides 3D updates (aka dmabuf)

>
> Regards,
> BALATON Zoltan
>
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Acked-by: Michael S. Tsirkin <mst@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);
> >     }
> >
diff mbox series

Patch

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);
     }