From patchwork Thu Nov 21 05:51:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 22051 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 B09CAC32F9 for ; Thu, 21 Nov 2024 05:54:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 12FA765FA4; Thu, 21 Nov 2024 06:54:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="RGL7LT3L"; dkim-atps=neutral Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5EFCF65F54 for ; Thu, 21 Nov 2024 06:54:43 +0100 (CET) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-71e592d7f6eso424326b3a.3 for ; Wed, 20 Nov 2024 21:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1732168481; x=1732773281; 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=/uHDGLJa7c5LzqsYRnZPk7hpKLofiKktW4x/gbPtkm0=; b=RGL7LT3LJychOmbEgzBEz5y9KqvMCJSdd29MqCTwDMKBRCRTHV/IUUR0Psna84Ac1u tOyD6WMZxSyo8R71bLo1ILShsgoFxHeFXrj5+53ou7OfYHOJxPtYWYQPMQDkBM8L0qw0 Je5hP3HRcyUHGiM+48hLHM2MZnICB4KF1L1No= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732168481; x=1732773281; 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=/uHDGLJa7c5LzqsYRnZPk7hpKLofiKktW4x/gbPtkm0=; b=QCooI11K1Le7AkwOvrVmJ7jwc0uqxV6wSrnZOWTZmcd0nwaAFZBL1VwPs0IPCHO8F9 d1+ls8ajbFXKHQ47VATPasZJywVfX0F6ap5I73piUVdrLXbyj7lVvQd2LSnEMGbPa7Xy EIeVBy+/9tInLMt4iE3rKfZHnZffiipKLFmjCVnhLmIJPy8UeDBoEvy8kfc2w95scHFn +oBsnQtVnsvkVQKOP+a4AOWxFIQcCjdU6JqJjQXPaqG4D1buiHVMxQMkJ00YXv8plMKV 6uV59514KvOb7/ClvrRPFgGc4YithWMZGjoYUgstMPCs3rP4wtDtvghzcCjQUBRThKms 0uZA== X-Gm-Message-State: AOJu0Yz+Is5r1ed8WOlG7vTGVXCDDs6qCcBRQyo/2yzQ5tCyiEtQH+ej /nWG0rbTTrm852v7u+aTL5jYy4equmoQYOxbgHViubomDD6ElYBGcZ9xrzZOXj6JrJmX1yoe5Z8 = X-Google-Smtp-Source: AGHT+IH1/ZziXB01nlKxWrHBAxA5xZBLDOFcxAVRqI30KFvciOSbGOzwYnj6/bUJQB9Q3fT04fuDcw== X-Received: by 2002:a05:6a00:a14:b0:71e:21:d2d8 with SMTP id d2e1a72fcca58-724beca155bmr6290409b3a.7.1732168481242; Wed, 20 Nov 2024 21:54:41 -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-724bef8da82sm2815815b3a.124.2024.11.20.21.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 21:54:40 -0800 (PST) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH v3 0/2] Add DmaSyncer Date: Thu, 21 Nov 2024 05:51:30 +0000 Message-ID: <20241121055436.2502314-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.338.g60cca15819-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/1314375 Milan, I didn't add your review tag on the first patch, as there are quite some changes after Kieran's comments, FYI. v3: - Migrate static function sync in DmaBufAllocator to a private function in DmaSyncer. BR, Harvey Harvey Yang (2): DmaBufAllocator: Add Dma Buffer synchronization function & helper class debayer_cpu: Replace syncing DMABUFs with DmaSyncer .../libcamera/internal/dma_buf_allocator.h | 21 ++++++ src/libcamera/dma_buf_allocator.cpp | 75 +++++++++++++++++++ src/libcamera/software_isp/debayer_cpu.cpp | 29 ++----- 3 files changed, 104 insertions(+), 21 deletions(-)