On Wed Dec 10 09:59:42 2025 +0200, Sakari Ailus wrote:
> The stream number on the video nodes' single pad is always 0, thus the
> stream number of the CSI-2 receivers' source pads is also 0. Remove the
> complexity that is there to come up with 0.
> 
> Signed-off-by: Sakari Ailus <[email protected]>
> Reviewed-by: Antti Laakso <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/pci/intel/ipu6/ipu6-isys-video.c | 49 +++-----------------------
 1 file changed, 5 insertions(+), 44 deletions(-)

---

diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c 
b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
index b63fb9673604..b15c24b1b710 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
@@ -867,66 +867,27 @@ ipu6_isys_query_stream_by_source(struct ipu6_isys *isys, 
int source, u8 vc)
        return stream;
 }
 
-static u64 get_stream_mask_by_pipeline(struct ipu6_isys_video *__av)
-{
-       struct media_pipeline *pipeline =
-               media_entity_pipeline(&__av->vdev.entity);
-       unsigned int i;
-       u64 stream_mask = 0;
-
-       for (i = 0; i < NR_OF_CSI2_SRC_PADS; i++) {
-               struct ipu6_isys_video *av = &__av->csi2->av[i];
-
-               if (pipeline == media_entity_pipeline(&av->vdev.entity))
-                       stream_mask |= BIT_ULL(av->source_stream);
-       }
-
-       return stream_mask;
-}
-
 int ipu6_isys_video_set_streaming(struct ipu6_isys_video *av, int state)
 {
-       struct v4l2_subdev_krouting *routing;
-       struct ipu6_isys_stream *stream = av->stream;
-       struct v4l2_subdev_state *subdev_state;
        struct device *dev = &av->isys->adev->auxdev.dev;
        struct v4l2_subdev *sd;
        struct media_pad *r_pad;
-       u32 sink_pad, sink_stream;
-       u64 r_stream;
-       u64 stream_mask = 0;
        int ret = 0;
 
-       dev_dbg(dev, "set stream: %d\n", state);
-
-       sd = &stream->asd->sd;
+       sd = &av->stream->asd->sd;
        r_pad = media_pad_remote_pad_first(&av->pad);
-       r_stream = ipu6_isys_get_src_stream_by_src_pad(sd, r_pad->index);
-
-       subdev_state = v4l2_subdev_lock_and_get_active_state(sd);
-       routing = &subdev_state->routing;
-       ret = v4l2_subdev_routing_find_opposite_end(routing, r_pad->index,
-                                                   r_stream, &sink_pad,
-                                                   &sink_stream);
-       v4l2_subdev_unlock_state(subdev_state);
-       if (ret)
-               return ret;
 
-       stream_mask = get_stream_mask_by_pipeline(av);
        if (!state) {
                /* stop sub-device which connects with video */
-               dev_dbg(dev, "stream off entity %s pad:%d mask:0x%llx\n",
-                       sd->name, r_pad->index, stream_mask);
-               ret = v4l2_subdev_disable_streams(sd, r_pad->index,
-                                                 stream_mask);
+               dev_dbg(dev, "stream off %s pad:%d\n", sd->name, r_pad->index);
+               ret = v4l2_subdev_disable_streams(sd, r_pad->index, 1);
                if (ret)
                        dev_err(dev, "stream off %s failed with %d\n", sd->name,
                                ret);
        } else {
                /* start sub-device which connects with video */
-               dev_dbg(dev, "stream on %s pad %d mask 0x%llx\n", sd->name,
-                       r_pad->index, stream_mask);
-               ret = v4l2_subdev_enable_streams(sd, r_pad->index, stream_mask);
+               dev_dbg(dev, "stream on %s pad %d\n", sd->name, r_pad->index);
+               ret = v4l2_subdev_enable_streams(sd, r_pad->index, 1);
                if (ret)
                        dev_err(dev, "stream on %s failed with %d\n", sd->name,
                                ret);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to