{"id":18486,"url":"https://patchwork.libcamera.org/api/1.1/patches/18486/?format=json","web_url":"https://patchwork.libcamera.org/patch/18486/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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-2-harveyycyang@gmail.com>","date":"2023-03-28T09:55:32","name":"[libcamera-devel,v4,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/1.1/people/117/?format=json","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18486/mbox/","series":[{"id":3823,"url":"https://patchwork.libcamera.org/api/1.1/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/patches/18486/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18486/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 C919DC326C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Mar 2023 09:55:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5295A62749;\n\tTue, 28 Mar 2023 11:55:43 +0200 (CEST)","from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com\n\t[IPv6:2607:f8b0:4864:20::1034])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 003256273D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Mar 2023 11:55:39 +0200 (CEST)","by mail-pj1-x1034.google.com with SMTP id\n\tgp15-20020a17090adf0f00b0023d1bbd9f9eso14609542pjb.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Mar 2023 02:55:39 -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.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 28 Mar 2023 02:55:38 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1679997343;\n\tbh=VCDl4ZEryhgcpEmGNnEUQGklBXGY1bp3Bsn4GqvqK3Q=;\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=wZ48BG1Gt32L2kExw9wXk+TzFXQbwvyXFzG6WpPo2Pmtgo5B7utmaHs8wnuQCDulX\n\tfvnOhZAEsPseCMli5RBJqjdchnw2nKbHEm81RWzTE+Y8YIstwr1mUQeL4ZvfmK1kBT\n\tvXI8RuNnU8OrM0ZI5s17Q3QJmAI+69sHpV2W7qMvfbei8JpxSKcDYbPIT1EWheQ3eu\n\tPqsaayy5ltJwBop+7UbTE/sZAh2q9lFaWqxusuG1H3KrTa2QVOIIAVqG00Plci5AeY\n\tYPcdwHW0plKczbvewE5qti/jPtKW8Z6UMOaBf3sknwWonefecKYdsk0Wdn4hRaFW9+\n\tan1SIlz+xj/aQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1679997338;\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=mVbuPkhxZSj7ypJjZlYmo41mc2qUse3tKD8Pk9JRnps=;\n\tb=HsDxPs0YhWNJvXfD6J3zclFxowDyIKIP1UEjlwOOut0ZTWqwJbDlaZG/XjRAkilKhS\n\tacNqw7Y4f107pvchsD/sY0B99LZRCfdp+WJydl9CJqUTtnCZEs4p01Y0B6iuEtPqwdWv\n\tNyi3p7gEYqwNqGKw58WVQY7semWkKJqK2AwSs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"HsDxPs0Y\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112; t=1679997338;\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=mVbuPkhxZSj7ypJjZlYmo41mc2qUse3tKD8Pk9JRnps=;\n\tb=QVBPWty4PAYw5idra0tP2czn4oEt5BHeh151Igp0rEeYhSP4N2ofUEaH6MF22Nk0ae\n\tRvHud1rbby+I6tbhm5yVvaNWPkfX/g8np7EYe0DMNVq+8nuqcZ+ylKfOoC4BudUh4ka0\n\td23uxThYdKNxW1i0Aa03AomY/ZBwymPFMi2AbD7lNOg0GKORobiQkPy4hIDjurqCz7Wc\n\t6ThpmiObYX17lnmZbUBGJ9kEABT5TfTlUsxoGMextEzAoC9Yeh/6wANQ8vAb/hrgAhzi\n\tk74eX817w93DXFR9+2djAY8ZnahSu0Lk8kxQuC3YJHgDdi9thOKLrnpqFrj0cCyrVlBR\n\tNNeg==","X-Gm-Message-State":"AO0yUKXAQ70p8MPkQcf8+B0gw25nWxfaSARKuDItN6yym+HhyGOMWGoN\n\t+6rSILhqPzDXFr1Gna3lfHxM+M97n3kCwUFVq7y1cg==","X-Google-Smtp-Source":"AK7set9ze93wSjFjxTOMqymXky2fVSu+fs6qFHrmDWm2qZilfJdGIKcVNleuUaCL4SBf1IdgvsM2DA==","X-Received":"by 2002:a05:6a20:4a13:b0:db:e054:826a with SMTP id\n\tfr19-20020a056a204a1300b000dbe054826amr13139968pzb.5.1679997338280; \n\tTue, 28 Mar 2023 02:55:38 -0700 (PDT)","X-Google-Original-From":"Harvey Yang <harveyycyang@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 28 Mar 2023 17:55:32 +0800","Message-Id":"<20230328095534.3584-2-harveyycyang@gmail.com>","X-Mailer":"git-send-email 2.40.0","In-Reply-To":"<20230328095534.3584-1-harveyycyang@gmail.com>","References":"<20230328095534.3584-1-harveyycyang@gmail.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 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":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Cheng-Hao Yang <chenghaoyang@chromium.org>\n\nAs 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 00600441..198dcc9d 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@@ -246,7 +246,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@@ -1304,7 +1304,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@@ -1692,9 +1692,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","v4","1/3"]}