linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] media: Introduce V4L2 extensible parameters
@ 2025-07-08 10:40 Jacopo Mondi
  2025-07-08 10:40 ` [PATCH 1/8] media: uapi: Introduce V4L2 extensible params Jacopo Mondi
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Jacopo Mondi @ 2025-07-08 10:40 UTC (permalink / raw)
  To: Dafna Hirschfeld, Laurent Pinchart, Keke Li,
	Mauro Carvalho Chehab, Heiko Stuebner, Dan Scally, Sakari Ailus
  Cc: linux-kernel, linux-media, linux-rockchip, linux-arm-kernel,
	Jacopo Mondi

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/20250624-c55-v10-15-54f3d4196990@ideasonboard.com/

To avoid duplicating again the validation routines and common types
definition, this series introduces v4l2-params.c/.h for the kAPI
and v4l2-extensible-params.h for the uAPI and re-organize the RkISP1
and Amlogic C3 drivers to use the common types and the helper validation
routines.

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.

I have been able to test this on RkISP1 but not on C3.
Keke: would you be able to give this series a try and see what happens ?

Media CI pipeline:
https://gitlab.freedesktop.org/linux-media/users/jmondi/-/pipelines/1465950

Thanks
  j

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
Jacopo Mondi (8):
      media: uapi: Introduce V4L2 extensible params
      media: uapi: Convert RkISP1 to V4L2 extensible params
      media: uapi: Convert Amlogic C3 to V4L2 extensible params
      media: Documentation: uapi: Add V4L2 extensible parameters
      media: v4l2-common: Introduce v4l2-params.c
      media: rkisp1: Use v4l2-params for validation
      media: amlogic-c3: Use v4l2-params for validation
      media: Documentation: kapi: Add v4l2 extensible parameters

 Documentation/driver-api/media/v4l2-core.rst       |   1 +
 Documentation/driver-api/media/v4l2-params.rst     |   5 +
 .../media/v4l/extensible-parameters.rst            |  89 +++++
 .../userspace-api/media/v4l/meta-formats.rst       |   1 +
 MAINTAINERS                                        |  10 +
 .../media/platform/amlogic/c3/isp/c3-isp-params.c  | 272 ++++++---------
 .../media/platform/rockchip/rkisp1/rkisp1-params.c | 364 +++++++++------------
 drivers/media/v4l2-core/Makefile                   |   3 +-
 drivers/media/v4l2-core/v4l2-params.c              | 106 ++++++
 include/media/v4l2-params.h                        | 166 ++++++++++
 include/uapi/linux/media/amlogic/c3-isp-config.h   |  45 +--
 include/uapi/linux/media/v4l2-extensible-params.h  | 106 ++++++
 include/uapi/linux/rkisp1-config.h                 |  60 +---
 13 files changed, 775 insertions(+), 453 deletions(-)
---
base-commit: a8598c7de1bcd94461ca54c972efa9b4ea501fb9
change-id: 20250701-extensible-parameters-validation-c831f7f5cc0b

Best regards,
-- 
Jacopo Mondi <jacopo.mondi@ideasonboard.com>


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-07-10 14:48 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 10:40 [PATCH 0/8] media: Introduce V4L2 extensible parameters Jacopo Mondi
2025-07-08 10:40 ` [PATCH 1/8] media: uapi: Introduce V4L2 extensible params Jacopo Mondi
2025-07-09  5:59   ` kernel test robot
2025-07-09 11:33   ` Dan Scally
2025-07-09 11:53     ` Jacopo Mondi
2025-07-09 13:18       ` Dan Scally
2025-07-10  7:15         ` Jacopo Mondi
2025-07-10  9:10           ` Jacopo Mondi
2025-07-09 18:59   ` Nicolas Dufresne
2025-07-08 10:40 ` [PATCH 2/8] media: uapi: Convert RkISP1 to " Jacopo Mondi
2025-07-09 10:22   ` kernel test robot
2025-07-08 10:40 ` [PATCH 3/8] media: uapi: Convert Amlogic C3 " Jacopo Mondi
2025-07-10  2:32   ` Keke Li
2025-07-10  6:44     ` Jacopo Mondi
2025-07-10  6:59       ` Keke Li
2025-07-08 10:40 ` [PATCH 4/8] media: Documentation: uapi: Add V4L2 extensible parameters Jacopo Mondi
2025-07-08 10:40 ` [PATCH 5/8] media: v4l2-common: Introduce v4l2-params.c Jacopo Mondi
2025-07-09  6:20   ` kernel test robot
2025-07-10 12:42   ` Dan Scally
2025-07-10 13:04     ` Jacopo Mondi
2025-07-08 10:40 ` [PATCH 6/8] media: rkisp1: Use v4l2-params for validation Jacopo Mondi
2025-07-09 15:09   ` Dan Scally
2025-07-08 10:40 ` [PATCH 7/8] media: amlogic-c3: " Jacopo Mondi
2025-07-10  7:13   ` Keke Li
2025-07-08 10:40 ` [PATCH 8/8] media: Documentation: kapi: Add v4l2 extensible parameters Jacopo Mondi
2025-07-09 14:59   ` Dan Scally
2025-07-10  2:19 ` [PATCH 0/8] media: Introduce V4L2 " Keke Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).