From patchwork Tue May 19 19:39:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 26780 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 7CED0BDCBC for ; Tue, 19 May 2026 19:39:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7E67F62FE8; Tue, 19 May 2026 21:39: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="DaX+eImJ"; 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 779CB62FE8 for ; Tue, 19 May 2026 21:39:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1779219572; cv=none; d=zohomail.com; s=zohoarc; b=NL6JkY6KM1roc2Fb1L3BZ7R2uzleu9OMJFMiXMeLD+xvSiykSWsiAh1sudmptYf6PhNOuUOkoE2afxqY3w3vTskRNvd1rzUfZmPEiSK83gvkVtluWWEwsPf+ANM7dCXcxh7oRu2V7xMubebvGxzRl8ScLDBPvhO9/aQj0wqG8ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779219572; 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=P83P6/7pg+VK4cB5a7Kan33WswzHyCJgkZySWPnDT0E=; b=IpeSzaSgTy9O5x9I8WF87F0VMcXYSZe+GiVPVXrw/detjA7dpu16sG4kn/Q8Uh2f/t6m9V/Odaj21WA3vBLl6WmfY/6ZRr3ErcmRhh+GrZ1SbP7r4WaX/TXEmfmMxQMOhwIoNUOq7gLwF/rz2YKwD5OCEmgyYc8etHFUtGCdoxk= 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=1779219572; 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=P83P6/7pg+VK4cB5a7Kan33WswzHyCJgkZySWPnDT0E=; b=DaX+eImJMnMHyxI6Wo8y0tfbT197ZQOLjuNefP6PAqQXpKzlVtmNKDuGumomN7QT qbZZDMt7XTm6Bm8dAYy3pGlWRp4K897XDt2OThIY1qd0H76w81fh/oE9rNl3CNISqaJ vSTMk10tHAPh6g7PFFsG5HDF895ulOAXsK+frEU0= Received: by mx.zohomail.com with SMTPS id 1779219571301133.13285444909457; Tue, 19 May 2026 12:39:31 -0700 (PDT) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH v3 0/5] software_isp: Implement DMABuf import for input buffers Date: Tue, 19 May 2026 21:39:02 +0200 Message-ID: <20260519193907.86812-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 v3: - Split up changes to createTexture2D() and eGLImage constructor into two commits. - Added field to remember dmabuf import fails - and promote the relevant log to Info. - Reordered and slightly extended commit message for "egl: Demote an error log to debug" - Fixed some CI / linter errors 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 (5): egl: Add GL format parameter to eGLImage constructor egl: Remove some parameters from createTexture2D() debayer_egl: Implement dmabuf import for input buffers egl: Demote an error log to debug debayer_egl: Sync output buffer after processing stats include/libcamera/internal/egl.h | 8 +-- src/libcamera/egl.cpp | 31 +++++++++--- src/libcamera/software_isp/debayer_egl.cpp | 57 +++++++++++++--------- src/libcamera/software_isp/debayer_egl.h | 4 +- 4 files changed, 65 insertions(+), 35 deletions(-)