[{"id":26439,"web_url":"https://patchwork.libcamera.org/comment/26439/","msgid":"<167595444111.42371.10098267926583005789@Monstersaurus>","date":"2023-02-09T14:54:01","subject":"Re: [libcamera-devel] [PATCH v1 2/3] libcamera: Add UdmaHeap if\n\tDmaHeap is not valid","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Harvey,\n\nThanks for looking at this to make it easier to get allocations\nthroughout libcamera.\n\nQuoting Harvey Yang via libcamera-devel (2023-02-08 09:59:21)\n> If DmaHeap is not valid, fall back to UdmaHeap to allocate buffers.\n> \n> Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> ---\n>  include/libcamera/meson.build    |   1 +\n>  include/libcamera/udma_heap.h    |  20 ++++++\n>  src/libcamera/heap_allocator.cpp |   3 +\n>  src/libcamera/meson.build        |   1 +\n>  src/libcamera/udma_heap.cpp      | 117 +++++++++++++++++++++++++++++++\n>  5 files changed, 142 insertions(+)\n>  create mode 100644 include/libcamera/udma_heap.h\n>  create mode 100644 src/libcamera/udma_heap.cpp\n> \n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index f486630a..a1414a57 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -19,6 +19,7 @@ libcamera_public_headers = files([\n>      'request.h',\n>      'stream.h',\n>      'transform.h',\n> +    'udma_heap.h',\n>  ])\n>  \n>  subdir('base')\n> diff --git a/include/libcamera/udma_heap.h b/include/libcamera/udma_heap.h\n> new file mode 100644\n> index 00000000..b5b86922\n> --- /dev/null\n> +++ b/include/libcamera/udma_heap.h\n> @@ -0,0 +1,20 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2023, Google Inc.\n\nI have the same comment as from Dave in regards to Copyright.\n\nI expect this is highly derived from the work I commenced, at\n\nhttps://github.com/kbingham/libcamera/commit/8d79af53eaf461bab246c2fdeb1d9fdcbb288743\n\nSo please keep some form of attribution to Ideas on Board Oy.\n\n\n> + *\n> + * udma_heap.h - Udma Heap implementation.\n> + */\n> +\n> +#include <libcamera/heap.h>\n> +\n> +namespace libcamera {\n> +\n> +class UdmaHeap : public Heap\n> +{\n> +public:\n> +       UdmaHeap();\n> +       ~UdmaHeap();\n> +       UniqueFD alloc(const char *name, std::size_t size) override;\n> +};\n> +\n> +} /* namespace libcamera */\n> diff --git a/src/libcamera/heap_allocator.cpp b/src/libcamera/heap_allocator.cpp\n> index 594b1d6a..179c2c21 100644\n> --- a/src/libcamera/heap_allocator.cpp\n> +++ b/src/libcamera/heap_allocator.cpp\n> @@ -18,6 +18,7 @@\n>  #include <libcamera/base/log.h>\n>  \n>  #include <libcamera/dma_heap.h>\n> +#include <libcamera/udma_heap.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -26,6 +27,8 @@ LOG_DEFINE_CATEGORY(HeapAllocator)\n>  HeapAllocator::HeapAllocator()\n>  {\n>         heap_ = std::make_unique<DmaHeap>();\n> +       if (!isValid())\n> +               heap_ = std::make_unique<UdmaHeap>();\n>  }\n>  \n>  HeapAllocator::~HeapAllocator() = default;\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index ee586c0d..bce26d4b 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -45,6 +45,7 @@ libcamera_sources = files([\n>      'stream.cpp',\n>      'sysfs.cpp',\n>      'transform.cpp',\n> +    'udma_heap.cpp',\n>      'v4l2_device.cpp',\n>      'v4l2_pixelformat.cpp',\n>      'v4l2_subdevice.cpp',\n> diff --git a/src/libcamera/udma_heap.cpp b/src/libcamera/udma_heap.cpp\n> new file mode 100644\n> index 00000000..2a470f6b\n> --- /dev/null\n> +++ b/src/libcamera/udma_heap.cpp\n> @@ -0,0 +1,117 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2023, Google Inc.\n\nAnd here of course.\n\n\n> + *\n> + * dma_heap.h - Dma Heap implementation.\n> + */\n> +\n> +#include <libcamera/udma_heap.h>\n> +\n> +#include <fcntl.h>\n> +#include <sys/ioctl.h>\n> +#include <sys/mman.h>\n> +#include <sys/stat.h>\n> +#include <sys/types.h>\n> +#include <unistd.h>\n> +\n> +#include <linux/udmabuf.h>\n> +\n> +#include <libcamera/base/log.h>\n> +\n> +namespace libcamera {\n> +\n> +LOG_DEFINE_CATEGORY(UdmaHeap)\n> +\n> +UdmaHeap::UdmaHeap()\n> +{\n> +       int ret = ::open(\"/dev/udmabuf\", O_RDWR, 0);\n> +       if (ret < 0) {\n> +               ret = errno;\n> +               LOG(UdmaHeap, Error)\n> +                       << \"Failed to open allocator: \" << strerror(ret);\n> +\n> +               if (ret == EACCES) {\n> +                       LOG(UdmaHeap, Info)\n> +                               << \"Consider making /dev/udmabuf accessible by the video group\";\n> +                       LOG(UdmaHeap, Info)\n> +                               << \"Alternatively, add your user to the kvm group.\";\n> +               }\n> +\n> +       } else {\n> +               handle_ = UniqueFD(ret);\n> +       }\n> +}\n> +\n> +UdmaHeap::~UdmaHeap() = default;\n> +\n> +UniqueFD UdmaHeap::alloc(const char *name, std::size_t size)\n> +{\n> +       if (!isValid()) {\n> +               LOG(UdmaHeap, Fatal) << \"Allocation attempted without allocator\" << name;\n> +               return {};\n> +       }\n> +\n> +       int ret;\n> +\n> +       ret = memfd_create(name, MFD_ALLOW_SEALING);\n> +       if (ret < 0) {\n> +               ret = errno;\n> +               LOG(UdmaHeap, Error)\n> +                       << \"Failed to allocate memfd storage: \"\n> +                       << strerror(ret);\n> +               return {};\n> +       }\n> +\n> +       UniqueFD memfd(ret);\n> +\n> +       ret = ftruncate(memfd.get(), size);\n> +       if (ret < 0) {\n> +               ret = errno;\n> +               LOG(UdmaHeap, Error)\n> +                       << \"Failed to set memfd size: \" << strerror(ret);\n> +               return {};\n> +       }\n> +\n> +       /* UdmaHeap Buffers *must* have the F_SEAL_SHRINK seal */\n> +       ret = fcntl(memfd.get(), F_ADD_SEALS, F_SEAL_SHRINK);\n> +       if (ret < 0) {\n> +               ret = errno;\n> +               LOG(UdmaHeap, Error)\n> +                       << \"Failed to seal the memfd: \" << strerror(ret);\n> +               return {};\n> +       }\n> +\n> +       struct udmabuf_create create;\n> +\n> +       create.memfd = memfd.get();\n> +       create.flags = UDMABUF_FLAGS_CLOEXEC;\n> +       create.offset = 0;\n> +       create.size = size;\n> +\n> +       ret = ::ioctl(handle_.get(), UDMABUF_CREATE, &create);\n> +       if (ret < 0) {\n> +               ret = errno;\n> +               LOG(UdmaHeap, Error)\n> +                       << \"Failed to allocate \" << size << \" bytes: \"\n> +                       << strerror(ret);\n> +               return {};\n> +       }\n> +\n> +       /* The underlying memfd is kept as as a reference in the kernel */\n> +       UniqueFD uDma(ret);\n> +\n> +       if (create.size != size)\n> +               LOG(UdmaHeap, Warning)\n> +                       << \"Allocated \" << create.size << \" bytes instead of \"\n> +                       << size << \" bytes\";\n> +\n> +       /* Fail if not suitable, the allocation will be free'd by UniqueFD */\n> +       if (create.size < size)\n> +               return {};\n> +\n> +       LOG(UdmaHeap, Debug) << \"Allocated \" << create.size << \" bytes\";\n> +\n> +       return uDma;\n> +}\n> +\n> +} /* namespace libcamera */\n> -- \n> 2.39.1.519.gcb327c4b5f-goog\n>","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 1BD98BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Feb 2023 14:54:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 786FA625F4;\n\tThu,  9 Feb 2023 15:54:04 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BFBCE603BD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Feb 2023 15:54:03 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2CE5B9CA;\n\tThu,  9 Feb 2023 15:54:03 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675954444;\n\tbh=B44LC44+xyY4B/ef0H4SNPBgF6RqmzuEoD/G/BUxlK8=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=xs12+Hyafrfb2EKMoCtEc3Wic+M8Ispej334G8uS1ajqkVSSmtItKxHERzICQQcsH\n\tOnk9f4lY2pgw4evdAh0A9p0S7FVYQQVxlgf8IjSURP6HXPdMtMD/SGNyiVFiplp1uQ\n\tarrjLVu/Bma/KG+77JQlkGjBFpxshYQqUi22ovaWZYBMvLfgNceztXacmUcpx/BvPx\n\tj/D8qmT3AGsa7xG7ZRA8vjFgFV3M1Dj5U2a2ceHWwR7LX3NDkTfmsU33i7K00koQtu\n\thY1nkBx9M5d9nE0ZxCD6Exxo50sX32KeL1OzMqt8oB0wHYtXvj4tBKqmxhqmPx9bwM\n\t+2nrGvJvq0pjw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1675954443;\n\tbh=B44LC44+xyY4B/ef0H4SNPBgF6RqmzuEoD/G/BUxlK8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=hdAUNzr08qIefE87ax1Z2zwZdvqL1TbWhOJrABakNNe01UONEqZ2uZGxfTMsrPvcJ\n\tZOHYhtt6DAuBS7VWdEiWUO/kUodncThquAQYOnU50Oi6lEOdJtrun+oYYrzpCD/8GF\n\t+yKD7EN/YpG7gNnflVsMrs9Fcvh92UgwDYSO2fhg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"hdAUNzr0\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230208095922.1471175-3-chenghaoyang@google.com>","References":"<20230208095922.1471175-1-chenghaoyang@google.com>\n\t<20230208095922.1471175-3-chenghaoyang@google.com>","To":"Harvey Yang <chenghaoyang@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 09 Feb 2023 14:54:01 +0000","Message-ID":"<167595444111.42371.10098267926583005789@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v1 2/3] libcamera: Add UdmaHeap if\n\tDmaHeap is not valid","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","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>"}},{"id":26453,"web_url":"https://patchwork.libcamera.org/comment/26453/","msgid":"<CAEB1ahuvFqv1vKhpino1ptfYGSnSw1AGgojD-vjZt0Pk0OCySg@mail.gmail.com>","date":"2023-02-14T09:38:16","subject":"Re: [libcamera-devel] [PATCH v1 2/3] libcamera: Add UdmaHeap if\n\tDmaHeap is not valid","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"content":"Hi Kieran,\n\nThanks for pointing it out and so sorry about that. Updated in v2.\n\nOn Thu, Feb 9, 2023 at 10:54 PM Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Hi Harvey,\n>\n> Thanks for looking at this to make it easier to get allocations\n> throughout libcamera.\n>\n> Quoting Harvey Yang via libcamera-devel (2023-02-08 09:59:21)\n> > If DmaHeap is not valid, fall back to UdmaHeap to allocate buffers.\n> >\n> > Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> > ---\n> >  include/libcamera/meson.build    |   1 +\n> >  include/libcamera/udma_heap.h    |  20 ++++++\n> >  src/libcamera/heap_allocator.cpp |   3 +\n> >  src/libcamera/meson.build        |   1 +\n> >  src/libcamera/udma_heap.cpp      | 117 +++++++++++++++++++++++++++++++\n> >  5 files changed, 142 insertions(+)\n> >  create mode 100644 include/libcamera/udma_heap.h\n> >  create mode 100644 src/libcamera/udma_heap.cpp\n> >\n> > diff --git a/include/libcamera/meson.build\n> b/include/libcamera/meson.build\n> > index f486630a..a1414a57 100644\n> > --- a/include/libcamera/meson.build\n> > +++ b/include/libcamera/meson.build\n> > @@ -19,6 +19,7 @@ libcamera_public_headers = files([\n> >      'request.h',\n> >      'stream.h',\n> >      'transform.h',\n> > +    'udma_heap.h',\n> >  ])\n> >\n> >  subdir('base')\n> > diff --git a/include/libcamera/udma_heap.h\n> b/include/libcamera/udma_heap.h\n> > new file mode 100644\n> > index 00000000..b5b86922\n> > --- /dev/null\n> > +++ b/include/libcamera/udma_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> I have the same comment as from Dave in regards to Copyright.\n>\n> I expect this is highly derived from the work I commenced, at\n>\n>\n> https://github.com/kbingham/libcamera/commit/8d79af53eaf461bab246c2fdeb1d9fdcbb288743\n>\n> So please keep some form of attribution to Ideas on Board Oy.\n>\n>\n> > + *\n> > + * udma_heap.h - Udma Heap implementation.\n> > + */\n> > +\n> > +#include <libcamera/heap.h>\n> > +\n> > +namespace libcamera {\n> > +\n> > +class UdmaHeap : public Heap\n> > +{\n> > +public:\n> > +       UdmaHeap();\n> > +       ~UdmaHeap();\n> > +       UniqueFD alloc(const char *name, std::size_t size) override;\n> > +};\n> > +\n> > +} /* namespace libcamera */\n> > diff --git a/src/libcamera/heap_allocator.cpp\n> b/src/libcamera/heap_allocator.cpp\n> > index 594b1d6a..179c2c21 100644\n> > --- a/src/libcamera/heap_allocator.cpp\n> > +++ b/src/libcamera/heap_allocator.cpp\n> > @@ -18,6 +18,7 @@\n> >  #include <libcamera/base/log.h>\n> >\n> >  #include <libcamera/dma_heap.h>\n> > +#include <libcamera/udma_heap.h>\n> >\n> >  namespace libcamera {\n> >\n> > @@ -26,6 +27,8 @@ LOG_DEFINE_CATEGORY(HeapAllocator)\n> >  HeapAllocator::HeapAllocator()\n> >  {\n> >         heap_ = std::make_unique<DmaHeap>();\n> > +       if (!isValid())\n> > +               heap_ = std::make_unique<UdmaHeap>();\n> >  }\n> >\n> >  HeapAllocator::~HeapAllocator() = default;\n> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> > index ee586c0d..bce26d4b 100644\n> > --- a/src/libcamera/meson.build\n> > +++ b/src/libcamera/meson.build\n> > @@ -45,6 +45,7 @@ libcamera_sources = files([\n> >      'stream.cpp',\n> >      'sysfs.cpp',\n> >      'transform.cpp',\n> > +    'udma_heap.cpp',\n> >      'v4l2_device.cpp',\n> >      'v4l2_pixelformat.cpp',\n> >      'v4l2_subdevice.cpp',\n> > diff --git a/src/libcamera/udma_heap.cpp b/src/libcamera/udma_heap.cpp\n> > new file mode 100644\n> > index 00000000..2a470f6b\n> > --- /dev/null\n> > +++ b/src/libcamera/udma_heap.cpp\n> > @@ -0,0 +1,117 @@\n> > +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> > +/*\n> > + * Copyright (C) 2023, Google Inc.\n>\n> And here of course.\n>\n>\n> > + *\n> > + * dma_heap.h - Dma Heap implementation.\n> > + */\n> > +\n> > +#include <libcamera/udma_heap.h>\n> > +\n> > +#include <fcntl.h>\n> > +#include <sys/ioctl.h>\n> > +#include <sys/mman.h>\n> > +#include <sys/stat.h>\n> > +#include <sys/types.h>\n> > +#include <unistd.h>\n> > +\n> > +#include <linux/udmabuf.h>\n> > +\n> > +#include <libcamera/base/log.h>\n> > +\n> > +namespace libcamera {\n> > +\n> > +LOG_DEFINE_CATEGORY(UdmaHeap)\n> > +\n> > +UdmaHeap::UdmaHeap()\n> > +{\n> > +       int ret = ::open(\"/dev/udmabuf\", O_RDWR, 0);\n> > +       if (ret < 0) {\n> > +               ret = errno;\n> > +               LOG(UdmaHeap, Error)\n> > +                       << \"Failed to open allocator: \" << strerror(ret);\n> > +\n> > +               if (ret == EACCES) {\n> > +                       LOG(UdmaHeap, Info)\n> > +                               << \"Consider making /dev/udmabuf\n> accessible by the video group\";\n> > +                       LOG(UdmaHeap, Info)\n> > +                               << \"Alternatively, add your user to the\n> kvm group.\";\n> > +               }\n> > +\n> > +       } else {\n> > +               handle_ = UniqueFD(ret);\n> > +       }\n> > +}\n> > +\n> > +UdmaHeap::~UdmaHeap() = default;\n> > +\n> > +UniqueFD UdmaHeap::alloc(const char *name, std::size_t size)\n> > +{\n> > +       if (!isValid()) {\n> > +               LOG(UdmaHeap, Fatal) << \"Allocation attempted without\n> allocator\" << name;\n> > +               return {};\n> > +       }\n> > +\n> > +       int ret;\n> > +\n> > +       ret = memfd_create(name, MFD_ALLOW_SEALING);\n> > +       if (ret < 0) {\n> > +               ret = errno;\n> > +               LOG(UdmaHeap, Error)\n> > +                       << \"Failed to allocate memfd storage: \"\n> > +                       << strerror(ret);\n> > +               return {};\n> > +       }\n> > +\n> > +       UniqueFD memfd(ret);\n> > +\n> > +       ret = ftruncate(memfd.get(), size);\n> > +       if (ret < 0) {\n> > +               ret = errno;\n> > +               LOG(UdmaHeap, Error)\n> > +                       << \"Failed to set memfd size: \" << strerror(ret);\n> > +               return {};\n> > +       }\n> > +\n> > +       /* UdmaHeap Buffers *must* have the F_SEAL_SHRINK seal */\n> > +       ret = fcntl(memfd.get(), F_ADD_SEALS, F_SEAL_SHRINK);\n> > +       if (ret < 0) {\n> > +               ret = errno;\n> > +               LOG(UdmaHeap, Error)\n> > +                       << \"Failed to seal the memfd: \" << strerror(ret);\n> > +               return {};\n> > +       }\n> > +\n> > +       struct udmabuf_create create;\n> > +\n> > +       create.memfd = memfd.get();\n> > +       create.flags = UDMABUF_FLAGS_CLOEXEC;\n> > +       create.offset = 0;\n> > +       create.size = size;\n> > +\n> > +       ret = ::ioctl(handle_.get(), UDMABUF_CREATE, &create);\n> > +       if (ret < 0) {\n> > +               ret = errno;\n> > +               LOG(UdmaHeap, Error)\n> > +                       << \"Failed to allocate \" << size << \" bytes: \"\n> > +                       << strerror(ret);\n> > +               return {};\n> > +       }\n> > +\n> > +       /* The underlying memfd is kept as as a reference in the kernel\n> */\n> > +       UniqueFD uDma(ret);\n> > +\n> > +       if (create.size != size)\n> > +               LOG(UdmaHeap, Warning)\n> > +                       << \"Allocated \" << create.size << \" bytes\n> instead of \"\n> > +                       << size << \" bytes\";\n> > +\n> > +       /* Fail if not suitable, the allocation will be free'd by\n> UniqueFD */\n> > +       if (create.size < size)\n> > +               return {};\n> > +\n> > +       LOG(UdmaHeap, Debug) << \"Allocated \" << create.size << \" bytes\";\n> > +\n> > +       return uDma;\n> > +}\n> > +\n> > +} /* namespace libcamera */\n> > --\n> > 2.39.1.519.gcb327c4b5f-goog\n> >\n>","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 D6403BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Feb 2023 09:38:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 97C3F625F4;\n\tTue, 14 Feb 2023 10:38:29 +0100 (CET)","from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com\n\t[IPv6:2607:f8b0:4864:20::a32])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 331F061EEC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Feb 2023 10:38:28 +0100 (CET)","by mail-vk1-xa32.google.com with SMTP id n22so3732988vkm.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Feb 2023 01:38:28 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1676367509;\n\tbh=eOuDEH57B7X3BG+ylr8vltY02gw+kNkerRmRV/+QkJ0=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=oAYep2aGwYiUNDk8kWBInpWov4eFVzJ2ILq4R01hzj4ZWJIhuRFX08Y7YdW/Mckk4\n\tvRczLNZgHRzDFzIpWXwAsqHy9FKc2EU/UMzObRzs3eMgrbUneWP3TO9Vi5JWeoCA1Q\n\tG7F0k11pLctGHVs6JszN1Y8gWKA6Mj7xZq7DG+aWhLIMRF3ILLKaiYPz1FRyq8eCFz\n\tDpFHsIynXBlNcv5TibIRWj8wM8N11g4rr9XXKy9/89Gnh4jLUfSKnbto1xTZme6C+N\n\tX/Pf0qxTXRTj+qM89Yo7h/taVG75COwnUmXrED74N3GFYbbTBlDPmLlg5sNiXaynBe\n\tAs+5SVJEHWEEw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=gz5LUSEHy9GZ+oOTiXsFGn2NNEesYlkhTknMcKPUEaw=;\n\tb=jol/6xQhzddUv5MQuiSObgBF1HMMRUToUXL/wA2NK8a4mx4WFjP5P54Lr9fpUeJ6Mj\n\tTDv1hOu2iJ3RcqO5ZAnYviDVZSnAKuRqEKi/fKm9vG180ski9Q+M/wd62yNDJmmniFf8\n\tJd1npK8323iFvVRNSBiC0mErhUg6eGUm6vaaA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"jol/6xQh\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=gz5LUSEHy9GZ+oOTiXsFGn2NNEesYlkhTknMcKPUEaw=;\n\tb=vd41TYRkIXf9ejqfNj7E49k8GRZVDAgNLuCFGadfLQDxM1StmtXsc/6dzIHKm4jbZl\n\t5gOrjqsJYv7N2jLUcV7CCt8TxLmskeWsnD6pG4Yn6QN4xMtVBWomBtfZm00oj0QM2LLG\n\tZ2Ph0oP91cXiCaYMcH2J5L9Rbt7IA798VoCIfoiOyhPjvL0CMkAI1A+xqLL4NUtC6HY1\n\ttRdTjoykbwmVYUUXK2VG9pTTNTa9FSP2cdm2Z+5BczJwlqyAST5rc/UnYbWgBfRgXPzX\n\tvv9iOYDJ4URCOlJP1exijtYZhhmTMT6i/b6Mqfz/Au/8QX5vUGqMFDJwMfUDC41bUSYL\n\tuHsQ==","X-Gm-Message-State":"AO0yUKWAP6QYwDLRdH6PcxAK3owdc9UWdz5AclfQTxyHAgRJSkoR5JtN\n\tGuIX7CzgGwdIuwUmaNSrI+vBHc4rx6wjetrI2ZsslKBNiJLqIA==","X-Google-Smtp-Source":"AK7set+h8zyJj0DELmYO6JDdSnrp43gsk0o1SWTTuZlaYuM+U3/juo4wezenSh1zFDmiTzovn9IRD7VrRw1A8OAjhEQ=","X-Received":"by 2002:a1f:2dc3:0:b0:3b7:5ff7:cfb8 with SMTP id\n\tt186-20020a1f2dc3000000b003b75ff7cfb8mr262903vkt.11.1676367506981;\n\tTue, 14 Feb 2023 01:38:26 -0800 (PST)","MIME-Version":"1.0","References":"<20230208095922.1471175-1-chenghaoyang@google.com>\n\t<20230208095922.1471175-3-chenghaoyang@google.com>\n\t<167595444111.42371.10098267926583005789@Monstersaurus>","In-Reply-To":"<167595444111.42371.10098267926583005789@Monstersaurus>","Date":"Tue, 14 Feb 2023 17:38:16 +0800","Message-ID":"<CAEB1ahuvFqv1vKhpino1ptfYGSnSw1AGgojD-vjZt0Pk0OCySg@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000c45a0605f4a5b990\"","Subject":"Re: [libcamera-devel] [PATCH v1 2/3] libcamera: Add UdmaHeap if\n\tDmaHeap is not valid","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":"Cheng-Hao Yang via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Cc":"Harvey Yang <chenghaoyang@google.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]