[v6,04/14] libcamera: mali-c55: Simplify bufferReady()
diff mbox series

Message ID 20241115101334.453104-5-dan.scally@ideasonboard.com
State Accepted
Headers show
Series
  • Miscellaneous Mali-C55 Pipeline Fixes
Related show

Commit Message

Dan Scally Nov. 15, 2024, 10:13 a.m. UTC
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>
---
Changes in v6:

	- None

Changes in v5:

	- None

 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 80cd98b3..7d0d0293 100644
--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp
+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp
@@ -893,12 +893,8 @@  void PipelineHandlerMaliC55::imageBufferReady(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,