From patchwork Wed Nov 13 05:54:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-Hao Yang X-Patchwork-Id: 21878 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 BBEB3BE173 for ; Wed, 13 Nov 2024 05:55:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C1854657FB; Wed, 13 Nov 2024 06:55:32 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="CQ6BBE/m"; dkim-atps=neutral Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1DB6E618BD for ; Wed, 13 Nov 2024 06:55:31 +0100 (CET) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-720aa3dbda5so4710618b3a.1 for ; Tue, 12 Nov 2024 21:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1731477329; x=1732082129; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FB1TXoqRsV+BVHqAIyrnwh5Ayx+7q++j2fNBLOvUAHc=; b=CQ6BBE/mde4woUooghvf1/N/7aOPej/6tSo7WykHCrut0Ylpsqucs8CpQeRZpEBk16 xAKizXYAP1m89zN0oALiR7wiWgDA2rfynlcsiIbiB/v4Nb8S9pcDNOqPyD4VGHHSoAov pqbKo7q0BRjJniVfjiBS3RHNPFvu5y8SX2ioA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731477329; x=1732082129; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FB1TXoqRsV+BVHqAIyrnwh5Ayx+7q++j2fNBLOvUAHc=; b=mnmtIHTf0y5D1Ij2lGpTE3C3/aUPfJKfJjJ+Q7W4greSnEpob+B/0HAcSK/eECWpfS rh9VozQgqBGk5GTq6BOIFcaMPzMNFiV4bL3840ikhEToS9br9Q52rSyLObUGxMi+H80T BL96lLoahvB54HqF4B4uG0prPJXDe2MpB4c3r1oSPoIvpq3UC6HKvDqYcUT3shV1PSo+ 52b6uI+rJJJFHO5qfvrENyu9+Qa2PMF7xEr5As/UoCnaWNcjqdWjnoMToXFWEXzRwnf3 Szg+S7x7Fu0iPd+v3wqzxoT5EACec46A9Z9/YnJNi1S0QKueBCMJWovop/w5YFcVxIlX XMuA== X-Gm-Message-State: AOJu0Yz5rIwjgwRQD+dpS/daOAaNBscMAy0mf0SPLIXodPeHiANK5pEI zdLseGi+9GuOFFYjJ+c/sMYNAyQxLuNy8S9U30v6RNP3fF/UIiJylbQySGenvucsoNeysptxij8 = X-Google-Smtp-Source: AGHT+IHBl+bmhJkCW/3VPEE6ZwNG4tb7yPBiXM8f+LyGcpwvoz0dQpMtmfcRULhGcTVvmeF+KbHS9A== X-Received: by 2002:a05:6a00:3a2a:b0:71e:4ee1:6d78 with SMTP id d2e1a72fcca58-7244a4fde5fmr7086641b3a.1.1731477329116; Tue, 12 Nov 2024 21:55:29 -0800 (PST) Received: from chenghaoyang-low.c.googlers.com.com (27.247.221.35.bc.googleusercontent.com. [35.221.247.27]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7240785ffb6sm12382544b3a.40.2024.11.12.21.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 21:55:28 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v2 0/2] Add DmaSyncer Date: Wed, 13 Nov 2024 05:54:31 +0000 Message-ID: <20241113055524.3099340-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.277.g8800431eea-goog 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" Hi folks, This series of patches follows the discussion with Kieran in patch [1], which adds a helper function and a helper class to make synchronizing DMA buffers easier. The second patch updates debayer_cpu to utilize the new helper class. The following mtkisp7 pipeline handler will also depend on the helper class. I put the function in DmaBufAllocator and the helper class in the same file for now. Let me know if I should put them elsewhere. This passes gitlab pipeline: https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1309296 v2: - Fixed ioctl return value check when being interrupted. BR, Harvey [1]: [PATCH v4] libcamera: debayer_cpu: Sync DMABUFs Harvey Yang (2): DmaBufAllocator: Add Dma Buffer synchronization function & helper class debayer_cpu: Replace syncing DMABUFs with DmaSyncer .../libcamera/internal/dma_buf_allocator.h | 33 +++++++ src/libcamera/dma_buf_allocator.cpp | 90 +++++++++++++++++++ src/libcamera/software_isp/debayer_cpu.cpp | 29 ++---- 3 files changed, 131 insertions(+), 21 deletions(-)