Skip to content

V4L2 subdev and sensor control changes, SMIA++ driver and N9 camera board code

Sakari Ailus linux-media 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest35 patches 44 repliesIn review
  2. v434 patches 22 repliesSuperseded
  3. v333 patches 53 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v231 patches14 repliesSuperseded
v123 patches26 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/35v4l: Introduce integer menu controlsdrivers/media/video/v4l2-ctrls.c include/linux/videodev2.h include/media/v4l2-ctrls.h+67 -190 replies
2/35v4l: Document integer menu controlsDocumentation/DocBook/media/v4l/compat.xml Documentation/DocBook/media/v4l/v4l2.xml Documentation/DocBook/media/v4l/vidioc-queryctrl.xml+53 -20 replies
3/35vivi: Add an integer menu test controldrivers/media/video/vivi.c+22 -00 replies
4/35v4l: VIDIOC_SUBDEV_S_SELECTION and VIDIOC_SUBDEV_G_SELECTION IOCTLsdrivers/media/video/v4l2-subdev.c include/linux/v4l2-subdev.h include/media/v4l2-subdev.h+90 -140 replies
5/35v4l: vdev_to_v4l2_subdev() should have return type "struct v4l2_subdev *"include/media/v4l2-subdev.h+1 -10 replies
6/35v4l: Check pad number in get try pointer functionsinclude/media/v4l2-subdev.h+13 -170 replies
7/35v4l: Support s_crop and g_crop through s/g_selectiondrivers/media/video/v4l2-subdev.c+35 -20 replies
8/35v4l: Add subdev selections documentation: svg and dia filesDocumentation/DocBook/media/v4l/subdev-image-processing-crop.dia Documentation/DocBook/media/v4l/subdev-image-processing-crop.svg Documentation/DocBook/media/v4l/subdev-image-processing-full.dia +3 more+3696 -01 reply
9/35v4l: Add subdev selections documentationDocumentation/DocBook/media/Makefile Documentation/DocBook/media/v4l/compat.xml Documentation/DocBook/media/v4l/dev-subdev.xml +2 more+433 -275 replies
10/35v4l: Mark VIDIOC_SUBDEV_G_CROP and VIDIOC_SUBDEV_S_CROP obsoleteDocumentation/DocBook/media/v4l/compat.xml Documentation/DocBook/media/v4l/vidioc-subdev-g-crop.xml+13 -30 replies
11/35v4l: Image source control classDocumentation/DocBook/media/v4l/controls.xml Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml drivers/media/video/v4l2-ctrls.c +1 more+108 -00 replies
12/35v4l: Image processing control classDocumentation/DocBook/media/v4l/controls.xml Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml drivers/media/video/v4l2-ctrls.c +1 more+109 -00 replies
13/35v4l: Document raw bayer 4CC codesDocumentation/video4linux/4CCs.txt+32 -00 replies
14/35v4l: Add DPCM compressed raw bayer pixel formatsDocumentation/DocBook/media/v4l/pixfmt-srggb10.xml Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml Documentation/DocBook/media/v4l/pixfmt.xml +1 more+34 -14 replies
15/35media: Add link_validate() op to check links to the sink padDocumentation/media-framework.txt drivers/media/media-entity.c include/media/media-entity.h+70 -40 replies
16/35v4l: Improve sub-device documentation for pad opsDocumentation/video4linux/v4l2-framework.txt+9 -00 replies
17/35v4l: Implement v4l2_subdev_link_validate()Documentation/video4linux/v4l2-framework.txt drivers/media/video/v4l2-subdev.c include/media/v4l2-subdev.h+88 -00 replies
18/35v4l: Allow changing control handler lockdrivers/media/video/adp1653.c drivers/media/video/v4l2-ctrls.c drivers/media/video/vivi.c +1 more+32 -284 replies
19/35omap3isp: Support additional in-memory compressed bayer formatsdrivers/media/video/omap3isp/ispvideo.c+13 -00 replies
20/35omap3isp: Move definitions required by board code under include/media.drivers/media/video/omap3isp/isp.h include/media/omap3isp.h+4 -40 replies
21/35omap3: add definition for CONTROL_CAMERA_PHY_CTRLarch/arm/mach-omap2/control.h+1 -00 replies
22/35omap3isp: Move setting constaints above media_entity_pipeline_startdrivers/media/video/omap3isp/ispvideo.c+7 -70 replies
23/35omap3isp: Assume media_entity_pipeline_start may faildrivers/media/video/omap3isp/ispvideo.c+28 -241 reply
24/35omap3isp: Add lane configuration to platform datadrivers/media/video/omap3isp/ispcsiphy.h include/media/omap3isp.h+27 -130 replies
25/35omap3isp: Collect entities that are part of the pipelinedrivers/media/video/omap3isp/ispvideo.c drivers/media/video/omap3isp/ispvideo.h+10 -04 replies
25/35omap3isp: Collect entities that are part of the pipelinedrivers/media/video/omap3isp/ispvideo.c drivers/media/video/omap3isp/ispvideo.h+27 -231 reply
25/35omap3isp: Collect entities that are part of the pipelinedrivers/media/video/omap3isp/ispvideo.c drivers/media/video/omap3isp/ispvideo.h+27 -230 replies
25/35omap3isp: Collect entities that are part of the pipelinedrivers/media/video/omap3isp/ispvideo.c drivers/media/video/omap3isp/ispvideo.h+35 -280 replies
25/35omap3isp: Collect entities that are part of the pipelinedrivers/media/video/omap3isp/ispvideo.c drivers/media/video/omap3isp/ispvideo.h+34 -251 reply
26/35omap3isp: Add information on external subdev to struct isp_pipelinedrivers/media/video/omap3isp/ispvideo.h+3 -00 replies
27/35omap3isp: Introduce isp_video_check_external_subdevs()drivers/media/video/omap3isp/ispvideo.c+75 -04 replies
27/35omap3isp: Introduce isp_video_check_external_subdevs()drivers/media/video/omap3isp/ispvideo.c+79 -00 replies
27/35omap3isp: Introduce isp_video_check_external_subdevs()drivers/media/video/omap3isp/ispvideo.c+79 -01 reply
28/35omap3isp: Use external rate instead of vpcfgdrivers/media/video/omap3isp/isp.c drivers/media/video/omap3isp/isp.h drivers/media/video/omap3isp/ispccdc.c +2 more+3 -303 replies
29/35omap3isp: Default link validation for ccp2, csi2, preview and resizerdrivers/media/video/omap3isp/ispccp2.c drivers/media/video/omap3isp/ispcsi2.c drivers/media/video/omap3isp/isppreview.c +1 more+4 -00 replies
30/35omap3isp: Move CCDC link validation to ccdc_link_validate()drivers/media/video/omap3isp/ispccdc.c drivers/media/video/omap3isp/ispvideo.c+76 -832 replies
31/35omap3isp: Configure CSI-2 phy based on platform datadrivers/media/video/omap3isp/isp.h drivers/media/video/omap3isp/ispcsiphy.c drivers/media/video/omap3isp/ispcsiphy.h+97 -840 replies
32/35omap3isp: Add resizer data rate configuration to resizer_link_validatedrivers/media/video/omap3isp/ispresizer.c drivers/media/video/omap3isp/ispvideo.c+15 -541 reply
33/35omap3isp: Find source pad from external entitydrivers/media/video/omap3isp/isp.c+12 -12 replies
34/35smiapp: Generic SMIA++/SMIA PLL calculatordrivers/media/video/Kconfig drivers/media/video/Makefile drivers/media/video/smiapp-pll.c +15 more+5224 -02 replies
34/35smiapp: Generic SMIA++/SMIA PLL calculatordrivers/media/video/Kconfig drivers/media/video/Makefile drivers/media/video/smiapp-pll.c +1 more+527 -02 replies
34/35smiapp: Generic SMIA++/SMIA PLL calculatordrivers/media/video/Kconfig drivers/media/video/Makefile drivers/media/video/smiapp-pll.c +1 more+525 -01 reply
35/35rm680: Add camera initarch/arm/mach-omap2/Makefile arch/arm/mach-omap2/board-rm680-camera.c arch/arm/mach-omap2/board-rm680.c+415 -10 replies
35/35smiapp: Add driverdrivers/media/video/Kconfig drivers/media/video/Makefile drivers/media/video/smiapp-pll.c +14 more+4693 -04 replies
35/35smiapp: Add driverdrivers/media/video/Kconfig drivers/media/video/Makefile drivers/media/video/smiapp-pll.c +14 more+4698 -02 replies
35/35smiapp: Add driverdrivers/media/video/Kconfig drivers/media/video/Makefile drivers/media/video/smiapp-pll.c +14 more+4699 -01 reply

Reviews trailers per patch

42 of 46 patches have a Reviewed-by or Acked-by.

PatchLaurent PinchartSylwester NawrockiPrabhakar Lad
1/35A-b T-b
2/35A-b
3/35A-b
4/35A-b
5/35A-b
6/35A-b
7/35A-b
8/35A-b
9/35A-b
10/35A-b
11/35
12/35
13/35
14/35A-b
15/35A-b
16/35A-b
17/35A-b
18/35
19/35A-b
20/35A-b
21/35A-b
22/35A-b
23/35A-b
24/35A-b
25/35A-b
25/35A-b
25/35A-b
25/35A-b
25/35A-b
26/35A-b
27/35A-b
27/35A-b
27/35A-b
28/35A-b
29/35A-b
30/35A-b
31/35A-b
32/35A-b
33/35A-b
34/35A-b
34/35A-b
34/35A-b
35/35A-b A-b
35/35A-b A-b
35/35A-b A-b
35/35A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/35] V4L2 subdev and sensor control changes, SMIA++ driver and N9 camera board code

Hi everyone,

This the fifth version of my patchset that contains:

- Integer menu controls [2],
- Selection IOCTL for subdevs [3],
- Sensor control changes [5,7],
- link_validate() media entity and V4L2 subdev pad ops,
- OMAP 3 ISP driver improvements [4],
- SMIA++ sensor driver,
- rm680/rm696 board code (a.k.a Nokia N9 and N950) and
- Other V4L2 and media improvements (see individual patches)

The Docbook documentation in HTML format can be found in [15] (v3 documentation available in [11] and v4 in [13]).

The issue with "ACTIVE" target names still needs to be addressed. The current proposal is "CURRENT". To be discussed on IRC.

Changes to version 4 [16]:

- V4L2 / V4L2 subdev
- Documentation
- Spelling fixes
- Red lines in diagrams dotted instead of solid
- Proper ordering of raw bayer formats

- SMIA++ driver
- PLL code separated from the actual driver
- Source pads are always zero now
- Error handling fixes in nvm reading
- Try format pixel code handling fixes
- Miscellaneous code cleanups

- Media controller
- Dropped the patch to find entities; moved to omap3isp driver instead

- OMAP 3 ISP
- Find out external entity's pad number, don't assume zero (new patch)
- Small cleanups
- Entities in pipeline stored in struct isp_pipeline

Changes to version 3 [12] include:

- OMAP 3 ISP
- Rework ISP driver patches
- Remove code from isp_video_pipeline_validate in same patch as the functionality is added elsewhere (old patch to remove leftovers dropped)
- isp_video_streamon() error handling cleanups
- All pipeline validation performed before any s_straem subdev ops
- Resizer data rate check moved to link validation
- CCDC rate checked in isp_video_check_external_subdeva()
- Formats checked during link validation
- Remove means to set pixel rate (new patch)
- Don't set link_validate pad ops where the default is sufficient

- Media controller
- media_entity_pipeline_start() collects information on entities in pipeline
- link validation error handling fix

- V4L2 / V4L2 subdev
- Less confusing selection example diagrams
- Selection documentation improvements (as also suggested by Laurent)

- SMIA++ driver
- Fixes according to Laurent's suggestions [14]
- Locking fixes and power handling cleanups

Changes to version 2 [10] include:

- V4L2
- Image source controls
- Documentation no longer refers to "pixel clock" in v4l2_mbus_framefmt (this should have been the last reference to those!!)
- Capitalise first letters in control names
- Selections
- Use hex numbers for targets
- Return NULL instead of invalid pointer when accessing non-existend pads in v4l2_subdev_get_try_{format,crop,compose} (new patch)
- Put link validation definitions in v4l2-subdev.h behind

    #ifdef CONFIG_MEDIA_CONTROLLER ... #endif

- Spelling fixes (selections and 4cc guidelines)
- Change vdev_to_v4l2_subdev() return type to struct v4l2_subdev * (new patch)

- SMIA++ driver
- Clock tree calculation fixes
- Control handler setup usage fixes at smiapp_open()
- Don't access non-existent pads

Changes to version 1 [8] include:

- OMAP 3 ISP driver
- Swapped order of csi receiver's lane definitions
- Rewrote omap 3 isp link validation patches almost completely
- Information on connected external entity collected to isp_pipeline
- Information collected during link checking and used at streamon

- Media entity link validation
- Error handling fixes

- SMIA++ driver
- Selection API bugfixes
- Report correct pixel order right from boot
- Move link rate control to subdev connected to subdev external to the sensor (e.g. ISP's CSI-2 receiver)
- Introduce proper serialisation
- Deny changing some controls when streaming (flipping and link rate)
- Control handler setup moved from streamon time to first subdev open
- There is no source compose target
- Bugfixes

- Media bus pixel codes
- Documentation fix for dpcm compressed formats
- Added patch for 4CC guidelines (raw bayer only for now)

- Selections
- Improved selections documentation
- Added more selections examples
- Compose target is not available on source pads anymore [9]
- Dropped default targets

- V4L2
- Add documentation on link_validate()
- link_validate() and relater functions depends on
CONFIG_MEDIA_CONTROLLER
- Skip link validation for links on which stream_count was non-zero
- Do not validate link if entity's stream count is non-zero
- Use v4l2_subdev_link_validate_default() if no link_validate pad op
is set
- Allow changing control handler mutex: this enables a driver to provide multiple subdevs but use only one mutex. Default mutex (part of struct v4l2_ctrl_handler) is set in v4l2_ctrl_handler_init().
- Split image source class into two: image source and image processing

Changes to the RFC v1 [6] include:

- Integer controls:
- Target Linux 3.4 instead of 3.3
- Proper control type check in querymenu
- vivi compile fixes

- Subdev selections
- Pad try fields combined to single struct
- Correctly set sel.which based on crop->which in crop fall-back

- Subdev selection documentation
- Better explanation on image processing in subdevs
- Added a diagram to visualise subdev configuration
- Fixed DocBook syntax issues
- Mark VIDIOC_SUBDEV_S_CROP and VIDIOC_SUBDEV_G_CROP obsolete

- Pixel rate
- Pixel rate is now a 64-bit control, not part of v4l2_mbus_framefmt
- Unit for pixel rate is pixels / second
- Pixel rate is read-only

- Link frequency is now in Hz --- documented as such also

- Link validation instead of pipeline validation
- Each link is validated by calling link_validate op
- Added link validation op to media_entity_ops
- Link validation op in pad ops makes this easy for subdev drivers
- media_entity_pipeline_start() may return an error code now
- This might affect other drivers, but will warn in compilation. No adverse effects are caused if the driver does not use link_validate().

- OMAP 3 ISP
- Make lanecfg as part of the platform data structure, not pointer
- Document lane configuration structures
- Link validation moved to respective subdev drivers from ispvideo.c
- isp_validate_pipeline() removed

- SMIA++ driver
- Update pixel order based on vflip and hflip
- Cleanups in the main driver, register definitions and PLL code
- Depend on V4L2_V4L2_SUBDEV_API and MEDIA_CONTROLLER
- Use pr_* macros instead of printk
- Improved error handling for i2c_transfer()
- Removed useless definitions
- Don't access try crop / compose directly but use helper functions
- Add xshutdown to platform data
- Move driver under smiapp directory

- rm680 board code
- Use REGULATOR_SUPPLY() where possible
- Removed printk()'s
- Don't include private smiapp headers

References:

[1] http://www.spinics.net/lists/linux-omap/msg61295.html

[2] http://www.spinics.net/lists/linux-media/msg40796.html

[3] http://www.spinics.net/lists/linux-media/msg41503.html

[4] http://www.spinics.net/lists/linux-media/msg41542.html

[5] http://www.spinics.net/lists/linux-media/msg40861.html

[6] http://www.spinics.net/lists/linux-media/msg41765.html

[7] http://www.spinics.net/lists/linux-media/msg42848.html

[8] http://www.spinics.net/lists/linux-media/msg42991.html

[9] http://www.spinics.net/lists/linux-media/msg43810.html

[10] http://www.spinics.net/lists/linux-media/msg43888.html

[11] http://www.retiisi.org.uk/v4l2/tmp/media_api/

[12] http://www.spinics.net/lists/linux-media/msg44405.html

[13] http://www.retiisi.org.uk/v4l2/tmp/media_api2/

[14] http://www.spinics.net/lists/linux-media/msg44704.html

[15] http://wwww.retiisi.org.uk/v4l2/tmp/media_api3/

[16] http://www.spinics.net/lists/linux-media/msg44843.html

Kind regards,

Signature · 2 lines
Sakari Ailus
[email protected]