{"id":18485,"url":"https://patchwork.libcamera.org/api/covers/18485/?format=json","web_url":"https://patchwork.libcamera.org/cover/18485/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230328095534.3584-1-harveyycyang@gmail.com>","date":"2023-03-28T09:55:31","name":"[libcamera-devel,v4,0/3] Add HeapAllocator","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/?format=json","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"mbox":"https://patchwork.libcamera.org/cover/18485/mbox/","series":[{"id":3823,"url":"https://patchwork.libcamera.org/api/series/3823/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3823","date":"2023-03-28T09:55:31","name":"Add HeapAllocator","version":4,"mbox":"https://patchwork.libcamera.org/series/3823/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/18485/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7E493C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Mar 2023 09:55:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B24962744;\n\tTue, 28 Mar 2023 11:55:40 +0200 (CEST)","from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com\n\t[IPv6:2607:f8b0:4864:20::1032])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E209A626E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Mar 2023 11:55:38 +0200 (CEST)","by mail-pj1-x1032.google.com with SMTP id\n\tgp15-20020a17090adf0f00b0023d1bbd9f9eso14609506pjb.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Mar 2023 02:55:38 -0700 (PDT)","from harveyyang.localdomain (1-163-26-93.dynamic-ip.hinet.net.\n\t[1.163.26.93]) by smtp.gmail.com with ESMTPSA id\n\tv21-20020aa78515000000b006259beddb63sm20241488pfn.44.2023.03.28.02.55.36\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 28 Mar 2023 02:55:36 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679997340;\n\tbh=dWZy1QzNnKEGzsMgUtjF1fj3XmL8AzersFqKrME4ZyA=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=mMvgHvynwGjozfp6KS6NdA1YfARcYQRKzSjDacJZSok2PPqQXJzZSfsMKX7heO5bF\n\tDAM4DSrh9rkcIZAuDatfikFwxt+IlOMOvcKyXfMv2v4MynXCyvh4TYSqm3RNq/VOc7\n\tbolvVERI0szSzQrZZ2Qqzi9kXcyUjOn6WljTviqb0UcLL9ZC9+OJPvGKDXt1c1HC4U\n\tBpYVpCyJoCwQ+ypPlysTEU0KyNKoY8u9+8DPwgujkSr7/inODf0qU3bkT2aSc16qtG\n\t+7cxCvjUJZfgMO8OLsElLWnCykLKU2F4QvE7/sHVhVFjLqReTaOQMgKhYyL/gIUVCU\n\toGriS4X38YiSQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1679997337;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=JxjpvmCEvNsogn7qVqi7DrB5hRP7I81eTCnegLWe9gc=;\n\tb=dPDeBS8c8cqfmfxVwXz7yK1XkPnMPu/NqyQUlqE7GH5QkxUVu54E3TVC79HoLSECI4\n\tlwsZ14gFgIH6+SdJLn1uTkkojg7SAK5GqNRKVDFURTrnJvU8+YdzdIAfi17H10sJzhTW\n\t4gshjKKPVb5pt4/8eAMBYSf93/aMbvhuo3/ls="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"dPDeBS8c\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1679997337;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=JxjpvmCEvNsogn7qVqi7DrB5hRP7I81eTCnegLWe9gc=;\n\tb=NY7gHohMl03T3la6v0dpR73Qh+LIUlkAlfhEO8oB6wMtc/pz7o1ySmqgDQ5ingiLvQ\n\tDyXpaNzRvAYuhEEzK9LB3yB/1V2eyxTELj9U1Et/NTPju565KYJfWSd/iQFv43/6CxiZ\n\to7Vg5wWcWSpv4zMjz8UzdXiWpyONEt4/s40V65MuJRfvyIDfdPV7lf2rUMK2/xm5cvop\n\tmE+hVxk5NV3MoReBKh6A2GTyUsJpBiu1hUnkJqPMf+MF7xsPgHA0U8gw0CBhB8LTkq5R\n\tMXgo8dzZhHUih5lHK3NCfjoNjwto28e6KsAFlX2f8PGp9O2By3EWZd2L1FZoE8dNa8cb\n\txBJQ==","X-Gm-Message-State":"AO0yUKXNqeF47CCe7vRelSk4MI6U+Ur+f9Gze+AfNuWdsh+rvf5n4eQ6\n\tpGjWIoYpJLOw4LcQoN+7o6mJugpy0IaXHgMDIsL44g==","X-Google-Smtp-Source":"AK7set92JCaa9O/ERl8pUuKTWxGheQcTEwvWy67Pag17/Nk+luNN6v9LdbymQdPVcGmRpJzqOhs2DA==","X-Received":"by 2002:a05:6a20:c50f:b0:dd:bf6a:4609 with SMTP id\n\tgm15-20020a056a20c50f00b000ddbf6a4609mr13505677pzb.49.1679997337250; \n\tTue, 28 Mar 2023 02:55:37 -0700 (PDT)","X-Google-Original-From":"Harvey Yang <harveyycyang@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 28 Mar 2023 17:55:31 +0800","Message-Id":"<20230328095534.3584-1-harveyycyang@gmail.com>","X-Mailer":"git-send-email 2.40.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 0/3] Add HeapAllocator","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Harvey Yang via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Harvey Yang <chenghaoyang@chromium.org>","Cc":"Harvey Yang <harveyycyang@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Hi all,\n\nThe series of patches added HeapAllocator, which uses DmaHeap (moved\nfrom Raspberry Pi pipeline handler) and UdmaHeap to allocate heap\nbuffers.\n\nI've updated and tested it on my virtual pipeline handler.\nHeapAllocator creates buffer as a direct multiple of the page size,\nand create planes according to the stream configuration.\n\nI think the patch is ready to be reviewed. Please take a look, thanks!\n\nBR,\nHarvey\n\nCheng-Hao Yang (3):\n  libcamera: Move DmaHeap to HeapAllocator as a base class\n  libcamera: Add UdmaHeap if DmaHeap is not valid\n  libcamera: Add exportFrameBuffers in HeapAllocator\n\n include/libcamera/dma_heap.h                  |  20 +++\n include/libcamera/heap.h                      |  27 ++++\n include/libcamera/heap_allocator.h            |  41 ++++++\n include/libcamera/meson.build                 |   4 +\n include/libcamera/udma_heap.h                 |  20 +++\n .../dma_heaps.cpp => dma_heap.cpp}            |  35 +++---\n src/libcamera/heap_allocator.cpp              | 102 +++++++++++++++\n src/libcamera/meson.build                     |   3 +\n .../pipeline/raspberrypi/dma_heaps.h          |  32 -----\n .../pipeline/raspberrypi/meson.build          |   1 -\n .../pipeline/raspberrypi/raspberrypi.cpp      |  10 +-\n src/libcamera/udma_heap.cpp                   | 117 ++++++++++++++++++\n 12 files changed, 355 insertions(+), 57 deletions(-)\n create mode 100644 include/libcamera/dma_heap.h\n create mode 100644 include/libcamera/heap.h\n create mode 100644 include/libcamera/heap_allocator.h\n create mode 100644 include/libcamera/udma_heap.h\n rename src/libcamera/{pipeline/raspberrypi/dma_heaps.cpp => dma_heap.cpp} (69%)\n create mode 100644 src/libcamera/heap_allocator.cpp\n delete mode 100644 src/libcamera/pipeline/raspberrypi/dma_heaps.h\n create mode 100644 src/libcamera/udma_heap.cpp"}