From patchwork Tue Jan 6 17:00:53 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: 25672 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 3457BC3213 for ; Tue, 6 Jan 2026 17:01:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F228661FCB; 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="FSRMLKG7"; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 747506201E for ; Tue, 6 Jan 2026 18:01:27 +0100 (CET) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-42fb03c3cf2so650294f8f.1 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=OsQgF7Qs+HMvg1ZequOlo1SF53K1FeHzGwsdEPNX8Cs=; b=FSRMLKG7LkWvz0e7P6rF70f4UbIOBFUCnliNcPwthZGv7Z9hXOrcgVZD+SPRNcFV7u QKp/53O3eNGIcK8WcBJhOEgJaE7cyUtsdMXggR2URcakU+1C0K0xhXTYMAPReCJia6Ha fLOPfNH8HUjYGC+mRsRfheuKvKZeSzPXyBXJbUttVHEEyUkY2bH+fKBc+t3W66+rSSfV hGMIfFx6x63D/vW1RitFmF/dxfsFU+njUDaoOrvXWqmOqRViDyLTbkH6V6asph6iBT4t OENL1gWabwrndtzdpMcXo0xucEn4Gornyn/M9b7jj/OXNyuR/UA/oxwTD14kcYZ9Adgg 6sPA== 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=OsQgF7Qs+HMvg1ZequOlo1SF53K1FeHzGwsdEPNX8Cs=; b=wRyvnF5v+/FMTu1kylBfO0tbB6tp4xYXaiU1N80moUprrRcB5pHwmYeNoHONuDtgrr Ak5MbO226cmgOLZHWOVXUGWmTaZxJC9ebl7v2g2q5tdKau9I+zUenv3zqwCF5nl1wEv6 9J5OGWglI6iNidbE8fFZ/yo5Jr5AxPhZwlopj9qH7HqbcKd9FG8TPIeZWPbtGdPZjNh2 Uj8YEsQRB0JkLFJRtj6KmpUIlYXqO8VJyhQ0cqkeKIzEG+MQxBQt/ENEC53cE/o8GZQs aWqL8yyhU+k5eDofVMFQKOWq/0jGwbTHmtnr1QjQQT0q4DuiKLZ6tYVZhdLogpomNmZ6 rqmw== X-Gm-Message-State: AOJu0YywKgnHx7aleQ4SUkYJ/am1pXOxt52+1hwj3+j4joWDuF3DvxRT 9K8d3aVqTbFvLkQjim80rdukOrcwcGISRtJZx/BLhUr1Rq3rwt5hqfUB5DQOSR5HTtyUlzNHNT6 nob2Lxdk= X-Gm-Gg: AY/fxX59pRqXfH4yCjnwQLrW7Mg5kPHERVqB5pmVZg0kFBJwjH9LCoWKuEh3CejJ21Z IjZzJvv2aMSCSkJx8qv+DaCWSZKntKes6QiKK2iEF1ulU7bBq2a0jlVnYBVFuKGE2HbVSbQaRwK qjDVOGKGhZiwRIe7UndkT2s+YtwwN6OwsZXm3fWtXIze0kxYE4FPRR+WFjotozMrD3f+MgNalfr VXLsNINQOlIp9P3SOrtROIUnZDh73nAO3ymuuyV1rv0HPVGIzCMMedzB7L1DoTTMrYTbfpYAwL/ XY9Eumjj4k+UOp4qCRP//ukD9BvcG1bvOpC3aB1GpRhxQv+0KIh32YMewV0wIt3gOYZ0kK4q5+H MmDHtYKROIBnbQ6DEyzt2w6DdJ8UEQ2hf1SbymCKe7hd9dXa5k8Bpotfk0WaP+mZZOjQm9UvNhA ZSYhd4pkd/2cd+oTuJN6kMEX51VF2B7kzFJ1jioVZ94zqv9qJHnfhECkBikGA+FKQsA9/8a/xTN tYZqg== X-Google-Smtp-Source: AGHT+IGemVHqweql1wbJDuSan5Jt1VoRPrcuKnpwI5wryy1dlrdhuKYqyje0mUB4nDc1AWj0dvusQg== X-Received: by 2002:a05:6000:401f:b0:432:5b81:497 with SMTP id ffacd0b85a97d-432bca03f1cmr4639101f8f.58.1767718885064; Tue, 06 Jan 2026 09:01:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 09:01:24 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Milan Zamazal Subject: [PATCH v11 18/24] libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option Date: Tue, 6 Jan 2026 17:00:53 +0000 Message-ID: <20260106170059.56193-19-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" If GPUISP support is available make it so an environment variable can switch it on. Given we don't have full feature parity with CPUISP just yet on pixel format output, we should default to CPUISP mode giving the user the option to switch on GPUISP by setting LIBCAMERA_SOFTISP_MODE=gpu Reviewed-by: Milan Zamazal Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/software_isp.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index b31a374d8..5e837af4c 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -25,6 +26,9 @@ #include "libcamera/internal/software_isp/debayer_params.h" #include "debayer_cpu.h" +#if HAVE_DEBAYER_EGL +#include "debayer_egl.h" +#endif /** * \file software_isp.cpp @@ -117,7 +121,15 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor, } stats->statsReady.connect(this, &SoftwareIsp::statsReady); - debayer_ = std::make_unique(std::move(stats), configuration); +#if HAVE_DEBAYER_EGL + std::optional softISPMode = configuration.envOption("LIBCAMERA_SOFTISP_MODE", { "software_isp", "mode" }); + + if (softISPMode && softISPMode == "gpu") + debayer_ = std::make_unique(std::move(stats), configuration); +#endif + if (!debayer_) + debayer_ = std::make_unique(std::move(stats), configuration); + debayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady); debayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);