[libcamera-devel] [PATCH v2 8/8] libcamera: pipeline: ipu3: Fail if the FrameInfo can't be found

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Mar 12 06:47:27 CET 2021


The FrameInfo structure associates the data sent to the IPA
and is essential for handling events.

If it can not be found, this is a fatal error which must be fixed.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index c5facaea16dd..a61e2b51ef9e 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1168,8 +1168,10 @@ void IPU3CameraData::queueFrameAction(unsigned int id,
 	}
 	case ipa::ipu3::ActionParamFilled: {
 		IPU3Frames::Info *info = frameInfos_.find(id);
-		if (!info)
+		if (!info) {
+			LOG(IPU3, Fatal) << "No frameInfo for ActionParamFilled on ID: " << id;
 			break;
+		}
 
 		/* Queue all buffers from the request aimed for the ImgU. */
 		for (auto it : info->request->buffers()) {
@@ -1190,8 +1192,10 @@ void IPU3CameraData::queueFrameAction(unsigned int id,
 	}
 	case ipa::ipu3::ActionMetadataReady: {
 		IPU3Frames::Info *info = frameInfos_.find(id);
-		if (!info)
+		if (!info) {
+			LOG(IPU3, Fatal) << "No frameInfo for ActionMetadataReady on ID: " << id;
 			break;
+		}
 
 		/*
 		 * \todo Parse the value of the controls returned by the IPA
-- 
2.25.1



More information about the libcamera-devel mailing list