From patchwork Mon Oct 5 13:16:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 28399 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 71EC6C3357 for ; Mon, 5 Oct 2026 13:17:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4849A68A4C; Mon, 5 Oct 2026 15:17:19 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Dbz4OpDq"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 553BE689E9 for ; Mon, 5 Oct 2026 15:17:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791206234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T+Ex6QelgClmAbj0l+lKSSHufG7fswHpJ9MX2GGVjSk=; b=Dbz4OpDq+dN4sYEEmnlRAmPMGSIoZtxBFTk2EcQodbbN3ET6fZLGPrtKk5QeBDEB7XxM+K 3Io7uzbt04fHv7yjOFKBcg8Fc1teR/nl1roUzIkrBC3wOEZpRlwCZPDAZrmpCneSrk4Wg6 nzdV9VojNRxqy0KIAoyRkX373yD16MU= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-280-sFL2H4dnPdmwlqhROvV9ag-1; Mon, 05 Oct 2026 09:17:10 -0400 X-MC-Unique: sFL2H4dnPdmwlqhROvV9ag-1 X-Mimecast-MFC-AGG-ID: sFL2H4dnPdmwlqhROvV9ag_1791206230 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4B561955F61; Mon, 5 Oct 2026 13:17:09 +0000 (UTC) Received: from mzamazal-thinkpadp1gen7.redhat.corp (headnet03.pony-001.prod.iad2.dc.redhat.com [10.2.32.114]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 98C0E180057F; Mon, 5 Oct 2026 13:17:08 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Kieran Bingham Subject: [PATCH 2/3] libcamera: software_isp: Separate IPA start/stop Date: Mon, 5 Oct 2026 15:16:57 +0200 Message-ID: <20261005131700.97438-3-mzamazal@redhat.com> In-Reply-To: <20261005131700.97438-1-mzamazal@redhat.com> References: <20261005131700.97438-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: jpV6sCVyOus6zlaUrapOtYDq57ejDWqMaSqyFaSdxiE_1791206230 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 SoftwareIsp start() and stop() methods start both the IPA and debayering. Let's isolate the IPA start and stop into separate methods. This allows starting just the softisp IPA from the simple pipeline, which is useful to get information from the IPA even with only raw output. Signed-off-by: Milan Zamazal --- .../internal/software_isp/software_isp.h | 3 ++ src/libcamera/software_isp/software_isp.cpp | 28 +++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h index 7c41bc7ad..3e420242b 100644 --- a/include/libcamera/internal/software_isp/software_isp.h +++ b/include/libcamera/internal/software_isp/software_isp.h @@ -78,6 +78,9 @@ public: int start(); void stop(); + int startIpa(); + void stopIpa(); + void queueRequest(const uint32_t frame, const ControlList &controls); int queueBuffers(uint32_t frame, FrameBuffer *input, const std::map &outputs); diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 46a7cb5c1..11e0c49ed 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -378,7 +378,7 @@ int SoftwareIsp::queueBuffers(uint32_t frame, FrameBuffer *input, */ int SoftwareIsp::start() { - int ret = ipa_->start(); + int ret = startIpa(); if (ret) return ret; @@ -388,6 +388,19 @@ int SoftwareIsp::start() ConnectionTypeBlocking); } +/** + * \brief Starts the software ISP IPA + * + * Only the IPA is started here. If you want full software ISP with debayering, + * use \a start() instead. + * + * \return 0 on success, any other value indicates an error + */ +int SoftwareIsp::startIpa() +{ + return ipa_->start(); +} + /** * \brief Stops the Software ISP streaming operation * @@ -409,7 +422,7 @@ void SoftwareIsp::stop() Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this); - ipa_->stop(); + stopIpa(); for (auto buffer : queuedOutputBuffers_) { buffer->_d()->cancel(); @@ -424,6 +437,17 @@ void SoftwareIsp::stop() queuedInputBuffers_.clear(); } +/** + * \brief Stops the software ISP IPA + * + * Only the IPA is stopped here. If you stop full software ISP with debayering, + * use \a stop() instead. + */ +void SoftwareIsp::stopIpa() +{ + ipa_->stop(); +} + /** * \brief Passes the input framebuffer to the ISP worker to process * \param[in] frame The frame number