@@ -1039,7 +1039,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)
for (MediaPad *pad : crossbar_->entity()->pads()) {
unsigned int sink = numSinks;
- if (!(pad->flags() & MEDIA_PAD_FL_SINK) || pad->links().empty())
+ if (!(pad->flags() & MEDIA_PAD_FL_SINK))
continue;
/*
@@ -1048,6 +1048,9 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)
*/
numSinks++;
+ if (pad->links().empty())
+ continue;
+
MediaEntity *csi = pad->links()[0]->source()->entity();
if (csi->pads().size() != 2) {
LOG(ISI, Debug) << "Skip unsupported CSI-2 receiver "
@@ -1082,6 +1085,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)
LOG(ISI, Debug)
<< "cam" << numCameras
<< " streams " << data->streams_.size()
+ << " sink " << data->xbarSink_
<< " offset " << data->xbarSourceOffset_;
ret = data->init();
In current implementation, the sink pad counter of the crossbar is not incremented if the pad is not connected to any subdevice. This would lead to incorrect routing and format configuration if CSI is not connected to first sink pad. To avoid such issue, every sink pads must be taken into account. Then if CSI and sensor are present, current counter is used for routing at match(), and stored in camera data to be reused during configure(). Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> --- src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)