From patchwork Tue Nov 12 09:56:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21874 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 78A12C324C for ; Tue, 12 Nov 2024 10:01:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 30C7C657EC; Tue, 12 Nov 2024 11:01:00 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZfZ4KWF2"; dkim-atps=neutral Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9404C65474 for ; Tue, 12 Nov 2024 11:00:57 +0100 (CET) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-295cee3a962so266884fac.3 for ; Tue, 12 Nov 2024 02:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1731405656; x=1732010456; 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=C5bjOH9qjHmib3RSf8SomnB5BAZZgdWPfdkwZctMtCU=; b=ZfZ4KWF2uh4fiNrq7YVo8ZiBPbF9bQ1ZX1PSPxbdJ25o4VVdRYuc28KT0vARh+wxN9 W4YMtFRrWVZsA90xvHrEbejpEh9DW1pGyXBk2UhlaXgkYAqHYet3j8zaY7zBfiBQPWAr 9pWOYnPPSS283WuPp8JvQG9hKZbQhBUVQDAro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731405656; x=1732010456; 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=C5bjOH9qjHmib3RSf8SomnB5BAZZgdWPfdkwZctMtCU=; b=h9S4XsZe3DOIG8wcOIuB6rpliS/97p2T6kjpJetnTlaVt1p9/xI3uOiWmrMk1GrI/F rTASePCQ2WvH/qN72uFWKX0ujXhE8X2GLMdE1Z7GVJQY18OYEdKRuTm16g6DskV1DEjE 8IV+pI3qRXvbInzc5/G4uXiZPRPGPDWeK6a4Dfu/9+t4nSbdqtSDHk9J8HgJ+lR7v8FB Z5KhEaZa5hI7Ut9M+OnFfF/ci12mwxalxn0MOcBBJA2/Kl22oj+dHlHyJ82hWc3v17sc pddzdRuRfiS9OSPwv0aHdbnfIRNoBZItIQB9Kx8oZlw4HMZs1BCV9U30Du7gsEL4TaVY XULw== X-Gm-Message-State: AOJu0YwBwCjZ+yd43ZChtXjYbAoft6ksQoNjiU19noVSJi9WId6y83cB s0XKUFjIk9HHwu2zzoBT5tjRMnUp5HybnQLGb5BeTDl+0Vkq7hk3LmrtWnRxFxFqA67CCDEpRWQ = X-Google-Smtp-Source: AGHT+IGkei6q8UmZZqhIjV2Z3Q8/KIL0U+83UoYMdfVSRCcIEjEtmPpB3JSd0PSTGaj4wRC2RFmzHQ== X-Received: by 2002:a05:6870:649f:b0:270:1b79:ccbc with SMTP id 586e51a60fabf-2955ffe8669mr13029310fac.5.1731405656004; Tue, 12 Nov 2024 02:00:56 -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 41be03b00d2f7-7f41f644214sm10157673a12.58.2024.11.12.02.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 02:00:55 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH 0/2] Add DmaSyncer Date: Tue, 12 Nov 2024 09:56:53 +0000 Message-ID: <20241112100051.4071443-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/1308648 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 | 88 +++++++++++++++++++ src/libcamera/software_isp/debayer_cpu.cpp | 29 ++---- 3 files changed, 129 insertions(+), 21 deletions(-)