On Wed, 12 Sep 2018 11:51:39 +0200 Dirk Eibach <dirk.eib...@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
pgpkaWHHfRLfE.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel