summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-10 00:20:46 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-12 19:13:34 +0100
commit4b9bd6c3ad94c617ac00a71d2e1ef33648afc99f (patch)
tree4b2d582f23f8b679e029419147addbaf1ca894d1 /src
parenta1c5450be573ebcb1a5acc6453b5fcfdaa9593a4 (diff)
libcamera: ipa_interface: Document the ownership of dmabufs passed to map_buffers()
The ownership of the dmabuf file handles passed to map_buffers() is not clear. Explicitly document that they are borrowed from the caller and only guaranteed to be valid for the duration of the map_buffers() call. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/ipa_interface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp
index 2f86087e..90015449 100644
--- a/src/libcamera/ipa_interface.cpp
+++ b/src/libcamera/ipa_interface.cpp
@@ -258,6 +258,11 @@
* \param[in] buffers The buffers to map
* \param[in] num_buffers The number of entries in the \a buffers array
*
+ * The dmabuf file descriptors provided in \a buffers are borrowed from the
+ * caller and are only guaranteed to be valid during the map_buffers() call.
+ * Should the callee need to store a copy of the file descriptors, it shall
+ * duplicate them first with ::dup().
+ *
* \sa libcamera::IPAInterface::mapBuffers()
*/