From patchwork Mon Jun 27 16:27:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16381 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 7192CBD808 for ; Mon, 27 Jun 2022 16:27:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8C3BF65635; Mon, 27 Jun 2022 18:27:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656347260; bh=LdodLVjx2elvsFzCyUgfoO7IuBTIh1j4Bg1ydGpKu5E=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=wuS+AYpaMnqlotNf55LhiqdabKU15eRCHMAur4ycczxqLRKgtBw8N5UwWoijp5/La +bXCX5FRBINsYh7kpNhpiC3fDv2ExRJ23ehOY5imbUH82bBlX4xiO5zN9DwOTvO2CQ 1qSuXhufvm1iHrEduBlC0Mldi1VT/+PLMFfy/6jIP92gQAdd1JtSb/FlkgUuCpaxoJ oTtfgWChcrKRIwvQmOx8n9cpfD1CGbsKUSJH65bKZK2iRK9xDJHuc3Y1UEWwIvdZpR 1uY23+gK+zFYahEZqlXa//QNPkVVZHy7mrw9OTFgiKP6LfMGE4uN40TbkwnSp6W5ZA Pas2FI3pFSWqQ== Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 76D206059B for ; Mon, 27 Jun 2022 18:27:39 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 8B7802000C; Mon, 27 Jun 2022 16:27:38 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Jun 2022 18:27:17 +0200 Message-Id: <20220627162732.33160-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/15] Internal controls, sensor delays and IPA init/configure rework 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, this series collects one on top of the others three developments, which should ideally continue in the direction of removing V4L2 controls from the PH/IPA interaction. Patches 1 to 3 introduce internal controls. The patches have already been sent and reviewed by Jean-Michel. I have however fixed a bug in 1/15 and dropped the tag. Patches 4 5 and 6 introduce a map of delays associated to the newly introduced internal control to replace the hardcoded delays in use in IPU3. The PH still interfaces with delayed controls, which reasons in V4L2 terms, so delays are translated from libcamera::internal to V4L2. On top of this development starts the reworking of the IPA interface to remove V4L2 controls. The patches here included remove V4L2 control from init and configure, as those function do not require to interface with delayed controls. Along the way a few fixes/rework of the IPA code, specifically: - Use the actual VBLANK value and not the control's default - Re-calculate the line length as it's now fixed at init time - Store all session variables in the context instead of mixing class members and context - Rework the operation flow slightly to assign a more logical order. I assume the last part of the series is not the most urgent to be merged, as it won't however remove V4L2 controls from IPA until we don't rework delayed controls, but I would appreciate feedback already, especially from IPA developers. Thanks Jacopo Mondi (15): libcamera: control_ids: Add 'internal' argument libcamera: control_ids: Separate the id numerical space libcamera: Introduce internal controls libcamera: camera_sensor_properties: Add sensor delays libcamera: camera_sensor: Retrieve sensor delays libcamera: ipu3: Initialize DelayedControls with camera properties libcamera: camera_sensor: Rename the control interface libcamera: camera_sensor: Initialize controls libcamera: control_serializer: Support internal controls libcamera: ipu3: Initialize Camera controls in the PH libcamera: IPACameraSensorInfo: Add VBLANK libcamera: ipa: Use the current VBLANK value libcamera: ipu3: ipa: Use an updated lineDuration ipa: ipu3: Configure IPA with libcamera controls ipa: ipu3: Rework IPAIPU3::processStatsBuffer() include/libcamera/control_ids.h.in | 6 +- include/libcamera/internal/camera_sensor.h | 13 +- .../internal/camera_sensor_properties.h | 2 + include/libcamera/internal/meson.build | 15 ++ include/libcamera/ipa/core.mojom | 6 + include/libcamera/ipa/ipa_controls.h | 1 + include/libcamera/ipa/ipu3.mojom | 8 +- src/ipa/ipu3/ipa_context.cpp | 14 +- src/ipa/ipu3/ipa_context.h | 9 +- src/ipa/ipu3/ipu3.cpp | 229 ++++++------------ src/libcamera/camera_sensor.cpp | 134 +++++++++- src/libcamera/camera_sensor_properties.cpp | 32 +++ src/libcamera/control_ids.cpp.in | 12 +- src/libcamera/control_serializer.cpp | 6 + src/libcamera/internal_control_ids.yaml | 64 +++++ src/libcamera/meson.build | 17 ++ src/libcamera/pipeline/ipu3/ipu3.cpp | 78 +++--- .../pipeline/raspberrypi/raspberrypi.cpp | 14 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/pipeline/vimc/vimc.cpp | 8 +- utils/gen-controls.py | 24 +- 21 files changed, 469 insertions(+), 225 deletions(-) create mode 100644 src/libcamera/internal_control_ids.yaml --- 2.36.1