From patchwork Mon May 18 20:15:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 26768 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 ADF4BBDCBD for ; Mon, 18 May 2026 20:15:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A2AC563024; Mon, 18 May 2026 22:15:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="fFKK69MA"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E12962FB1 for ; Mon, 18 May 2026 22:15:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1779135334; cv=none; d=zohomail.com; s=zohoarc; b=T6XfFqniSOGFXfP8uqwcBf53TMLwz97gUXzS0puABNyvi+ojYhjKmf5R254fSnM4da5RCm4LZTcHvL5qo51K4Gv3drI00fwEHphRs/gRlkZ8z3pg7uySm/E63KAkEjTgEhkQirJDWKoZTYMAVz9WJbbE8XDVLkkheuEei/3mYas= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779135334; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=fyxzNveD2qbjfBCoBwmVDXG58MdJKEBLtCP/X8T4GlU=; b=SfwzF2LiReJOE5vuj6jeDPFs2Ti32n0dWeHCoy4SFj9UZ1BCckoVCCCoeKhdoQcd+Hg0dH+mxLIx6atSrom0og4tTK9Q/LyaqhHaihkp2091gxzfPfXIDw/322bVPjRPrWk6bX8z/oHTzCrnp6363sBLvl5oqggdQ9/GF6ch+7g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1779135334; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=fyxzNveD2qbjfBCoBwmVDXG58MdJKEBLtCP/X8T4GlU=; b=fFKK69MA8K7M8mF8SCGqfSycKZ4Nx6+AH59FIsCcHYFWbmb5lBaCQoPvxM6MwYxe sKImN3wEPFrEZ/q16Dg7Otsr/tbY4x2oyS46pm6H27vRKkAeMP0vzdUt7UKMWVr/WHJ 7wJ0Io/XK5BrhyR+R0DChEAs9l6nAZK5Nrz0S5rI= Received: by mx.zohomail.com with SMTPS id 1779135333277683.8323084347467; Mon, 18 May 2026 13:15:33 -0700 (PDT) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH v2 0/4] software_isp: Implement DMABuf import for input buffers Date: Mon, 18 May 2026 22:15:04 +0200 Message-ID: <20260518201508.140849-1-robert.mader@collabora.com> X-Mailer: git-send-email 2.54.0 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" From the main commit: In many cases we can import the GPU-ISP input buffer, a dmabuf from v4l2, directly into EGL instead of mapping and uploading - i.e. copying - it. This reduces memory bandwidth and CPU usage and can slightly improve latency. Notes: Previous iterations of these patches have already been tested on various platforms, without known regressions and showing significant improvements. Changes in v2: - Instead of adding parameters to createInputDMABufTexture2D(), remove them from createTexture2D instead. - Use std::optional to make the code easier to understand. - Move error log level change into its own commit. Robert Mader (4): egl: Set more eGLImage paramters in constructor egl: Demote an error log to debug debayer_egl: Implement dmabuf import for input buffers debayer_egl: Sync output buffer after processing stats include/libcamera/internal/egl.h | 7 ++-- src/libcamera/egl.cpp | 31 ++++++++++---- src/libcamera/software_isp/debayer_egl.cpp | 49 ++++++++++++---------- src/libcamera/software_isp/debayer_egl.h | 2 +- 4 files changed, 55 insertions(+), 34 deletions(-)