From patchwork Mon May 22 08:35:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 18642 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 75CF3C31E9 for ; Mon, 22 May 2023 08:35:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 95F7462861; Mon, 22 May 2023 10:35:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1684744554; bh=fMWzBNgJWAdiLZz+uDPjesLdhkvFdhMpql63N0AxSlw=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=HTrF9EkmSoFtbq8L4DiEgWz0fUc9jaZCeZyf1iQlfBzy/9EhcifNjmb2bCtKKX70S NckD+FjDhZclxfKP5Jzr9HftXc0L0yEINLtyIsQAb8GiStp9mubJ58va9m5JO4yt1t lBpv8SyOsvVWs3rvA5Zy7e5viLp38TtHPC236qwkr1Gcf9Yx9AoC6N/SjPlp06McMX mLMpKM7pe7Xg14ILqr3xKE1fROxXYaWeaDgauKWoPSudXIsCgpIDJO6LyWOxLxu9Px ySmkg1RSc2tUeNWHSWyMS4pgueUTp9orqf6Q1yRVNRlFtGaTpq+9kuZJW4q7MY2Y5W D5gymZPOPIW2g== Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D04E6039D for ; Mon, 22 May 2023 10:35:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="U8NdUG1b"; dkim-atps=neutral Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1ae615d5018so35859185ad.1 for ; Mon, 22 May 2023 01:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684744551; x=1687336551; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=34f237zYNauwPWMm+OnHBsarX7E5LbZud+wP+ECdYSM=; b=U8NdUG1bSz1rWyaJ2JkBfv0BkMgIHpZFf+WR7fBZuyoCMy/AroXz7XbTe0GXmo5TLy UUxXio5BS7Pvh3DuFiQPPIJEU4F5UCncSSIhHCgz3XP21b1zYg4dbwEBKjS825WdJ7Vs Vq0L/jYwtk41lC/wwQeOl6Q7gNb4fmyznzIcw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684744551; x=1687336551; 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=34f237zYNauwPWMm+OnHBsarX7E5LbZud+wP+ECdYSM=; b=jcJQx8I1JBqFuKHPOuFbZzUWmwLiWSf2xEUXlVSnvRxzLsHp6D8QHDL6ZfBgaNznGE AMABFwRtb8SaJFXHknlKPpZ681b+YzQeNRh0jJLk432/uXKnMW6Z0FecO++Li+dm9jqZ L2hU6A37BtVn5mSZAZVDSoXG+Au6leQHXgeBb+o2a56EpesEr1OTZ+wkNN7ltqkQoqor ss7Ou2VtBB2KJRFRHXZ/Vy8tom7330zwaizNMFBF9RiBaLHv1G+kzVgbBckhBMinB5TT aKYyyrNlQJZSgTH6x4KL7vDTC2/Xiig/nv7Ysjqr/D3wSIyLS2KMZ0+tCBUjjo19AwYT CcVg== X-Gm-Message-State: AC+VfDzvSuACRTGR2PI5UZY/uf59hSCeGxMiMBY/2vpq9+fzLd5xnb0s AN2hPW90U+r8pK4lF15Z+V3AxENX1mEYJJ0/m14= X-Google-Smtp-Source: ACHHUZ5/lVQBL8992WdQcXcOJMrkKWXsxmy+OWDO2QMZwo0YVQPv7s4S8b/O2vF0AGmuj8TcKZ0gfA== X-Received: by 2002:a17:902:b68a:b0:1ae:7042:b169 with SMTP id c10-20020a170902b68a00b001ae7042b169mr9458988pls.30.1684744551391; Mon, 22 May 2023 01:35:51 -0700 (PDT) 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 h1-20020a170902f54100b001a980a23804sm4321253plf.4.2023.05.22.01.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 01:35:51 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Mon, 22 May 2023 08:35:05 +0000 Message-ID: <20230522083546.2465448-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.40.1.698.g37aff9b760-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 0/3] Add HeapAllocator 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: , X-Patchwork-Original-From: Harvey Yang via libcamera-devel From: Harvey Yang Reply-To: Harvey Yang Cc: Harvey Yang Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi all, The series of patches added HeapAllocator, which uses DmaHeap (moved from Raspberry Pi pipeline handler) and UdmaHeap to allocate heap buffers. I've updated based on Jacopo's and Kieran's comments. Thanks! BR, Harvey Cheng-Hao Yang (3): libcamera: Move DmaHeap to HeapAllocator as a base class libcamera: Add UdmaHeap if DmaHeap is not valid libcamera: Add exportFrameBuffers in HeapAllocator include/libcamera/internal/heap_allocator.h | 40 +++ include/libcamera/internal/meson.build | 1 + src/libcamera/heap_allocator.cpp | 292 +++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp | 90 ------ src/libcamera/pipeline/rpi/vc4/dma_heaps.h | 32 -- src/libcamera/pipeline/rpi/vc4/meson.build | 5 +- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 11 +- 8 files changed, 340 insertions(+), 132 deletions(-) create mode 100644 include/libcamera/internal/heap_allocator.h create mode 100644 src/libcamera/heap_allocator.cpp delete mode 100644 src/libcamera/pipeline/rpi/vc4/dma_heaps.cpp delete mode 100644 src/libcamera/pipeline/rpi/vc4/dma_heaps.h