Skip to contentSkip to conversation

Linux Media vimc update for 5.20-rc1

GIT PULL Shuah Khan 3 participants 4 messages Jul 7, 2022 – Jul 11, 2022

Subsystems (2)
lore
Share & tools
lore

Shuah Khan

author maintainer
#0 lore raw

Hi Mauro,

Please pull the following vimc update for Linux 5.20-rc1.

This vimc update Linux Media 5.20-rc1 consists of enhancement and cleanup patches:

- add lens to vimc driver and links it with sensors using ancillary links.
- add documentation for lens
- changes to make the code readable and maintainable.

diff is attached.

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 03c765b0e3b4cb5063276b086c76f7a612856a9a:

Linux 5.19-rc4 (2022-06-26 14:22:10 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux tags/linux-vimc-5.20-rc1

for you to fetch changes up to 55c592e9cff59e0d1c4069b7fe649b02ddf6c36b:

media: vimc: documentation for lens (2022-06-29 12:58:21 -0600)

----------------------------------------------------------------
linux-media-vimc-5.20-rc1

This vimc update Linux Media 5.20-rc1 consists of enhancement and cleanup patches:

- add lens to vimc driver and links it with sensors using ancillary links.
- add documentation for lens
- changes to make the code readable and maintainable.

----------------------------------------------------------------
Daniel Oakley (3):
media: vimc: expand the names of vimc entity types
media: vimc: enumerate data link entities for clarity
media: vimc: use data link entities enum to index the ent_config array

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-capture.c | 270 ++++++++---------
 drivers/media/test-drivers/vimc/vimc-common.h  |   9 +-
 drivers/media/test-drivers/vimc/vimc-core.c    | 142 ++++++---
 drivers/media/test-drivers/vimc/vimc-debayer.c | 393 +++++++++++++------------
 drivers/media/test-drivers/vimc/vimc-lens.c    | 102 +++++++
 drivers/media/test-drivers/vimc/vimc-scaler.c  | 216 +++++++-------
 drivers/media/test-drivers/vimc/vimc-sensor.c  | 307 +++++++++----------
 10 files changed, 830 insertions(+), 634 deletions(-)
 create mode 100644 drivers/media/test-drivers/vimc/vimc-lens.c

----------------------------------------------------------------

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 +19 -0
index 0b07f05dde25..3b4d2b36b4f3 100644
@@ -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:
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-capture.c +135 -135

519 lines not on this page · raw message

drivers/media/test-drivers/vimc/vimc-common.h +5 -4
index ba1930772589..7641a101a728 100644
@@ -167,10 +167,11 @@ struct vimc_ent_config {
  */
 bool vimc_is_source(struct media_entity *ent);
 
-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_sensor_type;
+extern struct vimc_ent_type vimc_debayer_type;
+extern struct vimc_ent_type vimc_scaler_type;
+extern struct vimc_ent_type vimc_capture_type;
+extern struct vimc_ent_type vimc_lens_type;
 
 /**
  * vimc_pix_map_by_index - get vimc_pix_map struct by its index
drivers/media/test-drivers/vimc/vimc-core.c +104 -38

214 lines not on this page · raw message

drivers/media/test-drivers/vimc/vimc-debayer.c +198 -195

741 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

drivers/media/test-drivers/vimc/vimc-scaler.c +108 -108

456 lines not on this page · raw message

drivers/media/test-drivers/vimc/vimc-sensor.c +154 -153

527 lines not on this page · raw message

#1 lore raw

Re: [GIT PULL] Linux Media vimc update for 5.20-rc1 (#84630)

From: [email protected]

Pull request: https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
Build log: https://builder.linuxtv.org/job/patchwork/222946/
Build time: 00:27:01

gpg: Signature made Thu 07 Jul 2022 04:16:22 PM UTC
gpg:                using RSA key 3D92B29BF459B8E086780FE40B0244C40D0D431C
gpg: Good signature from "Shuah Khan <[email protected]>" [full]
gpg:                 aka "Shuah Khan <[email protected]>" [unknown]
gpg:                 aka "Shuah Khan (gmail) <[email protected]>" [full]
gpg:                 aka "Shuah Khan (Linux Foundation work address) <[email protected]>" [unknown]

Summary: got 4/5 patches with issues, being 4 at build time, plus one error when buinding PDF document

Error/warnings:

patches/0001-media-vimc-add-ancillary-lens.patch:

allyesconfig: return code #0:
../scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
../scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
../scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3534 atomisp_cp_general_isp_parameters() parse error: OOM: 3000012Kb sm_state_count = 543759 ../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3534 atomisp_cp_general_isp_parameters() warn: Function too hairy. No more merges. ../drivers/staging/media/atomisp/pci/atomisp_cmd.c: ../drivers/staging/media/atomisp/pci/atomisp_cmd.c:3534 atomisp_cp_general_isp_parameters() parse error: __split_smt: function too hairy. Giving up after 8 seconds

allyesconfig: return code #0:
../drivers/media/i2c/cx25840/cx25840-core.c: ../drivers/media/i2c/cx25840/cx25840-core.c:5077 cx23885_dif_setup() parse error: turning off implications after 60 seconds ../drivers/media/platform/qcom/venus/helpers.c: ../drivers/media/platform/qcom/venus/helpers.c:678 venus_helper_get_bufreq() error: we previously assumed 'req' could be null (see line 674) SMATCH:../drivers/media/usb/siano/smsusb.c ../drivers/media/usb/siano/smsusb.c:53:38: :warning: array of flexible structures SPARSE:../drivers/media/usb/siano/smsusb.c ../drivers/media/usb/siano/smsusb.c:53:38: warning: array of flexible structures ../drivers/media/dvb-frontends/sp887x.c: ../drivers/media/dvb-frontends/sp887x.c:178 sp887x_initial_setup() error: __memcpy() '&buf[2]' too small (30 vs 16384) ../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2548 dvb_register() parse error: OOM: 3000024Kb sm_state_count = 1725875 ../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2548 dvb_register() warn: Function too hairy. No more merges. ../drivers/media/pci/cx23885/cx23885-dvb.c: ../drivers/media/pci/cx23885/cx23885-dvb.c:2548 dvb_register() parse error: __split_smt: function too hairy. Giving up after 51 seconds ../drivers/media/test-drivers/vimc/vimc-core.c: ../drivers/media/test-drivers/vimc/vimc-core.c:194 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR' ../drivers/media/usb/em28xx/em28xx-video.c: ../drivers/media/usb/em28xx/em28xx-video.c:2818 em28xx_v4l2_init() parse error: turning off implications after 60 seconds ../drivers/media/test-drivers/vivid/vivid-core.c: ../drivers/media/test-drivers/vivid/vivid-core.c:1961 vivid_create_instance() parse error: turning off implications after 60 seconds

checkpatch.pl:

	$ cat patches/0001-media-vimc-add-ancillary-lens.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:209: WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?

patches/0002-media-vimc-expand-the-names-of-vimc-entity-types.patch:

allyesconfig: return code #0:
../drivers/media/test-drivers/vimc/vimc-core.c: ../drivers/media/test-drivers/vimc/vimc-core.c:194 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR'

checkpatch.pl:

	$ cat patches/0002-media-vimc-expand-the-names-of-vimc-entity-types.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
	-:53: CHECK: Alignment should match open parenthesis
	-:62: CHECK: Alignment should match open parenthesis
	-:74: CHECK: Alignment should match open parenthesis
	-:87: CHECK: Alignment should match open parenthesis
	-:96: CHECK: Alignment should match open parenthesis
	-:116: WARNING: quoted string split across lines
	-:140: CHECK: Alignment should match open parenthesis
	-:149: CHECK: Alignment should match open parenthesis
	-:189: CHECK: Alignment should match open parenthesis
	-:280: CHECK: Alignment should match open parenthesis
	-:367: CHECK: Alignment should match open parenthesis
	-:417: CHECK: Alignment should match open parenthesis
	-:976: WARNING: quoted string split across lines
	-:1602: CHECK: Alignment should match open parenthesis
	-:1618: CHECK: Alignment should match open parenthesis
	-:1627: CHECK: Alignment should match open parenthesis
	-:1636: CHECK: Alignment should match open parenthesis
	-:1650: CHECK: Alignment should match open parenthesis
	-:1665: CHECK: Alignment should match open parenthesis
	-:1679: CHECK: Alignment should match open parenthesis
	-:1721: CHECK: Alignment should match open parenthesis
	-:1730: CHECK: Alignment should match open parenthesis
	-:1748: CHECK: Alignment should match open parenthesis
	-:1760: CHECK: Alignment should match open parenthesis
	-:1773: CHECK: Alignment should match open parenthesis
	-:1793: CHECK: Alignment should match open parenthesis
	-:1884: CHECK: Alignment should match open parenthesis
	-:1921: CHECK: Alignment should match open parenthesis
	-:1955: CHECK: Alignment should match open parenthesis
	-:2174: WARNING: quoted string split across lines

patches/0003-media-vimc-enumerate-data-link-entities-for-clarity.patch:

allyesconfig: return code #0:
../drivers/media/test-drivers/vimc/vimc-core.c: ../drivers/media/test-drivers/vimc/vimc-core.c:214 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR'

patches/0004-media-vimc-use-data-link-entities-enum-to-index-the-.patch:

allyesconfig: return code #0:
../drivers/media/test-drivers/vimc/vimc-core.c: ../drivers/media/test-drivers/vimc/vimc-core.c:214 vimc_create_links() warn: passing a valid pointer to 'PTR_ERR'

Error #512 when building PDF docs

#2 lore raw
In reply to Shuah Khan

Hi Shuah,

Em Thu, 7 Jul 2022 10:28:37 -0600
Shuah Khan <[email protected]> escreveu:

Quoted 7 lines

Hi Mauro,

Please pull the following vimc update for Linux 5.20-rc1.

This vimc update Linux Media 5.20-rc1 consists of enhancement and cleanup patches:

Quoted 6 lines

- add lens to vimc driver and links it with sensors using ancillary links.
- add documentation for lens
- changes to make the code readable and maintainable.

diff is attached.

Please also send the patches individually to the media ML, as reviews happen using them.

Hans,

Please let me know if you prefer to apply those on your tree, or if I should apply on mine a couple of days after Shuah post the patches at the ML.

Regards,
Mauro

Quoted 51 lines

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 03c765b0e3b4cb5063276b086c76f7a612856a9a:

   Linux 5.19-rc4 (2022-06-26 14:22:10 -0700)

are available in the Git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux tags/linux-vimc-5.20-rc1

for you to fetch changes up to 55c592e9cff59e0d1c4069b7fe649b02ddf6c36b:

media: vimc: documentation for lens (2022-06-29 12:58:21 -0600)

----------------------------------------------------------------
linux-media-vimc-5.20-rc1

This vimc update Linux Media 5.20-rc1 consists of enhancement and cleanup patches:

- add lens to vimc driver and links it with sensors using ancillary links.
- add documentation for lens
- changes to make the code readable and maintainable.

----------------------------------------------------------------
Daniel Oakley (3):
media: vimc: expand the names of vimc entity types
media: vimc: enumerate data link entities for clarity
media: vimc: use data link entities enum to index the ent_config array

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-capture.c | 270 ++++++++---------
  drivers/media/test-drivers/vimc/vimc-common.h  |   9 +-
  drivers/media/test-drivers/vimc/vimc-core.c    | 142 ++++++---
  drivers/media/test-drivers/vimc/vimc-debayer.c | 393 +++++++++++++------------
  drivers/media/test-drivers/vimc/vimc-lens.c    | 102 +++++++
  drivers/media/test-drivers/vimc/vimc-scaler.c  | 216 +++++++-------
  drivers/media/test-drivers/vimc/vimc-sensor.c  | 307 +++++++++----------
  10 files changed, 830 insertions(+), 634 deletions(-)

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

author maintainer
#3 lore raw
Quoted 17 lines · Mauro Carvalho Chehab

Hi Shuah,

Em Thu, 7 Jul 2022 10:28:37 -0600
Shuah Khan <[email protected]> escreveu:

Quoted 12 lines

Hi Mauro,

Please pull the following vimc update for Linux 5.20-rc1.

This vimc update Linux Media 5.20-rc1 consists of enhancement and cleanup patches:

- add lens to vimc driver and links it with sensors using ancillary links.
- add documentation for lens
- changes to make the code readable and maintainable.

Quoted 5 lines
Quoted 1 line

diff is attached.

Please also send the patches individually to the media ML, as reviews happen using them.

These are already on the linux-media mailing list and have been reviewed.

thanks,
-- Shuah