media: Introduce V4L2 generic ISP support
Get series with b4
b4 am 20251108-extensible-parameters-validation-v9-0-6a7e22aa57d0@ideasonboard.com change-id 20250701-extensible-parameters-validation-c831f7f5cc0bVersions newest first
- v9 Latest8 patches 1 replyIn review
- v88 patches 8 repliesSuperseded
- v78 patches 7 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 8 patches | 0 replies | Superseded | |
| v5 | 8 patches | 23 replies | Superseded | |
| v4 | 8 patches | 11 replies | Superseded | |
| v3 | 8 patches | 6 replies | Superseded | |
| v2 | 8 patches | 10 replies | Superseded | |
| v1 | 8 patches | 15 replies | Superseded |
Changes in v9 from the cover letter
- Modify the RkISP1 and C3 params drivers to enumerate their block info
with macros (and static_assert they're of the correct size)
- Modify documentation according to Laurent's suggestion
- Link to v8: https://lore.kernel.org/r/20251020-extensible-parameters-validation-v8-0-afba4ba7b42d@ideasonboard.com
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | media: uapi: Introduce V4L2 generic ISP typesMAINTAINERS include/ | +108 | 0 replies | |
| 2/8 | media: uapi: Convert RkISP1 to V4L2 extensible paramsinclude/ | +24 | 0 replies | |
| 3/8 | media: uapi: Convert Amlogic C3 to V4L2 extensible paramsinclude/ | +24 | 0 replies | |
| 4/8 | media: Documentation: uapi: Add V4L2 ISP documentationDocumentation/ Documentation/ MAINTAINERS | +69 | 0 replies | |
| 5/8 | media: v4l2-core: Introduce v4l2-isp.cMAINTAINERS drivers/ drivers/ +2 more | +226 | 1 reply | |
| 6/8 | media: rkisp1: Use v4l2-isp for validationdrivers/ drivers/ | +44 | 0 replies | |
| 7/8 | media: amlogic-c3: Use v4l2-isp for validationdrivers/ drivers/ | +44 | 0 replies | |
| 8/8 | media: Documentation: kapi: Add v4l2 generic ISP supportDocumentation/ Documentation/ MAINTAINERS | +51 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Daniel Scally | Laurent Pinchart | Michael Riesch | Sakari Ailus | Lad Prabhakar | Keke Li |
|---|---|---|---|---|---|---|
| 1/8 | R-b | R-b | R-b | A-b | T-b | |
| 2/8 | R-b | R-b | R-b | A-b | T-b | |
| 3/8 | R-b | R-b | A-b | T-b | R-b | |
| 4/8 | R-b | R-b | R-b | A-b | T-b | |
| 5/8 | R-b | R-b | R-b | A-b | T-b | |
| 6/8 | R-b | R-b | A-b | T-b | ||
| 7/8 | R-b | R-b | A-b | T-b | R-b | |
| 8/8 | R-b | R-b | R-b | A-b | T-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 6 reviewers.
Cover letter [PATCH v9 0/8] media: Introduce V4L2 generic ISP support
Extensible parameters meta formats have been introduced in the Linux kernel v6.12 initially to support different revision of the RkISP1 ISP implemented in different SoC. In order to avoid breaking userspace everytime an ISP configuration block is added or modified in the uAPI these new formats, which are versionated and extensible by their definition have been introduced.
See for reference:e9d05e9d5db1 ("media: uapi: rkisp1-config: Add extensible params format") 6c53a7b68c5d ("media: rkisp1: Implement extensible params support")
The Amlogic C3 ISP driver followed shortly, introducing an extensible format for the ISP configuration:
6d406187ebc0 ("media: uapi: Add stats info and parameters buffer for C3 ISP")
with a very similar, if not identical, implementation of the routines to validate and handle the ISP configuration in the ISP driver in the c3-isp-params.c file.
fb2e135208f3 ("media: platform: Add C3 ISP driver")
With the recent upstreaming attempt of the Mali C55 ISP driver from Dan, a third user of extensible parameters is going to be itroduced in the kernel, duplicating again in the driver the procedure for validating and handling the ISP configuration blocks
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
To avoid duplicating again the validation routines and common types definition, this series introduces v4l2-isp.c/.h for the kAPI and v4l2-isp.h for the uAPI and re-organize the RkISP1
and Amlogic C3 drivers to use the common types and the helper validation routines.
The v4l2-isp abstraction will be augmented to support statistcs as well.
If the here proposed approach is accepted, I propose to rebase the Mali C55 driver on top of this series, to use the new common types and helpers.
Tested on Mali C55 and RkISP1 with camshark
Thanks
j
---
Changes in v9:
- Modify the RkISP1 and C3 params drivers to enumerate their block info
with macros (and static_assert they're of the correct size)
- Modify documentation according to Laurent's suggestion
- Link to v8: https://lore.kernel.org/r/20251020-extensible-parameters-validation-v8-0-afba4ba7b42d@ideasonboard.com
Changes in v8:
- Address Michael comments and reword documentation
- Use the correct "metadata capture" for stats and "metadata output" for
parameters. I mixed up the two in the previous revisions.
- Link to v7: https://lore.kernel.org/r/20251014-extensible-parameters-validation-v7-0-6628bed5ca98@ideasonboard.com
Changes in v7:
- Moved version to the v4l2-isp uAPI
- Moved version check to the v4l2-isp.c helpers
- Link to v6: https://lore.kernel.org/r/20251007-extensible-parameters-validation-v6-0-5f719d9f39e5@ideasonboard.com
Changes in v6:
- Rename all symbols to v4l2_isp
- Changed the interface of the two buffer validation functions
- Reworked the rkisp1 and c3 porting accordingly
- Updated documentation
- I have moved v4l2_params_buffer_size() from uAPI because it was
convenient for linux but not required in userspace
- Link to v5: https://lore.kernel.org/r/20250915-extensible-parameters-validation-v5-0-e6db94468af3@ideasonboard.com
Changes in v5:
- Move everything to v4l2-isp prefix except from format documentation
which still is about 'extensible-parameters' (to be paired in future
with extensbile-stats)
- Simplify documentation and move it part to the driver-api
Documentation
- Remove 'group' and 'features' from the generic handlers definition and
adjust rkisp1 accordingly
- Link to v4: https://lore.kernel.org/r/20250820-extensible-parameters-validation-v4-0-30fe5a99cb1f@ideasonboard.com
Changes in v4:
- Fix the definition of V4L2_PARAMS_FL_PLATFORM_FLAGS
- Add __counted_by() attribute to the data[] flexible-array member of
v4l2_params_buffer
- Minor style change
- Link to v3: https://lore.kernel.org/r/20250819-extensible-parameters-validation-v3-0-9dc008348b30@ideasonboard.com
Changes in v3:
- Rebased on latest media-committers/next
- Take in Dan's suggestion in block size validation
- Documentation minor spelling fixes
- Link to v2: https://lore.kernel.org/r/20250710-extensible-parameters-validation-v2-0-7ec8918ec443@ideasonboard.com
Changes in v2:
- Make v4l2_params_buffer directly usable
- Centralize ENABLE/DISABLE flags definition and validation
- Take in Dan's v4l2_params_buffer_size()
- Allow blocks to only contain the header if they're going to be
disabled
- Documentation fixes as reported by Nicolas
- Link to v1: https://lore.kernel.org/r/20250708-extensible-parameters-validation-v1-0-9fc27c9c728c@ideasonboard.com
---
Jacopo Mondi (8):
media: uapi: Introduce V4L2 generic ISP types
media: uapi: Convert RkISP1 to V4L2 extensible params
media: uapi: Convert Amlogic C3 to V4L2 extensible params
media: Documentation: uapi: Add V4L2 ISP documentation
media: v4l2-core: Introduce v4l2-isp.c
media: rkisp1: Use v4l2-isp for validation
media: amlogic-c3: Use v4l2-isp for validation
media: Documentation: kapi: Add v4l2 generic ISP support
Documentation/driver-api/media/v4l2-core.rst | 1 + Documentation/driver-api/media/v4l2-isp.rst | 49 ++++++ .../userspace-api/media/v4l/meta-formats.rst | 1 + Documentation/userspace-api/media/v4l/v4l2-isp.rst | 67 +++++++++ MAINTAINERS | 10 ++ drivers/media/platform/amlogic/c3/isp/Kconfig | 1 + .../media/platform/amlogic/c3/isp/c3-isp-params.c | 165 ++++++--------------- drivers/media/platform/rockchip/rkisp1/Kconfig | 1 + .../media/platform/rockchip/rkisp1/rkisp1-params.c | 150 ++++++------------- drivers/media/v4l2-core/Kconfig | 4 + drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-core/v4l2-isp.c | 128 ++++++++++++++++ include/media/v4l2-isp.h | 91 ++++++++++++ include/uapi/linux/media/amlogic/c3-isp-config.h | 92 +++--------- include/uapi/linux/media/v4l2-isp.h | 102 +++++++++++++ include/uapi/linux/rkisp1-config.h | 107 +++---------- 16 files changed, 590 insertions(+), 380 deletions(-)
---
base-commit: b4fbb13db86adb0bae1d7f968b61ea8dc9635e33
change-id: 20250701-extensible-parameters-validation-c831f7f5cc0b
Best regards,
Signature · 1 line
Jacopo Mondi <[email protected]>