{"id":19730,"url":"https://patchwork.libcamera.org/api/patches/19730/?format=json","web_url":"https://patchwork.libcamera.org/patch/19730/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240315001613.2033-12-laurent.pinchart@ideasonboard.com>","date":"2024-03-15T00:16:10","name":"[v2,11/14] libcamera: camera_sensor: Drop updateControlInfo() function","commit_ref":"9b1a2a8c8b89b2c56afc155c67c78baefee19d28","pull_url":null,"state":"accepted","archived":false,"hash":"d65a031c9c5bb8827801955cd05c73df47b7e5b1","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19730/mbox/","series":[{"id":4226,"url":"https://patchwork.libcamera.org/api/series/4226/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4226","date":"2024-03-15T00:15:59","name":"libcamera: Prepare for new camera sensor class","version":2,"mbox":"https://patchwork.libcamera.org/series/4226/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19730/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19730/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 22800C3273\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Mar 2024 00:16:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C8A762973;\n\tFri, 15 Mar 2024 01:16:42 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21E8862973\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Mar 2024 01:16:32 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 69044A9A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Mar 2024 01:16:08 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"BvZvVvDr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1710461768;\n\tbh=CHY3Q49LZMvBm3ZDxJhaat9S4SkYi3DGv++foHfqHaw=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=BvZvVvDrOsoa2r+6wPXR1mZhDTJFEoLByY1vAIoFXgDtwbQOUTy/Jg8QT6n55CEP6\n\t9KwRXt6QjufLcXGVzNEw/LsB5vNoaX83lQlBRWGMaWHbscElwkJ/YSTGZwINGbFbwt\n\t4tWB+F9dBQZuPplBwKgIfanA22PUlzz6vKI5E/7E=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH v2 11/14] libcamera: camera_sensor: Drop updateControlInfo()\n\tfunction","Date":"Fri, 15 Mar 2024 02:16:10 +0200","Message-ID":"<20240315001613.2033-12-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.43.2","In-Reply-To":"<20240315001613.2033-1-laurent.pinchart@ideasonboard.com>","References":"<20240315001613.2033-1-laurent.pinchart@ideasonboard.com>","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 CameraSensor::updateControlInfo() function is a wrapper around the\nsame function of the V4L2Subdevice class. It was meant to be called by\npipeline handlers that modify the sensor configuration directly,\nbypassing the CameraSensor::setFormat() function. This never happened,\nand the function is called once only, internally to the CameraSensor\nclass. No external users are foreseen, drop the function and call\nV4L2Subdevice::updateControlInfo() directly.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n include/libcamera/internal/camera_sensor.h |  2 --\n src/libcamera/sensor/camera_sensor.cpp     | 20 ++------------------\n 2 files changed, 2 insertions(+), 20 deletions(-)","diff":"diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex 60a8b106d175..b2f077b9cc75 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -75,8 +75,6 @@ public:\n \tconst ControlList &properties() const { return properties_; }\n \tint sensorInfo(IPACameraSensorInfo *info) const;\n \n-\tvoid updateControlInfo();\n-\n \tCameraLens *focusLens() { return focusLens_.get(); }\n \n \tTransform computeTransform(Orientation *orientation) const;\ndiff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp\nindex af5d97f35de1..545f89d036df 100644\n--- a/src/libcamera/sensor/camera_sensor.cpp\n+++ b/src/libcamera/sensor/camera_sensor.cpp\n@@ -814,7 +814,7 @@ int CameraSensor::setFormat(V4L2SubdeviceFormat *format, Transform transform)\n \tif (ret)\n \t\treturn ret;\n \n-\tupdateControlInfo();\n+\tsubdev_->updateControlInfo();\n \treturn 0;\n }\n \n@@ -924,9 +924,7 @@ int CameraSensor::applyConfiguration(const SensorConfiguration &config,\n  *\n  * Control information is updated automatically to reflect the current sensor\n  * configuration when the setFormat() function is called, without invalidating\n- * any iterator on the ControlInfoMap. A manual update can also be forced by\n- * calling the updateControlInfo() function for pipeline handlers that change\n- * the sensor configuration wihtout using setFormat().\n+ * any iterator on the ControlInfoMap.\n  *\n  * \\return A map of the V4L2 controls supported by the sensor\n  */\n@@ -1013,10 +1011,6 @@ int CameraSensor::setControls(ControlList *ctrls)\n  * Sensor information is only available for raw sensors. When called for a YUV\n  * sensor, this function returns -EINVAL.\n  *\n- * Pipeline handlers that do not change the sensor format using the setFormat()\n- * function may need to call updateControlInfo() beforehand, to ensure all the\n- * control ranges are up to date.\n- *\n  * \\return 0 on success, a negative error code otherwise\n  */\n int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const\n@@ -1094,16 +1088,6 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const\n \treturn 0;\n }\n \n-/**\n- * \\fn void CameraSensor::updateControlInfo()\n- * \\brief Update the sensor's ControlInfoMap in case they have changed\n- * \\sa V4L2Device::updateControlInfo()\n- */\n-void CameraSensor::updateControlInfo()\n-{\n-\tsubdev_->updateControlInfo();\n-}\n-\n /**\n  * \\fn CameraSensor::focusLens()\n  * \\brief Retrieve the focus lens controller\n","prefixes":["v2","11/14"]}