[{"id":38364,"web_url":"https://patchwork.libcamera.org/comment/38364/","msgid":"<e16b6932-a204-4f7b-b4aa-5840e3a37404@ideasonboard.com>","date":"2026-03-18T16:10:42","subject":"Re: [PATCH v5 0/7] libcamera: mali-c55: Add support for\n\tmemory-to-memory","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2026. 03. 13. 17:14 keltezéssel, Jacopo Mondi írta:\n> Add support for m2m camera operations in the mali-c55 pipeline handler.\n> \n> The series targets SoCs like the Renesas RZ/V2H(P) one where the\n> Mali-C55 ISP is integrated in m2m mode. The CSI-2 receiver (CRU) saves\n> images to memory and the ISP is fed through a dedicated DMA engine that\n> provides memory interfacing capabilities.\n> \n> The series starts by adding support for the RZG2LCRU class (named after\n> the media device name) and then plumbs memory-to-memory operations in\n> the pipeline handler.\n> \n> Tested on RZ/V2H(P) EVK with imx708 camera sensor.\n> \n> Dan, could you re-test with Inline mode please ?\n> I should have collected your fix that restored proper operations with\n> Inline.\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> ---\n\nPlease check the following branch: https://gitlab.freedesktop.org/pobrn/libcamera/-/commits/mali-c55-mem\nI have made some small changes, mainly to the variant handling.\n\nI have also modified the `RZG2LCRU` class to use an `std::vector` instead of\nan `std::queue`, since it does not really need to be a queue. And as somewhat\nexpected, this brings out the raw buffer reuse issue much more consistently,\nso I think `frameInfo.rawBuffer = nullptr` should be added to `PipelineHandlerMaliC55::paramsComputed()`\nas discussed. Or alternatively maybe `RZG2LCRU::cruReturnBuffer()` could be\ncalled from `PipelineHandlerMaliC55::tryComplete()` like it is done for the\nother buffers. Although I think reusing it as soon as possible is probably\nthe better option.\n\nAnd the test pattern generator does not seem to work, I don't know why, yet.\nBut it is not working even without these changes, so probably unrelated.\n\n\n> Changes in v5:\n> - Use overloaded std::visit when possible\n> - Adjust indentation\n> \n> Changes in v4:\n> - Move the overloaded visitor helper to utils.h\n> \n> Changes in v3:\n> - Drop dynamic polymorphism and use overloaded visitor in\n>    MaliC55CameraData. The result is neater in my opinion.\n> - Address Barnabas' comments I missed in v2\n> \n> Changes in v2:\n> - Almost a complete rework of the CameraData which is now a class\n>    hierarchy. I'm not sure the result is that much cleaner, but hey, I'm\n>    using templates and pattern with weird names, so it ought be better\n>    for sure\n> \n> ---\n> Daniel Scally (3):\n>        libcamera: mali-c55: Add RZG2LCRU class\n>        libcamera: mali-c55: Register memory input camera\n>        libcamera: mali-c55: Implement capture for memory-to-memory\n> \n> Jacopo Mondi (4):\n>        libcamera: utils: Add overloaded visitor helpers\n>        libcamera: mali-c55: Split TPG and Inline camera handling\n>        libcamera: mali-c55: Configure camera in memory-to-memory\n>        libcamera: mali-c55: Fix sensor size computation\n> \n>   include/libcamera/base/utils.h                |   7 +\n>   src/libcamera/base/utils.cpp                  |  35 ++\n>   src/libcamera/pipeline/mali-c55/mali-c55.cpp  | 623 ++++++++++++++++++++------\n>   src/libcamera/pipeline/mali-c55/meson.build   |   3 +-\n>   src/libcamera/pipeline/mali-c55/rzg2l-cru.cpp | 260 +++++++++++\n>   src/libcamera/pipeline/mali-c55/rzg2l-cru.h   |  73 +++\n>   src/libcamera/pipeline/virtual/virtual.cpp    |  10 +-\n>   7 files changed, 867 insertions(+), 144 deletions(-)\n> ---\n> base-commit: 02277d4c1a5ae7fee582f635936877435a12db64\n> change-id: 20251205-mali-cru-e212f8ab332e\n> \n> Best regards,","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 4D6D7BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Mar 2026 16:10:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6CC562714;\n\tWed, 18 Mar 2026 17:10:47 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0251762010\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2026 17:10:45 +0100 (CET)","from [192.168.33.40] (185.182.214.153.nat.pool.zt.hu\n\t[185.182.214.153])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C9CD2308;\n\tWed, 18 Mar 2026 17:09:32 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"EzuBE46N\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1773850172;\n\tbh=1MAN4RcF88ZPdfhuTn+tdVFQP4ZpxRbg/v0F+nfgjW4=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=EzuBE46NZegpKsSoal9orQqZQ/5VvLei6wdLCDRjdnnqkOlrWJEgDRyreJ67ocUL6\n\tXS/slelDhPlweWQ7v1ufGbXdQp7vYDT6Doq3jYWAkux3LZt7jK1+jjZUFSO2/C6WOc\n\t1BaBToQPXbJTBNdWjf44gJr0pxep/gayS5/uLWtQ=","Message-ID":"<e16b6932-a204-4f7b-b4aa-5840e3a37404@ideasonboard.com>","Date":"Wed, 18 Mar 2026 17:10:42 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v5 0/7] libcamera: mali-c55: Add support for\n\tmemory-to-memory","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tDaniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260313-mali-cru-v5-0-48f93e431294@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260313-mali-cru-v5-0-48f93e431294@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38381,"web_url":"https://patchwork.libcamera.org/comment/38381/","msgid":"<acFcgWSGbpp1TsaD@zed>","date":"2026-03-23T16:27:13","subject":"Re: [PATCH v5 0/7] libcamera: mali-c55: Add support for\n\tmemory-to-memory","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Barnabás\n\nOn Wed, Mar 18, 2026 at 05:10:42PM +0100, Barnabás Pőcze wrote:\n> Hi\n>\n> 2026. 03. 13. 17:14 keltezéssel, Jacopo Mondi írta:\n> > Add support for m2m camera operations in the mali-c55 pipeline handler.\n> >\n> > The series targets SoCs like the Renesas RZ/V2H(P) one where the\n> > Mali-C55 ISP is integrated in m2m mode. The CSI-2 receiver (CRU) saves\n> > images to memory and the ISP is fed through a dedicated DMA engine that\n> > provides memory interfacing capabilities.\n> >\n> > The series starts by adding support for the RZG2LCRU class (named after\n> > the media device name) and then plumbs memory-to-memory operations in\n> > the pipeline handler.\n> >\n> > Tested on RZ/V2H(P) EVK with imx708 camera sensor.\n> >\n> > Dan, could you re-test with Inline mode please ?\n> > I should have collected your fix that restored proper operations with\n> > Inline.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > ---\n>\n> Please check the following branch: https://gitlab.freedesktop.org/pobrn/libcamera/-/commits/mali-c55-mem\n> I have made some small changes, mainly to the variant handling.\n\nThank you! I apreciate them.\n\n>\n> I have also modified the `RZG2LCRU` class to use an `std::vector` instead of\n> an `std::queue`, since it does not really need to be a queue. And as somewhat\n\nA vector uses contiguous memory, and I think that's preferred yeah.\n\nWith this change availableBuffers_ is now used as a LIFO, which might\nalso have an effect on the caching as buffers exported from the CRU\nare cache coherent.\n\n> expected, this brings out the raw buffer reuse issue much more consistently,\n> so I think `frameInfo.rawBuffer = nullptr` should be added to `PipelineHandlerMaliC55::paramsComputed()`\n> as discussed. Or alternatively maybe `RZG2LCRU::cruReturnBuffer()` could be\n\nThanks, I see you have added it to \"fixup! libcamera: mali-c55:\nImplement capture for memory-to-memory\"\n\n> called from `PipelineHandlerMaliC55::tryComplete()` like it is done for the\n> other buffers. Although I think reusing it as soon as possible is probably\n> the better option.\n>\n> And the test pattern generator does not seem to work, I don't know why, yet.\n> But it is not working even without these changes, so probably unrelated.\n\nNo, it didn't so at least we're not making things worse :)\n\n>\n>\n> > Changes in v5:\n> > - Use overloaded std::visit when possible\n> > - Adjust indentation\n> >\n> > Changes in v4:\n> > - Move the overloaded visitor helper to utils.h\n> >\n> > Changes in v3:\n> > - Drop dynamic polymorphism and use overloaded visitor in\n> >    MaliC55CameraData. The result is neater in my opinion.\n> > - Address Barnabas' comments I missed in v2\n> >\n> > Changes in v2:\n> > - Almost a complete rework of the CameraData which is now a class\n> >    hierarchy. I'm not sure the result is that much cleaner, but hey, I'm\n> >    using templates and pattern with weird names, so it ought be better\n> >    for sure\n> >\n> > ---\n> > Daniel Scally (3):\n> >        libcamera: mali-c55: Add RZG2LCRU class\n> >        libcamera: mali-c55: Register memory input camera\n> >        libcamera: mali-c55: Implement capture for memory-to-memory\n> >\n> > Jacopo Mondi (4):\n> >        libcamera: utils: Add overloaded visitor helpers\n> >        libcamera: mali-c55: Split TPG and Inline camera handling\n> >        libcamera: mali-c55: Configure camera in memory-to-memory\n> >        libcamera: mali-c55: Fix sensor size computation\n> >\n> >   include/libcamera/base/utils.h                |   7 +\n> >   src/libcamera/base/utils.cpp                  |  35 ++\n> >   src/libcamera/pipeline/mali-c55/mali-c55.cpp  | 623 ++++++++++++++++++++------\n> >   src/libcamera/pipeline/mali-c55/meson.build   |   3 +-\n> >   src/libcamera/pipeline/mali-c55/rzg2l-cru.cpp | 260 +++++++++++\n> >   src/libcamera/pipeline/mali-c55/rzg2l-cru.h   |  73 +++\n> >   src/libcamera/pipeline/virtual/virtual.cpp    |  10 +-\n> >   7 files changed, 867 insertions(+), 144 deletions(-)\n> > ---\n> > base-commit: 02277d4c1a5ae7fee582f635936877435a12db64\n> > change-id: 20251205-mali-cru-e212f8ab332e\n> >\n> > Best regards,\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 58199BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Mar 2026 16:27:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A2AE562764;\n\tMon, 23 Mar 2026 17:27:17 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5752562647\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Mar 2026 17:27:16 +0100 (CET)","from ideasonboard.com (net-93-65-100-155.cust.vodafonedsl.it\n\t[93.65.100.155])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 704BE189C;\n\tMon, 23 Mar 2026 17:25:59 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"RTRxOxAA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774283159;\n\tbh=fqqWSBsehSHkzNlYke03312sttGPwOXDfePiMaMR284=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RTRxOxAAcH5HHNsRAZUJYzXyosLEFzBmmyUaYRsTRm+A6fw+kUz3M7qxHyNr9CBg5\n\t8Mau5l4gf6UGEI7TZHmmLDFAs0bckABJTiyU9SRe6+Y1biTksEumOS4utNa+nGu/Ku\n\t6AdtyFE61ZJm3Yqolr/nQLpyGGsHdVv5q12difYE=","Date":"Mon, 23 Mar 2026 17:27:13 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tDaniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v5 0/7] libcamera: mali-c55: Add support for\n\tmemory-to-memory","Message-ID":"<acFcgWSGbpp1TsaD@zed>","References":"<20260313-mali-cru-v5-0-48f93e431294@ideasonboard.com>\n\t<e16b6932-a204-4f7b-b4aa-5840e3a37404@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<e16b6932-a204-4f7b-b4aa-5840e3a37404@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]