ipa: ipu3: Provide frame timestamps through IPU3Event

Pass in frame timestamps from IPU3 pipeline handler to IPU3 IPA via
IPU3Event. Frame timestamps are helpful to IPA algorithms to
convergence, by setting them via IPA stats.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Umang Jain
2021-05-26 18:40:25 +05:30
committed by Laurent Pinchart
parent abbc4bd11b
commit c43c12a24b
3 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -1357,6 +1357,8 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
if (!info)
return;
Request *request = info->request;
if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
info->metadataProcessed = true;
@@ -1364,8 +1366,6 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
* tryComplete() will delete info if it completes the IPU3Frame.
* In that event, we must have obtained the Request before hand.
*/
Request *request = info->request;
if (frameInfos_.tryComplete(info))
pipe_->completeRequest(request);
@@ -1376,6 +1376,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer)
ev.op = ipa::ipu3::EventStatReady;
ev.frame = info->id;
ev.bufferId = info->statBuffer->cookie();
ev.frameTimestamp = request->metadata().get(controls::SensorTimestamp);
ipa_->processEvent(ev);
}