Patch Detail
Show a patch.
GET /api/1.1/patches/16365/?format=api
{ "id": 16365, "url": "https://patchwork.libcamera.org/api/1.1/patches/16365/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16365/", "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": "<20220624073528.26670-4-naush@raspberrypi.com>", "date": "2022-06-24T07:35:27", "name": "[libcamera-devel,v2,3/4] ipa: raspberrypi: imx477: Get sensor temperature from embedded data", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "875e8690b818df4c8a535a46b90cba8ee50446e5", "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/16365/mbox/", "series": [ { "id": 3217, "url": "https://patchwork.libcamera.org/api/1.1/series/3217/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3217", "date": "2022-06-24T07:35:24", "name": "Add SensorTemperature control", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3217/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16365/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16365/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 C3FBCBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Jun 2022 07:35:37 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 600CB6563D;\n\tFri, 24 Jun 2022 09:35:37 +0200 (CEST)", "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 4A69965633\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Jun 2022 09:35:33 +0200 (CEST)", "by mail-wm1-x336.google.com with SMTP id\n\tr81-20020a1c4454000000b003a0297a61ddso1368224wma.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Jun 2022 00:35:33 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tf13-20020a05600c154d00b0039ee391a024sm6695195wmg.14.2022.06.24.00.35.31\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 24 Jun 2022 00:35:32 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656056137;\n\tbh=aw/1NuVF+9SHjjIH3cFOZ7ydPEJYmnwxzpNmg/Cnowo=;\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:\n\tFrom;\n\tb=COV8hlAnwYTFNlZ7JbHHMZBP+aH7prFKZ1hSkP3hOOl75mQ2wbCfjmW2q1WRnIDiK\n\tjj9sbFlcoX9+gsVZ5ElYdTwo8A9FmUWoKOdDZjI+nMZCu8gaEuo9jXWJXQ8PVzU5xC\n\toSfYExTzyy2Dke/LZSVJJLzn5YyEctVr96pViuoWCo118+wZOTiW+r12ZwS54rJTIE\n\tz5EjqtN4cmUT+u7MqfbuSzUWAM6BZror8kcnRKSMVqf6ony+NQ8IKfzNj5mLDs/O9C\n\tGfHGKUDshJxN6VPZ1L8v8febjNCqUhJNBUskLFOQ4wVG5Fw2mtgGFK9kz57qawT0a2\n\tkaQRGLWJITjQQ==", "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=KJAuSaTd++kex691QD4SoGtyc7WqZ/kD/BSuFWZ8jMk=;\n\tb=oOKPzor80VfkdmMtxikvZ5oViBctb+7I58LEbxgg5Rp4zu2EXXAl1yOANZhuzqVUrN\n\tGpa8efTdONjI4SUhAWwaGGLUrWPzKm2sjrlCJXYweHJu9X82GTzUzJ3g+mzJc8yIqFNF\n\tCKaZRhDnZPDFq9I+6yHmig5hCswM5ik0i6BJ8MolOxIHqzQ8nnngSmtp0tcCc43SPpBb\n\tyTFFCoLvg0lrLb1GFxGH40qmvuaGSl55SvYiJqsrFXN6kA8LUK9JUjTEvd0ZzB9DCJTj\n\thFrUNLT88zeXvM1wCyjCRVaLAY9e8tvp1vr1w5uz0YXM1jCR4y9Y2jw12E3DfXtcgNtN\n\tmjtA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"oOKPzor8\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=KJAuSaTd++kex691QD4SoGtyc7WqZ/kD/BSuFWZ8jMk=;\n\tb=pk0hkCu34sIfXrvLD8jgt0xmIke89D4UTg3YrJLouHCo7vSF53rwfcfud35VsrF8AA\n\twapLCrJCBBldvYyxs+cv76D4KxmAmH2ZRCbY2wNYyqhM6pGHvc6CplshyrEpLrp8PhoI\n\t5DaO20qICs0fKFdvkMeCMaFqz1VtAFZwCmF/tEYg/e2u1dFEbOttWmy+B5U4JyMuBMPX\n\tqbGE2ZPWZn8VzRLzNcBUkTEEekgrE/taTbarGXj3eTPt+IQq4T/8szhvRhO5GnL7T2cK\n\tw3eq4grqgjFFeQP7LmNBuLYEbLUQUXKzzO9hxtTquTqEvz+wXQ2eABJziIJdvr61Py6h\n\twMgw==", "X-Gm-Message-State": "AJIora9eqA0y+Az3QPAUXN92KaEKmrohhHjFqtZS7+DS0yFkkN29g6lF\n\tPRS+KGX2ZGOW6bEGs4jfCJjimOZ31yG8mGBW", "X-Google-Smtp-Source": "AGRyM1u7FV7mwUPKbveum89Q5+7WpZZDkf/SMbQ2/RK7TYqRkN8B/xF7Sh6jJ1mRcVw1r64RPPFd1Q==", "X-Received": "by 2002:a05:600c:5021:b0:39c:6571:e0b0 with SMTP id\n\tn33-20020a05600c502100b0039c6571e0b0mr2083182wmr.177.1656056132729; \n\tFri, 24 Jun 2022 00:35:32 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 24 Jun 2022 08:35:27 +0100", "Message-Id": "<20220624073528.26670-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220624073528.26670-1-naush@raspberrypi.com>", "References": "<20220624073528.26670-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 3/4] ipa: raspberrypi: imx477: Get\n\tsensor temperature from embedded data", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Fetch the sensor temperature value from the embedded data buffer and add it to\nthe DeviceStatus structure in CamHelperImx477::PopulateMetadata().\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/raspberrypi/cam_helper_imx477.cpp | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/ipa/raspberrypi/cam_helper_imx477.cpp b/src/ipa/raspberrypi/cam_helper_imx477.cpp\nindex 338fdc0c416a..0e1c0dbd142f 100644\n--- a/src/ipa/raspberrypi/cam_helper_imx477.cpp\n+++ b/src/ipa/raspberrypi/cam_helper_imx477.cpp\n@@ -5,6 +5,7 @@\n * cam_helper_imx477.cpp - camera helper for imx477 sensor\n */\n \n+#include <algorithm>\n #include <assert.h>\n #include <cmath>\n #include <stddef.h>\n@@ -34,8 +35,9 @@ constexpr uint32_t gainHiReg = 0x0204;\n constexpr uint32_t gainLoReg = 0x0205;\n constexpr uint32_t frameLengthHiReg = 0x0340;\n constexpr uint32_t frameLengthLoReg = 0x0341;\n+constexpr uint32_t temperatureReg = 0x013a;\n constexpr std::initializer_list<uint32_t> registerList =\n-\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg };\n+\t{ expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg, temperatureReg };\n \n class CamHelperImx477 : public CamHelper\n {\n@@ -171,6 +173,7 @@ void CamHelperImx477::PopulateMetadata(const MdParser::RegisterMap ®isters,\n \tdeviceStatus.shutter_speed = Exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg));\n \tdeviceStatus.analogue_gain = Gain(registers.at(gainHiReg) * 256 + registers.at(gainLoReg));\n \tdeviceStatus.frame_length = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);\n+\tdeviceStatus.sensor_temperature = std::clamp<int8_t>(registers.at(temperatureReg), -20, 80);\n \n \tmetadata.Set(\"device.status\", deviceStatus);\n }\n", "prefixes": [ "libcamera-devel", "v2", "3/4" ] }