Skip to content

v4l2bufferpool: request the maximum number of buffers for DMABUF

Michael Olbrich requested to merge mol/gst-plugins-good:v4l2 into master

There are often only two buffers queued in the kernel so no new buffers are requested.

With every qbuf, the kernel receives a new dmabuf for the specified index. This most likely differs from the last dmabuf and the old cached entry is released. This results in a lot of map/unmap overhead if the kernel driver needs a mapping for the buffer.

With a larger queue, it's quite likely, that both old and new dmabufs are also mapped for another index. So the map/unmap is skipped, because the mapping is reference counted.

The corresponding allocated buffers don't contain any actuall memory, so allocating them is quite cheep.

Signed-off-by: Michael Olbrich m.olbrich@pengutronix.de

Merge request reports

Loading