[libcamera-devel] [PATCH v2 8/8] libcamera: pipeline: ipu3: Fail if the FrameInfo can't be found
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Mar 14 00:13:26 CET 2021
Hi Kieran,
Thank you for the patch.
On Fri, Mar 12, 2021 at 05:47:27AM +0000, Kieran Bingham wrote:
> 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;
s/ID:/ID/ ?
Let's shorten lines a bit.
LOG(IPU3, Fatal)
<< "No frameInfo for ActionParamFilled on ID "
<< id;
Same below.
This being said, couldn't we more simply turn the existing Error message
in IPU3Frames::find(unsigned int id) into a Fatal message ?
I also wonder if the same shouldn't be done for
IPU3Frames::find(FrameBuffer *buffer).
> 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
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list