{"id":26334,"url":"https://patchwork.libcamera.org/api/covers/26334/?format=json","web_url":"https://patchwork.libcamera.org/cover/26334/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20260325-mali-cru-v6-0-b16b0c49819a@ideasonboard.com>","date":"2026-03-25T14:44:07","name":"[v6,0/7] libcamera: mali-c55: Add support for memory-to-memory","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/cover/26334/mbox/","series":[{"id":5848,"url":"https://patchwork.libcamera.org/api/series/5848/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5848","date":"2026-03-25T14:44:07","name":"libcamera: mali-c55: Add support for memory-to-memory","version":6,"mbox":"https://patchwork.libcamera.org/series/5848/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/26334/comments/","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 3FD6ABD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Mar 2026 14:44:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3CD156283F;\n\tWed, 25 Mar 2026 15:44:21 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D21CF6274D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Mar 2026 15:44:18 +0100 (CET)","from [192.168.1.104] (net-93-65-100-155.cust.vodafonedsl.it\n\t[93.65.100.155])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B226D121A;\n\tWed, 25 Mar 2026 15:43:00 +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=\"JC1r6iQX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774449780;\n\tbh=g71A6CnRcOvVK8YQr257TMTee8ftNJO+2dMpieUqdf4=;\n\th=From:Subject:Date:To:Cc:From;\n\tb=JC1r6iQXv/FZ9tiZZxpGd0v9e86i/Wux2scFyBddPxS0INJXa/ByBYeBdr5yl+3v5\n\tcy7/AJ9e4/+MFgJeU6IVWDD9++wWOwmF5ktDK0GSuT4sJEHY/s08DQkch4aOxb3V0r\n\tkQjhIo/WeHGSRmCYp5OIB9n1oACbZIMz2kWbhOJA=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[PATCH v6 0/7] libcamera: mali-c55: Add support for memory-to-memory","Date":"Wed, 25 Mar 2026 15:44:07 +0100","Message-Id":"<20260325-mali-cru-v6-0-b16b0c49819a@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","X-B4-Tracking":"v=1; b=H4sIALf0w2kC/3XOTU4DMQwF4KtUWROU2MmQsOIeFYv82DQSnaCEj\n\tkDV3J20EtIsOstn+3vyVXRqhbp4PVxFo6X0UucRpqeDSKcwf5AseWQBCqwGZeU5fBaZ2kUSaGA\n\tXIiKQGOdfjbj83KuO7yOfSv+u7ffevOjb9EHJoqWS2ekYLTO9YHgrmUKvc6yh5edUz+LWtcDGa\n\t7XxMDzBZEBnGuu443Hr/cbj8MyeWaFRLvodb/79pFDjxpvhk8o+Jpey473/7Z63wxvHHsmgBm8\n\te+HVd/wAdPFhwpwEAAA==","X-Change-ID":"20251205-mali-cru-e212f8ab332e","To":"Daniel Scally <dan.scally@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=openpgp-sha256; l=2748;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=g71A6CnRcOvVK8YQr257TMTee8ftNJO+2dMpieUqdf4=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpw/TBs7nRrj+EQ0AXlnjjFQxWLpAUz8M1hfIhJ\n\tjcTnVHku9eJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCacP0wQAKCRByNAaPFqFW\n\tPCqKEADAvN1FotiGXkFVoyaeoNHdUPt2w+NOvtIffZF05k5A53GgHqJD/z7YwzJL6qwt+FizGHB\n\tPQBJA50f9Cl3Il8NmTX+lKqgUI6ppSDL4vsJpll1e6TZLcb/9rxbXBFq0zNMk7ygEJAxpGJFVj5\n\tCEDYdkv1QI/FavJKPQnC5mNtDJuSGK1wp4l9cJDw8UaK3I6QRk1X3snGIhQB0k+NOJjSFrJUhJV\n\tFauKzKXOVI0NTYp7HI0MnNDAHiI6gENj5i3iY3SBXhzLW/vI4QCbOyOvanFttquI5654mhjREvG\n\tcL9fNZD9bTyd8Dj19xV5JN6SOGxg3L30O5TbV1q+CFI/se40fwHi0pMXAqbxHm7YbyJb2gowhgJ\n\t2hme55QQ8qGSGKAFMHvPam3/n16xOVy6lDY3+F4uzqYia1/ArFeoUJIffVz5its7oBnPu3Vw47N\n\t8Zz+iUu7/OeSc+5swoxcpzFIm0TTqYkF9b6o6k+OU+ZozGu5Pwz8y5WCpRyv0V1+UgNwh/Rrhsj\n\t74qcrix9jORqM2TCalX1m4pbENjy9Y9NNLDMu5NdVrO1zur9xa7A5a/SJNBvGF0US0tva9oZhTa\n\tz0qiY18ZveZJKLr04yvIaRQlk7ZgcPbBcJYmP7qQSjRrCXHFjyC0F71OHIa4xCNqnWJ5xk4B8Jd\n\tZ9dcAyUQnZdNiOg==","X-Developer-Key":"i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B","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>"},"content":"Add support for m2m camera operations in the mali-c55 pipeline handler.\n\nThe series targets SoCs like the Renesas RZ/V2H(P) one where the\nMali-C55 ISP is integrated in m2m mode. The CSI-2 receiver (CRU) saves\nimages to memory and the ISP is fed through a dedicated DMA engine that\nprovides memory interfacing capabilities.\n\nThe series starts by adding support for the RZG2LCRU class (named after\nthe media device name) and then plumbs memory-to-memory operations in\nthe pipeline handler.\n\nTested on RZ/V2H(P) EVK with imx708 camera sensor.\n\nDan, could you re-test with Inline mode please ?\nI should have collected your fix that restored proper operations with\nInline.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\nChanges in v6:\n- Address use-after-free errors reported by Barnabas by splitting CRU\n  buffer release from device streamoff\n- Address proper handling of Camera::stop() when in m2m using ASan. I\n  suspect inline would probably need fixes as well when run with ASan\n- Minor improvements to code style\n\nChanges in v5:\n- Use overloaded std::visit when possible\n- Adjust indentation\n\nChanges in v4:\n- Move the overloaded visitor helper to utils.h\n\nChanges 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\nChanges 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---\nDaniel Scally (2):\n      libcamera: mali-c55: Add RZG2LCRU class\n      libcamera: mali-c55: Implement capture for memory-to-memory\n\nJacopo Mondi (5):\n      libcamera: utils: Add overloaded visitor helpers\n      libcamera: mali-c55: Split TPG and Inline camera handling\n      libcamera: mali-c55: Register memory input camera\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  | 669 +++++++++++++++++++-------\n src/libcamera/pipeline/mali-c55/meson.build   |   3 +-\n src/libcamera/pipeline/mali-c55/rzg2l-cru.cpp | 253 ++++++++++\n src/libcamera/pipeline/mali-c55/rzg2l-cru.h   |  72 +++\n src/libcamera/pipeline/virtual/virtual.cpp    |  10 +-\n 7 files changed, 871 insertions(+), 178 deletions(-)\n---\nbase-commit: 4937f5489b799e1ce5b0856cc34549abacb1f19a\nchange-id: 20251205-mali-cru-e212f8ab332e\n\nBest regards,"}