From patchwork Tue May 16 08:03:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 18635 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 C2B76C3284 for ; Tue, 16 May 2023 08:05:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 14CD4627DE; Tue, 16 May 2023 10:05:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1684224308; bh=Hnzn/BidzyrW3uEuLKLHNoxbfAENeEkAvV8G5Y8+qSk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=dnIWu4BaoMtDRx2yoMQTfMk+PC+d8kRAhSEWdOHZEedPhJh9MaG2hL+hFWUV8tb2M ctF3KSl1tF1QckM/Oq61WU3nRZtp8u3aza5+UAJc/gDWsXlsKsd1qD/aVMMrqhhjRT f3iFHQeecJwO0DVcw2qrb+ZndkwR/JfO49I8+8di/WHH8Ha4jkPVVorUKXnTeHpdnE vq7PiMxjkh3/Wp2/fRYx6izLU6tH86/zHzss1jW5vtSjzlLPjhFAfFgswh0A9aY58b Gz88g6DknxMcP0yKnO1f5cZW7B3cr8ZrHoOq10AWH9/KYfug4kX+8snSUDjWImSwVn f+mpK1O60mJPg== Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 30CFA60535 for ; Tue, 16 May 2023 10:05:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ZI67d7vE"; dkim-atps=neutral Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1ab1ce53ca6so98489725ad.0 for ; Tue, 16 May 2023 01:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1684224305; x=1686816305; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6mipuFph2BrYpTK6nWY05154lUtlbkE9VsGDl7X+qtk=; b=ZI67d7vEBjsERzLT6iMKxaLN7QiUkvbi4SKe8N6ilhUKtgG4sRcH656cpfTm3jh2id VWhhCYi0NuV8lWadE8lxq9C5eANyKzpNDoup/uzgu9tYXmz9noQL0o+r6M5Hdowc7Pwe jBbBbHHqiJ8vB+OvvROy42TCL8u7NVCwbjC3Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684224305; x=1686816305; 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=6mipuFph2BrYpTK6nWY05154lUtlbkE9VsGDl7X+qtk=; b=kaBWj+v9YXAlWdWKNXh6g3fdkEyhWvdd6H3vLe19xjeUkxyAtam8qqrY6jBfNIwed+ b5n8LVw4/IIS8N6jUccOEee2pJD5/RUXrTdBLq23eptJg9EZtQMV1enRqk8F4tKELFf/ OIui7gUKYH8MW05EHvVBLstQPX+FD7iG7T0fg1H3dI1laGjyn+/SlulS9rYBguSyKGmX icjPpFRHciaY2RooESn7y8ydmhK57xsQFV6ff/WM6vr1l/W/QDUfy7fDtzJ9m1gaQPgu P2K99C2YXUaAFpqtdyLZzhIDLYcZmPUx9gaPq9ignIvtCfZv2/Zh/qVTv1SWcZGoHdSD 7eTg== X-Gm-Message-State: AC+VfDyrh3/47xLZ+P4EKZRdtUedcAPjwC7sLAaJblWH8aTT50CciN23 RdCY1MhiaFJw0SbhpYpfhP3uR+xgVwXKDHRR1yGB4w== X-Google-Smtp-Source: ACHHUZ7WveAhC/ot8QlQTMasvWgLH0PIacEodGZUI8XN4cMzJYBpNsygC1CUCDU+EhwP0Ev60G/J2A== X-Received: by 2002:a17:902:dac7:b0:1ac:874d:f55e with SMTP id q7-20020a170902dac700b001ac874df55emr33754239plx.22.1684224305300; Tue, 16 May 2023 01:05:05 -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 kd14-20020a17090b348e00b00252df595c01sm996881pjb.52.2023.05.16.01.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 01:05:05 -0700 (PDT) X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Date: Tue, 16 May 2023 08:03:16 +0000 Message-ID: <20230516080459.711347-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.40.1.606.ga4b1b128d6-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 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 comments. Please take another look. 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 | 39 +++ include/libcamera/internal/meson.build | 1 + src/libcamera/heap_allocator.cpp | 295 +++++++++++++++++++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/meson.build | 5 +- 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 +- 9 files changed, 343 insertions(+), 136 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