{"id":25672,"url":"https://patchwork.libcamera.org/api/1.1/patches/25672/?format=json","web_url":"https://patchwork.libcamera.org/patch/25672/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260106170059.56193-19-bryan.odonoghue@linaro.org>","date":"2026-01-06T17:00:53","name":"[v11,18/24] libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option","commit_ref":"a92cc12fb542ea0d72f4fa2c2e07898e106c88a1","pull_url":null,"state":"accepted","archived":false,"hash":"51c05d711e71b7b8c35375cbf02d73d7fa81177c","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25672/mbox/","series":[{"id":5689,"url":"https://patchwork.libcamera.org/api/1.1/series/5689/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5689","date":"2026-01-06T17:00:35","name":"Add GLES 2.0 GPUISP to libcamera","version":10,"mbox":"https://patchwork.libcamera.org/series/5689/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25672/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25672/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3457BC3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jan 2026 17:01:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F228661FCB;\n\tTue,  6 Jan 2026 18:01:30 +0100 (CET)","from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 747506201E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jan 2026 18:01:27 +0100 (CET)","by mail-wr1-x42c.google.com with SMTP id\n\tffacd0b85a97d-42fb03c3cf2so650294f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 06 Jan 2026 09:01:27 -0800 (PST)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-432bd0dadcfsm5515322f8f.3.2026.01.06.09.01.24\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 06 Jan 2026 09:01:24 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"FSRMLKG7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1767718886; x=1768323686;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=OsQgF7Qs+HMvg1ZequOlo1SF53K1FeHzGwsdEPNX8Cs=;\n\tb=FSRMLKG7LkWvz0e7P6rF70f4UbIOBFUCnliNcPwthZGv7Z9hXOrcgVZD+SPRNcFV7u\n\tQKp/53O3eNGIcK8WcBJhOEgJaE7cyUtsdMXggR2URcakU+1C0K0xhXTYMAPReCJia6Ha\n\tfLOPfNH8HUjYGC+mRsRfheuKvKZeSzPXyBXJbUttVHEEyUkY2bH+fKBc+t3W66+rSSfV\n\thGMIfFx6x63D/vW1RitFmF/dxfsFU+njUDaoOrvXWqmOqRViDyLTbkH6V6asph6iBT4t\n\tOENL1gWabwrndtzdpMcXo0xucEn4Gornyn/M9b7jj/OXNyuR/UA/oxwTD14kcYZ9Adgg\n\t6sPA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1767718886; x=1768323686;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=OsQgF7Qs+HMvg1ZequOlo1SF53K1FeHzGwsdEPNX8Cs=;\n\tb=wRyvnF5v+/FMTu1kylBfO0tbB6tp4xYXaiU1N80moUprrRcB5pHwmYeNoHONuDtgrr\n\tAk5MbO226cmgOLZHWOVXUGWmTaZxJC9ebl7v2g2q5tdKau9I+zUenv3zqwCF5nl1wEv6\n\t9J5OGWglI6iNidbE8fFZ/yo5Jr5AxPhZwlopj9qH7HqbcKd9FG8TPIeZWPbtGdPZjNh2\n\tUj8YEsQRB0JkLFJRtj6KmpUIlYXqO8VJyhQ0cqkeKIzEG+MQxBQt/ENEC53cE/o8GZQs\n\taWqL8yyhU+k5eDofVMFQKOWq/0jGwbTHmtnr1QjQQT0q4DuiKLZ6tYVZhdLogpomNmZ6\n\trqmw==","X-Gm-Message-State":"AOJu0YywKgnHx7aleQ4SUkYJ/am1pXOxt52+1hwj3+j4joWDuF3DvxRT\n\t9K8d3aVqTbFvLkQjim80rdukOrcwcGISRtJZx/BLhUr1Rq3rwt5hqfUB5DQOSR5HTtyUlzNHNT6\n\tnob2Lxdk=","X-Gm-Gg":"AY/fxX59pRqXfH4yCjnwQLrW7Mg5kPHERVqB5pmVZg0kFBJwjH9LCoWKuEh3CejJ21Z\n\tIjZzJvv2aMSCSkJx8qv+DaCWSZKntKes6QiKK2iEF1ulU7bBq2a0jlVnYBVFuKGE2HbVSbQaRwK\n\tqjDVOGKGhZiwRIe7UndkT2s+YtwwN6OwsZXm3fWtXIze0kxYE4FPRR+WFjotozMrD3f+MgNalfr\n\tVXLsNINQOlIp9P3SOrtROIUnZDh73nAO3ymuuyV1rv0HPVGIzCMMedzB7L1DoTTMrYTbfpYAwL/\n\tXY9Eumjj4k+UOp4qCRP//ukD9BvcG1bvOpC3aB1GpRhxQv+0KIh32YMewV0wIt3gOYZ0kK4q5+H\n\tMmDHtYKROIBnbQ6DEyzt2w6DdJ8UEQ2hf1SbymCKe7hd9dXa5k8Bpotfk0WaP+mZZOjQm9UvNhA\n\tZSYhd4pkd/2cd+oTuJN6kMEX51VF2B7kzFJ1jioVZ94zqv9qJHnfhECkBikGA+FKQsA9/8a/xTN\n\ttYZqg==","X-Google-Smtp-Source":"AGHT+IGemVHqweql1wbJDuSan5Jt1VoRPrcuKnpwI5wryy1dlrdhuKYqyje0mUB4nDc1AWj0dvusQg==","X-Received":"by 2002:a05:6000:401f:b0:432:5b81:497 with SMTP id\n\tffacd0b85a97d-432bca03f1cmr4639101f8f.58.1767718885064; \n\tTue, 06 Jan 2026 09:01:25 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"[PATCH v11 18/24] libcamera: software_isp: debayer_egl: Make\n\tDebayerEGL 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","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"If GPUISP support is available make it so an environment variable can\nswitch it on.\n\nGiven we don't have full feature parity with CPUISP just yet on pixel\nformat output, we should default to CPUISP mode giving the user the option\nto switch on GPUISP by setting LIBCAMERA_SOFTISP_MODE=gpu\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/software_isp.cpp | 14 +++++++++++++-\n 1 file changed, 13 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex b31a374d8..5e837af4c 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -15,6 +15,7 @@\n \n #include <libcamera/base/log.h>\n #include <libcamera/base/thread.h>\n+#include <libcamera/base/utils.h>\n \n #include <libcamera/controls.h>\n #include <libcamera/formats.h>\n@@ -25,6 +26,9 @@\n #include \"libcamera/internal/software_isp/debayer_params.h\"\n \n #include \"debayer_cpu.h\"\n+#if HAVE_DEBAYER_EGL\n+#include \"debayer_egl.h\"\n+#endif\n \n /**\n  * \\file software_isp.cpp\n@@ -117,7 +121,15 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,\n \t}\n \tstats->statsReady.connect(this, &SoftwareIsp::statsReady);\n \n-\tdebayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);\n+#if HAVE_DEBAYER_EGL\n+\tstd::optional<std::string> softISPMode = configuration.envOption(\"LIBCAMERA_SOFTISP_MODE\", { \"software_isp\", \"mode\" });\n+\n+\tif (softISPMode && softISPMode == \"gpu\")\n+\t\tdebayer_ = std::make_unique<DebayerEGL>(std::move(stats), configuration);\n+#endif\n+\tif (!debayer_)\n+\t\tdebayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);\n+\n \tdebayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady);\n \tdebayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);\n \n","prefixes":["v11","18/24"]}