Skip to contentSkip to conversation

media: nxp: imx8-isi: Mark all crossbar sink pads as MUST_CONNECT

git:media_stage/master Hans Verkuil 1 participant 1 message Feb 5, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

This is an automatic generated email to let you know that the following patch were queued:

Subject: media: nxp: imx8-isi: Mark all crossbar sink pads as MUST_CONNECT
Author:  Laurent Pinchart <[email protected]>
Date:    Mon Jan 15 04:16:29 2024 +0200

All the sink pads of the crossbar switch require an active link if they're part of the pipeline. Mark them with the MEDIA_PAD_FL_MUST_CONNECT flag to fail pipeline validation if they're not connected. This allows removing a manual check when translating streams.

 drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

---

drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +2 -8
index 1bb1334ec6f2..93a55c97cd17 100644
@@ -160,13 +160,6 @@ mxc_isi_crossbar_xlate_streams(struct mxc_isi_crossbar *xbar,
 	}
 
 	pad = media_pad_remote_pad_first(&xbar->pads[sink_pad]);
-	if (!pad) {
-		dev_dbg(xbar->isi->dev,
-			"no pad connected to crossbar input %u\n",
-			sink_pad);
-		return ERR_PTR(-EPIPE);
-	}
-
 	sd = media_entity_to_v4l2_subdev(pad->entity);
 	if (!sd) {
 		dev_dbg(xbar->isi->dev,
@@ -475,7 +468,8 @@ int mxc_isi_crossbar_init(struct mxc_isi_dev *isi)
 	}
 
 	for (i = 0; i < xbar->num_sinks; ++i)
-		xbar->pads[i].flags = MEDIA_PAD_FL_SINK;
+		xbar->pads[i].flags = MEDIA_PAD_FL_SINK
+				    | MEDIA_PAD_FL_MUST_CONNECT;
 	for (i = 0; i < xbar->num_sources; ++i)
 		xbar->pads[i + xbar->num_sinks].flags = MEDIA_PAD_FL_SOURCE;