Lines Matching defs:pipe

88  * @pipe: The pipeline
97 static int xvip_pipeline_start_stop(struct xvip_pipeline *pipe, bool start)
99 struct xvip_dma *dma = pipe->output;
128 * @pipe: The pipeline
151 static int xvip_pipeline_set_stream(struct xvip_pipeline *pipe, bool on)
155 mutex_lock(&pipe->lock);
158 if (pipe->stream_count == pipe->num_dmas - 1) {
159 ret = xvip_pipeline_start_stop(pipe, true);
163 pipe->stream_count++;
165 if (--pipe->stream_count == 0)
166 xvip_pipeline_start_stop(pipe, false);
170 mutex_unlock(&pipe->lock);
174 static int xvip_pipeline_validate(struct xvip_pipeline *pipe,
183 media_pipeline_for_each_pad(&pipe->pipe, &iter, pad) {
192 pipe->output = dma;
203 pipe->num_dmas = num_inputs + num_outputs;
208 static void __xvip_pipeline_cleanup(struct xvip_pipeline *pipe)
210 pipe->num_dmas = 0;
211 pipe->output = NULL;
216 * @pipe: the pipeline
220 static void xvip_pipeline_cleanup(struct xvip_pipeline *pipe)
222 mutex_lock(&pipe->lock);
225 if (--pipe->use_count == 0)
226 __xvip_pipeline_cleanup(pipe);
228 mutex_unlock(&pipe->lock);
233 * @pipe: the pipeline
241 static int xvip_pipeline_prepare(struct xvip_pipeline *pipe,
246 mutex_lock(&pipe->lock);
249 if (pipe->use_count == 0) {
250 ret = xvip_pipeline_validate(pipe, dma);
252 __xvip_pipeline_cleanup(pipe);
257 pipe->use_count++;
261 mutex_unlock(&pipe->lock);
378 struct xvip_pipeline *pipe;
390 pipe = to_xvip_pipeline(&dma->video) ? : &dma->pipe;
392 ret = video_device_pipeline_start(&dma->video, &pipe->pipe);
403 ret = xvip_pipeline_prepare(pipe, dma);
413 xvip_pipeline_set_stream(pipe, true);
435 struct xvip_pipeline *pipe = to_xvip_pipeline(&dma->video);
439 xvip_pipeline_set_stream(pipe, false);
445 xvip_pipeline_cleanup(pipe);
640 mutex_init(&dma->pipe.lock);
743 mutex_destroy(&dma->pipe.lock);