[{"id":27109,"web_url":"https://patchwork.libcamera.org/comment/27109/","msgid":"<168423607269.3378917.2232624650801338243@Monstersaurus>","date":"2023-05-16T11:21:12","subject":"Re: [libcamera-devel] [PATCH v5 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":"Quoting Harvey Yang via libcamera-devel (2023-05-16 09:03:18)\n> From: Cheng-Hao Yang <chenghaoyang@chromium.org>\n> \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>  src/libcamera/heap_allocator.cpp | 106 +++++++++++++++++++++++++++++++\n>  1 file changed, 106 insertions(+)\n> \n> diff --git a/src/libcamera/heap_allocator.cpp b/src/libcamera/heap_allocator.cpp\n> index e9476de5..682a7e01 100644\n> --- a/src/libcamera/heap_allocator.cpp\n> +++ b/src/libcamera/heap_allocator.cpp\n> @@ -10,10 +10,14 @@\n>  #include <array>\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/dma-buf.h>\n>  #include <linux/dma-heap.h>\n> +#include <linux/udmabuf.h>\n>  \n>  #include <libcamera/base/log.h>\n>  \n> @@ -52,6 +56,14 @@ public:\n>         UniqueFD alloc(const char *name, std::size_t size) override;\n>  };\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>  DmaHeap::DmaHeap()\n>  {\n>         for (const char *name : dmaHeapNames) {\n> @@ -103,9 +115,103 @@ UniqueFD DmaHeap::alloc(const char *name, std::size_t size)\n>         return allocFd;\n>  }\n>  \n> +UdmaHeap::UdmaHeap()\n> +{\n> +       int ret = ::open(\"/dev/udmabuf\", O_RDWR, 0);\n> +       if (ret < 0) {\n> +               ret = errno;\n> +               LOG(HeapAllocator, Error)\n> +                       << \"UdmaHeap failed to open allocator: \" << strerror(ret);\n> +\n> +               if (ret == EACCES) {\n> +                       LOG(HeapAllocator, Info)\n> +                               << \"UdmaHeap: Consider making /dev/udmabuf accessible by the video group\";\n> +                       LOG(HeapAllocator, Info)\n> +                               << \"UdmaHeap: Alternatively, add your user to the kvm group.\";\n\nI think I wrote this code, but I'm torn here for upstream. These are\nprobably very 'distro' specific comments which we probably shouldn't\ninclude here.\n\nI like that they help inform the user what they need to do - but I fear\nmaybe we should drop these comments for now.\n\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(HeapAllocator, Fatal) << \"UdmaHeap: 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(HeapAllocator, Error)\n> +                       << \"UdmaHeap 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(HeapAllocator, Error)\n> +                       << \"UdmaHeap 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(HeapAllocator, Error)\n> +                       << \"UdmaHeap 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(HeapAllocator, Error)\n> +                       << \"UdmaHeap 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(HeapAllocator, Warning)\n> +                       << \"UdmaHeap 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(HeapAllocator, Debug) << \"UdmaHeap allocated \" << create.size << \" bytes\";\n> +\n> +       return uDma;\n> +}\n> +\n>  HeapAllocator::HeapAllocator()\n>  {\n>         heap_ = std::make_unique<DmaHeap>();\n> +       if (!isValid())\n\nI think if we've failed to create a DmaHeap - that's probably important\nto report to the user.\n\nI'm weary of this error path being taken for instance on an RPi or real\ndevice that wouldn't necessarily work with UdmaHeap ? (Maybe it will, I\ndon't know) - but the fact we're using a different heap should probably\nbe reported in that instance.\n\nPerhaps at least just a\n\t\tLOG(HeapAllocator, Info) << \"Using UdmaHeap allocator\";\n\nWhich would give us an indicator if we have issues reported on hardware\npipelines that can't use the buffers.\n\nOtherwise, the allocation code all looks about how I remember it being\nso \n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> +               heap_ = std::make_unique<UdmaHeap>();\n>  }\n>  \n>  HeapAllocator::~HeapAllocator() = default;\n> -- \n> 2.40.1.606.ga4b1b128d6-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 56CF4BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 May 2023 11:21:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A51B7627D1;\n\tTue, 16 May 2023 13:21:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1CB8560399\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 May 2023 13:21:16 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9F7857F8;\n\tTue, 16 May 2023 13:21:04 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1684236077;\n\tbh=rkJneKrG+9uEGutdoVM7ZckrXn+IjhOULuAz4f9Yw8o=;\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=DxZMUu9S4O4mUZqPpmIoCLuLKBxtqk3a0hclisUpP8OqH52HdMRJNbVye96UuW1qK\n\tiaaIBsxGrLgA+UYae2WA8wkP1kGaH0iaKi2OoicEBUWK+7t0I4FRzPyqLPBY5mvf6L\n\tpjqdrPog+CtscY1n4jxh/FJs1ELRZ0qoj/0RJd/BiGGRa+VHgExfqOyh+iSz0t73wi\n\t/3TX9m9HqXxTiOpqeYiPSLeULKKiCIlPDSHfS7UcHxnzLjsr4eMXI47wLtGOkysnVi\n\tesZait0sF3pDcP5lxiITkr9442sEVVsiM5RJr6XU55gXUXvdwoECOKcvIP7F1X6qGT\n\tYlHnEWuUVo2ig==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1684236064;\n\tbh=rkJneKrG+9uEGutdoVM7ZckrXn+IjhOULuAz4f9Yw8o=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=VWUma9Yv5vRfZbY9TJdUdJ6zk7xNGLM12qm2bAjpw0xP09YB1RtknFsjtHI9CGMyQ\n\tp1BpUr4ntq1tkPFJuWV43Q+EH3kwJwMejWdmsbPbD8tpC7uR8418hPwuQbt63nPk0s\n\t7n6P1G/brREMALF7tPxy+oMsgah6yAGh4A9zTv6g="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"VWUma9Yv\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230516080459.711347-3-chenghaoyang@google.com>","References":"<20230516080459.711347-1-chenghaoyang@google.com>\n\t<20230516080459.711347-3-chenghaoyang@google.com>","To":"Harvey Yang <chenghaoyang@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 16 May 2023 12:21:12 +0100","Message-ID":"<168423607269.3378917.2232624650801338243@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v5 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":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27125,"web_url":"https://patchwork.libcamera.org/comment/27125/","msgid":"<CAEB1ahtLt5oO1x-cCbN0Ld=Jm8WnHmVGuzPO0r69JQ=rQaZPpw@mail.gmail.com>","date":"2023-05-22T08:37:17","subject":"Re: [libcamera-devel] [PATCH v5 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":"Thanks Kieran!\n\nOn Tue, May 16, 2023 at 7:21 PM Kieran Bingham <\nkieran.bingham@ideasonboard.com> wrote:\n\n> Quoting Harvey Yang via libcamera-devel (2023-05-16 09:03:18)\n> > From: Cheng-Hao Yang <chenghaoyang@chromium.org>\n> >\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> >  src/libcamera/heap_allocator.cpp | 106 +++++++++++++++++++++++++++++++\n> >  1 file changed, 106 insertions(+)\n> >\n> > diff --git a/src/libcamera/heap_allocator.cpp\n> b/src/libcamera/heap_allocator.cpp\n> > index e9476de5..682a7e01 100644\n> > --- a/src/libcamera/heap_allocator.cpp\n> > +++ b/src/libcamera/heap_allocator.cpp\n> > @@ -10,10 +10,14 @@\n> >  #include <array>\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/dma-buf.h>\n> >  #include <linux/dma-heap.h>\n> > +#include <linux/udmabuf.h>\n> >\n> >  #include <libcamera/base/log.h>\n> >\n> > @@ -52,6 +56,14 @@ public:\n> >         UniqueFD alloc(const char *name, std::size_t size) override;\n> >  };\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> >  DmaHeap::DmaHeap()\n> >  {\n> >         for (const char *name : dmaHeapNames) {\n> > @@ -103,9 +115,103 @@ UniqueFD DmaHeap::alloc(const char *name,\n> std::size_t size)\n> >         return allocFd;\n> >  }\n> >\n> > +UdmaHeap::UdmaHeap()\n> > +{\n> > +       int ret = ::open(\"/dev/udmabuf\", O_RDWR, 0);\n> > +       if (ret < 0) {\n> > +               ret = errno;\n> > +               LOG(HeapAllocator, Error)\n> > +                       << \"UdmaHeap failed to open allocator: \" <<\n> strerror(ret);\n> > +\n> > +               if (ret == EACCES) {\n> > +                       LOG(HeapAllocator, Info)\n> > +                               << \"UdmaHeap: Consider making\n> /dev/udmabuf accessible by the video group\";\n> > +                       LOG(HeapAllocator, Info)\n> > +                               << \"UdmaHeap: Alternatively, add your\n> user to the kvm group.\";\n>\n> I think I wrote this code, but I'm torn here for upstream. These are\n> probably very 'distro' specific comments which we probably shouldn't\n> include here.\n>\n> I like that they help inform the user what they need to do - but I fear\n> maybe we should drop these comments for now.\n>\n>\nI see. Removed.\n\n\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(HeapAllocator, Fatal) << \"UdmaHeap: Allocation\n> 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(HeapAllocator, Error)\n> > +                       << \"UdmaHeap 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(HeapAllocator, Error)\n> > +                       << \"UdmaHeap failed to set memfd size: \" <<\n> 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(HeapAllocator, Error)\n> > +                       << \"UdmaHeap failed to seal the memfd: \" <<\n> 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(HeapAllocator, Error)\n> > +                       << \"UdmaHeap failed to allocate \" << size << \"\n> 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(HeapAllocator, Warning)\n> > +                       << \"UdmaHeap allocated \" << create.size << \"\n> bytes 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(HeapAllocator, Debug) << \"UdmaHeap allocated \" <<\n> create.size << \" bytes\";\n> > +\n> > +       return uDma;\n> > +}\n> > +\n> >  HeapAllocator::HeapAllocator()\n> >  {\n> >         heap_ = std::make_unique<DmaHeap>();\n> > +       if (!isValid())\n>\n> I think if we've failed to create a DmaHeap - that's probably important\n> to report to the user.\n>\n> I'm weary of this error path being taken for instance on an RPi or real\n> device that wouldn't necessarily work with UdmaHeap ? (Maybe it will, I\n> don't know) - but the fact we're using a different heap should probably\n> be reported in that instance.\n>\n> Perhaps at least just a\n>                 LOG(HeapAllocator, Info) << \"Using UdmaHeap allocator\";\n>\n> Which would give us an indicator if we have issues reported on hardware\n> pipelines that can't use the buffers.\n>\n> Otherwise, the allocation code all looks about how I remember it being\n> so\n>\n>\nYes, your worry totally makes sense. I've considered letting users decide\nwhich heap to be used actually. For instance, we can create an enum list\nthat contains all the options (Dma & Udma) for now, and let users choose.\nWDYT?\n\nFor the log though, actually we'll get informed by \"Dmaheap could not\nopen any dmaHeap device\" in DmaHeap's c'tor, when it fails to initialize.\nI've added corresponiding Info log in DmaHeap's and UdmaHeap's c'tors\nthough, to make it clearer.\n\n\n>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n>\n> > +               heap_ = std::make_unique<UdmaHeap>();\n> >  }\n> >\n> >  HeapAllocator::~HeapAllocator() = default;\n> > --\n> > 2.40.1.606.ga4b1b128d6-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 252A0C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 22 May 2023 08:37:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E304C62861;\n\tMon, 22 May 2023 10:37:30 +0200 (CEST)","from mail-vk1-xa36.google.com (mail-vk1-xa36.google.com\n\t[IPv6:2607:f8b0:4864:20::a36])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4B6BD60536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 May 2023 10:37:29 +0200 (CEST)","by mail-vk1-xa36.google.com with SMTP id\n\t71dfb90a1353d-456d6ef4449so1432676e0c.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 22 May 2023 01:37:29 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1684744650;\n\tbh=PSDkhqwt6lBlEzptrmHJaZJ84fLEX1n4VTAXGN1qJuQ=;\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=GsTZ53oTRvVgO0GB05NzmT44fryNkWov97oytuFw4BXroHLJBlnzTdmIJBfm0x3NF\n\tRHv+xivnZiNKHjiuUXzvsD1GgPqyr6f3Zl8BQIvpFQRdYXBWlsJ62z4Glz1maAgFrX\n\taMF46is8HV/zFEX/oRhxRYKtIG+06ykUhxUBp/IcWKNzCbhzrpzbQbHKeAKCgupbG3\n\t1RGczD1zG8NRc6X1ewFK7hi6LBgaX6E4P9nVD+SjT0PacQhOqBr+i6c3SJci/FNAu4\n\t0CmgBte3D4DC6UhbUa+KNhyYPerKHSe3TId+GDb3cxTw/vxq9bD39adz2tajI61LLf\n\tOTtHM5uWW7pWA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1684744648; x=1687336648;\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=L6JJE+Kur9tNbEI8JTHMJ0C9L1ybuE2UrnAzzZmr5hc=;\n\tb=GjaHH4H4Fm8QwfGuUm1BLmEBsvc6s0YqiCMuU9x9O2Kzd8rL8+OfYaIVvyLWkCEqrz\n\tUEdCloBFXsvS25Pytnw/i2WBvRXMrrXiLHD1nChUB4lgYOb2ZDl9NrVh7MCfsX5erKaB\n\tg2bFV2272ZIPEhsF/2JzRamL5oJxJAxO2vBX8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"GjaHH4H4\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1684744648; x=1687336648;\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=L6JJE+Kur9tNbEI8JTHMJ0C9L1ybuE2UrnAzzZmr5hc=;\n\tb=FleVy8wBgatkSk/qpk0J+vzpVZqpFKRsr6E6vtZm8Qv0JihJQSucBEXjHRKomODJpL\n\th8hK1uGWtph/OsRX8NsI3UTzS6H+clt+yK13QPSWL/LXOH3e1Al70yxleFrQYVq+nkK4\n\tR77yJaqYmIAdxmMXDcfTtSoHPCzqDTPPZVzhz8PfYmbHISN0umShsBRDghkSufy+qkY3\n\tVI/DIyCyeyrr7Cka9QR4WBP9ZAqUt0csq6mksLCvNOTns/R6TMIuxwovT+uNR6qS/pqN\n\tbEvKFRceCC+peqzveNJuGgXNwGxlN2/eHzl+oltFooo2TTkTS7cgzOKsDA5a75OYLQV+\n\t1fpA==","X-Gm-Message-State":"AC+VfDzf5dXj9z5MDJbf+bG26ptr+45H4ZvkNoMDC18cHYzDKbA6hYLh\n\tMO0kATGQQr6IvlKYd3a2O8gEHxWnswSiblEqQ3SumRFO5fTC1Js8Flk=","X-Google-Smtp-Source":"ACHHUZ5DrHwL9XcUixsNp6cActfkq8u0cDmPpsEK8lGQIdIFtjZbAmurhDH2jgJ/3jPaFdM4Muc21tH1ujFjoBk8qRQ=","X-Received":"by 2002:a1f:c183:0:b0:44f:d1d6:1978 with SMTP id\n\tr125-20020a1fc183000000b0044fd1d61978mr3147546vkf.5.1684744648177;\n\tMon, 22 May 2023 01:37:28 -0700 (PDT)","MIME-Version":"1.0","References":"<20230516080459.711347-1-chenghaoyang@google.com>\n\t<20230516080459.711347-3-chenghaoyang@google.com>\n\t<168423607269.3378917.2232624650801338243@Monstersaurus>","In-Reply-To":"<168423607269.3378917.2232624650801338243@Monstersaurus>","Date":"Mon, 22 May 2023 16:37:17 +0800","Message-ID":"<CAEB1ahtLt5oO1x-cCbN0Ld=Jm8WnHmVGuzPO0r69JQ=rQaZPpw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"0000000000004ad38b05fc442e53\"","Subject":"Re: [libcamera-devel] [PATCH v5 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":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]