From patchwork Wed Apr 7 16:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11860 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 760A7BD1F6 for ; Wed, 7 Apr 2021 16:06:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CC6BC687DF; Wed, 7 Apr 2021 18:06:14 +0200 (CEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 73E68687A1 for ; Wed, 7 Apr 2021 18:06:13 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BED2AE000E; Wed, 7 Apr 2021 16:06:12 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 7 Apr 2021 18:06:41 +0200 Message-Id: <20210407160644.58326-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] libcamera: Add sensor timestamp support X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, we have an issue with reporting sensor timestamps correctly to android. We currently use one of the buffers timestamps, which fails some CTS tests that verify that the reported SENSOR_TIMESTAMP is in the frame duration range reported as static metadata Ie. android.hardware.camera2.cts.CaptureRequestTest#testNoiseReductionModeControl when run in FULL mode. This series de-stages the SensorTimestamp control we had defined as draft control and populates it in the IPU3 pipeline handler with the timestamp of the CIO2 raw buffer. It then reports it to Android. Paul: I didn't manage to reproduce the error on you in-development CTS patches so I can't say this series fixes the test. But I've manually collected the reported duration and run them through a little script and verified they all fall in the expected range. Could you test your failing test with this series on top ? Thanks j Jacopo Mondi (3): libcamera: controls: Destage 'SensorTimestamp' libcamera: ipu3: Report sensor timestamp android: camera_device: Use controls::SensorTimestamp src/android/camera_device.cpp | 33 +++++++++++++++++----------- src/android/camera_device.h | 3 +-- src/libcamera/control_ids.yaml | 21 ++++++++++++------ src/libcamera/pipeline/ipu3/ipu3.cpp | 9 ++++++++ 4 files changed, 44 insertions(+), 22 deletions(-) Tested-by: Paul Elder --- 2.31.1