[{"id":37262,"web_url":"https://patchwork.libcamera.org/comment/37262/","msgid":"<857buu48ai.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-12-10T16:21:25","subject":"Re: [PATCH v7 18/26] libcamera: software_isp: debayer_egl: Make\n\tgpuisp default softisp mode","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> In some cases the GPU can deliver 15x performance in Debayer with the\n> CCM on, reference hardware Qualcomm RB5 with IMX512 sensor.\n>\n> Given this large performance difference it makes sense to make GPUISP\n> the default for the Software ISP.\n\nLet's try.\n\n> If LIBCAMERA_SOFTISP_MODE is omitted gpu will be the default. If\n> libcamera is compiled without gpuisp support, CPU Debayer will be used.\n>\n> It is still possible to select CPU mode with LIBCAMERA_SOFISP_MODE=cpu.\n>\n> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n> ---\n>  src/libcamera/software_isp/software_isp.cpp | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\n> index efe44e393..06f93ee0f 100644\n> --- a/src/libcamera/software_isp/software_isp.cpp\n> +++ b/src/libcamera/software_isp/software_isp.cpp\n> @@ -123,8 +123,15 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,\n>  \n>  #if HAVE_DEBAYER_EGL\n>  \tstd::optional<std::string> softISPMode = configuration.envOption(\"LIBCAMERA_SOFTISP_MODE\", { \"software_isp\", \"mode\" });\n> +\tif (softISPMode) {\n> +\t\tif (softISPMode != \"gpu\" && softISPMode != \"cpu\") {\n> +\t\t\tLOG(SoftwareIsp, Error) << \"LIBCAMERA_SOFISP_MODE \" << softISPMode.value() << \" invalid. \"\n> +\t\t\t\t\t\t<< \"must be \\\"cpu\\\" or \\\"gpu\\\"\";\n\nI'd either replace the dot after \"invalid\" with a semicolon, or\ncapitalize \"must\".\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> +\t\t\treturn;\n> +\t\t}\n> +\t}\n>  \n> -\tif (softISPMode && softISPMode == \"gpu\") {\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\";","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 8229EBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 16:21:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9E9A361497;\n\tWed, 10 Dec 2025 17:21:32 +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 F40FA61480\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 17:21:30 +0100 (CET)","from mail-ej1-f70.google.com (mail-ej1-f70.google.com\n\t[209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-315-P_Sn2brZMHKQW3EH9o-_hw-1; Wed, 10 Dec 2025 11:21:28 -0500","by mail-ej1-f70.google.com with SMTP id\n\ta640c23a62f3a-b7ce2f26824so128657666b.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 08:21:28 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb ([213.175.46.86])\n\tby smtp.gmail.com with ESMTPSA id\n\ta640c23a62f3a-b79f49a4f35sm1743164266b.46.2025.12.10.08.21.26\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 10 Dec 2025 08:21:26 -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=\"ctiYRKKW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1765383689;\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=WxvGXJy0aMJP8Qt4ut9BwTOIPgyH1NEg5MbsHjkVZHA=;\n\tb=ctiYRKKWAwSkUhLq78uXoKWYnFg4zjhFX1aY4zkhUpOr2RTb6oeOTedZDlKfPHsinUDr4w\n\tQVESbgY4V1JED0BqXX5EsLVhwVcG8bKP8fOPYYaJ96mWEj3U6+3IUr+8AYgyK1RXyhWpub\n\tJbFkIlfmEIH8ashhMbedemnw4B6Iib4=","X-MC-Unique":"P_Sn2brZMHKQW3EH9o-_hw-1","X-Mimecast-MFC-AGG-ID":"P_Sn2brZMHKQW3EH9o-_hw_1765383687","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765383687; x=1765988487;\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=WxvGXJy0aMJP8Qt4ut9BwTOIPgyH1NEg5MbsHjkVZHA=;\n\tb=nB691hOMxo0oJSZsyUpTZ7Zp7M35dWgAsgsJyjKJsNVn2tAZEpcR1adaPaLEGHiK95\n\tB70dVhTf0u5cGT1M/6wiXo/Cmz08qhiZUyt1MFw8kYog7wOICCxRjnSQ7BcONF3pvpRz\n\tXWtgsX2yH6hJAB6CrzEQK00QD+mXXyIJ85Tji/BpsUThEeFBSkcYg17VDnYZFWh/3p5i\n\ti1tOjYBfUD8uIrmW96qJrlXeSEto+JmnOe21vjn9uUt3+zv1ncGnuzxPx0bykFPFkUnZ\n\tyeUEfwOes+7TDzBEqPJEh/xzLfM+/+MzMa2/nLGDioRbG7fCoU2PLdvrCzfpGCPwwqEl\n\twvuQ==","X-Gm-Message-State":"AOJu0Yz2+xwhfGAfahZNuxM6xrskaKYBmYdA2D+Zth5Wer4MacXiazAs\n\tuYF4Gp54+8lSzGnAENNfQgwxmCZwaSTybALH6Xn3GL2K8wR/U0TFL5J8ulFteZccrmj7UzktCVX\n\tiCmLVPvnyfqzm6q+m/tb7Kfe7wnUL2WIx7rahAJ5SLiEES8m2nppQN7Tmbf9EC4lPh5QWYExpZh\n\tk=","X-Gm-Gg":"AY/fxX5BBBOE1JEShpLaGQ4WOortYpGzDFX9gDNzhyFc3d6z7aNjXKVBvQj2N55UZDR\n\tgZBfUPV+uYaBa9cXgJjIkNT/aBjwpGRrrKCnVGc9/SCyxtlW52XeQKGjYM/Xm7HLC9uGlHGeA7k\n\tQMhnRL944acHsWWEYOJkhyS3wJwNccyqQw+/nxjoTwiul7LS01AOsD7xD3jYQRK/JNuMCyWvGN8\n\t1dY+J3tNPKZ0bJVXEjHlHLsKsgSXECxGysllh3AZfE3EZ0/JNYsjVPPGypK8NwYyWil6yJ2ZOgz\n\t7EJLzUwfLW4pO6KZmGA5bSYNTQHP06eaGroiRbDJhtMQyR91bgaJ8WBpOOAWTKMmYd2I0rbeQra\n\t3QWjeXtQb3DYnBK3oH47W4In6Aw==","X-Received":["by 2002:a17:907:9613:b0:b73:42df:27a with SMTP id\n\ta640c23a62f3a-b7ce8345c0dmr296324366b.1.1765383687269; \n\tWed, 10 Dec 2025 08:21:27 -0800 (PST)","by 2002:a17:907:9613:b0:b73:42df:27a with SMTP id\n\ta640c23a62f3a-b7ce8345c0dmr296322366b.1.1765383686798; \n\tWed, 10 Dec 2025 08:21:26 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IEr+gmKtRdSsVT1hZJOzg6WB2sef2NDHf9W69V6u61TUnaDbd98ZoPYaPylHBS8Y5toaXFYBg==","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 v7 18/26] libcamera: software_isp: debayer_egl: Make\n\tgpuisp default softisp mode","In-Reply-To":"<20251210005354.44726-19-bryan.odonoghue@linaro.org> (Bryan\n\tO'Donoghue's message of \"Wed, 10 Dec 2025 00:53:46 +0000\")","References":"<20251210005354.44726-1-bryan.odonoghue@linaro.org>\n\t<20251210005354.44726-19-bryan.odonoghue@linaro.org>","Date":"Wed, 10 Dec 2025 17:21:25 +0100","Message-ID":"<857buu48ai.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":"O3dqlaYJBpTOOMc8aLfvtC2t7OsuRTv7llB-egiST_E_1765383687","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>"}}]