{"id":25258,"url":"https://patchwork.libcamera.org/api/patches/25258/?format=json","web_url":"https://patchwork.libcamera.org/patch/25258/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20251127023739.179652-22-bryan.odonoghue@linaro.org>","date":"2025-11-27T02:37:36","name":"[v5,21/24] ipa: simple: Add a flag to indicate gpuIspEnabled","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"eb72be8930ba83fc7926620d682bf8490a897b25","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25258/mbox/","series":[{"id":5617,"url":"https://patchwork.libcamera.org/api/series/5617/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5617","date":"2025-11-27T02:37:15","name":"Add GLES 2.0 GPUISP to libcamera","version":5,"mbox":"https://patchwork.libcamera.org/series/5617/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25258/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25258/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 B333FC32E0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Nov 2025 02:38:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2A40260AD0;\n\tThu, 27 Nov 2025 03:38:32 +0100 (CET)","from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4445960C68\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Nov 2025 03:38:28 +0100 (CET)","by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-47798ded6fcso1421985e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 Nov 2025 18:38:28 -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\t5b1f17b1804b1-4790552c3c9sm58186345e9.0.2025.11.26.18.38.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 26 Nov 2025 18:38:27 -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=\"Aq1Gl/yL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764211108; x=1764815908;\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=woB0MgjmWr8Zdvt/377QQWSwZ83OLYd14divLlJMGJ8=;\n\tb=Aq1Gl/yLk/dc1rGhnplb5F9RqNiDuXmregiDJSHRBnxGThTLu2thuNwvJPfPg6v16l\n\tnjT/9VTOclgqhTgtKTBP5DaKgP65E2RosnDkzGaalmFzBQqaNNcQkNyLqbim8MPw2YCj\n\t3RdAhNkPzP+oDt6R9lfDj7r0aSZO1XGrma16NF8Tbfg5PFfgNBNxsVa3DOJx9iK7g65u\n\tKTfVkXzRDOdlKehFafjvfG06N0mA1h2kDAtqD6CCZ105Xm9VfptwekYJa0sN1HcXgTyq\n\tXeq4GhW+NEePF7Q+HCqRBBbE4PQlXSmqt/FlVlkthDcI1DX6bMrYaipiTNTD4rf1tJ/4\n\tFtiA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764211108; x=1764815908;\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=woB0MgjmWr8Zdvt/377QQWSwZ83OLYd14divLlJMGJ8=;\n\tb=Kvuvs4IK+9loQJnlG20RQmGAR44kb5U+6WCSk+04W4+LPhO7yhSNhDt4xZBwmPuJfN\n\tm+q0EzrUFQw0C00hPmKo0TP4Y0MxFL5cpn7Aia2IN8Xlrxyo11XGl1YAT69wuRBhu1xr\n\t6Y4FMXLAOeKD2UljWBrd1sZrdSBTUL7M3EGrKuE1AEXGyfkQ/spiyIn1pswjTdbnsd4c\n\tfAtdrerEoUj/UCALVddSMiSAw0yUn719JEevfkqMTZIjOMIeIiLKgI+FdwPKWtg31nmv\n\tOhIDxkoA1/KPwXM6AcvcgsoXv/WAaaY4MFynDqgtepHWytSGXWydItGip5xuMyPctpbi\n\t87BA==","X-Gm-Message-State":"AOJu0YxQdbPQTex4nRQBD4E7WEqy1jiXUX+LERxk3LPSWilp+/mOgJo+\n\tY5+bw1xrbbKSPG6ROEfcBWLI264Oae21MUylRtedoXcW7yXfPnoOGc/n+wEhvAat2vAGw3K8ZUR\n\tpj4FrXa8=","X-Gm-Gg":"ASbGncuqUCMVsKLF+Sk5q4IwfU7vPmVSrhqg0cSdSE/mvOdIRhM171Ud7n45E0fSe8o\n\t8XcdqCL5lHWhMKEEplvRghhqR7C5cJkav49IIykd38+ZtVWE1dCK6CWd4FuSjHEDysOtfcXGAx8\n\t5z5wAbJL6eqp0Hw40W5sWlze4Mw7OVp98wmZXrSQmusuS6a0Oe4O6Lbbr64GtRQRgceD2aM5a0a\n\thoO3gZ6IaNRI9DUP0WvOUWYaVrnqZNB4uncmg9pRU2QVAli+zdUctAKcu/iA9kPq/hM3ygYQuvF\n\tKwbSEvi2Ien4LDF1aKig5JZR9Z4oW6dtf/QMKoFzKTLfCrtnY46sdOvdHKOThUe7eVfKxDa+OoK\n\tOUpCpPBDIEFKH2A9GWSw4SurPx93Xyebsbsz6w+EbkTEK+g0tcMSCpbNdwwn1IKhLTLOw2+HpBO\n\t3ozbZNLrnEcgCw3jKuzXGDdnq2VEkY1eBUgLSJeEG5XkvxI71bVvyzQ8h9BgEUzrmmwx33VmtAE\n\tSIIng==","X-Google-Smtp-Source":"AGHT+IEtUuVL65j4R+Pi3HuwdEsPnLIEGhWstSoMBW/2jBbnQaqFFXnE5N6r1qwislYeJPn3eHIExA==","X-Received":"by 2002:a05:600c:3511:b0:476:d494:41d2 with SMTP id\n\t5b1f17b1804b1-477c112f7b1mr210333385e9.29.1764211107659; \n\tWed, 26 Nov 2025 18:38:27 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>","Subject":"[PATCH v5 21/24] ipa: simple: Add a flag to indicate gpuIspEnabled","Date":"Thu, 27 Nov 2025 02:37:36 +0000","Message-ID":"<20251127023739.179652-22-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.51.2","In-Reply-To":"<20251127023739.179652-1-bryan.odonoghue@linaro.org>","References":"<20251127023739.179652-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":"Flag gpuIspEnabled in the simple IPA context. This flag will allow to\nselectively avoid some calculations or to generate a default CCM.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n include/libcamera/ipa/soft.mojom            | 3 ++-\n src/ipa/simple/ipa_context.h                | 1 +\n src/ipa/simple/soft_simple.cpp              | 3 +++\n src/libcamera/software_isp/software_isp.cpp | 8 +++++++-\n 4 files changed, 13 insertions(+), 2 deletions(-)","diff":"diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\nindex 77328c5fd..aff8fcbd3 100644\n--- a/include/libcamera/ipa/soft.mojom\n+++ b/include/libcamera/ipa/soft.mojom\n@@ -17,7 +17,8 @@ interface IPASoftInterface {\n \t     libcamera.SharedFD fdStats,\n \t     libcamera.SharedFD fdParams,\n \t     libcamera.IPACameraSensorInfo sensorInfo,\n-\t     libcamera.ControlInfoMap sensorControls)\n+\t     libcamera.ControlInfoMap sensorControls,\n+\t     bool gpuIspEnabled)\n \t\t=> (int32 ret, libcamera.ControlInfoMap ipaControls, bool ccmEnabled);\n \tstart() => (int32 ret);\n \tstop();\ndiff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h\nindex c3081e306..ee8fb6b03 100644\n--- a/src/ipa/simple/ipa_context.h\n+++ b/src/ipa/simple/ipa_context.h\n@@ -103,6 +103,7 @@ struct IPAContext {\n \tFCQueue<IPAFrameContext> frameContexts;\n \tControlInfoMap::Map ctrlMap;\n \tbool ccmEnabled = false;\n+\tbool gpuIspEnabled = false;\n };\n \n } /* namespace ipa::soft */\ndiff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\nindex b147aca2e..2bbe271d9 100644\n--- a/src/ipa/simple/soft_simple.cpp\n+++ b/src/ipa/simple/soft_simple.cpp\n@@ -55,6 +55,7 @@ public:\n \t\t const SharedFD &fdParams,\n \t\t const IPACameraSensorInfo &sensorInfo,\n \t\t const ControlInfoMap &sensorControls,\n+\t\t bool gpuIspEnabled,\n \t\t ControlInfoMap *ipaControls,\n \t\t bool *ccmEnabled) override;\n \tint configure(const IPAConfigInfo &configInfo) override;\n@@ -95,6 +96,7 @@ int IPASoftSimple::init(const IPASettings &settings,\n \t\t\tconst SharedFD &fdParams,\n \t\t\tconst IPACameraSensorInfo &sensorInfo,\n \t\t\tconst ControlInfoMap &sensorControls,\n+\t\t\tbool gpuIspEnabled,\n \t\t\tControlInfoMap *ipaControls,\n \t\t\tbool *ccmEnabled)\n {\n@@ -106,6 +108,7 @@ int IPASoftSimple::init(const IPASettings &settings,\n \t}\n \n \tcontext_.sensorInfo = sensorInfo;\n+\tcontext_.gpuIspEnabled = gpuIspEnabled;\n \n \t/* Load the tuning data file */\n \tFile file(settings.configurationFile);\ndiff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex a54dcbaf5..8479760fc 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -130,6 +130,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,\n \t\t}\n \t}\n \n+\tbool gpuIspEnabled;\n+\n #if HAVE_DEBAYER_EGL\n \tif (!softISPMode || !strcmp(softISPMode, \"gpu\")) {\n \t\tdebayer_ = std::make_unique<DebayerEGL>(std::move(stats), configuration);\n@@ -137,10 +139,13 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,\n \t\t\tLOG(SoftwareIsp, Error) << \"Failed to instantiate GPUISP\";\n \t\t\treturn;\n \t\t}\n+\t\tgpuIspEnabled = true;\n \t}\n #endif\n-\tif (!debayer_)\n+\tif (!debayer_) {\n \t\tdebayer_ = std::make_unique<DebayerCpu>(std::move(stats), configuration);\n+\t\tgpuIspEnabled = false;\n+\t}\n \n \tif (!debayer_) {\n \t\tLOG(SoftwareIsp, Error) << \"Failed to create Debayer object\";\n@@ -177,6 +182,7 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,\n \t\t\t sharedParams_.fd(),\n \t\t\t sensorInfo,\n \t\t\t sensor->controls(),\n+\t\t\t gpuIspEnabled,\n \t\t\t ipaControls,\n \t\t\t &ccmEnabled_);\n \tif (ret) {\n","prefixes":["v5","21/24"]}