[libcamera-devel,0/2] libcamera: Fix unmapping of buffers
mbox series

Message ID 20190304232530.4427-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • libcamera: Fix unmapping of buffers
Related show

Message

Kieran Bingham March 4, 2019, 11:25 p.m. UTC
When closing down an active stream, the V4L2Device reports that buffers can not
be released.

This turns out to be a two part problem.

Firstly, exported buffers duplicate the dmabuf file handle for internal storage
- but the first handle was not released. The first patch solves this by
releasing the handle after it has been associated with the buffer.

The second issue is that the V4L2Device is asked to free buffers /before/ they
have been released. Resolve this issue by destroying the bufferpool contents
before calling down to the pipeline handler to free all buffers.

Kieran Bingham (2):
  libcamera: v4l2_device: Close Plane dmabuf fd
  libcamera: camera: Unmap buffers before release

 src/libcamera/camera.cpp      | 7 ++++++-
 src/libcamera/v4l2_device.cpp | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)