{"id":10343,"url":"https://patchwork.libcamera.org/api/patches/10343/?format=json","web_url":"https://patchwork.libcamera.org/patch/10343/","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":"<20201105001546.1690179-7-niklas.soderlund@ragnatech.se>","date":"2020-11-05T00:15:41","name":"[libcamera-devel,06/11] libcamera: ipu3: cio2: Generate start of frame event","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"8de8c3efaf8bae9f27e5e03e0e3f02611e80fb26","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":{"id":16,"url":"https://patchwork.libcamera.org/api/users/16/?format=json","username":"neg","first_name":"Niklas","last_name":"Söderlund","email":"niklas.soderlund@ragnatech.se"},"mbox":"https://patchwork.libcamera.org/patch/10343/mbox/","series":[{"id":1447,"url":"https://patchwork.libcamera.org/api/series/1447/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1447","date":"2020-11-05T00:15:35","name":"libcamera: ipu3: Attach to an skeleton IPA","version":1,"mbox":"https://patchwork.libcamera.org/series/1447/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10343/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10343/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 12C7FBE081\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Nov 2020 00:16:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3BCBC62CE8;\n\tThu,  5 Nov 2020 01:16:21 +0100 (CET)","from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1844062C8E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Nov 2020 01:16:19 +0100 (CET)","from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de\n\t[79.202.36.88])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 6d432969-1efa-11eb-8a9c-005056917a89;\n\tThu, 05 Nov 2020 01:04:09 +0100 (CET)"],"X-Halon-ID":"6d432969-1efa-11eb-8a9c-005056917a89","Authorized-sender":"niklas.soderlund@fsdn.se","From":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  5 Nov 2020 01:15:41 +0100","Message-Id":"<20201105001546.1690179-7-niklas.soderlund@ragnatech.se>","X-Mailer":"git-send-email 2.29.2","In-Reply-To":"<20201105001546.1690179-1-niklas.soderlund@ragnatech.se>","References":"<20201105001546.1690179-1-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 06/11] libcamera: ipu3: cio2: Generate\n\tstart of frame event","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>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Propagate the frameStart event whenever the CSI-2 receiver in the CIO2\npipeline generates one.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/pipeline/ipu3/cio2.cpp | 18 +++++++++++++++---\n src/libcamera/pipeline/ipu3/cio2.h   |  3 ++-\n 2 files changed, 17 insertions(+), 4 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp\nindex 1c7b9676f52abdb6..1eca674da339b8e0 100644\n--- a/src/libcamera/pipeline/ipu3/cio2.cpp\n+++ b/src/libcamera/pipeline/ipu3/cio2.cpp\n@@ -247,15 +247,27 @@ int CIO2Device::start()\n \t\tavailableBuffers_.push(buffer.get());\n \n \tret = output_->streamOn();\n-\tif (ret)\n+\tif (ret) {\n \t\tfreeBuffers();\n+\t\treturn ret;\n+\t}\n \n-\treturn ret;\n+\tret = csi2_->setFrameStartEnabled(true);\n+\tif (ret) {\n+\t\tstop();\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n }\n \n int CIO2Device::stop()\n {\n-\tint ret = output_->streamOff();\n+\tint ret;\n+\n+\tcsi2_->setFrameStartEnabled(false);\n+\n+\tret = output_->streamOff();\n \n \tfreeBuffers();\n \ndiff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h\nindex e8b491a0c104a3e2..67fede4e3b4e9fb6 100644\n--- a/src/libcamera/pipeline/ipu3/cio2.h\n+++ b/src/libcamera/pipeline/ipu3/cio2.h\n@@ -13,6 +13,7 @@\n \n #include <libcamera/signal.h>\n \n+#include \"libcamera/internal/v4l2_subdevice.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n namespace libcamera {\n@@ -24,7 +25,6 @@ class PixelFormat;\n class Request;\n class Size;\n class SizeRange;\n-class V4L2Subdevice;\n struct StreamConfiguration;\n \n class CIO2Device\n@@ -56,6 +56,7 @@ public:\n \tvoid tryReturnBuffer(FrameBuffer *buffer);\n \tSignal<FrameBuffer *> &bufferReady() { return output_->bufferReady; }\n \n+\tSignal<uint32_t> &frameStart() { return csi2_->frameStart; }\n private:\n \tvoid freeBuffers();\n \n","prefixes":["libcamera-devel","06/11"]}