Patch Detail
Show a patch.
GET /api/patches/17302/?format=api
{ "id": 17302, "url": "https://patchwork.libcamera.org/api/patches/17302/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17302/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220905073956.7342-7-naush@raspberrypi.com>", "date": "2022-09-05T07:39:55", "name": "[libcamera-devel,v2,6/7] pipeline: ipa: raspberrypi: Use IPA cookies", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "1627d54dc4777ac8bfb6465692048f7658cc74d6", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17302/mbox/", "series": [ { "id": 3471, "url": "https://patchwork.libcamera.org/api/series/3471/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3471", "date": "2022-09-05T07:39:49", "name": "Raspberry Pi AGC digial gain fixes", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3471/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17302/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17302/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 8433FC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 5 Sep 2022 07:40:11 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C46862076;\n\tMon, 5 Sep 2022 09:40:11 +0200 (CEST)", "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 723A76206A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 5 Sep 2022 09:40:09 +0200 (CEST)", "by mail-wm1-x331.google.com with SMTP id\n\ti188-20020a1c3bc5000000b003a7b6ae4eb2so7273595wma.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 05 Sep 2022 00:40:09 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tv16-20020a5d5910000000b00228a6ce17b4sm1342841wrd.37.2022.09.05.00.40.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 05 Sep 2022 00:40:07 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662363611;\n\tbh=HepHC9Nxj5KfTuENUVpqffKzK4BBpq4Gyfr3StYe2mw=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=aYslv1ZQrN7NJPWnFkd0hYkngRcR7hlQ7IDpS2o43guuW7KP/lEN/aqhQmM/nKQAC\n\tr39pA1TN8W9WgI0d+BvVBglghRY8r7JbEyKZDFo2B6sJXqXf4Sm3RBGMQNc+fOr9jO\n\t+7i5nlrn4eFhkmMfgldvwsYbfOSm5hjpDdjV9iAd64JkQrRBlIeyMnQZNFcLXyPjqS\n\tkriOr2AUFy4YAXi9yTlOEgfHJTNKztksQYdKWGutZlXPtQ0dq1McaDorZUbAOEB8rf\n\tLdtXNMkfxM766TUN/hQSLdJZFolUhrMmJhkkxs0F0QOapiAcoJ2uHeoKGdE4fES4Yu\n\t7bOepJOa69XZQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date;\n\tbh=wY8QaiimazJlQuDYAQIxMBOCIKxqVsqdc+VzLIYLd4A=;\n\tb=KIo9loSJ3iTAMNp3kjzcZff4CxcypzKBTtzoffglQh8hJxMrPOxyTNAio1TWACFtvE\n\tYybFm3tcTyxvCQzbSkBsxFk8xJAz+p5VlfEOkc2GpuqkW+O5wod0WF/h3xSR8kkVyZF2\n\tP+iwltl4UlsF3Rs7OyWSTB2E4fg95xLQM9WCipmH9RlGVoId9WzRVG++6lGd6xbw5Kwz\n\ttaGLHWynSvrLlBIalhzIp6drag8z6p797U+URzgyTeo/gfLGa5gfp/WMljJGBvYHjm5U\n\txEVUhrnuH4P9j2kj6CpmDEwFOIxK6QR/lQbHpw0z5ApSFrZtJ8CO7DG8s+wYYRMuWl47\n\tV51A==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"KIo9loSJ\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date;\n\tbh=wY8QaiimazJlQuDYAQIxMBOCIKxqVsqdc+VzLIYLd4A=;\n\tb=OzI4J+h/rfS1FTf1rYLXQlckG6ymmnl1AAIquHh7kymFV4bn3cD9ZYmjqBLHVIvFaM\n\tRTcqtzS2zu0JXtxjfh6jcrkO4oFo6esuJ+R1M0NhxxUqCm8nNijfc3BB+quF46D5kpBe\n\tlfHZrzIekWwuw5u/H5yu4j3JB1s96bKSce7dWDCwHGZCYe1+ek9tAIFFvfnFiCB9f/lM\n\the5GnC44YMMwEeLy7iw7schcN0YZ10OC5c/n1BzbYxFev40lW6Ar/iY3SSuJchl1V45h\n\t/kR3XUt1fl8/ceMjGinwGrLSk9xHFO+RO7m21n2w0Wz2PeM2nBE3x24nJwUqGARvP8EE\n\tPAJQ==", "X-Gm-Message-State": "ACgBeo0HUOhKY65UhgulpEuUTUSQscCRcz61trQBA8+QaLB2C1eRdmY3\n\tX0QaGXXGmYTWG3JK5Y66W5PAcH702J+anSjJ", "X-Google-Smtp-Source": "AA6agR5hSSxGq3UnLJLqJCF0i3e4Qzy+puCMbcgWj9lp8ghT9vYbI9A1xoDGCVgCcqfPHb5Fb7Bcwg==", "X-Received": "by 2002:a05:600c:1c95:b0:3a5:c28a:df3e with SMTP id\n\tk21-20020a05600c1c9500b003a5c28adf3emr10117329wms.40.1662363608666; \n\tMon, 05 Sep 2022 00:40:08 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 5 Sep 2022 08:39:55 +0100", "Message-Id": "<20220905073956.7342-7-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220905073956.7342-1-naush@raspberrypi.com>", "References": "<20220905073956.7342-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 6/7] pipeline: ipa: raspberrypi: Use\n\tIPA cookies", "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Pass an IPA cookie from the IPA to the pipeline handler through the\nsetDelayedControls signal. This cookie is the index of the current\nRPiController::Metadata context used for the frame. The cookie is subsequently\npassed into DelayedControls together with the controls to action.\n\nThe IPA cookie is then returned from DelayedControls when the frame with the\napplied controls has been returned from the sensor, and eventually passed back\nto the IPA from the signalIspPrepare signal.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom | 3 ++-\n src/ipa/raspberrypi/raspberrypi.cpp | 2 +-\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 +++++++-----\n 3 files changed, 10 insertions(+), 7 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex c0de435b7b33..fb806a1518d5 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -36,6 +36,7 @@ struct ISPConfig {\n \tuint32 bayerBufferId;\n \tbool embeddedBufferPresent;\n \tlibcamera.ControlList controls;\n+\tuint32 ipaCookie;\n };\n \n struct IPAConfig {\n@@ -136,5 +137,5 @@ interface IPARPiEventInterface {\n \trunIsp(uint32 bufferId);\n \tembeddedComplete(uint32 bufferId);\n \tsetIspControls(libcamera.ControlList controls);\n-\tsetDelayedControls(libcamera.ControlList controls);\n+\tsetDelayedControls(libcamera.ControlList controls, uint32 ipaCookie);\n };\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 63cccda901c1..0e80ef9c7b95 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -1144,7 +1144,7 @@ void IPARPi::processStats(unsigned int bufferId)\n \t\tControlList ctrls(sensorCtrls_);\n \t\tapplyAGC(&agcStatus, ctrls);\n \n-\t\tsetDelayedControls.emit(ctrls);\n+\t\tsetDelayedControls.emit(ctrls, metadataIdx_);\n \t}\n }\n \ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex d34a906c3cea..4d4c9e1fb9c4 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -208,7 +208,7 @@ public:\n \tvoid runIsp(uint32_t bufferId);\n \tvoid embeddedComplete(uint32_t bufferId);\n \tvoid setIspControls(const ControlList &controls);\n-\tvoid setDelayedControls(const ControlList &controls);\n+\tvoid setDelayedControls(const ControlList &controls, uint32_t ipaCookie);\n \tvoid setSensorControls(ControlList &controls);\n \tvoid unicamTimeout();\n \n@@ -259,6 +259,7 @@ public:\n \tstruct BayerFrame {\n \t\tFrameBuffer *buffer;\n \t\tControlList controls;\n+\t\tunsigned int ipaCookie;\n \t};\n \n \tstd::queue<BayerFrame> bayerQueue_;\n@@ -1784,9 +1785,9 @@ void RPiCameraData::setIspControls(const ControlList &controls)\n \thandleState();\n }\n \n-void RPiCameraData::setDelayedControls(const ControlList &controls)\n+void RPiCameraData::setDelayedControls(const ControlList &controls, uint32_t ipaCookie)\n {\n-\tif (!delayedCtrls_->push(controls))\n+\tif (!delayedCtrls_->push(controls, ipaCookie))\n \t\tLOG(RPI, Error) << \"V4L2 DelayedControl set failed\";\n \thandleState();\n }\n@@ -1848,13 +1849,13 @@ void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)\n \t\t * Lookup the sensor controls used for this frame sequence from\n \t\t * DelayedControl and queue them along with the frame buffer.\n \t\t */\n-\t\tauto [ctrl, cookie] = delayedCtrls_->get(buffer->metadata().sequence);\n+\t\tauto [ctrl, ipaCookie] = delayedCtrls_->get(buffer->metadata().sequence);\n \t\t/*\n \t\t * Add the frame timestamp to the ControlList for the IPA to use\n \t\t * as it does not receive the FrameBuffer object.\n \t\t */\n \t\tctrl.set(controls::SensorTimestamp, buffer->metadata().timestamp);\n-\t\tbayerQueue_.push({ buffer, std::move(ctrl) });\n+\t\tbayerQueue_.push({ buffer, std::move(ctrl), ipaCookie });\n \t} else {\n \t\tembeddedQueue_.push(buffer);\n \t}\n@@ -2148,6 +2149,7 @@ void RPiCameraData::tryRunPipeline()\n \tipa::RPi::ISPConfig ispPrepare;\n \tispPrepare.bayerBufferId = ipa::RPi::MaskBayerData | bayerId;\n \tispPrepare.controls = std::move(bayerFrame.controls);\n+\tispPrepare.ipaCookie = bayerFrame.ipaCookie;\n \n \tif (embeddedBuffer) {\n \t\tunsigned int embeddedId = unicam_[Unicam::Embedded].getBufferId(embeddedBuffer);\n", "prefixes": [ "libcamera-devel", "v2", "6/7" ] }