Patch Detail
Show a patch.
GET /api/1.1/patches/18183/?format=api
{ "id": 18183, "url": "https://patchwork.libcamera.org/api/1.1/patches/18183/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18183/", "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": "<20230123154934.27803-9-naush@raspberrypi.com>", "date": "2023-01-23T15:49:28", "name": "[libcamera-devel,v2,08/14] ipa: raspberrypi: Include autofocus controls in the IPA ControlInfoMap", "commit_ref": "3caa0dde0eece66e913f93236b6417375789710a", "pull_url": null, "state": "accepted", "archived": false, "hash": "b51c3d13854282a288412033b47c30ed7733bf62", "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/18183/mbox/", "series": [ { "id": 3719, "url": "https://patchwork.libcamera.org/api/1.1/series/3719/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3719", "date": "2023-01-23T15:49:20", "name": "Raspberry Pi: Camera Module 3 support", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3719/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18183/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18183/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 DB28CC3296\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Jan 2023 15:49:59 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9521762606;\n\tMon, 23 Jan 2023 16:49:59 +0100 (CET)", "from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 82F69625EB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jan 2023 16:49:53 +0100 (CET)", "by mail-wm1-x329.google.com with SMTP id\n\tf25-20020a1c6a19000000b003da221fbf48so8900154wmc.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Jan 2023 07:49:53 -0800 (PST)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tn16-20020a05600c181000b003d1de805de5sm10339689wmp.16.2023.01.23.07.49.52\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 23 Jan 2023 07:49:52 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674488999;\n\tbh=PcJOx2ozPgn+/h3v+0I2TaOSD5ltLOc0B5wmR8i/Xn8=;\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=G9YJs+FhzdJM3kwXWAOB7jjapNtgLc/K/kJ/nt9fFdRYOmpplOReXfDyHccIIndgm\n\tMyoCTgQE3C1mOtZmyggEKQnF7m99TsWVMdJBc6K6t+jsZJMlkWsBKkCDx9MXsnTCp6\n\t3fI47iHCLC7Op7Jf/EZByZdaC6NSDbXcJJ92WcwQfMOUseCgxkCXWr8MvXdqmX+nB5\n\t9d15J17CoQjVNwMl8O5lwtRKnoJYcZ+Z9aHqYdkB8sSc8eaNXywZyBpdF4frM2xh61\n\tYs4osXX2crBIolpL9V88ATsqehXj3i4YfQFj7ENiB8iOUA/VoFOWQNjIX3weDbo4hH\n\tNmqxcSf57JtfQ==", "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=fcT0+/4kJR0MUVvFlrqUk7hrKyJnbDdSh57uN7PeygU=;\n\tb=bKSGdDCU5MDgYH0nFv29R6aVXiR2PNeVY/LJmCUZIruw4FOOXegiROAt/2AWK//0RR\n\t2ACnOnyUMiRfs+X01PJ97xp5iAz4AvDkkX2Z/W834piFp8bNYVL0gol1zt+/J81+BvGO\n\tBnopC+dEcdVtkDnGqbdfJkuhUQN1f7UPe+mvwC375yzxD3+RaNJkGq1u2TCOjsdAzqFF\n\tokHzA2IZ86MSeRzel4wCTSjl8HihsASdgBjYhC0q7evCDxYrNFS+FrWEoFccSdqHxv4l\n\txmHSSYLCxRHHxdBC7JTPc9CvrXLAADZLVRACmL76VEsHxRAkrzR+Tyzo6dn5LZHQiuT1\n\tjTeA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"bKSGdDCU\"; 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=fcT0+/4kJR0MUVvFlrqUk7hrKyJnbDdSh57uN7PeygU=;\n\tb=mmjOJomZcfPS/TZVBvh9tvs0SY5d4hPfmXo5apFUKvtSqlBteTQUqKaT3DX+OL2nfR\n\tXwPL5cUyCNxI+ORYJRwLYVZDNojHvUtmS08RavUqJ2IJegYXmpQTmEMyDX7x+qkFDhC5\n\t1vwLNqR/Zj5OoZulemY5iuApY66bR1FkyGFAF2aB8Ff+9H72SCPCzNRvReAakb2BtHFD\n\t5NIhSk5QLB3/WpMg6L91Y0gnJyTK3EG/S8S0PYPGidoXcz2r8iqJ0mlI3KeQYr8WUAYW\n\tP9K6vItw8zZHTAjIXDMGWLXFUsrmAEFR+04g0vkV4AIX/hXFD56sQNCpnVjGyxEXxG9I\n\tgjkw==", "X-Gm-Message-State": "AFqh2krdLyWpat23SViL8Q9Z5feO5/LBQ2U++Ifc7puNpV2rRtMLdj/c\n\t5n6PPTSypHw5zp7O+3xD3R/U+fYmcv056mllxZ0=", "X-Google-Smtp-Source": "AMrXdXtXvDSd01Yw+Ma3W1uF0hjU7OKEVIbEQF6h7qWmcU5LTK+lRKnJ+Fazxg6zBICDOl0bc2B31w==", "X-Received": "by 2002:a05:600c:5386:b0:3cf:9844:7b11 with SMTP id\n\thg6-20020a05600c538600b003cf98447b11mr25528114wmb.23.1674488992601; \n\tMon, 23 Jan 2023 07:49:52 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 23 Jan 2023 15:49:28 +0000", "Message-Id": "<20230123154934.27803-9-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230123154934.27803-1-naush@raspberrypi.com>", "References": "<20230123154934.27803-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 08/14] ipa: raspberrypi: Include\n\tautofocus controls in the IPA ControlInfoMap", "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": "Add all the autofocus controls handled by the IPA into the ControlInfoMap if\na controllable lens actuator is present.\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 src/ipa/raspberrypi/raspberrypi.cpp | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)", "diff": "diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 18549420445b..745c16f354ce 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -97,6 +97,18 @@ static const ControlInfoMap::Map ipaControls{\n \t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }\n };\n \n+/* IPA controls handled conditionally, if the lens has a focus control */\n+static const ControlInfoMap::Map ipaAfControls{\n+\t{ &controls::AfMode, ControlInfo(controls::AfModeValues) },\n+\t{ &controls::AfRange, ControlInfo(controls::AfRangeValues) },\n+\t{ &controls::AfSpeed, ControlInfo(controls::AfSpeedValues) },\n+\t{ &controls::AfMetering, ControlInfo(controls::AfMeteringValues) },\n+\t{ &controls::AfWindows, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n+\t{ &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },\n+\t{ &controls::AfPause, ControlInfo(controls::AfPauseValues) },\n+\t{ &controls::LensPosition, ControlInfo(0.0f, 32.0f, 1.0f) }\n+};\n+\n LOG_DEFINE_CATEGORY(IPARPI)\n \n namespace ipa::RPi {\n@@ -248,6 +260,8 @@ int IPARPi::init(const IPASettings &settings, bool lensPresent, IPAInitResult *r\n \n \t/* Return the controls handled by the IPA */\n \tControlInfoMap::Map ctrlMap = ipaControls;\n+\tif (lensPresent_)\n+\t\tctrlMap.merge(ControlInfoMap::Map(ipaAfControls));\n \tresult->controlInfo = ControlInfoMap(std::move(ctrlMap), controls::controls);\n \n \treturn 0;\n@@ -489,6 +503,10 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo, const IPAConfig &ip\n \t\tControlInfo(static_cast<int32_t>(helper_->exposure(exposureMin, mode_.minLineLength).get<std::micro>()),\n \t\t\t static_cast<int32_t>(maxShutter.get<std::micro>()));\n \n+\t/* Declare Autofocus controls, only if we have a controllable lens */\n+\tif (lensPresent_)\n+\t\tctrlMap.merge(ControlInfoMap::Map(ipaAfControls));\n+\n \tresult->controlInfo = ControlInfoMap(std::move(ctrlMap), controls::controls);\n \treturn 0;\n }\n", "prefixes": [ "libcamera-devel", "v2", "08/14" ] }