From 4b9bd6c3ad94c617ac00a71d2e1ef33648afc99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Fri, 10 Jan 2020 00:20:46 +0100 Subject: libcamera: ipa_interface: Document the ownership of dmabufs passed to map_buffers() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/libcamera/ipa_interface.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libcamera/ipa_interface.cpp') 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() */ -- cgit v1.2.1