Even if a video device is part of a pipeline already,
video_device_pipeline_alloc_start() handles that case gracefully. Don't
explicitly differentiate between video_device_pipeline_start() and
video_device_pipeline_alloc_start() based on the existence of a pipeline.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.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>
media_pad_remote_pad_first(av->vdev.entity.pads);
struct v4l2_subdev *sd;
u32 r_stream, code;
- int ret;
if (!remote_pad)
return -ENOTCONN;
struct v4l2_subdev *remote_sd =
media_entity_to_v4l2_subdev(remote_pad->entity);
struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(remote_sd);
- struct media_pipeline *pipeline;
int ret = -EINVAL;
*nr_queues = 0;
return ret;
}
- pipeline = media_entity_pipeline(&av->vdev.entity);
- if (!pipeline)
- ret = video_device_pipeline_alloc_start(&av->vdev);
- else
- ret = video_device_pipeline_start(&av->vdev, pipeline);
+ ret = video_device_pipeline_alloc_start(&av->vdev);
if (ret < 0) {
dev_dbg(dev, "media pipeline start failed\n");
return ret;