No way for source node to know whether sink node interacts with DMA buffers the right way
An application can ask for a DMA buffer, and then attempt to use DMA_BUF_IOCTL_SYNC
and mmap()
to download it. However, often for GPU memory, mmap()
will either result in very very slow access (e.g. when using AMD gpus). On the other hand, for other types of DMA buffer, the same issue does not apply, for example for v4l2 DMA buffers. A sink node application can ask for "DMA buffer", but the source node does not know whether this implemented using a potentially very inefficient mmap() or using some adequate method for downloading GPU memory (i.e. glReadPixels()).
One could expand the documentation for accessing DMA Buffers to never mmap() them directly, to avoid accidentally getting very slow access, but that would require unnecessary restrictions on e.g. v4l2-only sink nodes, that will work well by mmap():ing.
Related: #1054 (closed)