{"id":26395,"url":"https://patchwork.libcamera.org/api/1.1/patches/26395/?format=json","web_url":"https://patchwork.libcamera.org/patch/26395/","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":"<20260331-mali-cru-v7-5-4caedc898a0e@ideasonboard.com>","date":"2026-03-31T16:36:33","name":"[v7,5/8] libcamera: mali-c55: Configure camera in memory-to-memory","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"f9443c90a2fdf06aeb528e5d7042ddc545bfba02","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26395/mbox/","series":[{"id":5860,"url":"https://patchwork.libcamera.org/api/1.1/series/5860/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5860","date":"2026-03-31T16:36:28","name":"libcamera: mali-c55: Add support for memory-to-memory","version":7,"mbox":"https://patchwork.libcamera.org/series/5860/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26395/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26395/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 A3694BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 31 Mar 2026 16:36:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 25F6262D24;\n\tTue, 31 Mar 2026 18:36:58 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 66C0962D1B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Mar 2026 18:36:51 +0200 (CEST)","from [100.93.44.16] (net-93-65-100-155.cust.vodafonedsl.it\n\t[93.65.100.155])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F092531A9;\n\tTue, 31 Mar 2026 18:35:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qV4nIkNT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1774974929;\n\tbh=TM7VmBjE8vfgc8t0dcQuhc3P87EZAMjVVw3CwS12mcg=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=qV4nIkNT42fQqMx9h1GVd9SpfU8u9iS2tv2DkEQ7VCkuNAxQoEAfBKIwvroO0YEFe\n\tayvaFx1zef3CmLiPbCCM/pvueR9oIFQc6W8/cPoZSdq5y5yRD1hj7nJtcp0Hg02Vpr\n\tu8vrG84LdpHds9Jx54wOJZ6HRZQbnEBmPWmnCvcU=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Tue, 31 Mar 2026 18:36:33 +0200","Subject":"[PATCH v7 5/8] libcamera: mali-c55: Configure camera in\n\tmemory-to-memory","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"8bit","Message-Id":"<20260331-mali-cru-v7-5-4caedc898a0e@ideasonboard.com>","References":"<20260331-mali-cru-v7-0-4caedc898a0e@ideasonboard.com>","In-Reply-To":"<20260331-mali-cru-v7-0-4caedc898a0e@ideasonboard.com>","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=1848;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=TM7VmBjE8vfgc8t0dcQuhc3P87EZAMjVVw3CwS12mcg=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpy/ggn3zRzq+6TnbudW0ifgAJGRTrEeaQWoo1p\n\tL2uj54TU+KJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCacv4IAAKCRByNAaPFqFW\n\tPFzSD/0cLGX1NZB9YSvpRrBLWD7zy4s2nkT9ZWvVv+5DAUHrjHtz1mKbjSpnCniLxJ4hZeO4/JN\n\tMdK9m/rVEfbp+1GqWpp5GTfIr2lQLWkztiqaEga7sEWbyyuI5tOLBePyh+BphP8LVQ74y/Lzv0w\n\tCs8aAzlRqoTMuwSJ7VYYB1yB/z5K6bC0vX2duunqX0+Uq6wo7nmDn653PNoD4CcemziYj9BZQN6\n\tP8KlgAxgF9HdNdvC35xMKAsEYOS6fDXzqDhw9/YwLyEgb2np7lGUOCB/Chf9J4qCocX2PxmCTEJ\n\tgu/5lUq3jAkReMeVTMvdoua+ljum/xeY1U508EiYFKpXM3fTQD+Ou0HtCfdB4tIlf2H6xtK0Ex3\n\tBv9kUjNpnoNSIQTEjsTn7GjvQXKS6jhV+ltZ7LHSe+dT2kr5lpNsJ3cjv+S9RuV16UQ2O6Y1YuP\n\tBjpbVuMgurLCORAD3E7nuRqySEP2FxXc9S1BpMskNvZnbDjW+mLscyhogg13bm8Mp2SYx6DCEhI\n\tPhKlhUxfljhYnzUtju1BKrL1RzCWJakj4voVEo7hfJyVV6oYoJBiOSPDvyxRS+N+Lh9p3EItcTj\n\t7oJPvw1lVcUsq0jYk74NeVcZoaIkIzYuKQpmkyHnJT5ALTLNo7G5uCVX7cNk0yAtAjsuLhOvC07\n\tRq5/xP3u2g67PiQ==","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 memory-to-memory Camera to the\nPipelineHandlerMaliC55::configure() function.\n\nStart by enabling the IVC links, then configure the CRU and\npropagate the format to the IVC.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/pipeline/mali-c55/mali-c55.cpp | 24 ++++++++++++++++++++----\n 1 file changed, 20 insertions(+), 4 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\nindex d17b026db119..566fa0549675 100644\n--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n@@ -1013,8 +1013,9 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \t\t\tconst MediaEntity *csi2Entity = in.csi2_->entity();\n \t\t\treturn csi2Entity->getPadByIndex(1)->links()[0]->setEnabled(true);\n \t\t},\n-\t\t[](MaliC55CameraData::Memory &) {\n-\t\t\treturn 0;\n+\t\t[&](MaliC55CameraData::Memory &) {\n+\t\t\tconst MediaEntity *ivcEntity = ivcSd_->entity();\n+\t\t\treturn ivcEntity->getPadByIndex(1)->links()[0]->setEnabled(true);\n \t\t},\n \t}, data->input_);\n \tif (ret)\n@@ -1041,8 +1042,23 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \n \t\t\treturn in.csi2_->getFormat(1, &subdevFormat);\n \t\t},\n-\t\t[](MaliC55CameraData::Memory &) {\n-\t\t\treturn 0;\n+\t\t[&](MaliC55CameraData::Memory &mem) {\n+\t\t\tV4L2DeviceFormat inputFormat;\n+\n+\t\t\tint r = mem.cru_->configure(&subdevFormat, &inputFormat);\n+\t\t\tif (r)\n+\t\t\t\treturn r;\n+\n+\t\t\t/* Propagate the CRU format to the IVC input. */\n+\t\t\tr = ivcSd_->setFormat(0, &subdevFormat);\n+\t\t\tif (r)\n+\t\t\t\treturn r;\n+\n+\t\t\tr = ivcSd_->getFormat(1, &subdevFormat);\n+\t\t\tif (r)\n+\t\t\t\treturn r;\n+\n+\t\t\treturn ivc_->setFormat(&inputFormat);\n \t\t},\n \t}, data->input_);\n \tif (ret)\n","prefixes":["v7","5/8"]}