[PATCH v3 0/9] rkisp1: Support BLS on i.MX8MP

Jacopo Mondi jacopo.mondi at ideasonboard.com
Mon Aug 26 18:16:59 CEST 2024


The series was sent by Laurent as
[PATCH v2 00/11] rkisp1: Support BLS on i.MX8MP
but it's actually more than BLS.

Now that support for extensible parameters has been merged in linux-media
staging tree, we can update libcamera to make use of them when available.

Below, the original cover letter from Laurent

-------------------------------------------------------------------------------
This patch series adds support for black level subtraction to the
rkisp1 on i.MX8MP. While the rkisp1 IPA already supports black level
subtraction, the i.MX8MP lacks the BLS block in the ISP and instead
implements black level substraction in a new block named companding.
Support for this block has been submitted for the kernel driver in [1]
and [2], which this series depends on.

The first part of this series adds support in the rkisp1 pipeline
handler and IPA module for the new ISP extensible parameters format
introduced in [1]. The first two patches start by adding the driver API
extensions to the rkisp1-config.h header (01/11) and the new V4L2 pixel
format (02/11). The next two patches then prepare the rkisp1 IPA module
interface to pass the parameters buffer format from the pipeline handler
to the IPA module (03/11), and the size of the filled buffer from the
IPA module to the pipeline handler (04/11). With that in place, patch
05/11 adds classes that abstract the ISP parameters buffer in order to
support the legacy fixed format and the new extensible format
transparently for the IPA module's algorithms, and patch 06/11 makes use
of those classes through the IPA module. Patch 07/11 finishes the first
part by switching to the extensible format by default when available.

The second part of the series then implements support for BLS on the
i.MX8MP. Patch 08/11 updates the rkisp1-config.h header to the kernel
API from [2] with support for the companding block, and patch 09/11
updates the rkisp1 parameters helper classes with support for the block.
Patch 10/11 adds a flag to the IPA context to signal support for the
companding block, and patch 11/11 makes use of it in the black level
correction algorithm to select between the BLS and companding blocks
depending on the platform.

[1] https://lore.kernel.org/r/20240703161048.247124-1-jacopo.mondi@ideasonboard.com
[2] https://lore.kernel.org/r/20240704154932.6686-1-laurent.pinchart@ideasonboard.com
-------------------------------------------------------------------------------


Jacopo Mondi (4):
  include: rkisp1: Update header for extensible parameters
  include: videodev2: Add V4L2_META_FMT_RK_ISP1_EXT_PARAMS
  ipa: rkisp1: Pass parameters buffer size to pipeline handler
  pipeline: rkisp1: Use the extensible parameters format

Laurent Pinchart (3):
  ipa: rkisp1: Pass parameters buffer format to IPA module
  ipa: rkisp1: Add ISP parameters abstraction class
  ipa: rkisp1: Use the new ISP parameters abstraction

Paul Elder (2):
  ipa: rkisp1: Add compand feature flag to ipa context
  ipa: rkisp1: blc: Add support for BLS in compand

 include/libcamera/ipa/rkisp1.mojom       |   3 +-
 include/linux/rkisp1-config.h            | 578 +++++++++++++++++++++++
 include/linux/videodev2.h                |   1 +
 src/ipa/rkisp1/algorithms/agc.cpp        |  48 +-
 src/ipa/rkisp1/algorithms/agc.h          |   2 +-
 src/ipa/rkisp1/algorithms/awb.cpp        |  60 +--
 src/ipa/rkisp1/algorithms/awb.h          |   2 +-
 src/ipa/rkisp1/algorithms/blc.cpp        |  36 +-
 src/ipa/rkisp1/algorithms/blc.h          |   3 +-
 src/ipa/rkisp1/algorithms/ccm.cpp        |  15 +-
 src/ipa/rkisp1/algorithms/ccm.h          |   4 +-
 src/ipa/rkisp1/algorithms/cproc.cpp      |  14 +-
 src/ipa/rkisp1/algorithms/cproc.h        |   2 +-
 src/ipa/rkisp1/algorithms/dpcc.cpp       |  10 +-
 src/ipa/rkisp1/algorithms/dpcc.h         |   2 +-
 src/ipa/rkisp1/algorithms/dpf.cpp        |  27 +-
 src/ipa/rkisp1/algorithms/dpf.h          |   2 +-
 src/ipa/rkisp1/algorithms/filter.cpp     |  56 ++-
 src/ipa/rkisp1/algorithms/filter.h       |   2 +-
 src/ipa/rkisp1/algorithms/goc.cpp        |  17 +-
 src/ipa/rkisp1/algorithms/goc.h          |   2 +-
 src/ipa/rkisp1/algorithms/gsl.cpp        |  20 +-
 src/ipa/rkisp1/algorithms/gsl.h          |   2 +-
 src/ipa/rkisp1/algorithms/lsc.cpp        |  29 +-
 src/ipa/rkisp1/algorithms/lsc.h          |   4 +-
 src/ipa/rkisp1/ipa_context.h             |   1 +
 src/ipa/rkisp1/meson.build               |   1 +
 src/ipa/rkisp1/module.h                  |   3 +-
 src/ipa/rkisp1/params.cpp                | 222 +++++++++
 src/ipa/rkisp1/params.h                  | 163 +++++++
 src/ipa/rkisp1/rkisp1.cpp                |  28 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp |  10 +-
 32 files changed, 1169 insertions(+), 200 deletions(-)
 create mode 100644 src/ipa/rkisp1/params.cpp
 create mode 100644 src/ipa/rkisp1/params.h

--
2.45.2



More information about the libcamera-devel mailing list