Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-12-03 Thread Gerd Hoffmann
  Hi,

> > > Do we already have a mechanism
> > > to import memory to virtio-gpu via importing a bo handle from somewhere
> > > else?
> >
> > Inside the guest?  Import is not working yet, that needs another update
> > (blob resources) due to current virtio-gpu resources requiring a format
> > at creation time and dmabufs not having one.
> >
> >
> Gotcha, I was just poking around related code and it looked like I could
> use a resource w/ R8 format and width = bytes.

Yep, that trick might work for some use cases.  But mapping such an
imported dma-buf to a scanout isn't going to work for example ...

cheers,
  Gerd


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-12-03 Thread Frank Yang
On Tue, Dec 3, 2019 at 1:33 AM Gerd Hoffmann  wrote:

> On Mon, Dec 02, 2019 at 09:24:31AM -0800, Frank Yang wrote:
> > Interesting; what's the use case for this?
>
> Mostly reduce data copying.
>
> > Do we already have a mechanism
> > to import memory to virtio-gpu via importing a bo handle from somewhere
> > else?
>
> Inside the guest?  Import is not working yet, that needs another update
> (blob resources) due to current virtio-gpu resources requiring a format
> at creation time and dmabufs not having one.
>
>
Gotcha, I was just poking around related code and it looked like I could
use a resource w/ R8 format and width = bytes. Blob resources would be a
more proper way then :)


> See https://www.kraxel.org/blog/2019/11/virtio-gpu-status-and-plans/ for
> some background.
>
> Exporting virtio-gpu resources works in the drm-misc-next branch, should
> land in mainline this merge window (i.e. 5.5-rc1).
>
> cheers,
>   Gerd
>
>


Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-12-03 Thread Gerd Hoffmann
On Mon, Dec 02, 2019 at 09:24:31AM -0800, Frank Yang wrote:
> Interesting; what's the use case for this?

Mostly reduce data copying.

> Do we already have a mechanism
> to import memory to virtio-gpu via importing a bo handle from somewhere
> else?

Inside the guest?  Import is not working yet, that needs another update
(blob resources) due to current virtio-gpu resources requiring a format
at creation time and dmabufs not having one.

See https://www.kraxel.org/blog/2019/11/virtio-gpu-status-and-plans/ for
some background.

Exporting virtio-gpu resources works in the drm-misc-next branch, should
land in mainline this merge window (i.e. 5.5-rc1).

cheers,
  Gerd


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-12-02 Thread Frank Yang
Interesting; what's the use case for this? Do we already have a mechanism
to import memory to virtio-gpu via importing a bo handle from somewhere
else?

On Thu, Nov 28, 2019 at 9:37 PM Gerd Hoffmann  wrote:

> On Thu, Nov 28, 2019 at 07:04:23PM +0100, Matti Moell wrote:
> > Hi Gerd,
> >
> > I really like this!
> >
> > On 28.11.19 14:19, Gerd Hoffmann wrote:
> > > @@ -186,6 +211,7 @@ \subsubsection{Device Operation: Request
> header}\label{sec:Device Types / GPU De
> > >   VIRTIO_GPU_CMD_GET_CAPSET_INFO,
> > >   VIRTIO_GPU_CMD_GET_CAPSET,
> > >   VIRTIO_GPU_CMD_GET_EDID,
> > > +VIRTIO_GPU_CMD_RESOURCE_CREATE_2D_SHARED,
> > Shouldn't there also the RESOURCE_CREATE_3D_SHARED? I know that 3D isn't
> > speced here but it looks awkward not to reserve it.
>
> Yep, none of the 3D commands is in the specs, thats why
> RESOURCE_CREATE_3D_SHARED isn't there too (but, yes, it exists).
>
> Guess it might be a good idea to at least list the commands,
> but that is something for a separate patch ...
>
> cheers,
>   Gerd
>
>
> -
> To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org
>
>


Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-11-28 Thread Gerd Hoffmann
On Thu, Nov 28, 2019 at 07:04:23PM +0100, Matti Moell wrote:
> Hi Gerd,
> 
> I really like this!
> 
> On 28.11.19 14:19, Gerd Hoffmann wrote:
> > @@ -186,6 +211,7 @@ \subsubsection{Device Operation: Request 
> > header}\label{sec:Device Types / GPU De
> >   VIRTIO_GPU_CMD_GET_CAPSET_INFO,
> >   VIRTIO_GPU_CMD_GET_CAPSET,
> >   VIRTIO_GPU_CMD_GET_EDID,
> > +VIRTIO_GPU_CMD_RESOURCE_CREATE_2D_SHARED,
> Shouldn't there also the RESOURCE_CREATE_3D_SHARED? I know that 3D isn't
> speced here but it looks awkward not to reserve it.

Yep, none of the 3D commands is in the specs, thats why
RESOURCE_CREATE_3D_SHARED isn't there too (but, yes, it exists).

Guess it might be a good idea to at least list the commands,
but that is something for a separate patch ...

cheers,
  Gerd


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



Re: [virtio-dev] [PATCH] virtio-gpu: add shared resource feature

2019-11-28 Thread Laszlo Ersek
On 11/28/19 14:19, Gerd Hoffmann wrote:

> +resources.  Normal resources have both a guest buffer and host buffer
> +buffer for the resource and the VIRTIO_GPU_CMD_TRANSFER_* commands are

typo: "buffer\nbuffer"

Thanks
Laszlo


-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org