Patch Detail
Show a patch.
GET /api/1.1/patches/17403/?format=api
{ "id": 17403, "url": "https://patchwork.libcamera.org/api/1.1/patches/17403/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17403/", "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": "<20220926095737.30506-7-naush@raspberrypi.com>", "date": "2022-09-26T09:57:36", "name": "[libcamera-devel,v3,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/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17403/mbox/", "series": [ { "id": 3503, "url": "https://patchwork.libcamera.org/api/1.1/series/3503/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3503", "date": "2022-09-26T09:57:30", "name": "Raspberry Pi AGC digital gain fixes", "version": 3, "mbox": "https://patchwork.libcamera.org/series/3503/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17403/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17403/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 8B405BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Sep 2022 09:58:14 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 433B06225D;\n\tMon, 26 Sep 2022 11:58:14 +0200 (CEST)", "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3CF7962257\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 11:58:13 +0200 (CEST)", "by mail-wm1-x32d.google.com with SMTP id t4so4096411wmj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 02:58:13 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tp22-20020a05600c419600b003a4efb794d7sm10160671wmh.36.2022.09.26.02.58.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Sep 2022 02:58:11 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664186294;\n\tbh=Pm0asb9k6Zx7lke8Ff6P78qNyo908O1gaFveL/DwuZo=;\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=Vp04PZgI6Tp+hjYK6HjnzuGRnL6W0iYpIN4dzZqqjAYBztSIm6XnVnu8A13Z0UmPj\n\tGXoSNKxpN6VXGFkKBKEp6+8m50isld1t493aEFGEjXxtfKIOHRJh+8fISHsVvXBYIF\n\tOwFMhWWmvjPWvxrweJJyHeEtczh72T0uGFY1Paf+Qbp3FsJvJ0pS+PvwjzTxmLj1sU\n\tmzWM4a4nOXgACdUopMWqEYnQXTrTFk0r+X+rV8trA8fIK4J1RWsdcxFaCBD90lpaWB\n\t+yvg3o0zn9Dz1Rxc/ViO+zrbNx9okS2i2VzHXV8/c62CrYuumtXzH8ZWJZv7f0L4jy\n\tqsVT1HmQlkUGQ==", "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=L7BGo9XsieqoGsVj+4OcyYvMZVvrKWhrge2dYXTBIuo=;\n\tb=Sdu/uremNEz5jvfA2T9sEo0BH99rJQVkDhZvGc6jh2PLCzguVTCOUnxVJuG18I/Vzr\n\t364ftmWggUnmrhCpBQD8g95hnxDI6mNvSNppix7Ed0+YAJwksBRWRSqJKZcmcPUztsp+\n\t+NqgTFInznc9JLT1XhJQv0FUDa8TXDWDkmgW5KrXmm4eeXjWsIu+tiahmR5ztFIVVqZU\n\tJH5NLoUCdZdlxEGHfeuDtaNDDInpSpZj5uj4/dQFaf4zalQZC6gFBaNI117F1zTYkn0z\n\tjjAdUdYnpVGc8lDYV8qAMBAcrwMXyVPm85TwEj9ifQiMyH3wRZn2tqyOr2iMRAkMjZH4\n\tw1/g==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Sdu/urem\"; 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=L7BGo9XsieqoGsVj+4OcyYvMZVvrKWhrge2dYXTBIuo=;\n\tb=h+elmFFDa3pdYrqalrxq3r5q434otUuSUWXFjtll77+wr4AVxqFDqvUFH9Z781C1pw\n\tI4JhqtUH+IKzdA68AedTXKtbbZ5qfcYEi6zJIS/WjATvhUf+ABknUWS+RH4CZGTj9jaj\n\tJNvtY3oZfywRrkXenVALGUP3CnwFKaZAW8rBMoiqkeO6PlaySGRsc7mtG45tBzHHOt8t\n\tnPNtd0RxGupqKJQKHNPbWD2UAh/3qZyf19HDPm/t5U/cRhA0UsK4H7TukQJEjl8A8tu/\n\t9XHaIPJ8aP32Qly+H3gRHDG4IRQ9zoczZaOLLp2DViAIPiLmGpgz4Owb4h/RD7kf6IUY\n\tqRtA==", "X-Gm-Message-State": "ACrzQf3U4N5S5uTWaq+cM23IMVuAvfEVcELosHEgfOImLBAHJXHuGyNy\n\tsU1wyfvKXr3K3yuNStSaWtxgv9ppEzq94K4P", "X-Google-Smtp-Source": "AMsMyM6q1LUnJLKdpjXBc9ftbZsRF19nVHUQFftl7l4qR4jzwOibb8JrS4JXCJ9vQNQvgTCT5p3N4A==", "X-Received": "by 2002:a05:600c:5114:b0:3b5:428:cf67 with SMTP id\n\to20-20020a05600c511400b003b50428cf67mr14209848wms.80.1664186292827; \n\tMon, 26 Sep 2022 02:58:12 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 26 Sep 2022 10:57:36 +0100", "Message-Id": "<20220926095737.30506-7-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220926095737.30506-1-naush@raspberrypi.com>", "References": "<20220926095737.30506-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 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>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nTested-by: David Plowman <david.plowman@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 39e69d748693..09680a72f58a 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@@ -264,6 +264,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@@ -1789,9 +1790,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@@ -1864,13 +1865,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@@ -2165,6 +2166,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", "v3", "6/7" ] }