media:vimc:add ancillary lens
Subsystems (2)
v3 cover media:vimc:add ancillary lens
Add a basic version of vimc lens.
Link lens with sensors using ancillary links.
Update vimc documentation to reflect this change.
Changelog from v2:
-Add test information into commit log and documentation
Changelog from v1:
-Better commit log.
-A bit more detailed documentation in 2/2.
Yunke Cao (2):
media: vimc: add ancillary lens
media: vimc: documentation for lens
Documentation/admin-guide/media/vimc.dot | 4 + Documentation/admin-guide/media/vimc.rst | 19 ++++ drivers/media/test-drivers/vimc/Makefile | 2 +- drivers/media/test-drivers/vimc/vimc-common.h | 1 + drivers/media/test-drivers/vimc/vimc-core.c | 86 +++++++++++---- drivers/media/test-drivers/vimc/vimc-lens.c | 102 ++++++++++++++++++ 6 files changed, 193 insertions(+), 21 deletions(-) create mode 100644 drivers/media/test-drivers/vimc/vimc-lens.c
Signature · 1 line
2.37.0.rc0.161.g10f37bed90-goog
PATCH v3 1/2 media: vimc: add ancillary lens
Add lens to vimc driver and link them with sensors using ancillary links. Provides an example of ancillary link usage.The lens supports FOCUS_ABSOLUTE control.
Test example: With default vimc topology
Quoted 1 line
media-ctl -p
Media controller API version 5.18.0
...
- entity 28: Lens A (0 pad, 0 link)
type V4L2 subdev subtype Lens flags 0 device node name /dev/v4l-subdev6
- entity 29: Lens B (0 pad, 0 link)
type V4L2 subdev subtype Lens flags 0 device node name /dev/v4l-subdev7
Quoted 1 line
v4l2-ctl -d
/dev/v4l-subdev7-Cfocus_absolute
focus_absolute: 0
--- drivers/media/test-drivers/vimc/Makefile | 2 +- drivers/media/test-drivers/vimc/vimc-common.h | 1 + drivers/media/test-drivers/vimc/vimc-core.c | 86 +++++++++++---- drivers/media/test-drivers/vimc/vimc-lens.c | 102 ++++++++++++++++++ 4 files changed, 170 insertions(+), 21 deletions(-) create mode 100644 drivers/media/test-drivers/vimc/vimc-lens.c
drivers/media/test-drivers/vimc/Makefile +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vimc-y := vimc-core.o vimc-common.o vimc-streamer.o vimc-capture.o \ - vimc-debayer.o vimc-scaler.o vimc-sensor.o + vimc-debayer.o vimc-scaler.o vimc-sensor.o vimc-lens.o obj-$(CONFIG_VIDEO_VIMC) += vimc.o
drivers/media/test-drivers/vimc/vimc-common.h +1 -0
@@ -171,6 +171,7 @@ extern struct vimc_ent_type vimc_sen_type;extern struct vimc_ent_type vimc_deb_type;extern struct vimc_ent_type vimc_sca_type;extern struct vimc_ent_type vimc_cap_type; +extern struct vimc_ent_type vimc_len_type;/** * vimc_pix_map_by_index - get vimc_pix_map struct by its index
drivers/media/test-drivers/vimc/vimc-core.c +66 -20
139 lines not on this page · raw message
drivers/media/test-drivers/vimc/vimc-lens.c new file +102 -0
102 lines not on this page · raw message
Signature · 1 line
2.37.0.rc0.161.g10f37bed90-goog
Shuah Khan
maintainerRe: [PATCH v3 1/2] media: vimc: add ancillary lens
Quoted 14 lines · Yunke Cao
Add lens to vimc driver and link them with sensors using ancillary links. Provides an example of ancillary link usage.The lens supports
FOCUS_ABSOLUTEcontrol.Test example: With default vimc topology
Quoted 1 line
media-ctl -p
Media controller API version 5.18.0
...
- entity 28: Lens A (0 pad, 0 link)
type V4L2 subdev subtype Lens flags 0 device node name/dev/v4l-subdev6
- entity 29: Lens B (0 pad, 0 link)
type V4L2 subdev subtype Lens flags 0 device node name/dev/v4l-subdev7
Quoted 7 lines
Quoted 1 line
v4l2-ctl -d
/dev/v4l-subdev7-Cfocus_absolute
focus_absolute: 0Reviewed-by Shuah Khan <[email protected]>Reviewed-by Kieran Bingham <[email protected]>Signed-off-by Yunke Cao <[email protected]>---
This patch is now queued for vimc pull request for Linux 5.20-rc1 to be send to Mauro Chehab.
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=vimc
thanks,
-- Shuah
PATCH v3 2/2 media: vimc: documentation for lens
In reply to Yunke CaoAdd documentation for vimc-lens.
Add a lens into the vimc topology graph.
--- Documentation/admin-guide/media/vimc.dot | 4 ++++ Documentation/admin-guide/media/vimc.rst | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+)
Documentation/admin-guide/media/vimc.dot +4 -0
@@ -5,9 +5,13 @@ digraph board { 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] + n00000001 -> n00000002 + n00000002 [label="{{} | Lens A\n/dev/v4l-subdev5 | {<port0>}}", shape=Mrecord, style=filled, fillcolor=green] 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] + n00000003 -> n00000004 + n00000004 [label="{{} | Lens B\n/dev/v4l-subdev6 | {<port0>}}", shape=Mrecord, style=filled, fillcolor=green] 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]
Documentation/admin-guide/media/vimc.rst +19 -0
@@ -53,6 +53,25 @@ vimc-sensor: * 1 Pad source +vimc-lens: + Ancillary lens for a sensor. Supports auto focus control. Linked to + a vimc-sensor using an ancillary link. The lens supports FOCUS_ABSOLUTE + control. + +.. code-block:: bash + + media-ctl -p + ... + - entity 28: Lens A (0 pad, 0 link) + type V4L2 subdev subtype Lens flags 0 + device node name /dev/v4l-subdev6 + - entity 29: Lens B (0 pad, 0 link) + type V4L2 subdev subtype Lens flags 0 + device node name /dev/v4l-subdev7 + v4l2-ctl -d /dev/v4l-subdev7 -C focus_absolute + focus_absolute: 0 + + vimc-debayer: Transforms images in bayer format into a non-bayer format. Exposes:
Signature · 1 line
2.37.0.rc0.161.g10f37bed90-goog
Shuah Khan
maintainerRe: [PATCH v3 2/2] media: vimc: documentation for lens
Quoted 10 lines · Yunke Cao
Add documentation for vimc-lens.
Add a lens into the vimc topology graph.Reviewed-by Shuah Khan <[email protected]>Signed-off-by Yunke Cao <[email protected]>--- Documentation/admin-guide/media/vimc.dot | 4 ++++ Documentation/admin-guide/media/vimc.rst | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+)
This patch failed to apply. Please rebase to the latest Linux 5.19-rc4 and resend.
thanks,
-- Shuah
Re: [PATCH v3 2/2] media: vimc: documentation for lens
Just resent the patches. Sorry about the inconvenience.
Thanks,
Yunke
Quoted 19 lines · Shuah Khan
Quoted 10 lines · Yunke Cao
Add documentation for vimc-lens.
Add a lens into the vimc topology graph.Reviewed-by Shuah Khan <[email protected]>Signed-off-by Yunke Cao <[email protected]>--- Documentation/admin-guide/media/vimc.dot | 4 ++++ Documentation/admin-guide/media/vimc.rst | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+)This patch failed to apply. Please rebase to the latest Linux 5.19-rc4 and resend.
thanks,
-- Shuah