[PATCH v3 4/9] libcamera: mali-c55: Simplify bufferReady()
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Wed Jun 26 16:03:00 CEST 2024
From: Daniel Scally <dan.scally at ideasonboard.com>
The PipelineHandler::completeBuffer() base class function returns
a boolean to indicate if there still are pending buffers in the
Request.
Simplify the bufferReady() function in the Mali-C55 pipeline handler
using the completeBuffer() return value.
Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/mali-c55/mali-c55.cpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
index bffd842c2af1..12e32f2339f9 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -894,12 +894,8 @@ void PipelineHandlerMaliC55::bufferReady(FrameBuffer *buffer)
{
Request *request = buffer->request();
- completeBuffer(request, buffer);
-
- if (request->hasPendingBuffers())
- return;
-
- completeRequest(request);
+ if (completeBuffer(request, buffer))
+ completeRequest(request);
}
void PipelineHandlerMaliC55::registerMaliCamera(std::unique_ptr<MaliC55CameraData> data,
--
2.45.2
More information about the libcamera-devel
mailing list