[v2,4/6] libcamera: mali-c55: Simplify bufferReady()
diff mbox series

Message ID 20240625190423.291429-5-jacopo.mondi@ideasonboard.com
State Superseded
Headers show
Series
  • Miscellaneous Mali-C55 Pipeline Fixes
Related show

Commit Message

Jacopo Mondi June 25, 2024, 7:04 p.m. UTC
From: Daniel Scally <dan.scally@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@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/pipeline/mali-c55/mali-c55.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
index 796e2ca60e94..ee73a092eb5b 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -895,12 +895,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,