Patch Detail
Show a patch.
GET /api/patches/22727/?format=api
{ "id": 22727, "url": "https://patchwork.libcamera.org/api/patches/22727/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22727/", "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": "<20250204150912.962121-1-naush@raspberrypi.com>", "date": "2025-02-04T15:09:02", "name": "[v1] ipa: rpi: Apply default ControlInfo values for sensor controls", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "8a6b6267f369cdd5b0c7d55c3191a8cf48871890", "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/22727/mbox/", "series": [ { "id": 4988, "url": "https://patchwork.libcamera.org/api/series/4988/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4988", "date": "2025-02-04T15:09:02", "name": "[v1] ipa: rpi: Apply default ControlInfo values for sensor controls", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4988/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22727/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22727/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 3AB9DC326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 4 Feb 2025 15:09:18 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 06819685B6;\n\tTue, 4 Feb 2025 16:09:17 +0100 (CET)", "from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n\t[IPv6:2a00:1450:4864:20::336])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6ED67685A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 4 Feb 2025 16:09:14 +0100 (CET)", "by mail-wm1-x336.google.com with SMTP id\n\t5b1f17b1804b1-4390935a14fso311315e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 04 Feb 2025 07:09:14 -0800 (PST)", "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-438dcc12f88sm228213575e9.2.2025.02.04.07.09.12\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 04 Feb 2025 07:09:13 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"PnbOFAl7\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1738681753; x=1739286553;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=CRes6BlvjHxbdxCNIfDYpFLn6juH2nvOBsh8UpvKg3M=;\n\tb=PnbOFAl7LOp+NPa84sWvp2hdZC3yPOJCxNacXr4JtsOaqsOUemBIvT2Z4Vcu7jrSSE\n\tsClOsw1etGkGcha5b48//Q/LczI5NWKq0nUa9w+QooAQfgCWYwp2SntpFIgsdPKegC4N\n\tgMgAHGFfPGitvjQQDwLAnmqFCVgC/t6ulgB14v45IS0WmRwMv44cnmN1nfWRziHfmyqh\n\tuqG7lN+LiemZaPwFAmww1wIoAUYQfXv467m8QGPRNC4KTmWJhASuWc9hwPCPNE2KesX0\n\tRS4wdiB0jg9a3O7KrFQlMVkGjvVvXyYvCOEwcUvW+nh4G12erukyaRIMh1DsS8frXjn8\n\ty4mg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1738681753; x=1739286553;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=CRes6BlvjHxbdxCNIfDYpFLn6juH2nvOBsh8UpvKg3M=;\n\tb=RG7SDr0ylPpr/y8orLA5QNnSGejiC0MtMR16hkcTaQtsKKCZ2h6jW5JtQSalWczenN\n\tVpYR0hf8XJdBzcKOs7GvKBFv44ZT23NI4uOXHNHwap5wxOdSYBUZ0mZSzbA0sKXsaPdu\n\t3wC6MBSP+5hr98rZkT6ifsEUOO8C7dj62YlOf13R1v8/jr3HfwZyAZVv49SPes1lQHZv\n\t4teeevMISxiJw1ZDcUf64tZEGaeCFAR2SUaXrsafR/E7PMFdsQzQgyCpXxFOVFtYGz0F\n\tYt/BUvArHdlb1BQZ8lWd1XlmELxJQLs122lr3lqbR6KQQl/Dspqflwu1QBCRuwWeCp6r\n\t94Ug==", "X-Gm-Message-State": "AOJu0Yyogt7m7eqwoBcy8O5NzwKOgQAZIuCCDa08wHmfr0yDgO7LnISw\n\tcoXtrHCm6++0DAd/A6RX4Q9LB0tUQIKB6euZA0qIdJxysGpjbhGusVwC3uBs45fw2OJJePbXOff\n\tdtVw=", "X-Gm-Gg": "ASbGncuA/LXVFV7VU5uGj8biDphk7QSWy6RAQZUK7Hd+2f7Mar6T1jCoULx/bkbhYB6\n\tzriBRoOfSsBdrJdYi/WsIDzeVOTws1uUjn/83qx2WiOnGs1hqmZJHIA8p9F2agk4stKYrflmQjP\n\tGOdrQLoUB5o7Z9StT75w8xDUz9x8CqUXrw+ha90D3jklIZli8usBwmn0h4VO1S2N8eNTWKZT6nC\n\ttA8AWBN5/9xPXiceQdJdAHPYLXy9rNPAlCsBlHoeVbOelrtUFbqtukTl3L81xh2KYVo/ENRmSR0\n\tl3D4TKto/4wcrxbHPAxojUTjRkAo4MYU+VA=", "X-Google-Smtp-Source": "AGHT+IGDbZ2IQdvE93yUmwB7+UW8pGUBNABWQpWwww4upMrmSRvolSqJRyrETnxoWJC+iPzhjjJlLw==", "X-Received": "by 2002:a05:600c:3501:b0:434:f7f0:189c with SMTP id\n\t5b1f17b1804b1-43905fe625bmr12159945e9.7.1738681753508; \n\tTue, 04 Feb 2025 07:09:13 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Naushir Patuck <naush@raspberrypi.com>", "Subject": "[PATCH v1] ipa: rpi: Apply default ControlInfo values for sensor\n\tcontrols", "Date": "Tue, 4 Feb 2025 15:09:02 +0000", "Message-ID": "<20250204150912.962121-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.43.0", "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": "The existing IPA initialisation code did not set default values for\nsome sensor related controls. This caused a crash using libcamerify\nwhen the it was trying to access the default value for\ncontrols::FrameDurationLimits as part of a recent change.\n\nEnsure controls::FrameDurationLimits, controls::AnalogueGain and\ncontrols::ExposureTime advertise default values along with the existing\nmin/max values. The default is set to the min value.\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=253\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/common/ipa_base.cpp | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex bd3c22000df5..5924df4c1125 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -259,15 +259,18 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa\n \tControlInfoMap::Map ctrlMap = ipaControls;\n \tctrlMap[&controls::FrameDurationLimits] =\n \t\tControlInfo(static_cast<int64_t>(mode_.minFrameDuration.get<std::micro>()),\n-\t\t\t static_cast<int64_t>(mode_.maxFrameDuration.get<std::micro>()));\n+\t\t\t static_cast<int64_t>(mode_.maxFrameDuration.get<std::micro>()),\n+\t\t\t static_cast<int64_t>(mode_.minFrameDuration.get<std::micro>()));\n \n \tctrlMap[&controls::AnalogueGain] =\n \t\tControlInfo(static_cast<float>(mode_.minAnalogueGain),\n-\t\t\t static_cast<float>(mode_.maxAnalogueGain));\n+\t\t\t static_cast<float>(mode_.maxAnalogueGain),\n+\t\t\t static_cast<float>(mode_.minAnalogueGain));\n \n \tctrlMap[&controls::ExposureTime] =\n \t\tControlInfo(static_cast<int32_t>(mode_.minExposureTime.get<std::micro>()),\n-\t\t\t static_cast<int32_t>(mode_.maxExposureTime.get<std::micro>()));\n+\t\t\t static_cast<int32_t>(mode_.maxExposureTime.get<std::micro>()),\n+\t\t\t static_cast<int32_t>(mode_.minExposureTime.get<std::micro>()));\n \n \t/* Declare colour processing related controls for non-mono sensors. */\n \tif (!monoSensor_)\n", "prefixes": [ "v1" ] }