From patchwork Wed Jul 1 12:30:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 8527 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 63AEBBF415 for ; Wed, 1 Jul 2020 12:27:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0BFA760C57; Wed, 1 Jul 2020 14:27:21 +0200 (CEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C8BF4603B4 for ; Wed, 1 Jul 2020 14:27:19 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 407C61C0011; Wed, 1 Jul 2020 12:27:18 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Jul 2020 14:30:21 +0200 Message-Id: <20200701123036.51922-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/15] libcamera: ipu3: Rework streams configuration 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" I started this series with the final goal of integrating in the IPU3 pipeline handler with the calculation of the IF, BDS and GDC rectangle, which are at the moment defaulted to the ImgU frame input sizes. Before attempting to calculate the sizes required for the pipeline components, I realized the IPU3 stream configuration had to be mostly reworked. The IPU3 pipeline handler stream configuration has been the first one that has been developed in libcamera, and it has not been updated since. This series rework that part, paving the way for the pipeline sizes calculation, which is yet implemented, but will be provided on-top. The series starts with a simple rename of an internal map of formats, then it reworks the generateConfiguration() operation in order to remove stream assignment from it. Following two minor patches, it then implements support for reporting the available stream formats associated to the stream configurations generated by the pipeline handler in [5/15]. Then validate() gets re-worked, as the current version has some arbitrary assumptions, and still requires streams to be assigned to configurations, which shall instead happen at configure() time. After reworking validation and a few more clean-up patches, the series moves to rework configure() to perform stream assignment and more strict checks on the supported stream combinations. As after [8/15] Streams are handled in configure() only, the streams_ vector and the camera_ shared pointer can be removed from IPU3CameraConfiguration in [9/15] and [10/15]. From [11/15] onward, the pipeline handler gets prepared to calculate the IF, BDS and GDC sizes, by instrumenting the ImgUDevice::configure() function with all the parameter it needs to perform the computation. A few more clean up patches close the series. Most notable improvements are: - Support more stream combinations: before this series, asking for two viewfinder streams, a viewfinder and a video stream or two video streams was not allowed. - Report StreamFormats for each generated StreamConfiguration - Make sure no more than one raw and two non-raw streams are requested - Assign streams to video nodes in a way that reduces the risk of cropping the field of view - Pave the way for integrating pipeline sizes configuration in ImgUDevice::configure() Thanks j Jacopo Mondi (15): libcamera: ipu3: Rename mbusCodesToInfo libcamera: ipu3: Remove streams from generateConfiguration libcamera: ipu3: cio2: Report format and sizes libcamera: ipu3: Do not overwrite StreamConfiguration libcamera: ipu3: Report StreamFormats libcamera: ipu3: Rework stream validation libcamera: ipu3: Refuse unsupported configuration libcamera: ipu3: Assign streams at configure() time libcamera: ipu3: Remove streams from IPU3CameraConfiguration libcamera: ipu3: Remove camera_ from IPU3CameraConfiguration libcamera: geometry: Add isNull() function to Rectangle class libcamera: ipu3: add ImgUDevice::Pipe libcamera: ipu3: Collect ImgU pipe configuration libcamera: ipu3: Rename ImgUDevice::configureInput() libcamera: ipu3: Pass cio2 fourcc to ImgUDevice::configure() include/libcamera/geometry.h | 1 + src/libcamera/geometry.cpp | 6 + src/libcamera/pipeline/ipu3/cio2.cpp | 61 +++- src/libcamera/pipeline/ipu3/cio2.h | 7 + src/libcamera/pipeline/ipu3/imgu.cpp | 45 ++- src/libcamera/pipeline/ipu3/imgu.h | 9 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 409 +++++++++++++-------------- 7 files changed, 306 insertions(+), 232 deletions(-) --- 2.27.0