Patch Detail
Show a patch.
GET /api/patches/18268/?format=api
{ "id": 18268, "url": "https://patchwork.libcamera.org/api/patches/18268/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18268/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230208095922.1471175-2-chenghaoyang@google.com>", "date": "2023-02-08T09:59:20", "name": "[libcamera-devel,v1,1/3] libcamera: Move DmaHeap to HeapAllocator as a base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "1863f67e4c1873dbd83d7d33d473104320a643fa", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18268/mbox/", "series": [ { "id": 3744, "url": "https://patchwork.libcamera.org/api/series/3744/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3744", "date": "2023-02-08T09:59:19", "name": "Add HeapAllocator", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3744/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18268/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18268/checks/", "tags": {}, "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 924D8C324D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 8 Feb 2023 09:59:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2FEE2625DD;\n\tWed, 8 Feb 2023 10:59:33 +0100 (CET)", "from mail-pl1-x635.google.com (mail-pl1-x635.google.com\n\t[IPv6:2607:f8b0:4864:20::635])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FD9F625DD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 8 Feb 2023 10:59:31 +0100 (CET)", "by mail-pl1-x635.google.com with SMTP id m2so18698975plg.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 08 Feb 2023 01:59:31 -0800 (PST)", "from chenghaoyang-low.c.googlers.com.com\n\t(46.165.189.35.bc.googleusercontent.com. [35.189.165.46])\n\tby smtp.gmail.com with ESMTPSA id\n\tm2-20020a17090a4d8200b00230b8402760sm1077773pjh.38.2023.02.08.01.59.28\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 08 Feb 2023 01:59:29 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675850373;\n\tbh=hIw5+SRIuWyed/qnCewJkqS3kiJgum8sAja5LyLkdoM=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=oISVPCk+0wqZ5o9l0wmyukgD3RP8GXtb5BMX8o7qnlkG8OvKsRMLVLwCUzRoozz7T\n\tUBw5Q8/zRnIMIT+rIfpM6uPBp7F3MpY6LuvYiDWUYcQQ7oTEMteoUXr/e/uSg9b9I3\n\tWugLTD9Dym8jK3bwJfFaw9qFg+c4xBbqy74z4xmFJHqMgPMI9ppgobGliEqA403PZl\n\tLF27tjRJ22zCS9Ft1ZyiEySsdGGzd9lLN67xgR1KOyNfnZ6TR36WNC7AoZOy8RGaQn\n\tMpz6pQkrlO8rp/hd6hWK3ex8v//3RfWJkafdkgzWLVObF479vhrFKR6Cd1eGQYRoIE\n\tiPMa1/mtWIX8A==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=T9GJDs4TKummjr4e2ozrtlVsxQUqmk/B31rc2tukESk=;\n\tb=T/z48UjF+TRR9iBsdxNYTlfeBmkjl0Zmb5imuwqfRkhM1UuT4lNdsDr/O9ISHGBkPL\n\t5Qe55iF55qZI0GqFfItZAbuotIOLXEYVvRZbnNNWDtwXe6M2YTuoaC6eoPRS0GPoqo7z\n\tsH6iJILBhgtb4sQ2pmf40b0VczYVn4lQhMZpo=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"T/z48UjF\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=T9GJDs4TKummjr4e2ozrtlVsxQUqmk/B31rc2tukESk=;\n\tb=kn1MFYEQabgz3EtzGwxBJN/joe+80znoCu7RommibC1qI3faKszk3NbSOzXW8HfJAV\n\tFeCZp7d5uC9T/cyTtkLFtNElWrnOKKEM5Gpvrvo/Cf2wP7zS/LWoUpwPzI3pwNqB498Z\n\tAA9ulYooNeozN8C0uGlRrCjTh9Yy7+88jRizcfSMlE0BlSS1Jzyo/zAjpWnQkR9A6bFb\n\txnBdYVqnDqVQ8d4oIGGECtPfoQXn3rLc4zfgRhaDq5AFJt97esWwSav48Qp6qFN2gfDF\n\t+cWfyvQ/gkErrtLmvqZ8uTuQxvjbLz41xKxEShZRKFJAUfBiyDitWwF+Uo/wxow9twVr\n\tZgsQ==", "X-Gm-Message-State": "AO0yUKWS+AHDMxAr3RuHXvH1c1kemYysxMeavghIiRBp+t73zYIrM5vH\n\txR+rnTMGtu9R4/j/d3plR/5vr07D+vEoTVRD", "X-Google-Smtp-Source": "AK7set8Kabb5SK4YdThfj8Hp5SKxQ0y93lxkr7CpzbQQrBf4WUKrELo9nwYsTYU6HCwikrjfVRzWvg==", "X-Received": "by 2002:a05:6a21:6d82:b0:bc:8bd6:d460 with SMTP id\n\twl2-20020a056a216d8200b000bc8bd6d460mr8981655pzb.3.1675850369606; \n\tWed, 08 Feb 2023 01:59:29 -0800 (PST)", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 8 Feb 2023 09:59:20 +0000", "Message-Id": "<20230208095922.1471175-2-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.39.1.519.gcb327c4b5f-goog", "In-Reply-To": "<20230208095922.1471175-1-chenghaoyang@google.com>", "References": "<20230208095922.1471175-1-chenghaoyang@google.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 1/3] libcamera: Move DmaHeap to\n\tHeapAllocator as a base class", "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 <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "As other components (like the WIP virtual pipeline handler) also need a\nheap allocator, move DmaHeap from raspberry pi pipeline handler to a\ngeneral HeapAllocator as a base class.\n\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n include/libcamera/dma_heap.h | 20 +++++++\n include/libcamera/heap.h | 27 ++++++++++\n include/libcamera/heap_allocator.h | 30 +++++++++++\n include/libcamera/meson.build | 3 ++\n .../dma_heaps.cpp => dma_heap.cpp} | 54 ++++++++++++-------\n src/libcamera/heap_allocator.cpp | 43 +++++++++++++++\n src/libcamera/meson.build | 2 +\n .../pipeline/raspberrypi/dma_heaps.h | 32 -----------\n .../pipeline/raspberrypi/meson.build | 1 -\n .../pipeline/raspberrypi/raspberrypi.cpp | 10 ++--\n 10 files changed, 164 insertions(+), 58 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 rename src/libcamera/{pipeline/raspberrypi/dma_heaps.cpp => dma_heap.cpp} (56%)\n create mode 100644 src/libcamera/heap_allocator.cpp\n delete mode 100644 src/libcamera/pipeline/raspberrypi/dma_heaps.h", "diff": "diff --git a/include/libcamera/dma_heap.h b/include/libcamera/dma_heap.h\nnew file mode 100644\nindex 00000000..96e311d3\n--- /dev/null\n+++ b/include/libcamera/dma_heap.h\n@@ -0,0 +1,20 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Google Inc.\n+ *\n+ * dma_heap.h - Dma Heap implementation.\n+ */\n+\n+#include <libcamera/heap.h>\n+\n+namespace libcamera {\n+\n+class DmaHeap : public Heap\n+{\n+public:\n+\tDmaHeap();\n+\t~DmaHeap();\n+\tUniqueFD alloc(const char *name, std::size_t size) override;\n+};\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/heap.h b/include/libcamera/heap.h\nnew file mode 100644\nindex 00000000..c49a2ac3\n--- /dev/null\n+++ b/include/libcamera/heap.h\n@@ -0,0 +1,27 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Google Inc.\n+ *\n+ * heap.h - Heap interface.\n+ */\n+\n+#pragma once\n+\n+#include <stddef.h>\n+\n+#include <libcamera/base/unique_fd.h>\n+\n+namespace libcamera {\n+\n+class Heap\n+{\n+public:\n+\tvirtual ~Heap() = default;\n+\tbool isValid() const { return handle_.isValid(); }\n+\tvirtual UniqueFD alloc(const char *name, std::size_t size) = 0;\n+\n+protected:\n+\tUniqueFD handle_;\n+};\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/heap_allocator.h b/include/libcamera/heap_allocator.h\nnew file mode 100644\nindex 00000000..cd7ed1a3\n--- /dev/null\n+++ b/include/libcamera/heap_allocator.h\n@@ -0,0 +1,30 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Google Inc.\n+ *\n+ * heap_allocator.h - Helper class for heap buffer allocations.\n+ */\n+\n+#pragma once\n+\n+#include <stddef.h>\n+\n+#include <libcamera/base/unique_fd.h>\n+\n+#include <libcamera/heap.h>\n+\n+namespace libcamera {\n+\n+class HeapAllocator\n+{\n+public:\n+\tHeapAllocator();\n+\t~HeapAllocator();\n+\tbool isValid() const { return heap_->isValid(); }\n+\tUniqueFD alloc(const char *name, std::size_t size);\n+\n+private:\n+\tstd::unique_ptr<Heap> heap_;\n+};\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex 408b7acf..f486630a 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -7,10 +7,13 @@ libcamera_public_headers = files([\n 'camera_manager.h',\n 'color_space.h',\n 'controls.h',\n+ 'dma_heap.h',\n 'fence.h',\n 'framebuffer.h',\n 'framebuffer_allocator.h',\n 'geometry.h',\n+ 'heap.h',\n+ 'heap_allocator.h',\n 'logging.h',\n 'pixel_format.h',\n 'request.h',\ndiff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp b/src/libcamera/dma_heap.cpp\nsimilarity index 56%\nrename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\nrename to src/libcamera/dma_heap.cpp\nindex 6b644406..8b67e9d0 100644\n--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n+++ b/src/libcamera/dma_heap.cpp\n@@ -1,19 +1,20 @@\n /* SPDX-License-Identifier: LGPL-2.1-or-later */\n /*\n- * Copyright (C) 2020, Raspberry Pi Ltd\n+ * Copyright (C) 2023, Google Inc.\n *\n- * dma_heaps.h - Helper class for dma-heap allocations.\n+ * dma_heap.h - Dma Heap implementation.\n */\n \n-#include \"dma_heaps.h\"\n+#include <libcamera/dma_heap.h>\n \n #include <array>\n #include <fcntl.h>\n-#include <linux/dma-buf.h>\n-#include <linux/dma-heap.h>\n #include <sys/ioctl.h>\n #include <unistd.h>\n \n+#include <linux/dma-buf.h>\n+#include <linux/dma-heap.h>\n+\n #include <libcamera/base/log.h>\n \n /*\n@@ -30,9 +31,7 @@ static constexpr std::array<const char *, 2> heapNames = {\n \n namespace libcamera {\n \n-LOG_DECLARE_CATEGORY(RPI)\n-\n-namespace RPi {\n+LOG_DEFINE_CATEGORY(DmaHeap)\n \n DmaHeap::DmaHeap()\n {\n@@ -40,17 +39,34 @@ DmaHeap::DmaHeap()\n \t\tint ret = ::open(name, O_RDWR, 0);\n \t\tif (ret < 0) {\n \t\t\tret = errno;\n-\t\t\tLOG(RPI, Debug) << \"Failed to open \" << name << \": \"\n-\t\t\t\t\t<< strerror(ret);\n+\t\t\tLOG(DmaHeap, Debug) << \"Failed to open \" << name << \": \"\n+\t\t\t\t\t << strerror(ret);\n \t\t\tcontinue;\n \t\t}\n \n-\t\tdmaHeapHandle_ = UniqueFD(ret);\n+\t\thandle_ = UniqueFD(ret);\n \t\tbreak;\n \t}\n \n-\tif (!dmaHeapHandle_.isValid())\n-\t\tLOG(RPI, Error) << \"Could not open any dmaHeap device\";\n+\tif (!handle_.isValid())\n+\t\tLOG(DmaHeap, Error) << \"Could not open any dmaHeap device\";\n+\n+\tint ret = ::open(\"/dev/udmabuf\", O_RDWR, 0);\n+\tif (ret < 0) {\n+\t\tret = errno;\n+\t\tLOG(DmaHeap, Error)\n+\t\t\t<< \"Failed to open allocator: \" << strerror(ret);\n+\n+\t\tif (ret == EACCES) {\n+\t\t\tLOG(DmaHeap, Info)\n+\t\t\t\t<< \"Consider making /dev/udmabuf accessible by the video group\";\n+\t\t\tLOG(DmaHeap, Info)\n+\t\t\t\t<< \"Alternatively, add your user to the kvm group.\";\n+\t\t}\n+\n+\t} else {\n+\t\thandle_ = UniqueFD(ret);\n+\t}\n }\n \n DmaHeap::~DmaHeap() = default;\n@@ -67,24 +83,22 @@ UniqueFD DmaHeap::alloc(const char *name, std::size_t size)\n \talloc.len = size;\n \talloc.fd_flags = O_CLOEXEC | O_RDWR;\n \n-\tret = ::ioctl(dmaHeapHandle_.get(), DMA_HEAP_IOCTL_ALLOC, &alloc);\n+\tret = ::ioctl(handle_.get(), DMA_HEAP_IOCTL_ALLOC, &alloc);\n \tif (ret < 0) {\n-\t\tLOG(RPI, Error) << \"dmaHeap allocation failure for \"\n-\t\t\t\t<< name;\n+\t\tLOG(DmaHeap, Error) << \"dmaHeap allocation failure for \"\n+\t\t\t\t << name;\n \t\treturn {};\n \t}\n \n \tUniqueFD allocFd(alloc.fd);\n \tret = ::ioctl(allocFd.get(), DMA_BUF_SET_NAME, name);\n \tif (ret < 0) {\n-\t\tLOG(RPI, Error) << \"dmaHeap naming failure for \"\n-\t\t\t\t<< name;\n+\t\tLOG(DmaHeap, Error) << \"dmaHeap naming failure for \"\n+\t\t\t\t << name;\n \t\treturn {};\n \t}\n \n \treturn allocFd;\n }\n \n-} /* namespace RPi */\n-\n } /* namespace libcamera */\ndiff --git a/src/libcamera/heap_allocator.cpp b/src/libcamera/heap_allocator.cpp\nnew file mode 100644\nindex 00000000..594b1d6a\n--- /dev/null\n+++ b/src/libcamera/heap_allocator.cpp\n@@ -0,0 +1,43 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2023, Google Inc.\n+ *\n+ * heap_allocator.cpp - Helper class for heap buffer allocations.\n+ */\n+\n+#include <libcamera/heap_allocator.h>\n+\n+#include <array>\n+#include <fcntl.h>\n+#include <sys/ioctl.h>\n+#include <unistd.h>\n+\n+#include <linux/dma-buf.h>\n+#include <linux/dma-heap.h>\n+\n+#include <libcamera/base/log.h>\n+\n+#include <libcamera/dma_heap.h>\n+\n+namespace libcamera {\n+\n+LOG_DEFINE_CATEGORY(HeapAllocator)\n+\n+HeapAllocator::HeapAllocator()\n+{\n+\theap_ = std::make_unique<DmaHeap>();\n+}\n+\n+HeapAllocator::~HeapAllocator() = default;\n+\n+UniqueFD HeapAllocator::alloc(const char *name, std::size_t size)\n+{\n+\tif (!isValid()) {\n+\t\tLOG(HeapAllocator, Fatal) << \"Allocation attempted without allocator\" << name;\n+\t\treturn {};\n+\t}\n+\n+\treturn heap_->alloc(name, size);\n+}\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 9869bfe7..ee586c0d 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -17,11 +17,13 @@ libcamera_sources = files([\n 'delayed_controls.cpp',\n 'device_enumerator.cpp',\n 'device_enumerator_sysfs.cpp',\n+ 'dma_heap.cpp',\n 'fence.cpp',\n 'formats.cpp',\n 'framebuffer.cpp',\n 'framebuffer_allocator.cpp',\n 'geometry.cpp',\n+ 'heap_allocator.cpp',\n 'ipa_controls.cpp',\n 'ipa_data_serializer.cpp',\n 'ipa_interface.cpp',\ndiff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h\ndeleted file mode 100644\nindex 0a4a8d86..00000000\n--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h\n+++ /dev/null\n@@ -1,32 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2020, Raspberry Pi Ltd\n- *\n- * dma_heaps.h - Helper class for dma-heap allocations.\n- */\n-\n-#pragma once\n-\n-#include <stddef.h>\n-\n-#include <libcamera/base/unique_fd.h>\n-\n-namespace libcamera {\n-\n-namespace RPi {\n-\n-class DmaHeap\n-{\n-public:\n-\tDmaHeap();\n-\t~DmaHeap();\n-\tbool isValid() const { return dmaHeapHandle_.isValid(); }\n-\tUniqueFD alloc(const char *name, std::size_t size);\n-\n-private:\n-\tUniqueFD dmaHeapHandle_;\n-};\n-\n-} /* namespace RPi */\n-\n-} /* namespace libcamera */\ndiff --git a/src/libcamera/pipeline/raspberrypi/meson.build b/src/libcamera/pipeline/raspberrypi/meson.build\nindex 6064a3f0..42b96286 100644\n--- a/src/libcamera/pipeline/raspberrypi/meson.build\n+++ b/src/libcamera/pipeline/raspberrypi/meson.build\n@@ -2,7 +2,6 @@\n \n libcamera_sources += files([\n 'delayed_controls.cpp',\n- 'dma_heaps.cpp',\n 'raspberrypi.cpp',\n 'rpi_stream.cpp',\n ])\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 8569df17..18325faa 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -20,6 +20,7 @@\n #include <libcamera/camera.h>\n #include <libcamera/control_ids.h>\n #include <libcamera/formats.h>\n+#include <libcamera/heap_allocator.h>\n #include <libcamera/ipa/raspberrypi_ipa_interface.h>\n #include <libcamera/ipa/raspberrypi_ipa_proxy.h>\n #include <libcamera/logging.h>\n@@ -41,7 +42,6 @@\n #include \"libcamera/internal/v4l2_videodevice.h\"\n \n #include \"delayed_controls.h\"\n-#include \"dma_heaps.h\"\n #include \"rpi_stream.h\"\n \n using namespace std::chrono_literals;\n@@ -240,7 +240,7 @@ public:\n \tstd::vector<std::pair<std::unique_ptr<V4L2Subdevice>, MediaLink *>> bridgeDevices_;\n \n \t/* DMAHEAP allocation helper. */\n-\tRPi::DmaHeap dmaHeap_;\n+\tHeapAllocator heapAllocator_;\n \tSharedFD lsTable_;\n \n \tstd::unique_ptr<RPi::DelayedControls> delayedCtrls_;\n@@ -1206,7 +1206,7 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me\n {\n \tstd::unique_ptr<RPiCameraData> data = std::make_unique<RPiCameraData>(this);\n \n-\tif (!data->dmaHeap_.isValid())\n+\tif (!data->heapAllocator_.isValid())\n \t\treturn -ENOMEM;\n \n \tMediaEntity *unicamImage = unicam->getEntityByName(\"unicam-image\");\n@@ -1595,9 +1595,9 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::IPA\n \t/* Always send the user transform to the IPA. */\n \tipaConfig.transform = static_cast<unsigned int>(config->transform);\n \n-\t/* Allocate the lens shading table via dmaHeap and pass to the IPA. */\n+\t/* Allocate the lens shading table via heapAllocator and pass to the IPA. */\n \tif (!lsTable_.isValid()) {\n-\t\tlsTable_ = SharedFD(dmaHeap_.alloc(\"ls_grid\", ipa::RPi::MaxLsGridSize));\n+\t\tlsTable_ = SharedFD(heapAllocator_.alloc(\"ls_grid\", ipa::RPi::MaxLsGridSize));\n \t\tif (!lsTable_.isValid())\n \t\t\treturn -ENOMEM;\n \n", "prefixes": [ "libcamera-devel", "v1", "1/3" ] }