Skip to content

Commit 6b07fdb

Browse files
Sakari Ailusgregkh
authored andcommitted
media: ipu6: isys: Use correct pads for xlate_streams()
commit ff49672 upstream. 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: 3a5c59a ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d8c94df commit 6b07fdb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd,
354354
remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
355355
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
356356

357-
sink_streams = v4l2_subdev_state_xlate_streams(state, CSI2_PAD_SRC,
358-
CSI2_PAD_SINK,
359-
&streams_mask);
357+
sink_streams =
358+
v4l2_subdev_state_xlate_streams(state, pad, CSI2_PAD_SINK,
359+
&streams_mask);
360360

361361
ret = ipu6_isys_csi2_calc_timing(csi2, &timing, CSI2_ACCINV);
362362
if (ret)
@@ -384,9 +384,9 @@ static int ipu6_isys_csi2_disable_streams(struct v4l2_subdev *sd,
384384
struct media_pad *remote_pad;
385385
u64 sink_streams;
386386

387-
sink_streams = v4l2_subdev_state_xlate_streams(state, CSI2_PAD_SRC,
388-
CSI2_PAD_SINK,
389-
&streams_mask);
387+
sink_streams =
388+
v4l2_subdev_state_xlate_streams(state, pad, CSI2_PAD_SINK,
389+
&streams_mask);
390390

391391
remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]);
392392
remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);

0 commit comments

Comments
 (0)