{"id":17818,"url":"https://patchwork.libcamera.org/api/patches/17818/?format=json","web_url":"https://patchwork.libcamera.org/patch/17818/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20221120172030.21821-1-laurent.pinchart@ideasonboard.com>","date":"2022-11-20T17:20:30","name":"[libcamera-devel] pipeline: imx8-isi: Set SensorTimestamp metadata","commit_ref":"47c53f8084ed9e6e40cd2f8f74415472ccccef9c","pull_url":null,"state":"accepted","archived":false,"hash":"a4665ff0cf16ecd8e724ca1061d20ed77ec24460","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17818/mbox/","series":[{"id":3622,"url":"https://patchwork.libcamera.org/api/series/3622/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3622","date":"2022-11-20T17:20:30","name":"[libcamera-devel] pipeline: imx8-isi: Set SensorTimestamp metadata","version":1,"mbox":"https://patchwork.libcamera.org/series/3622/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17818/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17818/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id A232ABD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 20 Nov 2022 17:20:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 07B4E61F34;\n\tSun, 20 Nov 2022 18:20:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17D51603CE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 20 Nov 2022 18:20:46 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 859C330A;\n\tSun, 20 Nov 2022 18:20:45 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668964848;\n\tbh=NuNSyuVLS8nHm2AjXlahaTSwMrAG37xpv2FNf/n28ak=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=2mLLuSnss551SRSn6Na69awDQnZH4PllRc0frP7YLEsati8aV8qIHs6HzjX2Z52pj\n\tWLxMjRFENttylmVCWu+OEUJOhoxJ4ZmgMm76NV5laR/QytGCZ41YwRZgI1e18MguYC\n\tb27WEx61C59ZIU7bcE4LLfSVKf2vptB57qf0wtN1+l3H1cDAzWljq9U96mc5aoKc19\n\toX6qTydCESAw9yIt0V+5+7NntrAu63EUVDJltfjE19TRFlj54Kl+U3ngCaTSbeDpIf\n\tsKkBeXleQUWw7CSh5f9ZomHjtbS+v8PAK19pz3mG24gWg7EviETPqhTrNaaR3aCt/b\n\tiXNAh6ksd0uYQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1668964845;\n\tbh=NuNSyuVLS8nHm2AjXlahaTSwMrAG37xpv2FNf/n28ak=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=tVw/wAM5FZG5cxUsSKybisj0Omhe2UsVeatey7e3NNgCIL92b87AjQeUY+KBexFS3\n\t34ftmCSX/U+1LeQAiSd1LlbVQ+cN/CfI9cKeCRFS/9ozi2VlpEl5JzMrXiOeLshDeb\n\tJLjB0sunGQEuDThJuJuMNO+f4YWpUTq5/f8BcrUo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"tVw/wAM5\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Sun, 20 Nov 2022 19:20:30 +0200","Message-Id":"<20221120172030.21821-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.37.4","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] pipeline: imx8-isi: Set SensorTimestamp\n\tmetadata","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Report the sensor timestamp in metadata. Use the timestamp from the\nfirst buffer. Accuracy could be improved by using the frame start event\nfrom the CSI-2 receiver, but the kernel driver doesn't support it yet.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 ++++++\n 1 file changed, 6 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\nindex a3dfd3fc529c..e51457ebc345 100644\n--- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n+++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n@@ -994,6 +994,12 @@ void PipelineHandlerISI::bufferReady(FrameBuffer *buffer)\n {\n \tRequest *request = buffer->request();\n \n+\t/* Record the sensor's timestamp in the request metadata. */\n+\tControlList &metadata = request->metadata();\n+\tif (!metadata.contains(controls::SensorTimestamp.id()))\n+\t\tmetadata.set(controls::SensorTimestamp,\n+\t\t\t     buffer->metadata().timestamp);\n+\n \tcompleteBuffer(request, buffer);\n \tif (request->hasPendingBuffers())\n \t\treturn;\n","prefixes":["libcamera-devel"]}