[v2] libcamera: request: Clarify ReuseBuffers flag usage with fences
diff mbox series

Message ID 20251016140720.216006-1-uajain@igalia.com
State Accepted
Headers show
Series
  • [v2] libcamera: request: Clarify ReuseBuffers flag usage with fences
Related show

Commit Message

Umang Jain Oct. 16, 2025, 2:07 p.m. UTC
Explicitly clarify the usage of Request::ReuseBuffers flag in context
of buffer fences. Fences are user-supplied and are not re-cycled as
part of Request::reuse(), hence document this behaviour explicitly.

Signed-off-by: Umang Jain <uajain@igalia.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
Changes in v2:
- Use \note annotation suggested by Barnabás

v1: https://patchwork.libcamera.org/patch/24070/
---
 src/libcamera/request.cpp | 3 +++
 1 file changed, 3 insertions(+)

Comments

Barnabás Pőcze Oct. 17, 2025, 7:55 a.m. UTC | #1
2025. 10. 16. 16:07 keltezéssel, Umang Jain írta:
> Explicitly clarify the usage of Request::ReuseBuffers flag in context
> of buffer fences. Fences are user-supplied and are not re-cycled as
> part of Request::reuse(), hence document this behaviour explicitly.
> 
> Signed-off-by: Umang Jain <uajain@igalia.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
> Changes in v2:
> - Use \note annotation suggested by Barnabás
> 
> v1: https://patchwork.libcamera.org/patch/24070/
> ---

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   src/libcamera/request.cpp | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
> index 26bba8f2..992d476e 100644
> --- a/src/libcamera/request.cpp
> +++ b/src/libcamera/request.cpp
> @@ -327,6 +327,9 @@ void Request::Private::timeout()
>    * Don't reuse buffers
>    * \var Request::ReuseBuffers
>    * Reuse the buffers that were previously added by addBuffer()
> + *
> + * \note Fences associated with the buffers are not reused.
> + *  This flag should not be used if fences are used.
>    */
> 
>   /**
> --
> 2.51.0
>

Patch
diff mbox series

diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 26bba8f2..992d476e 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -327,6 +327,9 @@  void Request::Private::timeout()
  * Don't reuse buffers
  * \var Request::ReuseBuffers
  * Reuse the buffers that were previously added by addBuffer()
+ *
+ * \note Fences associated with the buffers are not reused.
+ *  This flag should not be used if fences are used.
  */
 
 /**