{"id":26288,"url":"https://patchwork.libcamera.org/api/1.1/patches/26288/?format=json","web_url":"https://patchwork.libcamera.org/patch/26288/","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":"<20260313-mali-cru-v4-5-c0d9bc8cd8fa@ideasonboard.com>","date":"2026-03-13T11:33:46","name":"[v4,5/7] libcamera: mali-c55: Configure camera in memory-to-memory","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"9e2ce4681b2162ef4b70ba8c48072273c9d042f7","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/26288/mbox/","series":[{"id":5829,"url":"https://patchwork.libcamera.org/api/1.1/series/5829/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5829","date":"2026-03-13T11:33:41","name":"libcamera: mali-c55: Add support for memory-to-memory","version":4,"mbox":"https://patchwork.libcamera.org/series/5829/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26288/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26288/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 508F7C32B5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Mar 2026 11:34:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0DD45626E8;\n\tFri, 13 Mar 2026 12:34:31 +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 BC1F36268F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Mar 2026 12:34:29 +0100 (CET)","from [192.168.224.131] (unknown [37.159.92.229])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1FF531356;\n\tFri, 13 Mar 2026 12:33:20 +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=\"m0WrLKrv\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1773401600;\n\tbh=8ul1n4i5T6cYcm/npmTY7Y82IwwGSy83YUy+ayD6KtU=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=m0WrLKrvOFeS7TlvSBCFx34XdqzwSiWrQo3B3sYHRPhbpfCb4EASq056itZTTn84v\n\tu7gzD/AqJCwVe7wQsYpuNmv5cl+vbjJ6P7Vjnkn9EPr+X5RZlx+8+7Ak/IXJo9epUP\n\tYDgbXPh8/lP9f2Sk9aBWew6c+EchjLnRq1qY3w18=","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Date":"Fri, 13 Mar 2026 12:33:46 +0100","Subject":"[PATCH v4 5/7] libcamera: mali-c55: Configure camera in\n\tmemory-to-memory","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260313-mali-cru-v4-5-c0d9bc8cd8fa@ideasonboard.com>","References":"<20260313-mali-cru-v4-0-c0d9bc8cd8fa@ideasonboard.com>","In-Reply-To":"<20260313-mali-cru-v4-0-c0d9bc8cd8fa@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=openpgp-sha256; l=2412;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=8ul1n4i5T6cYcm/npmTY7Y82IwwGSy83YUy+ayD6KtU=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBps/Y1Nq5xHluLiAcnOzGo8TIY8pZx8w0aWwxY/\n\t9OkgryGQEuJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCabP2NQAKCRByNAaPFqFW\n\tPLmDD/4gUrsvl6nCwQcPinOXiJN6OVELclzx7F4gkAyO4N6DPv1+Ycz8+GfFdXDUPhPuP1Wy8Yr\n\t9XdZKHp/jAU5CnAZqoFqUeN5rVoGazZ1/cxWFa7zttYu+BuS+FEudr16hk3HuRd3Cs5dHaBge7p\n\t88VMe+zFGmJoHWIRQP4QNmInzbBUdotntZUFvzic2eU2az9nnsQQVNh9DkmjrdjPi5L1TIXLo//\n\teFg1Q0M1IMXpyQ2uIC1OlQGlltpV5JlgcEkx+CPhglq02m/GRI2yytp4NwaQUH1b+B8C2dKDhlm\n\tSj6hR/X7BYt0WG2fzqQ1BObReBawwg1x04y72d0sqQ5iM9uDqXnmB6+bU04xQKwk6aVuoCBuAJ1\n\t7ovzyYSwl7vxhr+t9oeL7u47sYPwWDnunlF7DsZtSoZCXcmqrHKsAuNC3PPrDNW7Kv9oaNJNu51\n\tP/WtE4Cr5+c3SQAKAWkdkfyNx/gMbUZDNJmSBt8sEKLHr06ADKL3ExdrLwySE6tKXVKsPTYYZUk\n\tKpmvrM1/9L7eLJKQEDFsEWuLKzVmFoy4pNR3uib3U9hper4Q7gHS+DbuRrbcW8dFthdu34/HKHb\n\tkhO5nhLP/8czCR0FOGcU4G8aaf5ru4zTyrqVAlvZadc1axHg3iS7qFH0jGM9SLdXupW4vkuHAVi\n\tSV8ORXqb/dnMZuQ==","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>\n---\n src/libcamera/pipeline/mali-c55/mali-c55.cpp | 26 ++++++++++++++++++++++++--\n 1 file changed, 24 insertions(+), 2 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\nindex 3c8848d28707..575c8451fc4f 100644\n--- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n+++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n@@ -1042,9 +1042,12 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \tif (std::holds_alternative<MaliC55CameraData::Tpg>(data->input_)) {\n \t\tconst MediaEntity *tpgEntity = data->subdev()->entity();\n \t\tret = tpgEntity->getPadByIndex(0)->links()[0]->setEnabled(true);\n-\t} else {\n+\t} else if (std::holds_alternative<MaliC55CameraData::Inline>(data->input_)) {\n \t\tconst MediaEntity *csi2Entity = data->csi2()->entity();\n \t\tret = csi2Entity->getPadByIndex(1)->links()[0]->setEnabled(true);\n+\t} else {\n+\t\tconst MediaEntity *ivcEntity = ivcSd_->entity();\n+\t\tret = ivcEntity->getPadByIndex(1)->links()[0]->setEnabled(true);\n \t}\n \tif (ret)\n \t\treturn ret;\n@@ -1056,7 +1059,7 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \t/* Apply format to the origin of the pipeline and propagate it. */\n \tif (std::holds_alternative<MaliC55CameraData::Tpg>(data->input_)) {\n \t\tret = data->subdev()->setFormat(0, &subdevFormat);\n-\t} else {\n+\t} else if (std::holds_alternative<MaliC55CameraData::Inline>(data->input_)) {\n \t\tret = data->sensor()->setFormat(&subdevFormat,\n \t\t\t\t\t\tmaliConfig->combinedTransform());\n \t\tif (ret)\n@@ -1067,6 +1070,25 @@ int PipelineHandlerMaliC55::configure(Camera *camera,\n \t\t\treturn ret;\n \n \t\tret = data->csi2()->getFormat(1, &subdevFormat);\n+\t} else {\n+\t\tV4L2DeviceFormat inputFormat;\n+\n+\t\tret = data->cru()->configure(&subdevFormat, &inputFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\t/* Propagate the CRU format to the IVC input. */\n+\t\tret = ivcSd_->setFormat(0, &subdevFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\tret = ivcSd_->getFormat(1, &subdevFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\tret = ivc_->setFormat(&inputFormat);\n+\t\tif (ret)\n+\t\t\treturn ret;\n \t}\n \tif (ret)\n \t\treturn ret;\n","prefixes":["v4","5/7"]}