[Spice-devel] intel vgpu & spice & cursor
Zhang, Tina
tina.zhang at intel.com
Fri Oct 13 02:09:24 UTC 2017
> -----Original Message-----
> From: Marc-André Lureau [mailto:marcandre.lureau at redhat.com]
> Sent: Thursday, October 12, 2017 5:42 PM
> To: Gerd Hoffmann <kraxel at redhat.com>
> Cc: intel-gvt-dev at lists.freedesktop.org; spice-devel at lists.freedesktop.org;
> Zhang, Tina <tina.zhang at intel.com>
> Subject: Re: [Spice-devel] intel vgpu & spice & cursor
>
> Hi
>
> ----- Original Message -----
> > Hi,
> >
> > We need to figure a way to handle intel vgpu with spice, especially
> > how to handle the cursor.
> >
> > What we'll get from the vgpu is two dma-bufs: One for the primary
> > plane (aka guest display), one for the cursor plane. We also get the
> > position of the cursor. We do *not* get the hotspot of the cursor.
> >
> > The latter implies client mouse mode isn't going to work, so we need
> > some other way to render the cursor. I see basically two options:
> >
>
> It's a shame not to have client mouse mode support. I wonder if we could
> modify the intel driver to pass along the cursor details, like virgl does (see
> drmModeSetCursor2).
I see Gerd asked this question in another thread. Sorry for the late replay.
It seems for i915 the cursor hotspot is always to be (0,0).
Joonas, could you please give us some comments here?
How does i915 handle the cursor hotspot configuration? Is there a register for
cursor spot setting. If so, we can decode the register and send the hot sport
info to user space.
Thanks.
BR,
Tina
>
> > (a) Update spice-server API (and probably spice protocol too),
> > add a call (or two) to pass on cursor dmabuf and position.
> >
> > (b) Create a new dma-buf in qemu, render guest display with cursor
> > to it, pass *that* to spice-server.
> >
> > I think (a) would be the better choice. It gives more flexibility to
> > the spice client, for example it would be possible to create a drm-
> > based spice client which simply maps the guest planes to a host
> > scanout. I think it'll also have less overhead as qemu has no need to
> > touch the dma-bufs then, it just passes on the fds.
>
> Spice has SPICE_MSG_DISPLAY_GL_SCANOUT_UNIX to pass a dmabuf to client,
> it could be extended as needed or a new similar message could be added.
>
> >
> > But option (b) wouldn't be a big deal either. qemu must handle that
> > anyway, for the gtk and sdl UIs, so supporting it for spice too would
> > be easy.
> >
> > Comments?
More information about the Spice-devel
mailing list