Show a patch.

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

{
    "id": 16054,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16054/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16054/",
    "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": "<20220526082737.1081262-6-chenghaoyang@google.com>",
    "date": "2022-05-26T08:27:33",
    "name": "[libcamera-devel,v2,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/1.1/people/117/?format=api",
        "name": "Cheng-Hao Yang",
        "email": "chenghaoyang@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16054/mbox/",
    "series": [
        {
            "id": 3141,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3141/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3141",
            "date": "2022-05-26T08:27:28",
            "name": "Use two imgus in ipu3 pipeline handler",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3141/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16054/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16054/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 0A561BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 May 2022 08:27:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AF59765674;\n\tThu, 26 May 2022 10:27:57 +0200 (CEST)",
            "from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com\n\t[IPv6:2607:f8b0:4864:20::102b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D40265662\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 May 2022 10:27:54 +0200 (CEST)",
            "by mail-pj1-x102b.google.com with SMTP id\n\tnn3-20020a17090b38c300b001e0e091cf03so512361pjb.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 May 2022 01:27:54 -0700 (PDT)",
            "from chenghaoyang-low.c.googlers.com.com\n\t(21.160.199.104.bc.googleusercontent.com. [104.199.160.21])\n\tby smtp.gmail.com with ESMTPSA id\n\tm2-20020a170902bb8200b0016191b843e2sm834429pls.235.2022.05.26.01.27.51\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 May 2022 01:27:52 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653553677;\n\tbh=9kwnulspX2JdSQLq+n+ENLikAD05iVOpEntcGl8F45M=;\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=dH4Pwc5BqiMN2b0pIzyZ2VB87m/fQSidaTVpMZ8iviLYuqB5J/VVZNr/Q1mAKFSTz\n\tW0JIR80tueP6YXeYBzZHzlaB+FP/uVz+Cbw8kQIBFRwlsnsBPBuHg9buoSVxPV92sH\n\tGuBnF6P83xSP+ubgRkr5DijYS5V1mWlQVgZVMtOefJxHC4ipfeDpN2DElhVEi8x4aG\n\t5638n17F/lqkbQE1TtZbZIRMvKIlPdGeNFT9t8PwLo6mDxn9ZAilk/kxM0tAALhnsc\n\t1jmxlOINbdT9749qRDHarNunq1s1RQ/THcL48hMiZCAil0aLaJDVgphTdQ59H38mMm\n\tjuubHneu6kofw==",
            "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=tQ4Bk1UrTuHyfOQZJWawRUAEwBR8cQQ227PIgGGKTiw=;\n\tb=YOHv6UmXZoebsEk+Wlf+2cN9ugSFnYsLpRNy9Pv1nvDokjDuu72dPM/LJUbYprSfBl\n\tmcUtYWYKiXzmrlZhUXQoi2UBGq/+7W0lx2+y046H1nFcjfUFJVGmnHKIijc7Zzaie8bB\n\tkEvBTVnY7yXzy47ofFf83V8+SOZfWWeNpuHqM="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"YOHv6UmX\"; \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=tQ4Bk1UrTuHyfOQZJWawRUAEwBR8cQQ227PIgGGKTiw=;\n\tb=17V82rnk6fuRO2Gjb0cCiIEw91xnU40LV9v77l12oTvc781WwqqVExrFuCE/3s33Ra\n\tCb3tn3cl48Wb/Z2Z26PNACw8ojzl5qKo4EK7D5ksQ0w7HQSf76X1Ocp5HTV8+qZff2et\n\tA4C+wW+O082ekjt8QOmClxHdb9dlH/QCDu+z9nixo9mElyE33OiVL9aaJ9cHKo/clbcs\n\tbrfToKrcKTBq4dR6W0q1mIvyCSM6EVfGfFRJnFFJK87g7B2Xq5cy+CN2i4rZaQ9bUvgV\n\tMkqHh3wuNW43eNFgkQodUK6aGcUiLvNqI2zCfSIF1FrUjdwHr+TZwh6GTmO+4IkaKs8I\n\tvsaQ==",
        "X-Gm-Message-State": "AOAM5321EUN51EZdCvGr5gRL8l1TNgk+vrJJdP5KTvHaNSW1nNLYuGW6\n\t4DQ/nKbFbZNwDNvkXuoqqtY+crPJRgc3A6Yo",
        "X-Google-Smtp-Source": "ABdhPJzpuBPVUwRfD2XKeTMi9Azj9wc40pxC+tPBLdG8WzdqL87cyh3NrD+uis5uadVtGcwL3ZCosA==",
        "X-Received": "by 2002:a17:902:8693:b0:161:e28f:f85f with SMTP id\n\tg19-20020a170902869300b00161e28ff85fmr34083178plo.17.1653553672682; \n\tThu, 26 May 2022 01:27:52 -0700 (PDT)",
        "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 26 May 2022 08:27:33 +0000",
        "Message-Id": "<20220526082737.1081262-6-chenghaoyang@google.com>",
        "X-Mailer": "git-send-email 2.36.1.124.g0e6072fb45-goog",
        "In-Reply-To": "<20220526082737.1081262-1-chenghaoyang@google.com>",
        "References": "<20220526082737.1081262-1-chenghaoyang@google.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 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",
        "v2",
        "5/9"
    ]
}