[libcamera-devel] [PATCH] libcamera: ipa_interface: Document the ownership of dmabufs passed to mapBuffers()

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Jan 10 00:26:47 CET 2020


The ownership of the dmabuf file handles passed to mapBuffers() is not
clear. Explicitly document that they are borrowed from the callee and
only guaranteed to be valid for the duration of the mapBuffers() call.

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/libcamera/ipa_interface.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp
index ee3e3622f39ae85f..25b075fef5a50db7 100644
--- a/src/libcamera/ipa_interface.cpp
+++ b/src/libcamera/ipa_interface.cpp
@@ -429,6 +429,9 @@ namespace libcamera {
  * handler that the IPA needs to access. It provides dmabuf file handles for
  * each buffer, and associates the buffers with unique numerical IDs.
  *
+ * The dmabuf file handles provided in \a buffers are borrowed from the callee
+ * and are only guaranteed to be valid during the mapBuffers() call.
+ *
  * IPAs shall map the dmabuf file handles to their address space and keep a
  * cache of the mappings, indexed by the buffer numerical IDs. The IDs are used
  * in all other IPA interface methods to refer to buffers, including the
-- 
2.24.1



More information about the libcamera-devel mailing list