Lines Matching refs:stream

446 	struct ipu6_isys_stream *stream = av->stream;
463 dev_err(dev, "can't get stream format (%d)\n", ret);
470 dev_err(dev, "can't get stream crop (%d)\n", ret);
489 stream->output_pins[output_pins].pin_ready = ipu6_isys_queue_buf_ready;
490 stream->output_pins[output_pins].aq = aq;
524 struct ipu6_isys_stream *stream = av->stream;
531 msg = ipu6_get_fw_msg_buf(stream);
535 stream_cfg = &msg->fw_msg.stream;
536 stream_cfg->src = stream->stream_source;
537 stream_cfg->vc = stream->vc;
541 list_for_each_entry(aq, &stream->queues, node) {
553 stream->nr_output_pins = stream_cfg->nof_output_pins;
555 reinit_completion(&stream->stream_open_completion);
557 ret = ipu6_fw_isys_complex_cmd(av->isys, stream->stream_handle,
562 dev_err(dev, "can't open stream (%d)\n", ret);
569 tout = wait_for_completion_timeout(&stream->stream_open_completion,
575 dev_err(dev, "stream open time out\n");
579 if (stream->error) {
580 dev_err(dev, "stream open error: %d\n", stream->error);
584 dev_dbg(dev, "start stream: open complete\n");
587 msg = ipu6_get_fw_msg_buf(stream);
593 ipu6_isys_buf_to_fw_frame_buf(buf, stream, bl);
598 reinit_completion(&stream->stream_start_completion);
604 ret = ipu6_fw_isys_complex_cmd(av->isys, stream->stream_handle,
609 ret = ipu6_fw_isys_simple_cmd(av->isys, stream->stream_handle,
618 tout = wait_for_completion_timeout(&stream->stream_start_completion,
621 dev_err(dev, "stream start time out\n");
625 if (stream->error) {
626 dev_err(dev, "stream start error: %d\n", stream->error);
630 dev_dbg(dev, "start stream: complete\n");
635 reinit_completion(&stream->stream_close_completion);
638 stream->stream_handle,
641 dev_dbg(dev, "can't close stream (%d)\n", retout);
645 tout = wait_for_completion_timeout(&stream->stream_close_completion,
648 dev_err(dev, "stream close time out\n");
649 else if (stream->error)
650 dev_err(dev, "stream close error: %d\n", stream->error);
652 dev_dbg(dev, "stream close complete\n");
663 struct ipu6_isys_stream *stream = av->stream;
666 reinit_completion(&stream->stream_stop_completion);
668 ret = ipu6_fw_isys_simple_cmd(av->isys, stream->stream_handle,
672 dev_err(dev, "can't stop stream (%d)\n", ret);
676 tout = wait_for_completion_timeout(&stream->stream_stop_completion,
679 dev_warn(dev, "stream stop time out\n");
680 else if (stream->error)
681 dev_warn(dev, "stream stop error: %d\n", stream->error);
683 dev_dbg(dev, "stop stream: complete\n");
688 struct ipu6_isys_stream *stream = av->stream;
692 reinit_completion(&stream->stream_close_completion);
694 ret = ipu6_fw_isys_simple_cmd(av->isys, stream->stream_handle,
697 dev_err(dev, "can't close stream (%d)\n", ret);
701 tout = wait_for_completion_timeout(&stream->stream_close_completion,
704 dev_warn(dev, "stream close time out\n");
705 else if (stream->error)
706 dev_warn(dev, "stream close error: %d\n", stream->error);
708 dev_dbg(dev, "close stream: complete\n");
717 struct ipu6_isys_stream *stream = av->stream;
720 if (WARN_ON(stream->nr_streaming))
723 stream->nr_queues = nr_queues;
724 atomic_set(&stream->sequence, 0);
726 stream->seq_index = 0;
727 memset(stream->seq, 0, sizeof(stream->seq));
729 if (WARN_ON(!list_empty(&stream->queues)))
732 stream->stream_source = stream->asd->source;
733 csi2 = ipu6_isys_subdev_to_csi2(stream->asd);
735 stream->source_entity = source_entity;
738 "prepare stream: external entity %s\n",
739 stream->source_entity->name);
762 esd = media_entity_to_v4l2_subdev(av->stream->source_entity);
775 csi2 = ipu6_isys_subdev_to_csi2(av->stream->asd);
794 av->stream->source_entity->name);
845 void ipu6_isys_put_stream(struct ipu6_isys_stream *stream)
851 if (!stream) {
852 pr_err("ipu6-isys: no available stream\n");
856 dev = &stream->isys->adev->auxdev.dev;
858 spin_lock_irqsave(&stream->isys->streams_lock, flags);
860 if (&stream->isys->streams[i] == stream) {
861 if (stream->isys->streams_ref_count[i] > 0)
862 stream->isys->streams_ref_count[i]--;
864 dev_warn(dev, "invalid stream %d\n", i);
869 spin_unlock_irqrestore(&stream->isys->streams_lock, flags);
875 struct ipu6_isys_stream *stream = NULL;
889 stream = &isys->streams[i];
894 if (!stream) {
898 stream = &isys->streams[i];
899 stream->vc = vc;
900 stream->asd = asd;
907 return stream;
914 struct ipu6_isys_stream *stream = NULL;
928 stream = &isys->streams[stream_handle];
932 return stream;
938 struct ipu6_isys_stream *stream = NULL;
946 dev_err(&stream->isys->adev->auxdev.dev,
947 "query stream with invalid port number\n");
958 stream = &isys->streams[i];
965 return stream;
989 struct ipu6_isys_stream *stream = av->stream;
1001 dev_dbg(dev, "set stream: %d\n", state);
1003 if (WARN(!stream->source_entity, "No source entity for stream\n"))
1006 ssd = media_entity_to_v4l2_subdev(stream->source_entity);
1007 sd = &stream->asd->sd;
1020 s_pad = media_pad_remote_pad_first(&stream->asd->pad[sink_pad]);
1038 dev_dbg(dev, "stream off entity %s pad:%d\n", sd->name,
1042 dev_err(dev, "stream off %s failed with %d\n", sd->name,
1050 dev_err(dev, "start stream of firmware failed\n");
1055 dev_dbg(dev, "stream on %s pad %d\n", sd->name, r_pad->index);
1058 dev_err(dev, "stream on %s failed with %d\n", sd->name,
1071 stream_mask, stream->source_entity->name, ret);
1255 dev_dbg(dev, "Framedesc: stream %u, len %u, vc %u, dt %#x\n",
1256 entry.stream, entry.length, entry.bus.csi2.vc,
1276 av->stream = ipu6_isys_get_stream(av, asd);
1277 if (!av->stream) {
1279 dev_err(dev, "no available stream for firmware\n");