[{"id":37206,"web_url":"https://patchwork.libcamera.org/comment/37206/","msgid":"<85v7inz2uz.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-12-03T21:12:36","subject":"Re: [PATCH v6 19/24] ipa: simple: Add a flag to indicate\n\tgpuIspEnabled","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:\n\n> Flag gpuIspEnabled in the simple IPA context. This flag will allow to\n> selectively avoid some calculations or to generate a default CCM.\n>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\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(-)\n>\n> diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom\n> index 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();\n> diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h\n> index 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 */\n> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp\n> index 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);\n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index fd68dd0c5..a14fa22e5 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) {","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 9CDEDC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Dec 2025 21:12:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DAC4E61023;\n\tWed,  3 Dec 2025 22:12:43 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6BBA0609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Dec 2025 22:12:42 +0100 (CET)","from mail-wm1-f71.google.com (mail-wm1-f71.google.com\n\t[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-225-6PmqfMQ8N1eWoDuEKEGkjA-1; Wed, 03 Dec 2025 16:12:40 -0500","by mail-wm1-f71.google.com with SMTP id\n\t5b1f17b1804b1-477b8a667bcso1655275e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 03 Dec 2025 13:12:39 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4792a7a3379sm69591355e9.8.2025.12.03.13.12.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 03 Dec 2025 13:12:37 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"KNzkfPH2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1764796361;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=DfCjBt85rixIHtf06hVaZ6mHaDZkHzP33XXjA74DYig=;\n\tb=KNzkfPH2uuRzgO16zIie7q5i46gUfAtsDHotT+Ab17B7iSCf0/mC+5GkxMhz9CHhyDhG4r\n\to4iIKTboACvi98o6OEgD7keKFjd74qpZ02oc84VZgKazrRv4pdalb2KivFv2VcSQbkGNko\n\tvXGdinswjYSgYj8zDoNY9Ui8+JtrYRo=","X-MC-Unique":"6PmqfMQ8N1eWoDuEKEGkjA-1","X-Mimecast-MFC-AGG-ID":"6PmqfMQ8N1eWoDuEKEGkjA_1764796359","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764796358; x=1765401158;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject\n\t:date:message-id:reply-to;\n\tbh=DfCjBt85rixIHtf06hVaZ6mHaDZkHzP33XXjA74DYig=;\n\tb=Wa5jYfrLFXVTjrQwrcCjDQMKEZjHjFrWNU7XDMUYvymfRqq9lVcjv+w0h/HYfIQ78L\n\tdrI2UiD73QJNGDsC4xQWat3cNM6kU+C6mzhD0YtlkSqspsw3r0/6seyi31bMNb88/Y90\n\tijkYkd/L+XkUwYYw3IBwES8fjKhyfxMzPw0AZObWgCS+mIhF5eyQlZL37Q5HSC59lVwW\n\tt9O86E1Ref818t7/Ly9y6CLXVMDGfgea9DWwgrkABqDSkxx3mt/oD7e7vdkzkLvOb6dr\n\t1NQb7LifRSgEIgAMEljZmTj+doI9ZKeQV+uTuB31zyr/FLz2s4FY/bmYAwBdo7ngwjMT\n\tA6eg==","X-Gm-Message-State":"AOJu0YyBx+MuA7htfgi9HJWtWJMlmB2505gKMut+45MuOD5dPTgYHR6x\n\tgleeSvFMXBLGVsfWJAvu2jKhSrjRpL3EjM2ORas3NqJquqR0m8vyv+YbNS9uJJ2f0hu2+UVoVD+\n\tIdWwbx9Cej9Ghh6t6CraBtjsj9naeBeRlFhvWHbWDzUSv3lvx/vB3YpWM58S9XddGQ0ZYq7+rnT\n\th0TStTWs0=","X-Gm-Gg":"ASbGnctmXNuQo49N29z3pu64LUYg5pCqNHy3hvbkoXYhMTOnbYAmPBxuRjUXWzTevll\n\tuH6YuAbYJ4WMXj7oWxbng9GXPtW4L/NClCa9cciPHs+4s83TRFAruEIhstESprYJ0tkX1k0yLM3\n\to3Tmn0gZnsYq7tOEZUfuUrCCYauMxvPK5fdU6ClqcNN03c21loxmi/wNuvm4tAJsCoXDcEkpoAj\n\tcqu328gAx8bos2HqcSUZb29m7ToSqC/LQZiE5ulsCPuCaOaV8sPGzxPMndcOPIQZ+ZK79Wl6lH/\n\tDc29z3f792LrmNaWl09hod97UhnBgonypNw3bgUZY2G/m3WZrNw4EQp+tiAYqTkdqoE1mxKssCJ\n\tiuCJa05N31Bhqfrryh9y/mogZueF9rNt090T5vqDg1PY8aTn9DE+Wh5MGFUteeyY=","X-Received":["by 2002:a05:600c:4584:b0:475:dd89:abc with SMTP id\n\t5b1f17b1804b1-4792f25b843mr4514355e9.11.1764796358454; \n\tWed, 03 Dec 2025 13:12:38 -0800 (PST)","by 2002:a05:600c:4584:b0:475:dd89:abc with SMTP id\n\t5b1f17b1804b1-4792f25b843mr4514165e9.11.1764796357997; \n\tWed, 03 Dec 2025 13:12:37 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IF88KjH8GFoIZgtR2VDEXTkrK4p/hvHrebZC4OC2ZyiaGrrP1I0pkpQKI6BK1mhX9ohr6arSA==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","Cc":"libcamera-devel@lists.libcamera.org,  pavel@ucw.cz","Subject":"Re: [PATCH v6 19/24] ipa: simple: Add a flag to indicate\n\tgpuIspEnabled","In-Reply-To":"<20251202134544.662446-20-bryan.odonoghue@linaro.org> (Bryan\n\tO'Donoghue's message of \"Tue, 2 Dec 2025 13:45:39 +0000\")","References":"<20251202134544.662446-1-bryan.odonoghue@linaro.org>\n\t<20251202134544.662446-20-bryan.odonoghue@linaro.org>","Date":"Wed, 03 Dec 2025 22:12:36 +0100","Message-ID":"<85v7inz2uz.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"uI6HTa4zB6lEhN4PxH0uYiM9N77V3ya7xdjg5hreTAE_1764796359","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]