The IPU6 ISYS creates sub-device nodes in its bound and complete callbacks. A sensor behind the IVSC is bound by the IVSC's own notifier, after the ISYS's bound callback has already run for the IVSC, and mei_csi_notify_bound() doesn't create a node. Unless another device binds to the ISYS afterwards, the sensor's node is therefore only created by the ISYS's complete callback, which runs once every sensor in the graph is bound. Commit 4fdb0342f05e ("media: ipu-bridge: Add Himax HM1092 IR sensor") added the HM1092 to the ipu-bridge list. The HM1092 has no driver in mainline yet, so it never binds and the complete callback never runs. The OV02C10 behind the IVSC therefore never gets a sub-device node. On a Dell XPS 13 9340, libcamera then fails with: 'ov02c10 3-0036': Failed to open V4L2 device '': No such file or directory No valid pipeline for sensor 'ov02c10 3-0036', skipping Register the sub-device nodes in mei_csi_notify_bound() as well, so that the sensor's node is created as soon as it binds. If the complete callback runs later, v4l2_device_register_subdev_nodes() skips sub-devices that already have a node. Commit 7456b40bc992 ("media: i2c: cvs: Add sensor node in bound callback") is the CVS equivalent of this IVSC fix. Fixes: 29006e196a56 ("media: pci: intel: ivsc: Add CSI submodule") Cc: stable@vger.kernel.org Signed-off-by: Arpith Alexander --- Tested on a Dell XPS 13 9340 (Meteor Lake IPU6, OV02C10 behind the IVSC) with v7.4-rc1. ipu-bridge connects both sensors ("Connected 2 cameras"), the HM1092 has no driver and doesn't bind, and the OV02C10 now gets its sub-device node. libcamera finds the camera and streams at 30 fps (cam -c 1 -C10). The camera last worked on v7.2. The test kernel also had my two other v7.4-rc1 fixes for this laptop: https://lore.kernel.org/linux-spi/20261103131435.21838-1-arpith99@gmail.com/ https://lore.kernel.org/linux-media/20261103163814.96980-1-arpith99@gmail.com/ Unlike a revert of commit 4fdb0342f05e, this keeps the HM1092 entry for the pending driver, and it also covers kernels built without that driver once it is merged. drivers/media/pci/intel/ivsc/mei_csi.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c index 005b1414a252..f9513cffaacd 100644 --- a/drivers/media/pci/intel/ivsc/mei_csi.c +++ b/drivers/media/pci/intel/ivsc/mei_csi.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -513,7 +514,7 @@ static int mei_csi_notify_bound(struct v4l2_async_notifier *notifier, struct v4l2_async_connection *asd) { struct mei_csi *csi = notifier_to_csi(notifier); - int pad; + int pad, ret; pad = media_entity_get_fwnode_pad(&subdev->entity, asd->match.fwnode, MEDIA_PAD_FL_SOURCE); @@ -522,10 +523,14 @@ static int mei_csi_notify_bound(struct v4l2_async_notifier *notifier, csi->remote = &subdev->entity.pads[pad]; - return media_create_pad_link(&subdev->entity, pad, - &csi->subdev.entity, CSI_PAD_SINK, - MEDIA_LNK_FL_ENABLED | - MEDIA_LNK_FL_IMMUTABLE); + ret = media_create_pad_link(&subdev->entity, pad, + &csi->subdev.entity, CSI_PAD_SINK, + MEDIA_LNK_FL_ENABLED | + MEDIA_LNK_FL_IMMUTABLE); + if (ret) + return ret; + + return v4l2_device_register_subdev_nodes(subdev->v4l2_dev); } static void mei_csi_notify_unbind(struct v4l2_async_notifier *notifier, base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 -- 2.55.0