Show a patch.

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

{
    "id": 15901,
    "url": "https://patchwork.libcamera.org/api/patches/15901/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15901/",
    "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": "<20220512103258.324339-6-chenghaoyang@google.com>",
    "date": "2022-05-12T10:32:55",
    "name": "[libcamera-devel,5/8] Update IPAIPU3Interface::fillParamsBuffer with captureBufferId",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8bfc11cf385657007303cb791eb8e6c838af3097",
    "submitter": {
        "id": 117,
        "url": "https://patchwork.libcamera.org/api/people/117/?format=api",
        "name": "Cheng-Hao Yang",
        "email": "chenghaoyang@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15901/mbox/",
    "series": [
        {
            "id": 3111,
            "url": "https://patchwork.libcamera.org/api/series/3111/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3111",
            "date": "2022-05-12T10:32:50",
            "name": "Use two imgus in ipu3 pipeline handler",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3111/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15901/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15901/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 482E8C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 May 2022 10:33:15 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EB8B365669;\n\tThu, 12 May 2022 12:33:14 +0200 (CEST)",
            "from mail-pl1-x630.google.com (mail-pl1-x630.google.com\n\t[IPv6:2607:f8b0:4864:20::630])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F2EEB65656\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 May 2022 12:33:12 +0200 (CEST)",
            "by mail-pl1-x630.google.com with SMTP id d22so4452922plr.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 May 2022 03:33:12 -0700 (PDT)",
            "from chenghaoyang-low.c.googlers.com.com\n\t(174.71.80.34.bc.googleusercontent.com. [34.80.71.174])\n\tby smtp.gmail.com with ESMTPSA id\n\tt19-20020a62d153000000b005087c23ad8dsm3402219pfl.0.2022.05.12.03.33.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 12 May 2022 03:33:10 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652351594;\n\tbh=NmvPGRWZ8BHkKJ+CL/GqZwQR9gt2UjFZgPCTRdQ7tY0=;\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=SJmaAAqcprj8EEBPop/zbjeKA9GIEY0LMJOnYtasTp8QPmjOvcqTPMXCvt7NW5D2/\n\tQOX1BOFjqNnpNm1VEe0lyRrYrUXe1Wnz749BbwyYNmBxPE5XkuVsXv5Xmb1+KIPTUk\n\t7RyrYlg7Wu2rxzVsuCjgw7Mrup9p5XGoDfNcyL78I6NqxyNNG0jdiQCDEnfBZnhkPA\n\thklxmyHIuDEoAAi1k3XrnqvBTMwHUIOf3a7EcuKyVuHOVEjQAEQfVxFiLA9Lg3npkh\n\tukgVUycyBU1kk2M9bA+9Cw1abv55U7Iw0cfds/ornuuLSgwy7DEPZm9vCNKHnbBDvl\n\tR0l2W8k65pASw==",
            "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=wq1C41Z7au0ZywRuZwrAMRj2QMMsSgjjchnT4sVEoaA=;\n\tb=Y2L6SgJSWArSGmqA51+l0y0KLmtXa7GAPxQ6yj2rtu9xaH/RJpbbIqF+zWoat7Vrkz\n\tLyuc1WX6f63xXOW5mdFZR2ckI+VdJAAsYiK9uGVdlP3QGqbKh/xn4Nv40EggBz00lND/\n\t48E93/Gc5AsUYMdZR0h30pHKN5g/BiMvxattI="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"Y2L6SgJS\"; \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=wq1C41Z7au0ZywRuZwrAMRj2QMMsSgjjchnT4sVEoaA=;\n\tb=vX7czXHhl9Dw2BL/NGY9YB7pvDbu+5jtP5kAzC+xTmPGxGVGWuE8G6vn2PCwDNOnoC\n\td2PO8dzJU20ZX6LdTyiBQJzUaH5jt8n/73/HsSqYo6e6XHVTN5+5B2Wc2XhvMzawbcWQ\n\tkfGdghspLXREk4qZD5+xn0JUHbsx+fkXKl4xGFL0wHFBBTUnN71yPEigkA5eiEHMHYbR\n\t76XddIuwmEVR4rqcNNgaqcxTcqSbKPNJdkXOlpxNX4c4ZMuRyI3rQcePlpbgyDvE3p9p\n\tYcDl4yZz7Q3oicMMc5hzezxRvISmsUTBR1PJ94jKR1vxzoK1SiWHziCxB3SkMrvDSIb0\n\tar0w==",
        "X-Gm-Message-State": "AOAM531oHh33p8hXoce2ZLUjoL2XJYDJa6ZLuHstqrkE3/k/u4zvOiK5\n\tweHvdZALhwUdUiU85/dSiuEIxmsDB8Xmwn/Y",
        "X-Google-Smtp-Source": "ABdhPJx1t5pUAcmb8Dg1BoKKPS7nu+3vq4LBSMGRwaY4SSuTHaGGrtA9Hba2xJNlkI5Gk4sNuIidVA==",
        "X-Received": "by 2002:a17:90b:33cd:b0:1dc:c9b9:2a6e with SMTP id\n\tlk13-20020a17090b33cd00b001dcc9b92a6emr10152025pjb.86.1652351591102; \n\tThu, 12 May 2022 03:33:11 -0700 (PDT)",
        "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 12 May 2022 10:32:55 +0000",
        "Message-Id": "<20220512103258.324339-6-chenghaoyang@google.com>",
        "X-Mailer": "git-send-email 2.36.0.512.ge40c2bad7a-goog",
        "In-Reply-To": "<20220512103258.324339-1-chenghaoyang@google.com>",
        "References": "<20220512103258.324339-1-chenghaoyang@google.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 5/8] 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\nStillCapture 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                | 19 ++++++++++++++++---\n src/libcamera/pipeline/ipu3/ipu3.cpp |  2 +-\n 3 files changed, 18 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..b0cc8cd7 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -146,7 +146,7 @@ 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, 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 +508,13 @@ 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, const uint32_t captureBufferId)\n {\n \tauto it = buffers_.find(bufferId);\n \tif (it == buffers_.end()) {\n@@ -536,6 +537,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 b635976b..8ce1968f 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1420,7 +1420,7 @@ 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(), info->captureParamBuffer->cookie());\n }\n \n void IPU3CameraData::paramBufferReady(FrameBuffer *buffer)\n",
    "prefixes": [
        "libcamera-devel",
        "5/8"
    ]
}