All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/2] media: vimc: stream: add missing function documentation
@ 2019-06-17 13:32 André Almeida
  2019-06-17 13:32 ` [PATCH v3 2/2] media: docs: create vimc documentation André Almeida
  2019-06-21 21:17 ` [PATCH v3 1/2] media: vimc: stream: add missing function documentation Mauro Carvalho Chehab
  0 siblings, 2 replies; 5+ messages in thread
From: André Almeida @ 2019-06-17 13:32 UTC (permalink / raw)
  To: linux-media
  Cc: mchehab, hverkuil, helen.koike, kernel, linux-kernel, André Almeida

Add comments at vimc_streamer_s_stream and vimc_streamer_thread, making
the vimc-stream totally documented.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
---
Changes in v3: replace "streaming" by "stream" at vimc_streamer_thread().

Changes in v2: fix typos

 drivers/media/platform/vimc/vimc-streamer.c | 22 +++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc/vimc-streamer.c
index 236ade38f1da..1fea6d666c2e 100644
--- a/drivers/media/platform/vimc/vimc-streamer.c
+++ b/drivers/media/platform/vimc/vimc-streamer.c
@@ -122,6 +122,14 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream,
 	return -EINVAL;
 }
 
+/*
+ * vimc_streamer_thread - process frames through the pipeline
+ *
+ * @data:	vimc_stream struct of the current stream
+ *
+ * From the source to the sink, gets a frame from each subdevice and send to
+ * the next one of the pipeline in a fixed framerate.
+ */
 static int vimc_streamer_thread(void *data)
 {
 	struct vimc_stream *stream = data;
@@ -149,6 +157,20 @@ static int vimc_streamer_thread(void *data)
 	return 0;
 }
 
+/*
+ * vimc_streamer_s_stream - start/stop the streaming on the media pipeline
+ *
+ * @stream:	the pointer to the stream structure of the current stream
+ * @ved:	pointer to the vimc entity of the entity of the stream
+ * @enable:	flag to determine if stream should start/stop
+ *
+ * When starting, check if there is no stream->kthread allocated. This should
+ * indicate that a streaming is already running. Then, it initializes
+ * the pipeline, creates and runs a kthread to consume buffers through the
+ * pipeline.
+ * When stopping, analogously check if there is a stream running, stops
+ * the thread and terminates the pipeline.
+ */
 int vimc_streamer_s_stream(struct vimc_stream *stream,
 			   struct vimc_ent_device *ved,
 			   int enable)
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-22 21:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 13:32 [PATCH v3 1/2] media: vimc: stream: add missing function documentation André Almeida
2019-06-17 13:32 ` [PATCH v3 2/2] media: docs: create vimc documentation André Almeida
2019-06-21 21:17 ` [PATCH v3 1/2] media: vimc: stream: add missing function documentation Mauro Carvalho Chehab
2019-06-22 21:51   ` André Almeida
2019-06-22 21:58     ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.