From patchwork Fri Dec 12 00:29:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 25533 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 39223BD1F1 for ; Fri, 12 Dec 2025 00:34:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DBDB461917; Fri, 12 Dec 2025 01:34:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Hxf4dfP5"; dkim-atps=neutral Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C1B361866 for ; Fri, 12 Dec 2025 01:34:21 +0100 (CET) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-29d7b8bd6b0so4388875ad.0 for ; Thu, 11 Dec 2025 16:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765499660; x=1766104460; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=enuSJNXFUuoTYs1Tq2LkRLCCtdszeCb+2wiWiBmGXZE=; b=Hxf4dfP5QFBLhX10/974KgsDZqCzDx6A2iPDJwsC4USIUm07AkCWp/JJ0OyswqEfgN FXbmUqle70Ms1dnspmMhKnA7+E78CwN1ZZpHGK+0JQSvT9vklnXokLrjQ2cqcKflED1u ilcEbXMDIEDgcn2mZ44/PNH8nL2QMoZBiN9cJYnyfhJXnfAFpiHGu4df8Q6inz930nIN EcwJreciPv7dcuX+h4sWPXXooaQSCYjDfpoOE4ICuxGjDCdfnDevUYnhZ/pHpLYaMqOh 2Pbz5WcYXBaIWh1pxJc6qYAcVymaoVEVWxjRZphHfL6Tc7f8dwts7MMaV8Yo+g6u6iLc jvJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765499660; x=1766104460; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=enuSJNXFUuoTYs1Tq2LkRLCCtdszeCb+2wiWiBmGXZE=; b=bwbz4OzYYFufB8fBrRx/esDpKZTqaf2GQo98ezDXjKJ/fYh4q4skviNkjcsY3FgBtZ 0X5hHFDwq+vU+915+Pw6n2t6eAZICEczjcg0IO6u1VZTsOSuu4eDp/Q0GH/jWCSmF9q3 NAWe4hTWovW51Qzd8qOmlfMcW7JnoUWz7q5lIuNILTWjMh8Lo/cTgZGKk4Y+E2pzoiUL dQLdn6iyyzfG8dvB/sb609/72FiMxgWW/PRdqk2UtHj6D9wmQlNEWHXBKvxeIenm67VA NlCU/kUzzCKIvpLevsVLspkYKlXlrMaK2DFPz0dHLHpeLIsxio9WruVtCaVgleg453UL +Bpw== X-Gm-Message-State: AOJu0YxoK0ObieFSElaQ6+Sg8qJi9WI5LTjJGrrJQ93Vvx0H/9KUf5GQ yl2RVlicjD0JJEgckp/j6dJ2eYqrDC0GCElu6tjbwex6hgT35IpfKDjFSHevWtIOJuuj2Mmf2M+ lDAFh X-Gm-Gg: AY/fxX6fcTSy/EJdMAenpwLw+VIC7/cMQQj3JwIHp8IFDQbz/jaPoPzWcsQ4XHDGUKu LEQYB+DGrDPDwpFpTz3Nh2OStS3/+uPSsW1RBAjXbg+u17q0umT7r/XIbLo5TNPt63FMWGjMpXG yMXIsShjm+ZKCCcoc2JfIW2vxF2tV3crlp/4qtfBcEp6beCxd6Gm4zv3uPGguenPlcs6kZ6vAUV iKRSelUDM1QVM/v1a5MHKYuBo2n+sNaDNnPQd6QcH9iDD4tex33iRRSeD6sGfOrAphOgcUwySuj 0GJ/reKnwO1JcjeaAgXk6+GPOnhFJu1oeISovC8UV1CW/QduiUbVO0M1WaCzuycQH+WyoswEh5G /nCSNKXP39wGMvyaKKm5+LaU1YJkiS7D0l3yXKKFB+cDH68BKRlJsY/oCoi9Y4S4YqSZ+kw0qe9 XcgeBtLVmAJBiCM+fDH1FLVkmA7XMbSlw8hFefM8CVK11SB3C98OzWRqPbMd0= X-Google-Smtp-Source: AGHT+IGR5UQuOK5s0Yz6qgT74OAdEzZ0pk/Yc+NAzhk+P3EcujKsroruznjqPlMR2tlfkfJk3aDlwQ== X-Received: by 2002:a17:903:2451:b0:295:5da6:5ff7 with SMTP id d9443c01a7336-29f24e6f089mr3915865ad.15.1765499659940; Thu, 11 Dec 2025 16:34:19 -0800 (PST) Received: from inspiron14p-linux (p99250-ipoefx.ipoe.ocn.ne.jp. [153.246.134.249]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c0c26eb0f6bsm3317282a12.14.2025.12.11.16.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 16:34:19 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Milan Zamazal Subject: [PATCH v8 18/26] libcamera: software_isp: debayer_egl: Make gpuisp default softisp mode Date: Fri, 12 Dec 2025 00:29:29 +0000 Message-ID: <20251212002937.3118-19-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 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In some cases the GPU can deliver 15x performance in Debayer with the CCM on, reference hardware Qualcomm RB5 with IMX512 sensor. Given this large performance difference it makes sense to make GPUISP the default for the Software ISP. If LIBCAMERA_SOFTISP_MODE is omitted gpu will be the default. If libcamera is compiled without gpuisp support, CPU Debayer will be used. It is still possible to select CPU mode with LIBCAMERA_SOFISP_MODE=cpu. Reviewed-by: Milan Zamazal Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/software_isp.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index efe44e393..7fde57aec 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -123,8 +123,15 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor, #if HAVE_DEBAYER_EGL std::optional softISPMode = configuration.envOption("LIBCAMERA_SOFTISP_MODE", { "software_isp", "mode" }); + if (softISPMode) { + if (softISPMode != "gpu" && softISPMode != "cpu") { + LOG(SoftwareIsp, Error) << "LIBCAMERA_SOFISP_MODE " << softISPMode.value() << " invalid " + << "must be \"cpu\" or \"gpu\""; + return; + } + } - if (softISPMode && softISPMode == "gpu") { + if (!softISPMode || softISPMode == "gpu") { debayer_ = std::make_unique(std::move(stats), configuration); if (!debayer_) { LOG(SoftwareIsp, Error) << "Failed to instantiate GPUISP";