Skip to contentSkip to conversation

media: vimc: add ancillary lens

PATCH RESEND Superseded Yunke Cao 2 participants 7 messages Jun 10, 2022 – Jun 17, 2022

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yunke Cao

author
#0 lore raw

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.

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      |   3 +
 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, 177 insertions(+), 21 deletions(-)
 create mode 100644 drivers/media/test-drivers/vimc/vimc-lens.c
Signature · 1 line
2.36.1.476.g0c4daa206d-goog
author
#1 lore raw

PATCH RESEND 1/2 media: vimc: add ancillary lens

Add a basic version of vimc lens.
Link lens with sensors using ancillary links.

---
 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
index a53b2b532e9f..9b9631562473 100644
@@ -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
index ba1930772589..37f6b687ce10 100644
@@ -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.36.1.476.g0c4daa206d-goog
maintainer Reviewed-by on v1 1/2
#2 lore raw
Quoted 3 lines · Yunke Cao

Add a basic version of vimc lens.
Link lens with sensors using ancillary links.

Please add more information to the commit lg describing what this patch adds. Describe why this feature is needed for one thing. Also describe how it fits into the existing code so we can do a better review.

Quoted 27 lines
---
  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
index a53b2b532e9f..9b9631562473 100644
@@ -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 +0 -0
index ba1930772589..37f6b687ce10 100644

drivers/media/test-drivers/vimc/vimc-common.h extern struct vimc_ent_type vimc_sen_type; · line 175

Quoted 5 lines
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;
 

Code looks good. With the above suggested changes to commit log

thanks,
-- Shuah

author
#3 lore raw

PATCH RESEND 2/2 media: vimc: documentation for lens

In reply to Yunke Cao
---
 Documentation/admin-guide/media/vimc.dot | 4 ++++
 Documentation/admin-guide/media/vimc.rst | 3 +++
 2 files changed, 7 insertions(+)
Documentation/admin-guide/media/vimc.dot +4 -0
index 8e829c164626..92a5bb631235 100644
@@ -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 -> n00000015: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 +3 -0
index 0b07f05dde25..1723eb5ec56a 100644
@@ -53,6 +53,9 @@ vimc-sensor:
 
 	* 1 Pad source
 
+vimc-lens:
+	Ancillary lens for a sensor.
+
 vimc-debayer:
 	Transforms images in bayer format into a non-bayer format.
 	Exposes:
Signature · 1 line
2.36.1.476.g0c4daa206d-goog
maintainer Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH v1 2/2 RESEND] media: vimc: documentation for lens

Quoted 2 lines · Yunke Cao

---

Please add commit log - describe what this feature adds in a couple of sentences. It would be helpful to see how this can be invoked or used.

Quoted 27 lines
  Documentation/admin-guide/media/vimc.dot | 4 ++++
  Documentation/admin-guide/media/vimc.rst | 3 +++
  2 files changed, 7 insertions(+)
Documentation/admin-guide/media/vimc.dot +4 -0
index 8e829c164626..92a5bb631235 100644
@@ -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 -> n00000015: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 +0 -0
index 0b07f05dde25..1723eb5ec56a 100644

Documentation/admin-guide/media/vimc.rst vimc-sensor: · line 58

Quoted 6 lines
Documentation/admin-guide/media/vimc.rst +3 -0
@@ -53,6 +53,9 @@ vimc-sensor:
 
  	* 1 Pad source
 
+vimc-lens:
+	Ancillary lens for a sensor.
+

Please add some description on what this does.

Documentation/admin-guide/media/vimc.rst vimc-sensor: · line 61

Quoted 4 lines
Documentation/admin-guide/media/vimc.rst +0 -0
  vimc-debayer:
  	Transforms images in bayer format into a non-bayer format.
  	Exposes:

With these fixed

thanks,
-- Shuah

maintainer
#5 lore raw
In reply to Yunke Cao
Quoted 8 lines · Yunke Cao

Add a basic version of vimc lens.
Link lens with sensors using ancillary links.
Update vimc documentation to reflect this change.

Yunke Cao (2):
media: vimc: add ancillary lens
media: vimc: documentation for lens

Quoted 9 lines
  Documentation/admin-guide/media/vimc.dot      |   4 +
  Documentation/admin-guide/media/vimc.rst      |   3 +
  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, 177 insertions(+), 21 deletions(-)

create mode 100644 drivers/media/test-drivers/vimc/vimc-lens.c

Reviewed all three patches

Mauro,

Would you like me to send a pull request for these patches?

Yunke, please make sure to run get_maintainers.pl and include everybody the scripts asks you to. Leaving out people causes delays in patch reviews and acceptance.

thanks,
-- Shuah

author
#6 lore raw

Hi Shuah,

Thanks for the review!
I just sent out v2.

Changelog from v1:
-Better commit log.
-A bit more detailed documentation in 2/2.

Quoted 22 lines · Shuah Khan
Quoted 8 lines · Yunke Cao

Add a basic version of vimc lens.
Link lens with sensors using ancillary links.
Update vimc documentation to reflect this change.

Yunke Cao (2):
media: vimc: add ancillary lens
media: vimc: documentation for lens

Quoted 9 lines
  Documentation/admin-guide/media/vimc.dot      |   4 +
  Documentation/admin-guide/media/vimc.rst      |   3 +
  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, 177 insertions(+), 21 deletions(-)

create mode 100644 drivers/media/test-drivers/vimc/vimc-lens.c

Reviewed all three patches

Quoted 7 lines

Mauro,

Would you like me to send a pull request for these patches?

Yunke, please make sure to run get_maintainers.pl and include everybody the scripts asks you to. Leaving out people causes delays in patch reviews and acceptance.

Thank you, I will do it in the future.

Best,
Yunke

Quoted 3 lines

thanks,
-- Shuah