External DMA to gpu

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 13 11:30:29 UTC 2018


On Wed, 12 Sep 2018 11:51:39 +0200
Dirk Eibach <dirk.eibach at googlemail.com> wrote:

> Hi Pekka,
> 
> > yes, simple-dmabuf-v4l does exactly what I wrote in the above quote.
> > However, it does not allocate from the GPU device or from the display
> > device. Instead, it allocates from the V4L2 device and hopes that the
> > compositor will be able to use the buffers. Quite likely the compositor
> > can use the buffer, but they might not be fit for direct scanout which
> > would mean that composite bypass is not possible in the compositor.  
> 
> To be sure the buffer can be used for scanout, I could use
> gbm_bo_create_with_modifiers() to allocate it, right?

Hi Dirk,

yeah, you query the KMS device for acceptable formats and modifiers by
reading the IN_FORMATS property (see Weston's
drm_plane_populate_formats()), and try to create a GBM bo with one of
those. Your grabber driver need to use the same format and modifier as
well. Hopefully that gives you a buffer that is good for scanout and
texturing.

There are no strong guarantees, though. That would need the Unix device
memory allocator infrastructure.

This is the theory as I understand it, at least.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180913/708cfce8/attachment-0001.sig>


More information about the wayland-devel mailing list