From c89cfa534ba1d35e35de7d33c57a6c2906a5b11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Fri, 10 Jan 2020 18:41:30 +0100 Subject: cam: Cache buffer memory mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the buffer allocator in use it's possible to cache the dmabuf memory mappings when starting the camera instead of mapping and unmapping them each time. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/cam/capture.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cam/capture.cpp') diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp index dd078eb0..738fa1c2 100644 --- a/src/cam/capture.cpp +++ b/src/cam/capture.cpp @@ -116,6 +116,9 @@ int Capture::capture(EventLoop *loop, FrameBufferAllocator *allocator) << std::endl; return ret; } + + if (writer_) + writer_->mapBuffer(buffer.get()); } requests.push_back(request); -- cgit v1.2.1