libcamera: rkisp1: Report sensor timestamp

Report the sensor's timestamp in the Request metadata using the
completed buffer timestamp.

The buffer's timestamp is recorded at DMA-transfer time, and it does not
theoretically matches the 'start of exposure' definition. Record this with
a \todo entry.

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi
2021-04-16 14:52:58 +02:00
parent 210c59b6bb
commit 62f53a0f22
+9
View File
@@ -1070,6 +1070,15 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)
{
Request *request = buffer->request();
/*
* Record the sensor's timestamp in the request metadata.
*
* \todo The sensor timestamp should be better estimated by connecting
* to the V4L2Device::frameStart signal.
*/
request->metadata().set(controls::SensorTimestamp,
buffer->metadata().timestamp);
completeBuffer(request, buffer);
tryCompleteRequest(request);
}