Show a patch.

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

{
    "id": 20207,
    "url": "https://patchwork.libcamera.org/api/patches/20207/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20207/",
    "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": "<20240605095417.157703-3-stefan.klug@ideasonboard.com>",
    "date": "2024-06-05T09:53:50",
    "name": "[v4,2/3] ipa: rkisp1: Fix algorithm controls vanish after configure",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "66be035ed7a64f7965d32d13a8b2361507ecc4c9",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20207/mbox/",
    "series": [
        {
            "id": 4363,
            "url": "https://patchwork.libcamera.org/api/series/4363/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4363",
            "date": "2024-06-05T09:53:48",
            "name": "libcamera: Add gamma control for rkisp1",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4363/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20207/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20207/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 2190EC32C8\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  5 Jun 2024 09:54:32 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9FAB365443;\n\tWed,  5 Jun 2024 11:54:31 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D7366543A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Jun 2024 11:54:29 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:dcc4:f2dc:93ce:ff8f])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A615214B0;\n\tWed,  5 Jun 2024 11:54:20 +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=\"n7zab9GK\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1717581260;\n\tbh=6y6ZrqxFyeo04yqZlQiP45swXL8m+qZ7N1myOnzNink=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=n7zab9GKrPOEotV4fHHzWKcWll2Y41bGP77u5i/h6SCWO2G/GOqN//+KP+9kPMGSC\n\tvf9JTpbhTJsNTYYryrerk1LjcGCeIySTTqy3uFo6mlK3hXMIeWi2VMheosTnYggVFM\n\tSitHpMwFyBLULLSjSUJkJWxAoVNZCgdG/cmEdaeM=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH v4 2/3] ipa: rkisp1: Fix algorithm controls vanish after\n\tconfigure",
        "Date": "Wed,  5 Jun 2024 11:53:50 +0200",
        "Message-ID": "<20240605095417.157703-3-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240605095417.157703-1-stefan.klug@ideasonboard.com>",
        "References": "<20240605095417.157703-1-stefan.klug@ideasonboard.com>",
        "MIME-Version": "1.0",
        "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": "std::unordered_map::merge(source) has the side effect of actually moving items\nfrom source to target. In this case the controls were removed from the source\nmaps on the first call to updateControls() and on the second call to\nupdateControls() they were missing in the source maps and therefore also\nremoved from the camera. Fix this by using insert() instead of merge(). This is\nmost likely cheaper than copy-contructing the source map.\n\nFixes: 4c5152843a2a (\"ipa: rkisp1: Derive rkisp1::algorithms::Agc from AgcMeanLuminance\")\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/rkisp1/rkisp1.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 6687c91e7fb0..17474408ed2d 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -427,7 +427,7 @@ void IPARkISP1::updateControls(const IPACameraSensorInfo &sensorInfo,\n \t\t\t\t\t\t\t      frameDurations[1],\n \t\t\t\t\t\t\t      frameDurations[2]);\n \n-\tctrlMap.merge(context_.ctrlMap);\n+\tctrlMap.insert(context_.ctrlMap.begin(), context_.ctrlMap.end());\n \t*ipaControls = ControlInfoMap(std::move(ctrlMap), controls::controls);\n }\n \n",
    "prefixes": [
        "v4",
        "2/3"
    ]
}