]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: ipu6: Obtain unique source pad from remote sub-device
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 6 Nov 2025 09:56:40 +0000 (11:56 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 11:47:56 +0000 (12:47 +0100)
Obtain unique source pad from a remote sub-device, instead of the first
one. This means that only one link may be active at stream start. There's
no functional change in practice, unless multiple CSI-2 transmitters are
directly connected to the receiver.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 9315
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/pci/intel/ipu6/ipu6-isys-video.c

index 54d861aca008877c9f446eaec0d926d5af957395..1d58e321bda7287a9eea70e8202cac8c2e8cd6b1 100644 (file)
@@ -1204,10 +1204,10 @@ int ipu6_isys_setup_video(struct ipu6_isys_video *av,
 
        remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
        asd = to_ipu6_isys_subdev(remote_sd);
-       source_pad = media_pad_remote_pad_first(&remote_pad->entity->pads[0]);
-       if (!source_pad) {
+       source_pad = media_pad_remote_pad_unique(&remote_pad->entity->pads[0]);
+       if (IS_ERR(source_pad)) {
                dev_dbg(dev, "No external source entity\n");
-               return -ENODEV;
+               return PTR_ERR(source_pad);
        }
 
        *source_entity = source_pad->entity;