From patchwork Thu Nov 5 00:15:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10340 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se 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 DFE49BDB89 for ; Thu, 5 Nov 2020 00:16:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B093362C94; Thu, 5 Nov 2020 01:16:20 +0100 (CET) Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D0F262C7D for ; Thu, 5 Nov 2020 01:16:17 +0100 (CET) X-Halon-ID: 6bf112c8-1efa-11eb-8a9c-005056917a89 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de [79.202.36.88]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 6bf112c8-1efa-11eb-8a9c-005056917a89; Thu, 05 Nov 2020 01:04:07 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Thu, 5 Nov 2020 01:15:38 +0100 Message-Id: <20201105001546.1690179-4-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201105001546.1690179-1-niklas.soderlund@ragnatech.se> References: <20201105001546.1690179-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 03/11] libcamera: ipu3: imgu: Configure the stat video device as part of configure() 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" There is no reason to expose and call a separate configureStat() when the statistics video device can be configured with the exact same parameters as part of configure(). Move the configuration internally to the ImgUDevice simplifying the interface, there is no functional change. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/imgu.cpp | 7 +++++++ src/libcamera/pipeline/ipu3/imgu.h | 7 ------- src/libcamera/pipeline/ipu3/ipu3.cpp | 11 ----------- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp index a4d74a62f69a0c97..0a3bf62020fd23fb 100644 --- a/src/libcamera/pipeline/ipu3/imgu.cpp +++ b/src/libcamera/pipeline/ipu3/imgu.cpp @@ -477,6 +477,13 @@ int ImgUDevice::configure(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputF LOG(IPU3, Debug) << "ImgU GDC format = " << gdcFormat.toString(); + StreamConfiguration statCfg = {}; + statCfg.size = inputFormat->size; + V4L2DeviceFormat statFormat; + ret = configureVideoDevice(stat_.get(), PAD_STAT, statCfg, &statFormat); + if (ret) + return ret; + return 0; } diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h index c73ac5a5a37cfe0e..37f5ae77c99ff8fe 100644 --- a/src/libcamera/pipeline/ipu3/imgu.h +++ b/src/libcamera/pipeline/ipu3/imgu.h @@ -61,13 +61,6 @@ public: outputFormat); } - int configureStat(const StreamConfiguration &cfg, - V4L2DeviceFormat *outputFormat) - { - return configureVideoDevice(stat_.get(), PAD_STAT, cfg, - outputFormat); - } - int allocateBuffers(unsigned int bufferCount); void freeBuffers(); diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 3f0232bc1eaad048..c559d160084f87e7 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -518,17 +518,6 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c) return ret; } - /* - * Apply the largest available format to the stat node. - * \todo Revise this when we'll actually use the stat node. - */ - StreamConfiguration statCfg = {}; - statCfg.size = cio2Format.size; - - ret = imgu->configureStat(statCfg, &outputFormat); - if (ret) - return ret; - /* Apply the "pipe_mode" control to the ImgU subdevice. */ ControlList ctrls(imgu->imgu_->controls()); ctrls.set(V4L2_CID_IPU3_PIPE_MODE,