libcamera: mali-c55: Configure camera in memory-to-memory

Add support for memory-to-memory Camera to the
PipelineHandlerMaliC55::configure() function.

Start by enabling the IVC links, then configure the CRU and
propagate the format to the IVC.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2026-03-23 17:32:30 +01:00
parent ac9e8dd724
commit 3b6c01fd94
+20 -4
View File
@@ -1012,8 +1012,9 @@ int PipelineHandlerMaliC55::configure(Camera *camera,
const MediaEntity *csi2Entity = in.csi2_->entity();
return csi2Entity->getPadByIndex(1)->links()[0]->setEnabled(true);
},
[](MaliC55CameraData::Memory &) {
return 0;
[&](MaliC55CameraData::Memory &) {
const MediaEntity *ivcEntity = ivcSd_->entity();
return ivcEntity->getPadByIndex(1)->links()[0]->setEnabled(true);
},
}, data->input_);
if (ret)
@@ -1040,8 +1041,23 @@ int PipelineHandlerMaliC55::configure(Camera *camera,
return in.csi2_->getFormat(1, &subdevFormat);
},
[](MaliC55CameraData::Memory &) {
return 0;
[&](MaliC55CameraData::Memory &mem) {
V4L2DeviceFormat inputFormat;
int r = mem.cru_->configure(&subdevFormat, &inputFormat);
if (r)
return r;
/* Propagate the CRU format to the IVC input. */
r = ivcSd_->setFormat(0, &subdevFormat);
if (r)
return r;
r = ivcSd_->getFormat(1, &subdevFormat);
if (r)
return r;
return ivc_->setFormat(&inputFormat);
},
}, data->input_);
if (ret)