{"id":19606,"url":"https://patchwork.libcamera.org/api/patches/19606/?format=json","web_url":"https://patchwork.libcamera.org/patch/19606/","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":"<20240301212121.9072-16-laurent.pinchart@ideasonboard.com>","date":"2024-03-01T21:21:04","name":"[PATCH/RFC,15/32] libcamera: camera_sensor: Drop updateControlInfo() function","commit_ref":null,"pull_url":null,"state":"rfc","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/19606/mbox/","series":[{"id":4197,"url":"https://patchwork.libcamera.org/api/series/4197/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4197","date":"2024-03-01T21:20:49","name":"libcamera: Support the upstream Unicam driver","version":1,"mbox":"https://patchwork.libcamera.org/series/4197/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19606/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19606/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 434BCC3260\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  1 Mar 2024 21:21:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B0E5D62C83;\n\tFri,  1 Mar 2024 22:21:44 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B3BA262964\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 Mar 2024 22:21:41 +0100 (CET)","from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F96E3305;\n\tFri,  1 Mar 2024 22:21:27 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aXwFdjs1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1709328087;\n\tbh=kxW9XI3rwqAn5ldiS1qOKwd3E4CgfdRqBSW1dMd5HWU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=aXwFdjs1FcPrTbpSJw0Wha6EdhzW8bdg/HkZv5eFY/oZf2UFI9l4Gqb1LZDMU8yz6\n\t+xoiA47zVbxegL33P6gRgRY9yKacOr+/7glDxE3o8lr+jcRcSQqZG+xn5wy5eRXoxK\n\tWlBnWj8Wq5FSDXA51+o3RzYV6mPFNO+PUFzJzuiI=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH/RFC 15/32] libcamera: camera_sensor: Drop updateControlInfo()\n\tfunction","Date":"Fri,  1 Mar 2024 23:21:04 +0200","Message-ID":"<20240301212121.9072-16-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20240301212121.9072-1-laurent.pinchart@ideasonboard.com>","References":"<20240301212121.9072-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>","Cc":"Sakari Ailus <sakari.ailus@iki.fi>","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>\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":["PATCH/RFC","15/32"]}