| Message ID | 20260325-mali-cru-v6-5-b16b0c49819a@ideasonboard.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
2026. 03. 25. 15:44 keltezéssel, Jacopo Mondi írta: > 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> > --- Looks ok to me. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/libcamera/pipeline/mali-c55/mali-c55.cpp | 24 ++++++++++++++++++++---- > 1 file changed, 20 insertions(+), 4 deletions(-) > > diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp > index 26d368bb9132..be3e38da95ab 100644 > --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp > +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp > @@ -1013,8 +1013,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) > @@ -1041,8 +1042,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) >
diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index 26d368bb9132..be3e38da95ab 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -1013,8 +1013,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) @@ -1041,8 +1042,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)
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> --- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)