diff mbox series

[3/4] media: vimc: stream: add missing function documentation

Message ID 20190613150616.19336-4-andrealmeid@collabora.com (mailing list archive)
State New, archived
Headers show
Series media: vimc: Minor code cleanup and documentation | expand

Commit Message

André Almeida June 13, 2019, 3:06 p.m. UTC
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>
---
 drivers/media/platform/vimc/vimc-streamer.c | 22 +++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Hans Verkuil June 14, 2019, 7:23 a.m. UTC | #1
On 6/13/19 5:06 PM, André Almeida wrote:
> 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>
> ---
>  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..8556cc6e8654 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 streaming
> + *
> + * 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, checks if there's no stream->kthread allocated. This should

checks -> check
there's -> there is

> + * indicates that a streaming is already running. Then, it's initialize

indicates -> indicate
it's initialize -> it initializes

> + * the pipeline, create and run a kthread to consume buffers through the

create and run -> creates and runs

> + * pipeline.
> + * When stopping, analogously check's it there's a streaming running, stops

check's it there's a streaming -> check if there is a stream



> + * the thread and terminate the pipeline.

terminate -> terminates

> + */
>  int vimc_streamer_s_stream(struct vimc_stream *stream,
>  			   struct vimc_ent_device *ved,
>  			   int enable)
> 

Regards,

	Hans
diff mbox series

Patch

diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc/vimc-streamer.c
index 236ade38f1da..8556cc6e8654 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 streaming
+ *
+ * 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, checks if there's no stream->kthread allocated. This should
+ * indicates that a streaming is already running. Then, it's initialize
+ * the pipeline, create and run a kthread to consume buffers through the
+ * pipeline.
+ * When stopping, analogously check's it there's a streaming running, stops
+ * the thread and terminate the pipeline.
+ */
 int vimc_streamer_s_stream(struct vimc_stream *stream,
 			   struct vimc_ent_device *ved,
 			   int enable)