Show a patch.

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

{
    "id": 11334,
    "url": "https://patchwork.libcamera.org/api/patches/11334/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11334/",
    "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": "<20210218124824.1825418-5-naush@raspberrypi.com>",
    "date": "2021-02-18T12:48:24",
    "name": "[libcamera-devel,v3,4/4] pipeline: raspberrypi: Update the lens shading control in-place",
    "commit_ref": "b147de25537652f8dabf40d5165350dad083a28a",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "336381646ef5db19ab957b71c25bc4c7754c1850",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11334/mbox/",
    "series": [
        {
            "id": 1706,
            "url": "https://patchwork.libcamera.org/api/series/1706/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1706",
            "date": "2021-02-18T12:48:20",
            "name": "Updates after IPAInterface changes",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/1706/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11334/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11334/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 7C756BD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Feb 2021 12:48:39 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 470F2689B1;\n\tThu, 18 Feb 2021 13:48:39 +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 24D586836F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Feb 2021 13:48:36 +0100 (CET)",
            "by mail-wm1-x32b.google.com with SMTP id a132so3556222wmc.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Feb 2021 04:48:36 -0800 (PST)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:15:c37b:2722:9ed2:1d58])\n\tby smtp.gmail.com with ESMTPSA id\n\tz63sm7675876wme.8.2021.02.18.04.48.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Feb 2021 04:48:34 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ixh7zVIm\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=Llu3rk37nadcwxNGL+VmmMCkZ76r0uhevYyMgruKdMM=;\n\tb=ixh7zVImuYVQm3dfx9FS9LrHMiqgEhlqtSVMA2NGkfghuWQhomOwjN/zau352CRSCu\n\tNGlY0kPdHrs6YprqIiRlp6gI7Tt1fu07iSO5LzzQZPF0jsJhd1Qs4FONbtQkNoEfMhv5\n\tgzfv1dM7/lqdE3K9kTDyTuL8LRV2W5mQYIar+yX/fJ7A1X8emXaB6SQoTWj7DfYkPDUe\n\teZIH05M8gHrEUOnrufxCKbiZLpt5JRZSPk1YmMqyVSS5j+NJ3xe0t4WkdLgdpaUOP/71\n\tIhK9yE2lG/CWEP1iIn6fRyuXHbxqDGmXTps6nPYPQ4pgIyRfON+Aoe7gGGFrSm8cvJR6\n\t4itg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\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=Llu3rk37nadcwxNGL+VmmMCkZ76r0uhevYyMgruKdMM=;\n\tb=V+bh9DcYXCn4fHkHkN3IG8P+8Qb0ghmOJ1aOUMaC4HWw+YecXEDrtC25rldvmRAj95\n\tZg+H4Sr1dcV7PykeCnjxlpe/tpVmMoMSn5aLa1h4bSbMGI+HNCoAHB+qYMVW58/HjEZ6\n\tVzaJf3WtUhJf4WRUKYmoXDKV2R1oHfHmjdMsMmYgix0zffZikjb2TtJMGx4RtefJJhNA\n\tnp6NkTLuVfajKFOuUcsgNk27uKCcf5S5Jffvkxjnrhu7Svjm3z1fWVxto5lJWVMzZUD3\n\tt8u760Ite5seeXJpnGKCq8mNEMUPaurAkeDdxZ9kq/cyct+adusft27htXUAXIuW40V0\n\tzjgA==",
        "X-Gm-Message-State": "AOAM5306UmuAcrdVimtmqtzYc6KdBcRNJfeAQoqebujRJAdPUM/qp3VK\n\t3mkUQDMPdvOZiQ2o0h9XmOZUBItfIpLc52HT",
        "X-Google-Smtp-Source": "ABdhPJxIZYN9JsRczykAOfZioHU0/4pMG35rP7hM84q5mxVlu6YIbBYzuLs/WRiADO6tZVntp5EQ/A==",
        "X-Received": "by 2002:a1c:23c2:: with SMTP id\n\tj185mr3459528wmj.96.1613652515677; \n\tThu, 18 Feb 2021 04:48:35 -0800 (PST)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 18 Feb 2021 12:48:24 +0000",
        "Message-Id": "<20210218124824.1825418-5-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210218124824.1825418-1-naush@raspberrypi.com>",
        "References": "<20210218124824.1825418-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v3 4/4] pipeline: raspberrypi: Update the\n\tlens shading control in-place",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Only update the lens shading control if it is present in the\nControlList.\n\nAdd the dmabuf file descriptor to the lens shading control in-place\nrather than taking a copy.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../pipeline/raspberrypi/raspberrypi.cpp      | 21 +++++++++----------\n 1 file changed, 10 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex acf2d56cddb2..a60415d93705 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1338,17 +1338,16 @@ void RPiCameraData::embeddedComplete(uint32_t bufferId)\n \n void RPiCameraData::setIspControls(const ControlList &controls)\n {\n-\tControlList ctrls = controls;\n-\n-\tSpan<const uint8_t> s =\n-\t\tctrls.get(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING).data();\n-\tbcm2835_isp_lens_shading ls =\n-\t\t*reinterpret_cast<const bcm2835_isp_lens_shading *>(s.data());\n-\tls.dmabuf = lsTable_.fd();\n-\n-\tControlValue c(Span<const uint8_t>{ reinterpret_cast<uint8_t *>(&ls),\n-\t\t\t\t\t    sizeof(ls) });\n-\tctrls.set(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING, c);\n+\tControlList ctrls = std::move(controls);\n+\n+\tif (ctrls.contains(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING)) {\n+\t\tControlValue &value =\n+\t\t\tconst_cast<ControlValue &>(ctrls.get(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING));\n+\t\tSpan<uint8_t> s = value.data();\n+\t\tbcm2835_isp_lens_shading *ls =\n+\t\t\treinterpret_cast<bcm2835_isp_lens_shading *>(s.data());\n+\t\tls->dmabuf = lsTable_.fd();\n+\t}\n \n \tisp_[Isp::Input].dev()->setControls(&ctrls);\n \thandleState();\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "4/4"
    ]
}