From patchwork Tue Jan 6 17:00:54 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 25671 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 791ECBDCC0 for ; Tue, 6 Jan 2026 17:01:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 283596202B; Tue, 6 Jan 2026 18:01:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="OQqI5vIS"; dkim-atps=neutral Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4CD346201B for ; Tue, 6 Jan 2026 18:01:27 +0100 (CET) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-42fb2314f52so580905f8f.0 for ; Tue, 06 Jan 2026 09:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767718886; x=1768323686; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=obbRpAVZjcoxO7/iHqw+nRA0ImMCqi2GHIb0BnjqJe8=; b=OQqI5vISHPn1XG88qnL24FTu7QisQ7HuloHNpdQqnl1QLTbR5P7FVRTGb4Qu9eYQPD rkL7+8KY6jtTYCDUOyktgsYwxIg1rXkDRlF96W/1vMhLRAtLvw1IJ5FQ3/Sh4yF9lPNt Uaxx9jtx2OkFmwiiYZk2hXIj7bNyWMGrs14ut5IoDyArJFMzf1BN+8WpRQv+TKCePebR NgUjjFa7OYJxQfa9pyWsEDd1GftfGPIcasKX4u1K/LODFvOs39CYiMGl+uEYBKIdvkXK Lu5v9XAEFYXylmExFB9fAL1duIHZ8dVDOpgGLCPBsJQLSIQxY+LYqGTJSswPoJN8lDPG myIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767718886; x=1768323686; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=obbRpAVZjcoxO7/iHqw+nRA0ImMCqi2GHIb0BnjqJe8=; b=NDqj1AWDz6xWGrqMMFt493HnqO0ZBb9Ln7n28cjVjdklgZE12Bm8fQXO2+qby4Wjvc aWz9UCptH8ZV6cct8JsfIqgHgZgKHWha4epkCTE/DFOuyUineW8yOo6RomNOSjoGbHxR cLbaWnpHGAy02072yFcj60eRVXw3zrHSqqy2Ny7+B9vBrqqBcyJTKaBMLoJ4pFKrUnJF noBTdr8Kc2aT0r9e6e8+SKfgsiEJkaGqa4fnM3/MH66skxm4leeGdL3B9JQG2rpybez6 n9xOrgJqzFzLij3ZF7rJCXAemOruDCLbx2PgI0/Mqvg56PbBnD7nB1AQv5bjyA3siHVE K+Cw== X-Gm-Message-State: AOJu0YxjFJvF48IEFqhcpBxChZDXYlAWYo7/0hJq8r3uBjYayJUAEgCm ZdGMeXYIQ92hvGLefmCZ91T6ja2WLRqY+eXcfqVaBwqJRJHDtAHg6/SvLi9YIgVwZgqnUv/XM/l 7P+1/K74= X-Gm-Gg: AY/fxX4wVlejL0eJGReUblVfux9yJRDAO51E14Jy99rRq9/rhgEWR+yr6wBKrQYkEgO CD60qjMz8YnyACm48ceJwdgYS3kjmLVzSuIgD+us7mWrnYOq+gZn+wPYL1VoOAkmxy3Q7sAlwP8 N/wqrg5ClCTRBdAEIsr2z6rRi0EBeeFvv0zWmhyfuMsIl4jn48XA9KmcGMPgLal0i5keqwqCvio ypmqC5AkZorduwrQurDPJUZgFvchKy/1OimzOa8Rm11Exw10oifBs9BQJDXR8rlkXThqnTeMED5 S118VWWA2RcuooAnYTqoFDj0PdJ1vZ4WIdLikqFx61CjjEW9YaH8TFnBh2ofS6ioBGxs7uij/A9 HOtVjJOBgVFS4oiw5UxAy4bZ6bPcqojPSkT3oxLY7IqSXh89Wq7jQGUECrccMMERz63KIMCwq26 wqmYekG/NtEa0+SqTirqM9sh3nGuQwNYc4nY6Ms2VO1WImOhQHoXYQ5b9PTfKfPyIafRA= X-Google-Smtp-Source: AGHT+IGEVnZnrOVFylNVBK5+GhMY1mrE44j1PP/HesrtiFTxXbOJLBuQWQhfJp7lPC1ZKRx1tcqb2Q== X-Received: by 2002:a05:6000:288b:b0:430:fb6d:1442 with SMTP id ffacd0b85a97d-432bca52322mr5037484f8f.62.1767718886418; Tue, 06 Jan 2026 09:01:26 -0800 (PST) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0dadcfsm5515322f8f.3.2026.01.06.09.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 09:01:25 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Milan Zamazal Subject: [PATCH v11 19/24] ipa: simple: Add a flag to indicate gpuIspEnabled Date: Tue, 6 Jan 2026 17:00:54 +0000 Message-ID: <20260106170059.56193-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106170059.56193-1-bryan.odonoghue@linaro.org> References: <20260106170059.56193-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 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" Flag gpuIspEnabled in the simple IPA context. This flag will allow to selectively avoid some calculations or to generate a default CCM. Reviewed-by: Milan Zamazal Signed-off-by: Bryan O'Donoghue --- include/libcamera/ipa/soft.mojom | 3 ++- src/ipa/simple/ipa_context.h | 1 + src/ipa/simple/soft_simple.cpp | 3 +++ src/libcamera/software_isp/software_isp.cpp | 11 +++++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom index 77328c5fd..aff8fcbd3 100644 --- a/include/libcamera/ipa/soft.mojom +++ b/include/libcamera/ipa/soft.mojom @@ -17,7 +17,8 @@ interface IPASoftInterface { libcamera.SharedFD fdStats, libcamera.SharedFD fdParams, libcamera.IPACameraSensorInfo sensorInfo, - libcamera.ControlInfoMap sensorControls) + libcamera.ControlInfoMap sensorControls, + bool gpuIspEnabled) => (int32 ret, libcamera.ControlInfoMap ipaControls, bool ccmEnabled); start() => (int32 ret); stop(); diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h index 7837bb4dd..26db92e93 100644 --- a/src/ipa/simple/ipa_context.h +++ b/src/ipa/simple/ipa_context.h @@ -105,6 +105,7 @@ struct IPAContext { FCQueue frameContexts; ControlInfoMap::Map ctrlMap; bool ccmEnabled = false; + bool gpuIspEnabled = false; }; } /* namespace ipa::soft */ diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index dde116661..57836c73c 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -55,6 +55,7 @@ public: const SharedFD &fdParams, const IPACameraSensorInfo &sensorInfo, const ControlInfoMap &sensorControls, + bool gpuIspEnabled, ControlInfoMap *ipaControls, bool *ccmEnabled) override; int configure(const IPAConfigInfo &configInfo) override; @@ -95,6 +96,7 @@ int IPASoftSimple::init(const IPASettings &settings, const SharedFD &fdParams, const IPACameraSensorInfo &sensorInfo, const ControlInfoMap &sensorControls, + bool gpuIspEnabled, ControlInfoMap *ipaControls, bool *ccmEnabled) { @@ -106,6 +108,7 @@ int IPASoftSimple::init(const IPASettings &settings, } context_.sensorInfo = sensorInfo; + context_.gpuIspEnabled = gpuIspEnabled; /* Load the tuning data file */ File file(settings.configurationFile); diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 5e837af4c..5a93442f8 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -121,14 +121,20 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor, } stats->statsReady.connect(this, &SoftwareIsp::statsReady); + bool gpuIspEnabled; + #if HAVE_DEBAYER_EGL std::optional softISPMode = configuration.envOption("LIBCAMERA_SOFTISP_MODE", { "software_isp", "mode" }); - if (softISPMode && softISPMode == "gpu") + if (softISPMode && softISPMode == "gpu") { debayer_ = std::make_unique(std::move(stats), configuration); + gpuIspEnabled = true; + } #endif - if (!debayer_) + if (!debayer_) { debayer_ = std::make_unique(std::move(stats), configuration); + gpuIspEnabled = false; + } debayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady); debayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady); @@ -160,6 +166,7 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor, sharedParams_.fd(), sensorInfo, sensor->controls(), + gpuIspEnabled, ipaControls, &ccmEnabled_); if (ret) {