Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: ipu6: isys: Use correct pads for xlate_streams()

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>

authored by

Sakari Ailus and committed by
Hans Verkuil
ff49672a 3e43442d

+6 -6
+6 -6
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
··· 354 354 remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]); 355 355 remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity); 356 356 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); 360 360 361 361 ret = ipu6_isys_csi2_calc_timing(csi2, &timing, CSI2_ACCINV); 362 362 if (ret) ··· 384 384 struct media_pad *remote_pad; 385 385 u64 sink_streams; 386 386 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); 390 390 391 391 remote_pad = media_pad_remote_pad_first(&sd->entity.pads[CSI2_PAD_SINK]); 392 392 remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);