{"id":25532,"url":"https://patchwork.libcamera.org/api/1.1/patches/25532/?format=json","web_url":"https://patchwork.libcamera.org/patch/25532/","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":"<20251212002937.3118-18-bryan.odonoghue@linaro.org>","date":"2025-12-12T00:29:28","name":"[v8,17/26] libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"a86e6818e4a2bdcb146de7b82a1a6d9608104c0d","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/25532/mbox/","series":[{"id":5657,"url":"https://patchwork.libcamera.org/api/1.1/series/5657/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5657","date":"2025-12-12T00:29:11","name":"Add GLES 2.0 GPUISP to libcamera","version":8,"mbox":"https://patchwork.libcamera.org/series/5657/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25532/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25532/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 8B6B2BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Dec 2025 00:34:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 547A9618BF;\n\tFri, 12 Dec 2025 01:34:20 +0100 (CET)","from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com\n\t[IPv6:2607:f8b0:4864:20::1032])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A5BC61636\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Dec 2025 01:34:18 +0100 (CET)","by mail-pj1-x1032.google.com with SMTP id\n\t98e67ed59e1d1-340a5c58bf1so448198a91.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Dec 2025 16:34:18 -0800 (PST)","from inspiron14p-linux (p99250-ipoefx.ipoe.ocn.ne.jp.\n\t[153.246.134.249]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-c0c26eb0f6bsm3317282a12.14.2025.12.11.16.34.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Dec 2025 16:34:16 -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=\"ujRA0ddU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765499657; x=1766104457;\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=qveDztGD+z1bcvRVfeWU9FTU1qkHWCGGVTIxAh2VXQw=;\n\tb=ujRA0ddUeT0adfRfxY/sZN2ZFfAZY4M0ufgfA2VWfZyczhWBU3YqRTNLrYhktB0PUv\n\tCJmeWO1aHpL5L5M2Wddrog43R59B4TSVRkjMZE8jE4GY/OmpIK6riNx7nrNoNqmpQLXY\n\tZ6XnKHx9DEsBoqOxN6EtX3+a3tu6g2JdE8SAx6mQM3Rjb/fZcMIEiv2S/own2iHe/wkp\n\tacifRras90WIzOt+kfcCc1XB1swMypT7RKCdFsTheUxKEuV2TMlX3v+wSXZ/ws3zdhyI\n\tEt3+4ar2+weYHnjUhIv3NnfeMvQ+46WrNIaxB/FMWRQQyjJhYAaRwc1RSKVeGdfbG5vI\n\tGXaQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765499657; x=1766104457;\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=qveDztGD+z1bcvRVfeWU9FTU1qkHWCGGVTIxAh2VXQw=;\n\tb=nVijrKqCT958oS7DeqOKSEbYJO8cen+gH9lN2B7Vc/udL/sWeVmibDpK2QDY2IpGBH\n\t0xTle0/eB7BwMYUaepPBMfqTF1ZxYXD5A3wuZCnTEVLWg9NuK3u3br/PoVXOtSBwKWIj\n\tZ+9VavPCn9RvSL/+lJCBx4OawFlxhhMD5SylRxq1Z10p1sYQscKegNJXAguFKbHds4So\n\tc87Cvbxrs1Nxg5gOBF7DVTgEn6XESRhYUDkGG4v3po+01MOdw8qjgM/rqaDbZ/v15YLY\n\tkemEJ8n2m2+f/kndBVONHDy0x9xTWiO67BHmn3sIqjKg+j8IEv6X6crg0uJjo/cqrdaZ\n\tZEhw==","X-Gm-Message-State":"AOJu0YyAmBFt6wbI9a58/VsLvVecepnisBSi5XhcVte8MP471v3X7A62\n\tsCIFSKvU3bJ+c5eyvoBKcVBUltR2mzPNB9olbOGcixunAcTxtEO0B511L1H9I0bz5IlnRemDtmi\n\tcHfdb","X-Gm-Gg":"AY/fxX7fBYdRvV5PrtUK6uXFkVw3/EI0MXEApAcWREG975OCAgtz3IXuQsLe9Tf+At+\n\tTq8N7RW/mRnPVjtatrDXokMS4dO2Jq77fqZlBZc0XrqMyETGu4MQFCyFB0snogBGtXCClgQn8wy\n\tUKVpRfpyIRjuTF7/QBHYcCvb887+qG2A4TZclf35qHdazqiEP/9miBRT0IllG6+2/PG3fmduRsr\n\tATAKnsVr51rFKqJP+gxWNNx13yBHmVWhfA3B7ows23AYuuaL3qRXm9supdPvusocAm1p0fCnIIf\n\tDmx4GHZ9iOhZ18eWOr273RnY5vjcMs6y+2kL54jz42nd9b0ly0vDLeLJiWkIF2lYV4Lr/tbftyb\n\tkLpY7ywjsVXSf39ADudwn/+UiJsWRXAKny7Fb6Xa37AYd1SAqlkm0M3QaP1EE6FDtLd/5S+KGqk\n\t/ID4zEoGN21b1vKdsYef1fVFi2OZL62t+nKm0fiBD4pDf2eUo08YS4IQ9DaTQ=","X-Google-Smtp-Source":"AGHT+IHXC9GjiM25nk9JU9k8vtsKsk2M7GHr8WRUwyeexPXBOUZkl8jUIjZ+BhCmaaJbw63hSh6knQ==","X-Received":"by 2002:a17:90a:d2cf:b0:349:30b4:6365 with SMTP id\n\t98e67ed59e1d1-34abd858908mr342348a91.27.1765499656544; \n\tThu, 11 Dec 2025 16:34:16 -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 v8 17/26] libcamera: software_isp: debayer_egl: Make\n\tDebayerEGL an environment option","Date":"Fri, 12 Dec 2025 00:29:28 +0000","Message-ID":"<20251212002937.3118-18-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251212002937.3118-1-bryan.odonoghue@linaro.org>","References":"<20251212002937.3118-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 | 24 ++++++++++++++++++++-\n 1 file changed, 23 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex b31a374d8..efe44e393 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,25 @@ 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+\t\tif (!debayer_) {\n+\t\t\tLOG(SoftwareIsp, Error) << \"Failed to instantiate GPUISP\";\n+\t\t\treturn;\n+\t\t}\n+\t}\n+#endif\n+\tif (!debayer_)\n+\t\tdebayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);\n+\n+\tif (!debayer_) {\n+\t\tLOG(SoftwareIsp, Error) << \"Failed to create Debayer object\";\n+\t\treturn;\n+\t}\n+\n \tdebayer_->inputBufferReady.connect(this, &SoftwareIsp::inputReady);\n \tdebayer_->outputBufferReady.connect(this, &SoftwareIsp::outputReady);\n \n","prefixes":["v8","17/26"]}