From patchwork Wed Dec 23 18:45:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10708 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 864C0C0F1A for ; Wed, 23 Dec 2020 18:45:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B2162615B1; Wed, 23 Dec 2020 19:45:08 +0100 (CET) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B0FE060527 for ; Wed, 23 Dec 2020 19:45:07 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 60C3820002 for ; Wed, 23 Dec 2020 18:45:07 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 23 Dec 2020 19:45:11 +0100 Message-Id: <20201223184516.58791-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/5] libcamera: Register CameraSensor controls X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" While preparing for supporting the sensor database, the CameraSensor class needed a bit of rework. This series: - Collect all sensor driver requirements in one function and makes error and defaulted properties value more verbose. I expect some platform to break after this change as their sensor drivers are not instrumented to report all the information required by libcamera. Question is: how high should we set the bar ? Personally, I think if we start low, we'll never be able to raise it again, so better be strict and change our mind as we go - Renames CameraSensor::controls() in CameraSensor::subdevControls() - Calculate the sensor exposure time limits as the first libcamera control registered by the class - Expand the IPU3 pipeline handler to register the CameraSensor class provided controls as Camera::controls() On IPU3 Soraka device and ov13858 sensor: Before this series: localhost ~ # cam -c1 --list-controls Control: Exposure: [4..3206] /-------- Control: Analogue Gain: [0..8191] | Control: Test Pattern: [0..4] | Control: Link Frequency: [0..1] These are all V4L2 Control: Horizontal Blanking: [264..264] controls which should not Control: Vertical Blanking: [78..29631] be reported by the Camera Control: Pixel Rate: [216000000..432000000] | Control: Digital Gain: [0..16384] /-------| Control: PipelineDepth: [2..3] After this series: localhost ~ # cam -c1 --list-controls Control: ExposureTime: [41..66613] Control: PipelineDepth: [2..3] Thanks j Jacopo Mondi (5): libcamera: camera_sensor: Validate driver support libcamera: camera_sensor: Initialize controls libcamera: camera_sensor: Rename controls() method libcamera: camera_sensor: Add controls() method libcamera: ipu3: Register sensor controls include/libcamera/internal/camera_sensor.h | 6 +- src/libcamera/camera_sensor.cpp | 158 +++++++++++++++++++-- src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/vimc/vimc.cpp | 4 +- 5 files changed, 162 insertions(+), 15 deletions(-) --- 2.29.2