media: vimc: stream: add missing function documentation
Subsystems (2)
PATCH v2 1/2 media: vimc: stream: add missing function documentation
Add comments at vimc_streamer_s_stream and vimc_streamer_thread, making the vimc-stream totally documented.
---
Commit extracted from [PATCH 0/4] media: vimc: Minor code cleanup and documentation
Changes in v2: fix typos
drivers/media/platform/vimc/vimc-streamer.c | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/media/platform/vimc/vimc-streamer.c +22 -0
@@ -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, 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)
Signature · 1 line
2.22.0
PATCH v2 2/2 media: docs: create vimc documentation
Create vimc documentation file to explain it basics features, it's topology, how to configure it and to document vimc's subdevices.
---
Commit extracted from [PATCH 0/4] media: vimc: Minor code cleanup and documentation
Changes in v2:
- Fix typos
- Make clear what does means scale factor
Documentation/media/v4l-drivers/index.rst | 1 + Documentation/media/v4l-drivers/vimc.dot | 22 +++++ Documentation/media/v4l-drivers/vimc.rst | 98 +++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 Documentation/media/v4l-drivers/vimc.dot create mode 100644 Documentation/media/v4l-drivers/vimc.rst
Documentation/media/v4l-drivers/index.rst +1 -0
@@ -64,5 +64,6 @@ For more details see the file COPYING in the source distribution of Linux. si476x soc-camera uvcvideo + vimc vivid zr364xx
Documentation/media/v4l-drivers/vimc.dot new file +22 -0
@@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0 + +digraph board { + rankdir=TB + n00000001 [label="{{} | Sensor A\n/dev/v4l-subdev0 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green] + n00000001:port0 -> n00000005:port0 [style=bold] + n00000001:port0 -> n0000000b [style=bold] + n00000003 [label="{{} | Sensor B\n/dev/v4l-subdev1 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green] + n00000003:port0 -> n00000008:port0 [style=bold] + n00000003:port0 -> n0000000f [style=bold] + n00000005 [label="{{<port0> 0} | Debayer A\n/dev/v4l-subdev2 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] + n00000005:port1 -> n00000017:port0 + n00000008 [label="{{<port0> 0} | Debayer B\n/dev/v4l-subdev3 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] + n00000008:port1 -> n00000017:port0 [style=dashed] + n0000000b [label="Raw Capture 0\n/dev/video0", shape=box, style=filled, fillcolor=yellow] + n0000000f [label="Raw Capture 1\n/dev/video1", shape=box, style=filled, fillcolor=yellow] + n00000013 [label="RGB/YUV Input\n/dev/video2", shape=box, style=filled, fillcolor=yellow] + n00000013 -> n00000017:port0 [style=dashed] + n00000017 [label="{{<port0> 0} | Scaler\n/dev/v4l-subdev4 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] + n00000017:port1 -> n0000001a [style=bold] + n0000001a [label="RGB/YUV Capture\n/dev/video3", shape=box, style=filled, fillcolor=yellow] +}
Documentation/media/v4l-drivers/vimc.rst new file +98 -0
98 lines not on this page · raw message
Signature · 1 line
2.22.0
Randy Dunlap
reviewerQuoted 18 lines · André Almeida
Add comments at
vimc_streamer_s_streamandvimc_streamer_thread, making the vimc-stream totally documented.Signed-off-by André Almeida <[email protected]>---
Commit extracted from [PATCH 0/4] media: vimc: Minor code cleanup and documentationChanges in v2: fix typos
drivers/media/platform/vimc/vimc-streamer.c | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+)drivers/media/platform/vimc/vimc-streamer.c +0
-0
drivers/media/platform/vimc/vimc-streamer.c static int vimc_streamer_pipeline_init(struct vimc_stream *stream, · line 128
Quoted 7 lines
drivers/media/platform/vimc/vimc-streamer.c +4
-0@@ -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
of the current stream ??
Quoted 29 lines
drivers/media/platform/vimc/vimc-streamer.c +18
-0+* +* 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)
Signature · 1 line
~Randy