From patchwork Thu Mar 25 17:42:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Fricke X-Patchwork-Id: 11728 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 4E598BDC66 for ; Thu, 25 Mar 2021 17:43:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 92D0268D65; Thu, 25 Mar 2021 18:43:03 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=posteo.net header.i=@posteo.net header.b="ElHOIclV"; dkim-atps=neutral Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ED7D9603FE for ; Thu, 25 Mar 2021 18:43:01 +0100 (CET) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5265A16005F for ; Thu, 25 Mar 2021 18:43:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1616694181; bh=gPKnu3pz4XZiIdIESbNrs0TCIN+L4vuyG0zo2gWAmZE=; h=From:To:Cc:Subject:Date:From; b=ElHOIclVz/okx3b0oqXR6LH3QQFLe84tnVJNwNOWwB+CbUy6R5WOlgMVfFB3HGUwn loCiXhuR7ETW8E1GuOHkR9QT2YwUp/zLMIbe+otCAc8g7MKeHk4dOHaABfLvf8sBOF d+HUQE9TtJK86+Yv5uM8C2FGkxcPSKGOwIuAfRJt/4SHj0tYoVQBQ6CzAVrJQac52V TUwk3sPJ0/WzN6hjREtHA2bNPLLzMwubCFmhXjKs5Dkxrr9FQqtOJ/c2UfsnzJA9pf uD6YaqaL240xc7EUaHSFOCds8lNr6DnerL1JK8IWcj0S6uHZsv9fCiOo3aDvDesjP2 PMsLXg7aOiCkw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4F5srh4Rngz6tmR; Thu, 25 Mar 2021 18:43:00 +0100 (CET) From: Sebastian Fricke To: libcamera-devel@lists.libcamera.org Date: Thu, 25 Mar 2021 18:42:54 +0100 Message-Id: <20210325174254.7977-1-sebastian.fricke@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: rkisp1: 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: Sebastian Fricke Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/rkisp1/rkisp1.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index d2a10bb9..b0698903 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -32,7 +32,7 @@ class IPARkISP1 : public ipa::rkisp1::IPARkISP1Interface { public: int init(unsigned int hwRevision) override; - int start() override { return 0; } + int start() override; void stop() override {} int configure(const CameraSensorInfo &info, @@ -80,6 +80,13 @@ int IPARkISP1::init(unsigned int hwRevision) return 0; } +int IPARkISP1::start() +{ + setControls(0); + + return 0; +} + /** * \todo The RkISP1 pipeline currently provides an empty CameraSensorInfo * if the connected sensor does not provide enough information to properly @@ -121,7 +128,6 @@ int IPARkISP1::configure([[maybe_unused]] const CameraSensorInfo &info, << "Exposure: " << minExposure_ << "-" << maxExposure_ << " Gain: " << minGain_ << "-" << maxGain_; - setControls(0); return 0; }