From: Arpith Alexander <arpith99@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Lixu Zhang <lixu.zhang@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Antti Laakso <antti.laakso@linux.intel.com>,
Mehdi Djait <mehdi.djait@linux.intel.com>,
Jake Steinman <j@metarealtyinc.ca>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Arpith Alexander <arpith99@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH] media: ivsc: csi: Add sensor node in bound callback
Date: Wed, 4 Nov 2026 01:32:26 +0530 [thread overview]
Message-ID: <20261103200226.100989-1-arpith99@gmail.com> (raw)
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 <arpith99@gmail.com>
---
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 <media/ipu-bridge.h>
#include <media/v4l2-async.h>
#include <media/v4l2-ctrls.h>
+#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
@@ -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
reply other threads:[~2026-11-03 20:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261103200226.100989-1-arpith99@gmail.com \
--to=arpith99@gmail.com \
--cc=antti.laakso@linux.intel.com \
--cc=j@metarealtyinc.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lixu.zhang@intel.com \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®