linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] media: rkisp1: Implement support for extensible parameters
@ 2024-06-05 16:54 Jacopo Mondi
  2024-06-05 16:54 ` [PATCH 1/8] uapi: rkisp1-config: Add extensible parameters format Jacopo Mondi
                   ` (7 more replies)
  0 siblings, 8 replies; 38+ messages in thread
From: Jacopo Mondi @ 2024-06-05 16:54 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: Jacopo Mondi, Laurent Pinchart, Sakari Ailus, Hans Verkuil,
	Stefan Klug, Paul Elder, Daniel Scally, Kieran Bingham,
	Umang Jain, Dafna Hirschfeld, Mauro Carvalho Chehab,
	Heiko Stuebner

The VeriSilicon ISP8000 IP, supported through the rkisp1 driver in the Linux
kernel, is integrated in several SoCs from different vendors. Different
revisions of the IP differ in the number of supported features and in the
register space location assigned to specific ISP blocks.

The current configuration parameters format, defined in
include/uapi/linux/rkisp1-config.h is realized by a C structure (struct
rkisp1_params_cfg) which wraps other structures that allows to configure
specific ISP blocks. The layout of the parameters buffer is part of the Linux
kernel uAPI and can hardly be extended or modified to adapt it to different
revisions of the same IP.

This series proposes the introduction of a new parameters format for the RkISP1
(without dropping support for the existing one) which is designed with the goals
of being:

1) versioned: can be changed without breaking existing applications
2) extensible: new blocks and parameters can be added without breaking the uABI

To do so, a new 'struct rkisp1_ext_params_cfg' type is introduced. It wraps an
header and a data buffer, which userspace fills with configuration blocks
for each ISP block it intends to configure. The parameters buffer is thus of
different effective sizes, depending on the number of blocks userspace intends
to configure.

The kernel driver parses the data block and decides, based on the versioning
number and the platform it operates on, how to handle each block.

The parameters format is very similar to the parameters format implemented
in the in-review Mali C55 ISP driver [1]

I considered sending this out as RFC, but the implementation has been tested
with a libcamera version ported to use the newly introduced format [1] and works
as expected, so I considered it good enough to send a proper patch series

A kernel branch for the interested ones is available at [3] with an associated
CI pipeline [4]

[1] https://lore.kernel.org/linux-media/20240529152858.183799-15-dan.scally@ideasonboard.com/
[2] https://gitlab.freedesktop.org/camera/libcamera/-/commits/imx8mp/extensible-format?ref_type=heads
[3] https://gitlab.freedesktop.org/linux-media/users/jmondi/-/commits/imx8mp/media-state/extensible-format
[4] https://gitlab.freedesktop.org/linux-media/users/jmondi/-/pipelines/1194073

Jacopo Mondi (8):
  uapi: rkisp1-config: Add extensible parameters format
  uapi: videodev2: Add V4L2_META_FMT_RK_ISP1_EXT_PARAMS
  media: rkisp1: Remove cached format info
  media: rkisp1: Add support for ext format
  media: rkisp1: Implement extensible params support
  media: rkisp1: Propagate pre/post-config errors
  media: rkisp1: Add struct rkisp1_params_buffer
  media: rkisp1: Copy and validate parameters buffer

 Documentation/admin-guide/media/rkisp1.rst    |  11 +-
 .../media/v4l/metafmt-rkisp1.rst              |  62 +-
 .../platform/rockchip/rkisp1/rkisp1-common.h  |  29 +-
 .../platform/rockchip/rkisp1/rkisp1-isp.c     |  14 +-
 .../platform/rockchip/rkisp1/rkisp1-params.c  | 795 ++++++++++++++++--
 drivers/media/v4l2-core/v4l2-ioctl.c          |   1 +
 include/uapi/linux/rkisp1-config.h            | 482 +++++++++++
 include/uapi/linux/videodev2.h                |   1 +
 8 files changed, 1314 insertions(+), 81 deletions(-)


base-commit: 1aea3d1d4a21e3e7895663b848ffae79ee82e065
--
2.45.1


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

end of thread, other threads:[~2024-06-20  9:42 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 16:54 [PATCH 0/8] media: rkisp1: Implement support for extensible parameters Jacopo Mondi
2024-06-05 16:54 ` [PATCH 1/8] uapi: rkisp1-config: Add extensible parameters format Jacopo Mondi
2024-06-12 10:02   ` Dan Scally
2024-06-12 12:56     ` Laurent Pinchart
2024-06-12 13:49       ` Dan Scally
2024-06-12 14:56         ` Laurent Pinchart
2024-06-19 12:44       ` Jacopo Mondi
2024-06-19 15:49         ` Laurent Pinchart
2024-06-05 16:54 ` [PATCH 2/8] uapi: videodev2: Add V4L2_META_FMT_RK_ISP1_EXT_PARAMS Jacopo Mondi
2024-06-12 10:00   ` Dan Scally
2024-06-12 14:35     ` Laurent Pinchart
2024-06-12 15:09       ` Dan Scally
2024-06-20  9:31   ` Paul Elder
2024-06-05 16:54 ` [PATCH 3/8] media: rkisp1: Remove cached format info Jacopo Mondi
2024-06-12 10:06   ` Dan Scally
2024-06-12 14:47   ` Laurent Pinchart
2024-06-20  9:41   ` Paul Elder
2024-06-05 16:54 ` [PATCH 4/8] media: rkisp1: Add support for ext format Jacopo Mondi
2024-06-12 10:46   ` Dan Scally
2024-06-12 14:51     ` Laurent Pinchart
2024-06-05 16:54 ` [PATCH 5/8] media: rkisp1: Implement extensible params support Jacopo Mondi
2024-06-12 13:50   ` Dan Scally
2024-06-12 15:42     ` Laurent Pinchart
2024-06-19 15:46       ` Jacopo Mondi
2024-06-19 16:09         ` Laurent Pinchart
2024-06-05 16:54 ` [PATCH 6/8] media: rkisp1: Propagate pre/post-config errors Jacopo Mondi
2024-06-12 13:35   ` Dan Scally
2024-06-12 15:46     ` Laurent Pinchart
2024-06-05 16:54 ` [PATCH 7/8] media: rkisp1: Add struct rkisp1_params_buffer Jacopo Mondi
2024-06-12 13:52   ` Dan Scally
2024-06-05 16:54 ` [PATCH 8/8] media: rkisp1: Copy and validate parameters buffer Jacopo Mondi
2024-06-12 14:28   ` Dan Scally
2024-06-12 16:20     ` Laurent Pinchart
2024-06-19 14:22       ` Jacopo Mondi
2024-06-19 15:44         ` Laurent Pinchart
2024-06-19 15:55           ` Jacopo Mondi
2024-06-19 16:11             ` Laurent Pinchart
2024-06-19 16:20               ` Jacopo Mondi

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).