{"id":26411,"url":"https://patchwork.libcamera.org/api/1.1/patches/26411/?format=json","web_url":"https://patchwork.libcamera.org/patch/26411/","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":"<20260401-mali-cru-v8-5-44c48f990e28@ideasonboard.com>","date":"2026-04-01T16:25:54","name":"[v8,5/8] libcamera: mali-c55: Configure camera in memory-to-memory","commit_ref":null,"pull_url":null,"state":"new","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/26411/mbox/","series":[{"id":5864,"url":"https://patchwork.libcamera.org/api/1.1/series/5864/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5864","date":"2026-04-01T16:25:49","name":"libcamera: mali-c55: Add support for memory-to-memory","version":8,"mbox":"https://patchwork.libcamera.org/series/5864/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26411/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26411/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 0BC19C32F7\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Apr 2026 16:26:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B4CB62D66;\n\tWed,  1 Apr 2026 18:26:08 +0200 (CEST)","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 75B4062D68\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Apr 2026 18:26:02 +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 17F11CE7;\n\tWed,  1 Apr 2026 18:24:39 +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=\"ExGprCHj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1775060679;\n\tbh=TM7VmBjE8vfgc8t0dcQuhc3P87EZAMjVVw3CwS12mcg=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=ExGprCHjn/uQcLiRDE4RdjPGPhR81WechKIaBoVvtUnwtbjPHAzQqprdko7u+diVd\n\tjIKlwqHUog7Yx98QXLODnZPAkv48zPEqgwe4sErgvrUrK5oQNcYZ6x6Jes9m8ixqU1\n\td72lSbXixni5rap/IuM9YmNHOyjJhtIMOeiOp+Pw=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Wed, 01 Apr 2026 18:25:54 +0200","Subject":"[PATCH v8 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":"<20260401-mali-cru-v8-5-44c48f990e28@ideasonboard.com>","References":"<20260401-mali-cru-v8-0-44c48f990e28@ideasonboard.com>","In-Reply-To":"<20260401-mali-cru-v8-0-44c48f990e28@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/ZANAwAKAXI0Bo8WoVY8AcsmYgBpzUcXC70mmk7KEOOIT+tt8EZNccSq4xRuaIrw8\n\tljBaWDR6eKJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCac1HFwAKCRByNAaPFqFW\n\tPCmRD/9Ef0R+WeKcoI9l1e3Nfh1wCN0knlgqprsk4o4hU5cnkSHGnxpjV6Wz+2IG+D0XSaYuy/b\n\tDGGaJ0RoGYS337O4pmKyLWwYnlL/5qthDfweDGbdPOcof31omL/Ih2pAMsxTWq1g7h6RcZoW/E2\n\tYcxPAQLpMeKKXraDxh2uZTVt0j4Y/lmDP2SnOF312MlxU2m6YXY/x2YAeqc+eMfPgmkC8na1kWM\n\tKCI8MGkilKbhPIog5csIMYLDReZGdwVkuI0CBn4nRAhp55VKoqRkpxLy4k6Gt6vpaJSrBcDnhc4\n\tBIAfDiX6L8N0IXhN//R0dXNm9Xd1hcimNsktbtzWOD0vGe5fGdp3V8SqP1jQ/hiOGVKaj/X2GLr\n\tKjDqgF2nr2pM2SpVsk1QJbOvCZV65fmMWwIr2A1hBZ2KI3M0j/HeNlD+TkR5RYSacCDNLesnP+2\n\t1MDGSBzb2i1VSXFZnCJuJRbkmqYxNUktFhGdNZ5pAkHMy9KtV9SXszC7e2movKaTJoqpT32lKTb\n\tKP3GbpzJB2MrjtbpWmG4XS7BpU5Skndrk7imx4ROHObE3adjCNW0op6IXctHV/BH0s8/7Qurqam\n\tAkO6L3ZoHWNJFkgTdV95DfD0ntRJubV1tc/Pu1gTevjXzgh7WPnHH4v6kCGZiVK30CEA0RKXT4e\n\tXE6WUTI1h0WoVgA==","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":["v8","5/8"]}