Show a patch.

GET /api/patches/18324/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 18324,
    "url": "https://patchwork.libcamera.org/api/patches/18324/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/18324/",
    "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": "<20230302081349.3334290-2-chenghaoyang@google.com>",
    "date": "2023-03-02T08:13:47",
    "name": "[libcamera-devel,v3,1/3] libcamera: Move DmaHeap to HeapAllocator as a base class",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "debb844eed6393a84911cafd2b95f0cf7bc47dd8",
    "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/18324/mbox/",
    "series": [
        {
            "id": 3780,
            "url": "https://patchwork.libcamera.org/api/series/3780/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3780",
            "date": "2023-03-02T08:13:46",
            "name": "Add HeapAllocator",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3780/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/18324/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/18324/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 48C74BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  2 Mar 2023 08:14:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0AA99626C5;\n\tThu,  2 Mar 2023 09:14:00 +0100 (CET)",
            "from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com\n\t[IPv6:2607:f8b0:4864:20::42a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 063C7626C0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  2 Mar 2023 09:13:58 +0100 (CET)",
            "by mail-pf1-x42a.google.com with SMTP id y10so9565974pfi.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 02 Mar 2023 00:13:57 -0800 (PST)",
            "from chenghaoyang-low.c.googlers.com.com\n\t(112.157.221.35.bc.googleusercontent.com. [35.221.157.112])\n\tby smtp.gmail.com with ESMTPSA id\n\tp9-20020aa78609000000b005a8bdc18453sm9179755pfn.35.2023.03.02.00.13.55\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 02 Mar 2023 00:13:55 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677744840;\n\tbh=f04+rWYpv5HytfIpWU+68S6T+DXQjLFZpICw3vf0OSs=;\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=MVuihu4JNfZzlMs/3k8TTmW3U3bNzZlohFrAKljz88JHu0liiieXZ3zCMBlvpefAn\n\t0ABYg81w3L359un+IGLnvLQVII0J/01ZzTsRVF/UmUr6wtaFfLxIE2YlMTPxUEwxLg\n\tUCNR7kr2N3ZtpExHT0Z1tf95JamTsoW+gFnzt3y6MCDJ0/ED1MgUM5s9fRx/SesZ4g\n\tzz4YpZKwiJfApsFHcjUavESXTOqHo6C0KNuZGdBvVqA9Tbz4XFso/5yGKxpmgrTSy0\n\t7DnTSG1EL4ktUCAH6C78yGczlgPl2y9TnVUF9vmtI7rcaw1aMuabM/KFHta93D9FJK\n\tGB8VGfBJB04kA==",
            "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=Z3/IRFilRfX4RdZtfng9VscS05Uz9TtsWjvv1NQFHNY=;\n\tb=VojQnyPFDPgo5Y/u6zpkRY7pR1wLOYclNY5AVJX8pjRqPYce7JnMGy/Lbvzo2MU2Wi\n\tyE50BGjlNk9BDDrJxaLftFM/y87bX5Og4uWVViHAOE0DF5Mx2eUqi3QL7sJgSUXwd+Wt\n\tv+mvrSs6a+CoWNqVQyRiMnzPKG2kZuz/T7oA0="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"VojQnyPF\"; \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=Z3/IRFilRfX4RdZtfng9VscS05Uz9TtsWjvv1NQFHNY=;\n\tb=s9bQllHlNnFAygC8hBlHTsd7htr/HFcjape2BwhGBx0hTIJUQ8sTSuE/G60AFUkUAK\n\tan6KAneTMIStPG1yp14UrhfwLdaZMXcsugaiIbA0Pcxn0EMsENOVHM98C19nzMke9ipT\n\twUNNCWbyDQTLD1j0kL/BCedVSrDGYrGzG6xUOXJR/nmXLU0MC4RKIsy7XQrH9JITOn4A\n\t8nBHxC+aohC3txwlIzMHnXBJfegLJC82LzCRh6/wbiYkUv60arau7kAmhXYnh7nwIOts\n\tfz5fS33775qMnpa9cTM0GWWYz28YEl2MjdDFj6iygMFv9uPg4we3cyyRHQo3fbzgUR2K\n\t4ypg==",
        "X-Gm-Message-State": "AO0yUKV9i4qhl2upq3iVWcrJSOobAc7TrYo10lc31eOVFKpKVQv8u3f9\n\tUh1QgtNpOr4/BMGuInJUluhJFPWNLIe1a+AcCL4=",
        "X-Google-Smtp-Source": "AK7set9oGWQKG4igyhMhUxxh63QVvqSSFNO3KF8Hov170LcL2qu53xn6bsNnjjGX0SxUHoyQ/dimpw==",
        "X-Received": "by 2002:a62:4ed0:0:b0:594:26a7:cbd2 with SMTP id\n\tc199-20020a624ed0000000b0059426a7cbd2mr1765582pfb.8.1677744836250; \n\tThu, 02 Mar 2023 00:13:56 -0800 (PST)",
        "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  2 Mar 2023 08:13:47 +0000",
        "Message-Id": "<20230302081349.3334290-2-chenghaoyang@google.com>",
        "X-Mailer": "git-send-email 2.39.2.722.g9855ee24e9-goog",
        "In-Reply-To": "<20230302081349.3334290-1-chenghaoyang@google.com>",
        "References": "<20230302081349.3334290-1-chenghaoyang@google.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 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}            | 35 +++++++--------\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, 146 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} (69%)\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 69%\nrename from src/libcamera/pipeline/raspberrypi/dma_heaps.cpp\nrename to src/libcamera/dma_heap.cpp\nindex 6b644406..02415975 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,17 @@ 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 \n DmaHeap::~DmaHeap() = default;\n@@ -67,24 +66,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 59e8fb18..7322f0e8 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 84120954..b7e0d031 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -21,6 +21,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@@ -44,7 +45,6 @@\n #include \"libcamera/internal/yaml_parser.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@@ -245,7 +245,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@@ -1293,7 +1293,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@@ -1680,9 +1680,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",
        "v3",
        "1/3"
    ]
}