Patch Detail
Show a patch.
GET /api/1.1/patches/17278/?format=api
{ "id": 17278, "url": "https://patchwork.libcamera.org/api/1.1/patches/17278/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17278/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220902120808.842-6-naush@raspberrypi.com>", "date": "2022-09-02T12:08:07", "name": "[libcamera-devel,v1,5/6] 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/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17278/mbox/", "series": [ { "id": 3459, "url": "https://patchwork.libcamera.org/api/1.1/series/3459/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3459", "date": "2022-09-02T12:08:02", "name": "Raspberry Pi AGC digial gain fixes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3459/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17278/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17278/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 D0BE0C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 2 Sep 2022 12:08:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9CCA361FF0;\n\tFri, 2 Sep 2022 14:08:23 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 59F2961FE4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 2 Sep 2022 14:08:20 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\tc131-20020a1c3589000000b003a84b160addso2517947wma.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 02 Sep 2022 05:08:20 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\th2-20020a5d4302000000b0021e51c039c5sm1397809wrq.80.2022.09.02.05.08.18\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 02 Sep 2022 05:08:18 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662120503;\n\tbh=BGta78LDjF7JV8+i1H+doqCf/m6mwDDIL7HTKbqQKc8=;\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=YYE1LfobIO6K4goW5nNAb/RdZR92hE9pid9aQuxrpju6mhG57xWPsNp2RQSnF+Bxz\n\txoJag172oYU+WzDQDuolYx55jwVdlxS7zugjcYzXiYip15z5xnJxCOHwiiIL4dG41A\n\tGfSzbajRbKAHT/3NO3ijxzOhTAoIfiCem6oiNaAy/he13+MXY0WeWCjQfs0TAJlA+w\n\tg9AXWGiayo8z9eyiiJ1+Z0CTgnh632dvf/bbGUyvm37MLdETJz5jGo4O0qzT/j8PJd\n\trhaXHY2RYjcNEr5Y3ptjZ5yyMMBpvmn5raplHqysOJJ7rJBSC1zsbwTZvTYNI4d78Z\n\t5vQLjC4ESAmZQ==", "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=i4Y4yviSj+cU6g+Xf/dahLktTgYTzN/ra6Hm4N5ijGQ=;\n\tb=BswpqBIKUxlQC5/10y9VRzPTNmZPzJLmutsOK1iRmWzvPM42fFW+mo7xwKs43Bvul7\n\t9PwXEhyRT+spaHOexOmHPYmbxT2O4LpvfkQOsMlfgu4yb8yf2Roe55ITtHwL/XDBvb4l\n\tz74eG01wdLgEtOJh2lk6K1CCkW5SyozC4oA/0XNh/TdDgGKGebXHMkPk3hP0qDMqPSnR\n\tK3x1vH9XTovXhNL2ttB8ZnJKtOjQAZMpoIcma7dGwVm2TSzN/7864cUimltXwSS0JFmk\n\tPdueuxfilnE5tFyTdujUM5vrVkO+K/3VtUQXvtSgWRWNS0xBBB3uRaVBbepaEvuN1f7x\n\tlJ3w==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"BswpqBIK\"; 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=i4Y4yviSj+cU6g+Xf/dahLktTgYTzN/ra6Hm4N5ijGQ=;\n\tb=V48G+eQiC5dGG7Yiy+Y91RfC+305PEp+/DFgH7k21/+e5tF1NN5Rvvhn9EWt0GvqJL\n\ttWkblydCAS7eMM8su9teGcrzIr/czmqM/HybqV6mbIdYiu7SKHqz5eJ1yiza62YO8tcP\n\tFjXIOsNiCLzAXOwA2g/P2+HSmDxdZEoREBiCDS+x122koSPuvxQa8pp/M0dm8P7mRq9R\n\tkLbZaPUGidcIvhrnX38k/W8zWNGcURTEYyjg8Z84YMpL3r0Zi2h3QZcwTYx6lw0WGSmB\n\tvG1WwnDbNdeP4Owl1nNZuvTAUwlg4PyUiAwKFM9xcrgtrY/kR93TCSDDeVGzDMZNpR/C\n\t8QLQ==", "X-Gm-Message-State": "ACgBeo0CmkSpaStzhYFxAW5DXErJrEMjLI8iEggdUaVylP4M9ngIGRN+\n\t+GU8ANb3EGTQMF/ZROKF70nz/hPBd6gQtgiP", "X-Google-Smtp-Source": "AA6agR4qCGlBwdtYM2znoHprbOCZPPQbDRdfdSMC54fQTbsqsbNmfGfhG/BFDz1dY3gCxYoSHUJdcw==", "X-Received": "by 2002:a05:600c:582:b0:3a5:4f7b:3146 with SMTP id\n\to2-20020a05600c058200b003a54f7b3146mr2644936wmd.152.1662120499715; \n\tFri, 02 Sep 2022 05:08:19 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 2 Sep 2022 13:08:07 +0100", "Message-Id": "<20220902120808.842-6-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220902120808.842-1-naush@raspberrypi.com>", "References": "<20220902120808.842-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 5/6] 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 424ca6c1c596..3faa3d490606 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", "v1", "5/6" ] }