From patchwork Wed Jul 31 13:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20729 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 6B3F0BDC71 for ; Wed, 31 Jul 2024 14:00:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3DD8D63374; Wed, 31 Jul 2024 15:59:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="I7F7U9v5"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 19BEE6198E for ; Wed, 31 Jul 2024 15:59:58 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F30A3F85 for ; Wed, 31 Jul 2024 15:59:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1722434350; bh=5s9hcaU6+q53MjyHNWoMUI+KBVm05RcixgO6viz0J/E=; h=From:To:Subject:Date:From; b=I7F7U9v5yXnwUr930HKTIuADMkVBuIExWQB/DzcGWtIfTbs5IujfWmPev89exiXV4 9GMHWCUWfjM9Yil98Oc9tjGWQwkgc+kzakOaDGkTlv3/pQw5TtMG41sz1qX0LBab7n 8L2bKawjk7Kpsv7t0hBWX2FsyeojMqfK6+4OpGPs= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 0/4] libcamera: Address soft ISP file seal TODO item Date: Wed, 31 Jul 2024 16:59:32 +0300 Message-ID: <20240731135936.2105-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 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" Hello, This small series addresses one TODO item of the soft ISP, namely shrink and grow sealing of the memfd underlying SharedMem objects. Patch 1/4 starts by sharing the memfd handling code between the DmaBufAllocator and SharedMem classes by moving it to a new MemFd helper class. Patch 2/4 then applies a suggestion from Nicolas to improve code readability. Patch 3/4 addresses the TODO item, and patch 4/4 finally drops it from the TODO file. Could someone test this with the soft ISP to make sure I haven't broken anything ? Laurent Pinchart (4): libcamera: base: Add MemFd helper class libcamera: base: memfd: Handle uClibc compatibility with function wrapper libcamera: shared_mem_object: Prevent memfd from shrinking or growing libcamera: software_isp: Remove file seal TODO item include/libcamera/base/memfd.h | 34 ++++++++ include/libcamera/base/meson.build | 1 + src/libcamera/base/memfd.cpp | 123 ++++++++++++++++++++++++++++ src/libcamera/base/meson.build | 1 + src/libcamera/dma_buf_allocator.cpp | 46 +---------- src/libcamera/shared_mem_object.cpp | 22 ++--- src/libcamera/software_isp/TODO | 19 ----- 7 files changed, 169 insertions(+), 77 deletions(-) create mode 100644 include/libcamera/base/memfd.h create mode 100644 src/libcamera/base/memfd.cpp base-commit: 98b01768397f982bd177b55e9bc67002b645b4d0 Tested-by: Milan Zamazal Tested-by: Hans de Goede