2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00

media: vimc: stream: format comments as kernel-doc

Format the current existing comments as kernel-doc comments, to be
reused at kernel documention. Add opening marks (/**) and return values.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
André Almeida 2019-06-24 08:37:27 -04:00 committed by Mauro Carvalho Chehab
parent 959f9c841b
commit ed391879dd

View File

@ -20,6 +20,8 @@
* *
* Helper function that returns the media entity containing the source pad * Helper function that returns the media entity containing the source pad
* linked with the first sink pad from the given media entity pad list. * linked with the first sink pad from the given media entity pad list.
*
* Return: The source pad or NULL, if it wasn't found.
*/ */
static struct media_entity *vimc_get_source_entity(struct media_entity *ent) static struct media_entity *vimc_get_source_entity(struct media_entity *ent)
{ {
@ -35,7 +37,7 @@ static struct media_entity *vimc_get_source_entity(struct media_entity *ent)
return NULL; return NULL;
} }
/* /**
* vimc_streamer_pipeline_terminate - Disable stream in all ved in stream * vimc_streamer_pipeline_terminate - Disable stream in all ved in stream
* *
* @stream: the pointer to the stream structure with the pipeline to be * @stream: the pointer to the stream structure with the pipeline to be
@ -63,15 +65,18 @@ static void vimc_streamer_pipeline_terminate(struct vimc_stream *stream)
} }
} }
/* /**
* vimc_streamer_pipeline_init - initializes the stream structure * vimc_streamer_pipeline_init - Initializes the stream structure
* *
* @stream: the pointer to the stream structure to be initialized * @stream: the pointer to the stream structure to be initialized
* @ved: the pointer to the vimc entity initializing the stream * @ved: the pointer to the vimc entity initializing the stream
* *
* Initializes the stream structure. Walks through the entity graph to * Initializes the stream structure. Walks through the entity graph to
* construct the pipeline used later on the streamer thread. * construct the pipeline used later on the streamer thread.
* Calls s_stream to enable stream in all entities of the pipeline. * Calls vimc_streamer_s_stream() to enable stream in all entities of
* the pipeline.
*
* Return: 0 if success, error code otherwise.
*/ */
static int vimc_streamer_pipeline_init(struct vimc_stream *stream, static int vimc_streamer_pipeline_init(struct vimc_stream *stream,
struct vimc_ent_device *ved) struct vimc_ent_device *ved)
@ -122,13 +127,17 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream,
return -EINVAL; return -EINVAL;
} }
/* /**
* vimc_streamer_thread - process frames through the pipeline * vimc_streamer_thread - Process frames through the pipeline
* *
* @data: vimc_stream struct of the current stream * @data: vimc_stream struct of the current stream
* *
* From the source to the sink, gets a frame from each subdevice and send to * From the source to the sink, gets a frame from each subdevice and send to
* the next one of the pipeline at a fixed framerate. * the next one of the pipeline at a fixed framerate.
*
* Return:
* Always zero (created as ``int`` instead of ``void`` to comply with
* kthread API).
*/ */
static int vimc_streamer_thread(void *data) static int vimc_streamer_thread(void *data)
{ {
@ -157,19 +166,20 @@ static int vimc_streamer_thread(void *data)
return 0; return 0;
} }
/* /**
* vimc_streamer_s_stream - start/stop the streaming on the media pipeline * vimc_streamer_s_stream - Start/stop the streaming on the media pipeline
* *
* @stream: the pointer to the stream structure of the current stream * @stream: the pointer to the stream structure of the current stream
* @ved: pointer to the vimc entity of the entity of the stream * @ved: pointer to the vimc entity of the entity of the stream
* @enable: flag to determine if stream should start/stop * @enable: flag to determine if stream should start/stop
* *
* When starting, check if there is no stream->kthread allocated. This should * When starting, check if there is no ``stream->kthread`` allocated. This
* indicate that a stream is already running. Then, it initializes * should indicate that a stream is already running. Then, it initializes the
* the pipeline, creates and runs a kthread to consume buffers through the * pipeline, creates and runs a kthread to consume buffers through the pipeline.
* pipeline. * When stopping, analogously check if there is a stream running, stop the
* When stopping, analogously check if there is a stream running, stop * thread and terminates the pipeline.
* the thread and terminates the pipeline. *
* Return: 0 if success, error code otherwise.
*/ */
int vimc_streamer_s_stream(struct vimc_stream *stream, int vimc_streamer_s_stream(struct vimc_stream *stream,
struct vimc_ent_device *ved, struct vimc_ent_device *ved,