Show a patch.

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

{
    "id": 27489,
    "url": "https://patchwork.libcamera.org/api/patches/27489/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/27489/",
    "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": "<20260723154327.1357866-42-barnabas.pocze@ideasonboard.com>",
    "date": "2026-07-23T15:43:24",
    "name": "[RFC,v2,41/43] ipa: simple: Update controls after configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "10a5c22296ece69c26747aacf59d5af1d954d651",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/27489/mbox/",
    "series": [
        {
            "id": 6075,
            "url": "https://patchwork.libcamera.org/api/series/6075/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6075",
            "date": "2026-07-23T15:42:43",
            "name": "ipa: libipa: agc rework",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/6075/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/27489/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/27489/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 128F4C333A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Jul 2026 15:44:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A82C167F58;\n\tThu, 23 Jul 2026 17:44:26 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D3DC867F05\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Jul 2026 17:43:40 +0200 (CEST)",
            "from pb-laptop.local (185.182.215.156.nat.pool.zt.hu\n\t[185.182.215.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 06FD123B9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Jul 2026 17:42:39 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mSyubCDt\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1784821360;\n\tbh=vRgrIZrtaPKRBBGdq3Bnp2egkRCiS3SDlWQUkx3rZbU=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=mSyubCDt8gxAVa6VmW/U+6RC30MxWwo2L9DVCT1iZ1meNWug3Ej61G7Tw7a8WLVSn\n\t92bcLVkbOPGBGWEmmXxPKrCFnl9FDg5xLNRjGiYe/nAylm8pB2lFOZLQBscKPlgCWK\n\t2AWouBRtW9iOUI4UCGUIqDFpbHVzCRSMHJq1eYjY=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[RFC PATCH v2 41/43] ipa: simple: Update controls after\n\tconfiguration",
        "Date": "Thu, 23 Jul 2026 17:43:24 +0200",
        "Message-ID": "<20260723154327.1357866-42-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.55.0",
        "In-Reply-To": "<20260723154327.1357866-1-barnabas.pocze@ideasonboard.com>",
        "References": "<20260723154327.1357866-1-barnabas.pocze@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Update the control info map after the algorithms are reconfigured.\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n include/libcamera/internal/software_isp/software_isp.h | 3 ++-\n include/libcamera/ipa/soft.mojom                       | 2 +-\n src/ipa/simple/soft_simple.cpp                         | 7 +++++--\n src/libcamera/pipeline/simple/simple.cpp               | 2 +-\n src/libcamera/software_isp/software_isp.cpp            | 9 +++++----\n 5 files changed, 14 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h\nindex 4f72dce9b1..938d980906 100644\n--- a/include/libcamera/internal/software_isp/software_isp.h\n+++ b/include/libcamera/internal/software_isp/software_isp.h\n@@ -65,7 +65,8 @@ public:\n \n \tint configure(const StreamConfiguration &inputCfg,\n \t\t      const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs,\n-\t\t      const ipa::soft::IPAConfigInfo &configInfo);\n+\t\t      const ipa::soft::IPAConfigInfo &configInfo,\n+\t\t      ControlInfoMap *ipaControls);\n \n \tint exportBuffers(const Stream *stream, unsigned int count,\n \t\t\t  std::vector<std::unique_ptr<FrameBuffer>> *buffers);\ndiff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\nindex 77328c5fd5..3acac53981 100644\n--- a/include/libcamera/ipa/soft.mojom\n+++ b/include/libcamera/ipa/soft.mojom\n@@ -22,7 +22,7 @@ interface IPASoftInterface {\n \tstart() => (int32 ret);\n \tstop();\n \tconfigure(IPAConfigInfo configInfo)\n-\t\t=> (int32 ret);\n+\t\t=> (int32 ret, libcamera.ControlInfoMap ipaControls);\n \n \t[async] queueRequest(uint32 frame, libcamera.ControlList sensorControls);\n \t[async] computeParams(uint32 frame);\ndiff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\nindex 717b44cf6d..8b5df884d4 100644\n--- a/src/ipa/simple/soft_simple.cpp\n+++ b/src/ipa/simple/soft_simple.cpp\n@@ -59,7 +59,8 @@ public:\n \t\t const ControlInfoMap &sensorControls,\n \t\t ControlInfoMap *ipaControls,\n \t\t bool *ccmEnabled) override;\n-\tint configure(const IPAConfigInfo &configInfo) override;\n+\tint configure(const IPAConfigInfo &configInfo,\n+\t\t      ControlInfoMap *ipaControls) override;\n \n \tint start() override;\n \tvoid stop() override;\n@@ -198,7 +199,7 @@ int IPASoftSimple::init(const IPASettings &settings,\n \treturn 0;\n }\n \n-int IPASoftSimple::configure(const IPAConfigInfo &configInfo)\n+int IPASoftSimple::configure(const IPAConfigInfo &configInfo, ControlInfoMap *ipaControls)\n {\n \tcontext_.sensorControls = configInfo.sensorControls;\n \n@@ -251,6 +252,8 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo)\n \t\t<< context_.configuration.agc.againMax\n \t\t<< \" (\" << context_.configuration.agc.againMinStep << \")\";\n \n+\t*ipaControls = { ControlInfoMap::Map(context_.ctrlMap), controls::controls };\n+\n \treturn 0;\n }\n \ndiff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex e26f438d9a..3917aa897e 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -1605,7 +1605,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n \t} else {\n \t\tipa::soft::IPAConfigInfo configInfo;\n \t\tconfigInfo.sensorControls = data->sensor_->controls();\n-\t\treturn data->swIsp_->configure(inputCfg, outputCfgs, configInfo);\n+\t\treturn data->swIsp_->configure(inputCfg, outputCfgs, configInfo, &data->controlInfo_);\n \t}\n }\n \ndiff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex f6b345f6a5..a51e1a65c9 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -277,17 +277,18 @@ uint32_t SoftwareIsp::preferredInputStride(const PixelFormat &inputFormat, const\n  * \\brief Configure the SoftwareIsp object according to the passed in parameters\n  * \\param[in] inputCfg The input configuration\n  * \\param[in] outputCfgs The output configurations\n- * \\param[in] configInfo The IPA configuration data, received from the pipeline\n- * handler\n+ * \\param[in] configInfo The IPA configuration data, received from the pipeline handler\n+ * \\param[out] ipaControls The IPA controls to update\n  * \\return 0 on success, a negative errno on failure\n  */\n int SoftwareIsp::configure(const StreamConfiguration &inputCfg,\n \t\t\t   const std::vector<std::reference_wrapper<const StreamConfiguration>> &outputCfgs,\n-\t\t\t   const ipa::soft::IPAConfigInfo &configInfo)\n+\t\t\t   const ipa::soft::IPAConfigInfo &configInfo,\n+\t\t\t   ControlInfoMap *ipaControls)\n {\n \tASSERT(ipa_ && debayer_);\n \n-\tint ret = ipa_->configure(configInfo);\n+\tint ret = ipa_->configure(configInfo, ipaControls);\n \tif (ret < 0)\n \t\treturn ret;\n \n",
    "prefixes": [
        "RFC",
        "v2",
        "41/43"
    ]
}