Show a patch.

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

{
    "id": 18153,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/18153/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18153/",
    "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": "<20230119104544.9456-6-naush@raspberrypi.com>",
    "date": "2023-01-19T10:45:35",
    "name": "[libcamera-devel,v1,05/14] ipa: mojom: raspberrypi: Add setLensControls() function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "d4c3978af07987605a05d2ffa2bf98c544e2b7c4",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/18153/mbox/",
    "series": [
        {
            "id": 3715,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3715/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3715",
            "date": "2023-01-19T10:45:30",
            "name": "Raspberry Pi: Camera Module 3 support",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3715/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18153/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18153/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 7B8BBBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Jan 2023 10:46:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 36BC0625E7;\n\tThu, 19 Jan 2023 11:46:03 +0100 (CET)",
            "from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com\n\t[IPv6:2a00:1450:4864:20::32b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CC884625D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Jan 2023 11:45:55 +0100 (CET)",
            "by mail-wm1-x32b.google.com with SMTP id\n\tf25-20020a1c6a19000000b003da221fbf48so930893wmc.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Jan 2023 02:45:55 -0800 (PST)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tbe12-20020a05600c1e8c00b003db06224953sm5332029wmb.41.2023.01.19.02.45.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 19 Jan 2023 02:45:54 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674125163;\n\tbh=Z7uwyphfvKrxAl1sUiyXPfIEf0yE2/sei9hxLIxwL5s=;\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=OuKzBUjrG4WZXamBBWfPD33BJjyiifQ1G0Q+cvZRDgfR+yU+J+y7xyZaAqR+FdWuD\n\tE6UhNTp/dM3BQsaodm2GCHEafCFwuzpkXr/E9r76YaJ2R30TOqdzTz08SFf594C6T5\n\tNjpyPPAoEf6Oymiwee8zaT4vTjodudlycyCNGnT1noMoHfHZPy9DQ7GOmTmDuMPw+H\n\tOv3r5gZhlyqVJ1MxbIQ8C2Vdt+4RHOKtzS9ynHJjSGffwCvEAi+94y9sdRZiayJU4D\n\tahUljIQwcAV25Bw63/ur8uFDx2ndzOez8a+G8YuaESnNkIO02Zp9nfNf3OioJuuFGg\n\tNfBD5RUa/i2OA==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=U1bnmtoEMhqsz9Hz00T1Qcn/t0Zjag+OzSmEPXGAjYY=;\n\tb=F00HXyhxa4U3TNhhneHXu8krzt3WvunE0DuiITPxiwnzV39JVPqew09ZckTUSy9UbO\n\tDDE3lfh9EGLWAaUrjWUZNUl52pS8zX8z0/ve9TqvTmJpny5jk3ACl7iGG4gISLHq5YSY\n\twjJDYFSbyxLRGXdDMbsVLPLVHxG0A25TYTSEOgjSruNMzYJ0azJA9I+O48AopHjr6hf0\n\t3j8L065HSGkTLYu62R0YJJmChg55cMFHryXXz4zmQl9DMKM7RrcDFTFLaVUc3bPazi0l\n\tgqyz/9am5olcemRPIwMPY5e0bCg2z94ek1qrnTCtZaRUYKcNxZ54Kp32eztTVbL7g8o7\n\tMM0w=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"F00HXyhx\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=U1bnmtoEMhqsz9Hz00T1Qcn/t0Zjag+OzSmEPXGAjYY=;\n\tb=FN3WCLsL4o9kRp/7sESScr2qmomblNoec4vIUX1aRJY9NBjtDqakkiaRBW+FMA+/Cu\n\t/9rsMHpFp9eorvYHCZKCgeCh3b3ZF9uNh1KXbOtieOdfHAKXtwzNMtr8LEl2ofSKwcu3\n\t1SsmdUn12nWQxHJzIg//Ckrmc3JtbRWahgylgmiJhSV8wZtXK2bs7wQYJulml7oEo2/b\n\tmIEQrmBGMpbbE+4o1rJ0YcqR6j5m5piYKMfufC0F4J3SlWPCLOhoLJ1GxeZC4w6hci+1\n\toD9uETNjr9peYCemy1qm5FMen+3/ZjRtTz5cunaUGhgk+4k2vPr3U7Zcd/CJFSYhvoUa\n\tb1Cg==",
        "X-Gm-Message-State": "AFqh2koVwh3QMYBHaPnhJEYeWVFKquF0dUyykY7aca3ydBy819yluWBX\n\trQoPLC3R9oK6wnPdo/hQ+Yki8ot6Qe5yahN2Jrs=",
        "X-Google-Smtp-Source": "AMrXdXuacn+Spk4enVBpqsE/97tITtDC01cjIZmvbcFnYs/eN8A4xj19HMapxQi5R+uzbP4a60OIrA==",
        "X-Received": "by 2002:a1c:7415:0:b0:3da:fd07:1e3 with SMTP id\n\tp21-20020a1c7415000000b003dafd0701e3mr9417615wmc.22.1674125155200; \n\tThu, 19 Jan 2023 02:45:55 -0800 (PST)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 19 Jan 2023 10:45:35 +0000",
        "Message-Id": "<20230119104544.9456-6-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230119104544.9456-1-naush@raspberrypi.com>",
        "References": "<20230119104544.9456-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1 05/14] ipa: mojom: raspberrypi: Add\n\tsetLensControls() function",
        "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Cc": "Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>\n\nAdd a setLensControls() function to the IPA/pipeline handler interface. This\nwill be used in a future commit to control the lens actuator position from an\nautofocus algorithm.\n\nSigned-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/ipa/raspberrypi.mojom            |  1 +\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++++++++\n 2 files changed, 13 insertions(+)",
    "diff": "diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\nindex bfacd1275bfb..8e78f167f179 100644\n--- a/include/libcamera/ipa/raspberrypi.mojom\n+++ b/include/libcamera/ipa/raspberrypi.mojom\n@@ -131,4 +131,5 @@ interface IPARPiEventInterface {\n \tembeddedComplete(uint32 bufferId);\n \tsetIspControls(libcamera.ControlList controls);\n \tsetDelayedControls(libcamera.ControlList controls, uint32 delayContext);\n+\tsetLensControls(libcamera.ControlList controls);\n };\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 249dedcd8c09..77719db57e44 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -208,6 +208,7 @@ public:\n \tvoid embeddedComplete(uint32_t bufferId);\n \tvoid setIspControls(const ControlList &controls);\n \tvoid setDelayedControls(const ControlList &controls, uint32_t delayContext);\n+\tvoid setLensControls(const ControlList &controls);\n \tvoid setSensorControls(ControlList &controls);\n \tvoid unicamTimeout();\n \n@@ -1589,6 +1590,7 @@ int RPiCameraData::loadIPA(ipa::RPi::IPAInitResult *result)\n \tipa_->embeddedComplete.connect(this, &RPiCameraData::embeddedComplete);\n \tipa_->setIspControls.connect(this, &RPiCameraData::setIspControls);\n \tipa_->setDelayedControls.connect(this, &RPiCameraData::setDelayedControls);\n+\tipa_->setLensControls.connect(this, &RPiCameraData::setLensControls);\n \n \t/*\n \t * The configuration (tuning file) is made from the sensor name unless\n@@ -1835,6 +1837,16 @@ void RPiCameraData::setDelayedControls(const ControlList &controls, uint32_t del\n \thandleState();\n }\n \n+void RPiCameraData::setLensControls(const ControlList &controls)\n+{\n+\tCameraLens *lens = sensor_->focusLens();\n+\n+\tif (lens && controls.contains(V4L2_CID_FOCUS_ABSOLUTE)) {\n+\t\tControlValue const &focusValue = controls.get(V4L2_CID_FOCUS_ABSOLUTE);\n+\t\tlens->setFocusPosition(focusValue.get<int32_t>());\n+\t}\n+}\n+\n void RPiCameraData::setSensorControls(ControlList &controls)\n {\n \t/*\n",
    "prefixes": [
        "libcamera-devel",
        "v1",
        "05/14"
    ]
}