Show a patch.

GET /api/patches/16431/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16431,
    "url": "https://patchwork.libcamera.org/api/patches/16431/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16431/",
    "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": "<20220629103018.4025635-6-chenghaoyang@google.com>",
    "date": "2022-06-29T10:30:14",
    "name": "[libcamera-devel,v3,5/9] ipu3: Update IPAIPU3Interface::fillParamsBuffer with captureBufferId",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "dd4ede7aa8c46b75fb19b2a440149b60565ebb31",
    "submitter": {
        "id": 117,
        "url": "https://patchwork.libcamera.org/api/people/117/?format=api",
        "name": "Cheng-Hao Yang",
        "email": "chenghaoyang@chromium.org"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/16431/mbox/",
    "series": [
        {
            "id": 3232,
            "url": "https://patchwork.libcamera.org/api/series/3232/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3232",
            "date": "2022-06-29T10:30:09",
            "name": "Use two imgus in ipu3 pipeline handler",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3232/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16431/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16431/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 3CA51BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Jun 2022 10:30:36 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C59D365635;\n\tWed, 29 Jun 2022 12:30:35 +0200 (CEST)",
            "from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com\n\t[IPv6:2607:f8b0:4864:20::1031])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D10E65631\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 12:30:30 +0200 (CEST)",
            "by mail-pj1-x1031.google.com with SMTP id\n\th9-20020a17090a648900b001ecb8596e43so15576075pjj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Jun 2022 03:30:30 -0700 (PDT)",
            "from chenghaoyang-low.c.googlers.com.com\n\t(208.158.221.35.bc.googleusercontent.com. [35.221.158.208])\n\tby smtp.gmail.com with ESMTPSA id\n\tjb4-20020a170903258400b00169071538a0sm10946059plb.267.2022.06.29.03.30.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 29 Jun 2022 03:30:28 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656498636;\n\tbh=522BI9487O+gF2B9gn8dxLTi51VfnY5JKZuEg2Hrl6s=;\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:Cc:\n\tFrom;\n\tb=ax3wUw8A7jb7kgPgX4ZAd/G9p76W3dnI3yDs6BSkCJASTKJ50sBS7RzYRlr+9tthw\n\tDzcSq5XE1pUEOJErP/SD+fLqYVTpkYsuuEXkJ0Til7B5FFX7XyE7If0Wv4vJXPeivD\n\ta1NDKeAp77Pq86IHpiQVKZoFFWbn0QLR1yfEcLCIU3KmkNHqWc/lTg+q7JnazoRrYx\n\t83OtGyYPNaM6KX12of+1Q1y+O9HDqBcPn5fw189dcsuWwfBml571HBXbUtFOeezbIy\n\ti2FjBAUfRzt5bC3TTyTZibuIc9xlHkd1dZahmDtQxVetu4QhtadLDWB66b6d9RLQNu\n\tcaFfC0tldMKqQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=UbbNcnO9GasdwFGniWaaPqU96QfmrN4OHi5sJ44cEWE=;\n\tb=ZkixFWKuTl31TE0ksaDMc1LJzK+RFqvuM+Unu7bHtR7psKqQ2AwNtb0cLndRbi0+uz\n\t4ikyaw5IIQX/KCBMQq0TdX54n1qe5HiFfTaypAtF5rGOtOJHSzk8tvvrxMu/VAcdB4bF\n\tV1uOawpkESW2lV4MVQmEq5O4t3Ye8V+2OH9EA="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"ZkixFWKu\"; \n\tdkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=UbbNcnO9GasdwFGniWaaPqU96QfmrN4OHi5sJ44cEWE=;\n\tb=QFm1x7aord0x37IqipJY2QrJrXdal8k6sd4IRafRIYqFYL+lOzzHLBeABG5FChQKpC\n\toUaPJx7DaVd027OWNq2tH3XnqvaigFAuzDj8IAmDwm3FEJ2cZ/1iih+n/OY4vJyDoNkK\n\tIRJqyyYjM5tbxQjwdEH+wpW/Qi55v/MNwlt7f8mEfylp9c3+hfvKhtU2/SrL1QJ4XCM+\n\tCOVwILrQU2+w6HLwNhTcogz67BPwj0F66OA0CMM7S/FX8RLiW0HWUGsq5jG0z/Ydy2k+\n\txjrKZfUfseRgPcAX6q1lzpFEJFKGpQmGPxkT5kzmFoBfNDSSD1eqjMUneo6wCWro1ngh\n\tmlJA==",
        "X-Gm-Message-State": "AJIora/2J3U4Ya6AGzZ7hOzU8hSI3wwjTokdkEzNx0zBrgwSwycwSRDS\n\tFPAL64jdlyNINOghJxFv3bAZ+MdcL/THw56e",
        "X-Google-Smtp-Source": "AGRyM1tUH9bdW8jbk9nkNuSyAi4GITFqr9+u4HHNaEQ0WElQ6BAKQeIklzffvGmz0tPhNbX50xPKgg==",
        "X-Received": "by 2002:a17:90b:4b41:b0:1ec:cb06:2fa3 with SMTP id\n\tmi1-20020a17090b4b4100b001eccb062fa3mr3045199pjb.55.1656498628641; \n\tWed, 29 Jun 2022 03:30:28 -0700 (PDT)",
        "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 29 Jun 2022 10:30:14 +0000",
        "Message-Id": "<20220629103018.4025635-6-chenghaoyang@google.com>",
        "X-Mailer": "git-send-email 2.37.0.rc0.161.g10f37bed90-goog",
        "In-Reply-To": "<20220629103018.4025635-1-chenghaoyang@google.com>",
        "References": "<20220629103018.4025635-1-chenghaoyang@google.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 5/9] ipu3: Update\n\tIPAIPU3Interface::fillParamsBuffer with captureBufferId",
        "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": "Harvey Yang via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Harvey Yang <chenghaoyang@chromium.org>",
        "Cc": "Harvey Yang <chenghaoyang@chromium.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Harvey Yang <chenghaoyang@chromium.org>\n\nThis patch updates the ipa interface |IPAIPU3Interface::fillParamsBuffer|\nwith additional |captureBufferId| to fill the param buffer for the\nStillCapture stream as well.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n include/libcamera/ipa/ipu3.mojom     |  2 +-\n src/ipa/ipu3/ipu3.cpp                | 21 ++++++++++++++++++---\n src/libcamera/pipeline/ipu3/ipu3.cpp |  3 ++-\n 3 files changed, 21 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom\nindex d1b1c6b8..d94c344e 100644\n--- a/include/libcamera/ipa/ipu3.mojom\n+++ b/include/libcamera/ipa/ipu3.mojom\n@@ -31,7 +31,7 @@ interface IPAIPU3Interface {\n \tunmapBuffers(array<uint32> ids);\n \n \t[async] queueRequest(uint32 frame, libcamera.ControlList controls);\n-\t[async] fillParamsBuffer(uint32 frame, uint32 bufferId);\n+\t[async] fillParamsBuffer(uint32 frame, uint32 bufferId, uint32 captureBufferId);\n \t[async] processStatsBuffer(uint32 frame, int64 frameTimestamp,\n \t\t\t\t   uint32 bufferId, libcamera.ControlList sensorControls);\n };\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex dd6cfd79..149a3958 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -146,7 +146,8 @@ public:\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \n \tvoid queueRequest(const uint32_t frame, const ControlList &controls) override;\n-\tvoid fillParamsBuffer(const uint32_t frame, const uint32_t bufferId) override;\n+\tvoid fillParamsBuffer(const uint32_t frame, const uint32_t bufferId,\n+\t\t\t      const uint32_t captureBufferId) override;\n \tvoid processStatsBuffer(const uint32_t frame, const int64_t frameTimestamp,\n \t\t\t\tconst uint32_t bufferId,\n \t\t\t\tconst ControlList &sensorControls) override;\n@@ -508,12 +509,14 @@ void IPAIPU3::unmapBuffers(const std::vector<unsigned int> &ids)\n /**\n  * \\brief Fill and return a buffer with ISP processing parameters for a frame\n  * \\param[in] frame The frame number\n- * \\param[in] bufferId ID of the parameter buffer to fill\n+ * \\param[in] bufferId ID of the video parameter buffer to fill\n+ * \\param[in] captureBufferId ID of the capture parameter buffer to fill\n  *\n  * Algorithms are expected to fill the IPU3 parameter buffer for the next\n  * frame given their most recent processing of the ImgU statistics.\n  */\n-void IPAIPU3::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n+void IPAIPU3::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId,\n+\t\t\t       const uint32_t captureBufferId)\n {\n \tauto it = buffers_.find(bufferId);\n \tif (it == buffers_.end()) {\n@@ -536,6 +539,18 @@ void IPAIPU3::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n \t */\n \tparams->use = {};\n \n+\tfor (auto const &algo : algorithms_)\n+\t\talgo->prepare(context_, params);\n+\n+\t// TODO: use different algorithms to set StillCapture params.\n+\tit = buffers_.find(captureBufferId);\n+\tif (it == buffers_.end()) {\n+\t\tLOG(IPAIPU3, Error) << \"Could not find capture param buffer!\";\n+\t\treturn;\n+\t}\n+\tmem = it->second.planes()[0];\n+\tparams = reinterpret_cast<ipu3_uapi_params *>(mem.data());\n+\tparams->use = {};\n \tfor (auto const &algo : algorithms_)\n \t\talgo->prepare(context_, params);\n \ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex a201c5ca..a13fb881 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1424,7 +1424,8 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)\n \tif (request->findBuffer(&rawStream_))\n \t\tpipe()->completeBuffer(request, buffer);\n \n-\tipa_->fillParamsBuffer(info->id, info->paramBuffer->cookie());\n+\tipa_->fillParamsBuffer(info->id, info->paramBuffer->cookie(),\n+\t\t\t       info->captureParamBuffer->cookie());\n }\n \n void IPU3CameraData::paramBufferReady(FrameBuffer *buffer)\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "5/9"
    ]
}