From patchwork Tue Jan 6 17:00:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 25677 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 D7545BDCC0 for ; Tue, 6 Jan 2026 17:01:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 78E2462021; Tue, 6 Jan 2026 18:01:36 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="I0BWxU3v"; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C7BBF6200C for ; Tue, 6 Jan 2026 18:01:32 +0100 (CET) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-430f9ffd4e8so12253f8f.0 for ; Tue, 06 Jan 2026 09:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767718892; x=1768323692; 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=fPV+YYnhiWt58AQ9eXmUONQuZ2vN/bNk/theU7ub+2o=; b=I0BWxU3v1wKRyY+56+/rhy+3v4dJjnUrMRiCCTLgpjCFYM34x9oklVdGjb74EhyFLD zgLS8XFOkfnDFiIY1+7OGVgNthAX8Zxbx+s4yoZVR5cdxxeRgnYY8gN7W4aqOIYfKpGn E7+5RVkMRGYb4MfIpaF7aGZVdOwWBlpdBuecAad34501Erzrc+iGyxJvCUtKcVn7L9N9 EIT40WJXnWKZxAvT1/exOke2lL6lMwXYEYrP4piA5Mns6ClwBKenZShbNUrMeLO3oVkT 6SvKCVh8EElPdnC8hOfgYgEvcUs2IHnoG8/zylngy8aYKjYbdxyaA9FIaYIFm9ffAF3Q dKxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767718892; x=1768323692; 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=fPV+YYnhiWt58AQ9eXmUONQuZ2vN/bNk/theU7ub+2o=; b=J8bbponJse7ynNZBzPDRy1dR+vpGtn33X03cp2GbBfkcCRuR+IMGR6teuzhzWTCIer VG/ppZrMqj4A/VBx3m6IJn90C0f8Cxn4FdeRyOxuyRMubXMn/nDIBdhuYpbdWsFVUM3/ ap5ICspyr4P1EhNwEz4NmZKAqAHQH3AVZBNemFG6pGUcDghrMl2JHnCG7GrhjPga503K 73jY8oyKW9D9+DOQA90RiqlTNOxbIuO0NJRbmApD7f2jvZNAGCsCI37xjReQafVxO/tO kQd6VtYyRGzayTu0fS75cJlZ6Wm7QD398lAyH6ga+AJAl9n5RpmU9SRKJ3m/+Cyd2xox mpJQ== X-Gm-Message-State: AOJu0YwvQoEPyI3+l30xMY3CbFdtALgbpg77TIPXEEIdHiwYwB+QAxGc 0N+e9Zm4OHbkIMx7D/OoB0vksWsLSdN1L5lAyknLNN3qLqXbpL4ir2pIOF6gYsmLMxsiQcMdhXS mCFOnHKE= X-Gm-Gg: AY/fxX5j4GA0zucl1nACQJ4bxwytqggeOiwekpsbD11ODCMFLavWkUHJng0dtV5CJ0v twaaavw8fqY19dX8Ai1LF5UOv/wGoQDTEU2rzeIaFBLsZoNIdygUlSAEO5IUOBEXc4Xm8mg2+ta eBX29Eyfc8m3VLRVZXTi1BQdThAisIIm6BTHt3s4tB4KJ2PS12+NepRj5JwcnlFSVg6WADaqQlY YVHRIRcnOgy1GlT2KaQOTaUAU9fLC0Zyy5GcyAJuQVGRAcNS+ROPZ+FStxWnbdrPVWNeY4srQsD 0tWr6s3q25bVQy/hUYKyeqwMeG1cJQQeEIc+zN3ZkAkjQG7TBKKvzPX/2FLAP9RUCmZ3u854d67 pcjkMIomTIVCndSjpHE2otJIq3ewWMCEjsvZmxS/Zl2lfFTWxqm0FXESlcvPxxrGvmWsrH2bpEO xjbgFSYRVz6Ya+rG2CRsOxPpf1IkIMgr71buM+b/jZWID55jYnV7EthGFji76ngMKAoD4= X-Google-Smtp-Source: AGHT+IHLwmE51hkUiQkYF/nSap+OoFieFzoCtTLbufQ0A6E6w/oXQgnTdoSjCKG3Zrmwovgvg4z/PA== X-Received: by 2002:a05:6000:4287:b0:430:f74d:6e9f with SMTP id ffacd0b85a97d-432bcfd37b3mr4600620f8f.14.1767718890580; Tue, 06 Jan 2026 09:01:30 -0800 (PST) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0dadcfsm5515322f8f.3.2026.01.06.09.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 09:01:30 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Milan Zamazal Subject: [PATCH v11 23/24] libcamera: software_isp: debayer_egl: Make gpuisp default softisp mode Date: Tue, 6 Jan 2026 17:00:58 +0000 Message-ID: <20260106170059.56193-24-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260106170059.56193-1-bryan.odonoghue@linaro.org> References: <20260106170059.56193-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 5a93442f8..7ad3511db 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -125,8 +125,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); gpuIspEnabled = true; }