From patchwork Sat Mar 27 10:05:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Fricke X-Patchwork-Id: 11735 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 11E42C32ED for ; Sat, 27 Mar 2021 10:05:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 13B5768D6E; Sat, 27 Mar 2021 11:05:56 +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="kGAFDsMb"; dkim-atps=neutral Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1759168D58 for ; Sat, 27 Mar 2021 11:05:55 +0100 (CET) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5316B16005C for ; Sat, 27 Mar 2021 11:05:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1616839554; bh=SEP7eHUjTW4tYsXEcfZ7452VWAa8X9UgHrO8ddTpg9k=; h=From:To:Cc:Subject:Date:From; b=kGAFDsMbKQRE4Uv4CinvHZc6QHvGDzI2nSCwKl+cAUU82/5rIeGZ4x6UX5Yj85FA2 2ekwB+dIh3q1W3TGm0F00E1qh6je4cjDvcmrZU+Bx6YJhu8uPEHZqFI3EXJBpXUUFO ucS/erW2xsg5oDHhwpHW/Kswb8pr4lJ1Qm0WJrVKW2Fg33WzfsuhdCN/+z/Xl+1wzh 9c774QQiBTBqV3DOSVZO2mToY34v/B7euw3vCqSf/XGvmYYj/FhSxmvLIo2SANQ8l6 eJYjcR5VGc2MVpjjbSCemuYLSnj674Td/Jf8vKybjnWRC/l9v5ZQpeV9vuS2MNOIxQ F+gQO3spKm0gw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4F6vcK2ZRpz6tmV; Sat, 27 Mar 2021 11:05:53 +0100 (CET) From: Sebastian Fricke To: libcamera-devel@lists.libcamera.org Date: Sat, 27 Mar 2021 11:05:50 +0100 Message-Id: <20210327100550.17271-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; }