From patchwork Wed Mar 24 15:01:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11700 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 94681C32E9 for ; Wed, 24 Mar 2021 15:01:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 52CFA68D75; Wed, 24 Mar 2021 16:01:38 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="o8zAxJlC"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C64568D6D for ; Wed, 24 Mar 2021 16:01:33 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C61388F3; Wed, 24 Mar 2021 16:01:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616598092; bh=iUvS2PpgzAjP5fRAdisbJ107L5bPd52IEECPc7Va/+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o8zAxJlCe1A1NDj+h0g3N2zAbztneLBR/8Z4jxk2oISDu8EWpAl2BnpABLbjlKIct agNaijAl/GOQDknz8bdhVCj7ntyKA6a5GrIzs164VxCnOrbSccmYmXeBCdy2ROzkGZ QjcF/vTx/bp+SsGaHjKGoKsEAmnIUF6cS4F6J7Cg= From: Kieran Bingham To: libcamera devel Date: Wed, 24 Mar 2021 15:01:25 +0000 Message-Id: <20210324150125.1318325-7-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210324150125.1318325-1-kieran.bingham@ideasonboard.com> References: <20210324150125.1318325-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 6/6] ipa: ipu3: Do not set controls during 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" The configure operation is synchronous and should not send events back to the pipeline handler. If information needs to be returned from configure it should be handled through the interface directly. Move the initial call to setControls() out of configure() and into the start() method which is called after the IPA running_ state is updated. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/ipu3/ipu3.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index a5c5e029f465..34a907f23ef5 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -32,7 +32,7 @@ public: { return 0; } - int start() override { return 0; } + int start() override; void stop() override {} void configure(const std::map &entityControls, @@ -63,6 +63,13 @@ private: uint32_t maxGain_; }; +int IPAIPU3::start() +{ + setControls(0); + + return 0; +} + void IPAIPU3::configure(const std::map &entityControls, [[maybe_unused]] const Size &bdsOutputSize) { @@ -90,8 +97,6 @@ void IPAIPU3::configure(const std::map &entityControls minGain_ = std::max(itGain->second.min().get(), 1); maxGain_ = itGain->second.max().get(); gain_ = maxGain_; - - setControls(0); } void IPAIPU3::mapBuffers(const std::vector &buffers)