From patchwork Sat Mar 27 10:08:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Fricke X-Patchwork-Id: 11736 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 846A7C32ED for ; Sat, 27 Mar 2021 10:09:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DA41F68D6E; Sat, 27 Mar 2021 11:09:02 +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="TiqklGix"; dkim-atps=neutral Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A630068D58 for ; Sat, 27 Mar 2021 11:09:00 +0100 (CET) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 1E227160061 for ; Sat, 27 Mar 2021 11:09:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1616839740; bh=SEP7eHUjTW4tYsXEcfZ7452VWAa8X9UgHrO8ddTpg9k=; h=From:To:Cc:Subject:Date:From; b=TiqklGixishbrEbJmxopDcvZv63XO1B+FPn/C4f5gKQ6oo1vuNhrgDVp1wp5oqKJW e9yK1p3rMOngpFgGMFBEg6B3hRQbg9RV/pBZiufyvnpfcjHQctGsmGdLTCLX5Xqmd/ JwipVwwALCkB3eMjeeSL5XwCWpkNuIkvCG46POlboWD8wlbJ8bmmMovacvxE6C3nYm Ii1pOtCuRj5zvB4WEyIggIsVarzmn7debj9Go7e5FJHb8aRpq0vDq9/KABoW0YI8GU A32XNudtzb95vjdALGR89H0oK6RSc2r2k7QxRtbyPnIQWPS+/NJqbaKayeE9453meR vpCcSqdxWBUMA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4F6vgv2qwKz6tmb; Sat, 27 Mar 2021 11:08:59 +0100 (CET) From: Sebastian Fricke To: libcamera-devel@lists.libcamera.org Date: Sat, 27 Mar 2021 11:08:13 +0100 Message-Id: <20210327100812.17483-1-sebastian.fricke@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] 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" Do not send events back to the pipeline handler, while the IPA thread has not been started. If information needs to be returned from configure it should be returned 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. Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Sebastian Fricke --- Changes since v1: - Fix whitespace issues (thanks to Laurent) - Correct commit description (thanks to Paul) --- 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..8a57b080 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; }