Patch Detail
Show a patch.
GET /api/1.1/patches/11322/?format=api
{ "id": 11322, "url": "https://patchwork.libcamera.org/api/1.1/patches/11322/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11322/", "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": "<20210217103626.1555692-1-naush@raspberrypi.com>", "date": "2021-02-17T10:36:26", "name": "[libcamera-devel] pipeline: raspberrypi: Update lens shading control in-place", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f157fba98be6aa47d22abc011f5a85e1c61ce6e5", "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/11322/mbox/", "series": [ { "id": 1702, "url": "https://patchwork.libcamera.org/api/1.1/series/1702/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1702", "date": "2021-02-17T10:36:26", "name": "[libcamera-devel] pipeline: raspberrypi: Update lens shading control in-place", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1702/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11322/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11322/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 0C0B6BD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Feb 2021 10:36:38 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B8AF68204;\n\tWed, 17 Feb 2021 11:36:37 +0100 (CET)", "from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CF106680A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 11:36:35 +0100 (CET)", "by mail-ed1-x52b.google.com with SMTP id l12so15804449edt.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 02:36:35 -0800 (PST)", "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tz16sm789254ejx.73.2021.02.17.02.36.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 17 Feb 2021 02:36: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=\"Y7tMHFH0\"; 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=u1lMSbTw5vBl8FGqw5BHTVCVmZkYE795IYau54/L0hY=;\n\tb=Y7tMHFH077i1x1qXS6g4stolT8amnziyXvL1H53ytmpmxz9gWHMw2DtbLHdkLtT7z9\n\tWtEHET0YJyxnvU52XEjk5a2fQOffjSP6y4O0mHM371sLAYnIfewuvLlAUzarU4U+3Egi\n\tB8mYh9SSSf5NAGv8Yq1sa1wcntb5mgHyME1NjXL+rgMH3tBxUtO8NMMhG0g5GNbZ2Vnq\n\tP45HzFyZmj3Y2+nMsTQlzRh3/fxXBR6ZSv9pmDqzSdsB2op4ZZD+FzuV8MbJs3oFJcsO\n\thMr51qLoTCqklnVdrbdkf5PvQ44pxQMYyzHGqtRRZdojA8g6GSPeq7O90w0fx+8oq3Ca\n\t7xdA==", "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=u1lMSbTw5vBl8FGqw5BHTVCVmZkYE795IYau54/L0hY=;\n\tb=lgHviHuYaWJwQKRztKYIHLGGHJZZ/YrbIlGXasyALP9AreuhHWUsBfNCQJQjzxjaYW\n\trnnCyMSxDjwgNKyzdYg4R6+tOJuQEDe0dJRZVmEKWmDF+kpI2Mkl1GvMShD4cf0wuJXX\n\t5LsxxJDBGd9sJISf9rJw+ZB/RhciaX1P4hakkcgzm6V7EzpFAV67SxNWchmAJ+WDmNoc\n\tZQB+uzkJE/7+2GO35GS4cmX4CA58KcMMdl4zC0D2ZyAauFYrTxvjCifGNDjvzPNvIy2X\n\trWWxTZq6t85VZCarfnV1414VPFllCSOgZyrmo0f406aEL0kDGSeGCfqZVsUeRp+3cprn\n\twnbg==", "X-Gm-Message-State": "AOAM533uzx22ovjojXTCIdRoFGYB9N89mCar9IIeUNaSkBWQlcdEPVRr\n\tO63yQ49rjy9oJxZTOKjhhLcI9HZA+BmW9dwn", "X-Google-Smtp-Source": "ABdhPJxf00m3+4/gSmZnHDqWRw+MugQAfIz7viyVnKg9p3B0pfP/3yWDWVrcNYBldNx5mfbouO27DQ==", "X-Received": "by 2002:a05:6402:19:: with SMTP id\n\td25mr25085395edu.71.1613558195306; \n\tWed, 17 Feb 2021 02:36:35 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 17 Feb 2021 10:36:26 +0000", "Message-Id": "<20210217103626.1555692-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210217100852.1542397-3-naush@raspberrypi.com>", "References": "<20210217100852.1542397-3-naush@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] pipeline: raspberrypi: Update lens\n\tshading 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": "Add 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 | 17 +++++++----------\n 1 file changed, 7 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 1a0bd6275578..a60415d93705 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1338,18 +1338,15 @@ void RPiCameraData::embeddedComplete(uint32_t bufferId)\n \n void RPiCameraData::setIspControls(const ControlList &controls)\n {\n-\tControlList ctrls = controls;\n+\tControlList ctrls = std::move(controls);\n \n \tif (ctrls.contains(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING)) {\n-\t\tSpan<const uint8_t> s =\n-\t\t\tctrls.get(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING).data();\n-\t\tbcm2835_isp_lens_shading ls =\n-\t\t\t*reinterpret_cast<const bcm2835_isp_lens_shading *>(s.data());\n-\t\tls.dmabuf = lsTable_.fd();\n-\n-\t\tControlValue c(Span<const uint8_t>{ reinterpret_cast<uint8_t *>(&ls),\n-\t\t\t\t\t\t sizeof(ls) });\n-\t\tctrls.set(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING, c);\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", "prefixes": [ "libcamera-devel" ] }