Patch Detail
Show a patch.
GET /api/patches/18281/?format=api
{ "id": 18281, "url": "https://patchwork.libcamera.org/api/patches/18281/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18281/", "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": "<20230214093736.4067033-2-chenghaoyang@google.com>", "date": "2023-02-14T09:37:34", "name": "[libcamera-devel,v2,1/3] libcamera: Move DmaHeap to HeapAllocator as a base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4703dcdf3c2e59d03ab6b461542da75be968fd59", "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/18281/mbox/", "series": [ { "id": 3754, "url": "https://patchwork.libcamera.org/api/series/3754/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3754", "date": "2023-02-14T09:37:33", "name": "Add HeapAllocator", "version": 2, "mbox": "https://patchwork.libcamera.org/series/3754/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18281/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18281/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 4C410C324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Feb 2023 09:37:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F1F60625FA;\n\tTue, 14 Feb 2023 10:37:45 +0100 (CET)", "from mail-pg1-x531.google.com (mail-pg1-x531.google.com\n\t[IPv6:2607:f8b0:4864:20::531])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2A59A625E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Feb 2023 10:37:44 +0100 (CET)", "by mail-pg1-x531.google.com with SMTP id v3so9863067pgh.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Feb 2023 01:37:44 -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\tz9-20020aa791c9000000b0059416691b64sm9696172pfa.19.2023.02.14.01.37.41\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 14 Feb 2023 01:37:41 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1676367466;\n\tbh=TQQuU+2lqJOFPv4XNWda6pdJVlZpFzQ381XZsJkbuX0=;\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=eBp/dNoltqHN2HaEma8zhV7nFK7nv2Q/vbalHSSpIwzamlkxCKBiYRAWE1XtsqHPf\n\tzzGSMCljHrpGv2w+C5WZ0nzrcE0db3VjzQVsoO6a67en9tswVseUqoGYAb/aGqurfe\n\trmWnSu0P5+DZFOOhCyfXpJBGHBQ+mVRcwrjwM4AURXeuPhsF1B8R7QcKrc2vUxYLoL\n\t1HTKB60/ilZLyVikRsOFQ89oZhxAEJ1JDGijQgINZ0vxy9iDjLQPsmpF+W9d7IuNrh\n\tx9uwVqrJQuAx/NzScs6KFBY8H33N979DGAeY9PKp7o9b4ubAaCnBbbT29EhsuV0KF4\n\tQYSh2grpSgHMA==", "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=GluqLnJbDOw0maX5MfqSGdLEbUHCvjlqu7pxccUlRUE=;\n\tb=JY4dXPvhBOCw8j2trY5oiyDYMp6FHeQ8YBXk7waZEpSEFdBDig3dJHiXOUMJrpsoSZ\n\ti0vf8q2Ta/ha6rAba6XmdHgC2kciQ3M4pFLFDA2hdkESMCCtZrTsK0kRvyKNN5dKrPYa\n\t+frVpNgiUin1sVozcTHFvixKS1znmt6aDNEho=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"JY4dXPvh\"; \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=GluqLnJbDOw0maX5MfqSGdLEbUHCvjlqu7pxccUlRUE=;\n\tb=JJJkjRa7dstx+zxBLRAZqqKphH/7bB0qyupBNCB/B3/UVZy9dtUgc2EiJmzhahHdjE\n\t/dDyyyPxwlY7GpmZDP4sYOS9WacbqdQP4xfzGW/NYS5J33m1lH7J+UNCp+ElVISiQwI0\n\t07rJtm0GqUhpjo4PNZr3krmMzds0MijeMvHD41oYmfaEzcOj/WtP+M+/8AjafD8GYA1D\n\tgkwNicAyObA453Fq7MtsNWodZgf9gc+Wbn6fxxbRqpfdul2hsN++G6dZ3D+mrgTABnKk\n\tP/KT7vyz7iMMhLfXZaDWvtApsi2/fK6KTHIJQq9EiotEp9Zl7aISajd/wxMqO4Z+zGiG\n\tPrEQ==", "X-Gm-Message-State": "AO0yUKU2J6EFRS0JDNG9hsgmAuChCna03H+0uEHz8MqfEFKli4fNQerN\n\tujZxfZccTo70KXaA/HytJRRO8LTxISs512Q+", "X-Google-Smtp-Source": "AK7set/INTyeefi37EFADZvpfufrB43xjA7FUkR0hze6ljAiB37YDV0lnLR7kHMHxcRDMlHpvkdYFQ==", "X-Received": "by 2002:aa7:98c2:0:b0:5a8:acd9:765b with SMTP id\n\te2-20020aa798c2000000b005a8acd9765bmr1627920pfm.16.1676367462215; \n\tTue, 14 Feb 2023 01:37:42 -0800 (PST)", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 14 Feb 2023 09:37:34 +0000", "Message-Id": "<20230214093736.4067033-2-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.39.1.581.gbfd45094c4-goog", "In-Reply-To": "<20230214093736.4067033-1-chenghaoyang@google.com>", "References": "<20230214093736.4067033-1-chenghaoyang@google.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 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} | 52 ++++++++++++-------\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, 163 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 rename src/libcamera/{pipeline/raspberrypi/dma_heaps.cpp => dma_heap.cpp} (58%)\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..a663c317\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) 2020, Raspberry Pi Ltd\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 58%\nrename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\nrename to src/libcamera/dma_heap.cpp\nindex 6b644406..38f603b0 100644\n--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\n+++ b/src/libcamera/dma_heap.cpp\n@@ -2,18 +2,19 @@\n /*\n * Copyright (C) 2020, Raspberry Pi Ltd\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", "v2", "1/3" ] }