From patchwork Wed Aug 2 06:51:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 18920 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 45E02BDCBF for ; Wed, 2 Aug 2023 06:55:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4E2C9627EC; Wed, 2 Aug 2023 08:55:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1690959301; bh=SEsenq1/TYdTCdh0dOvT8/hD35QOZVeKGk6J3TyIbv8=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=qB0JcCYxkh63C+fRF0vAptr/JV70MmjKb+4zRDt6yj39emokAJb2f+sROK+pXGP5I zn1q0Fa7KtxRz4wXQZ50C30umqy4rk/vfL/8HQy/yeurJsvfG+R5/LilAt4+FoTJye IRW6STyyra3B7wbh/5gP2AA5YGXppdL5lfGPpeUmEs9C5Dci2Y7JyYzRhdFhHLnpcJ kAyOfE+kKoL+cCrtlw79U1T9snaN3DzbCNt7mqsV1VoVt8EgE07sSMpqwStXYproJ9 mcI+DQuMCj/5IsEl5UeHec5CKnWotcmFfe6vRGlF0m+9Og5cGRcJwZ40j6zjMMTUDG vGP7Z7f9KVX4A== Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E241E61E1A for ; Wed, 2 Aug 2023 08:54:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="j6sPaqb0"; dkim-atps=neutral Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-686f8614ce5so6095401b3a.3 for ; Tue, 01 Aug 2023 23:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690959296; x=1691564096; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lC9Iys+RjdyVIxbzOkv24EPZBnMxq0doahk5F68MnS8=; b=j6sPaqb0fXRzPSdZMnhRs5QNmj/ApZ3nr8+j/AgID5W2PRtO2XmeJeo4FZ9wRnvtWU 3/U8BxbGvKyFSjcu8ZRbOWbPIBkFE8DPdn2P8jl24jdU+NktTP5nFmUF7vxsYzLSc9dM h/F4uuGBnB2tsNym4oPA2tIHX03LEjqsCHp6w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690959296; x=1691564096; 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=lC9Iys+RjdyVIxbzOkv24EPZBnMxq0doahk5F68MnS8=; b=YOiLpWqHmR59iwYhJDeUgGsVRVoURHzz4qX4BS0HX4Qb523CKtgXaA7bRL3q7P5gjM swWb1Dv4mUT7cxdyHX5ig+KYBkzL9ifxHhDkbQsD9G14FoPjivWhVakaafFFVXH3+ueF 0idbUuk0d7cmJyeAWORma+KShpv+bP9lLtopGcKspK737bLNEhqEW+yTOjuoLadlEt/Q ie4RPuBkYlTRQRb4+GIHxo0ug3poIal+JWdiuzB3UcOEWzhb9aMU9q3DhE5BoI+snkXy jHpjHpRO/53kTAZ/gYuU8wrzW4FzHix+PnnwkhSgkC+RFvBWU5cRODm0yNSxYsbTr6lT y7zQ== X-Gm-Message-State: ABy/qLbzqwcYEIHnFro3ie5byR1wazcqrV2JqsGz4jjTKqvIooeiluri 5vH6w69C+U+k+Hqew3RP6hnBXfbqjCglrMSGEwE= X-Google-Smtp-Source: APBJJlENw+XoBptGg/n7XToFEc+MytvLP8GSRrgDm18g4pT1u3K/ACSdZ0KgmBhSslszhfiMNooFLg== X-Received: by 2002:a05:6a21:4994:b0:138:2fb8:6b42 with SMTP id ax20-20020a056a21499400b001382fb86b42mr14302874pzc.14.1690959296575; Tue, 01 Aug 2023 23:54:56 -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 d14-20020aa7868e000000b0065980654baasm9142154pfo.130.2023.08.01.23.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Aug 2023 23:54:56 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 2 Aug 2023 06:51:42 +0000 Message-ID: <20230802065449.2904457-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v7 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, Fixed some comments, while haven't made the design decision according to Laurent's question of heap implementation. We need Debian & Fedora folks to confirm if any DMA heap or udmabuf would be available by default to make progress. BR, Harvey Harvey 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 | 42 +++ include/libcamera/internal/meson.build | 1 + src/libcamera/heap_allocator.cpp | 355 +++++++++++++++++++ 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, 405 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