]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: ipu6: isys: Use correct pads for xlate_streams()
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 2 Jun 2025 21:08:51 +0000 (00:08 +0300)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 10 Jul 2025 09:32:23 +0000 (11:32 +0200)
The pad argument to v4l2_subdev_state_xlate_streams() is incorrect, static
pad number is used for the source pad even though the pad number is
dependent on the stream. Fix it.

Fixes: 3a5c59ad926b ("media: ipu6: Rework CSI-2 sub-device streaming control")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c

index da8581a37e220484faa0c867aeb3c0b8dfa6376b..6030bd23b4b944d50c13ad0407c538e1857dca2c 100644 (file)
@@ -354,9 +354,9 @@ static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd,
        remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
        remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
 
-       sink_streams = v4l2_subdev_state_xlate_streams(state, CSI2_PAD_SRC,
-                                                      CSI2_PAD_SINK,
-                                                      &streams_mask);
+       sink_streams =
+               v4l2_subdev_state_xlate_streams(state, pad, CSI2_PAD_SINK,
+                                               &streams_mask);
 
        ret = ipu6_isys_csi2_calc_timing(csi2, &timing, CSI2_ACCINV);
        if (ret)
@@ -384,9 +384,9 @@ static int ipu6_isys_csi2_disable_streams(struct v4l2_subdev *sd,
        struct media_pad *remote_pad;
        u64 sink_streams;
 
-       sink_streams = v4l2_subdev_state_xlate_streams(state, CSI2_PAD_SRC,
-                                                      CSI2_PAD_SINK,
-                                                      &streams_mask);
+       sink_streams =
+               v4l2_subdev_state_xlate_streams(state, pad, CSI2_PAD_SINK,
+                                               &streams_mask);
 
        remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
        remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);