[PATCH v7 00/18] media: Add support for R-Car ISP using Dreamchip RPPX1 ISP

Jai Luthra posted 18 patches 6 days, 6 hours ago
MAINTAINERS                                        |    7 +
drivers/media/platform/Kconfig                     |    1 +
drivers/media/platform/Makefile                    |    1 +
drivers/media/platform/dreamchip/Kconfig           |    3 +
drivers/media/platform/dreamchip/Makefile          |    6 +
drivers/media/platform/dreamchip/rppx1/Kconfig     |   12 +
drivers/media/platform/dreamchip/rppx1/Makefile    |   33 +
.../media/platform/dreamchip/rppx1/rpp_module.c    |   40 +
.../media/platform/dreamchip/rppx1/rpp_module.h    |  155 +++
.../media/platform/dreamchip/rppx1/rpp_params.c    |  122 +++
drivers/media/platform/dreamchip/rppx1/rpp_stats.c |   30 +
drivers/media/platform/dreamchip/rppx1/rppx1.c     |  338 +++++++
drivers/media/platform/dreamchip/rppx1/rppx1.h     |   99 ++
drivers/media/platform/dreamchip/rppx1/rppx1_acq.c |  147 +++
.../media/platform/dreamchip/rppx1/rppx1_awbg.c    |   62 ++
drivers/media/platform/dreamchip/rppx1/rppx1_bd.c  |  202 ++++
.../media/platform/dreamchip/rppx1/rppx1_bdrgb.c   |   80 ++
drivers/media/platform/dreamchip/rppx1/rppx1_bls.c |  169 ++++
drivers/media/platform/dreamchip/rppx1/rppx1_cac.c |   29 +
.../media/platform/dreamchip/rppx1/rppx1_ccor.c    |  173 ++++
drivers/media/platform/dreamchip/rppx1/rppx1_db.c  |  126 +++
.../media/platform/dreamchip/rppx1/rppx1_dpcc.c    |   76 ++
drivers/media/platform/dreamchip/rppx1/rppx1_exm.c |  126 +++
drivers/media/platform/dreamchip/rppx1/rppx1_ga.c  |   83 ++
.../media/platform/dreamchip/rppx1/rppx1_hist.c    |  249 +++++
.../media/platform/dreamchip/rppx1/rppx1_hist256.c |   46 +
drivers/media/platform/dreamchip/rppx1/rppx1_is.c  |   42 +
drivers/media/platform/dreamchip/rppx1/rppx1_lin.c |   91 ++
drivers/media/platform/dreamchip/rppx1/rppx1_lsc.c |  187 ++++
drivers/media/platform/dreamchip/rppx1/rppx1_ltm.c |   48 +
.../media/platform/dreamchip/rppx1/rppx1_ltmmeas.c |   41 +
.../media/platform/dreamchip/rppx1/rppx1_outif.c   |   45 +
.../media/platform/dreamchip/rppx1/rppx1_outregs.c |   75 ++
.../media/platform/dreamchip/rppx1/rppx1_rmap.c    |   64 ++
.../platform/dreamchip/rppx1/rppx1_rmapmeas.c      |   47 +
.../media/platform/dreamchip/rppx1/rppx1_shrp.c    |   64 ++
.../media/platform/dreamchip/rppx1/rppx1_wbmeas.c  |  179 ++++
.../media/platform/dreamchip/rppx1/rppx1_xyz2luv.c |   26 +
drivers/media/platform/renesas/rcar-isp/Kconfig    |    2 +
drivers/media/platform/renesas/rcar-isp/Makefile   |    2 +-
drivers/media/platform/renesas/rcar-isp/core-io.c  | 1017 ++++++++++++++++++++
drivers/media/platform/renesas/rcar-isp/core.c     |  826 ++++++++++++++++
drivers/media/platform/renesas/rcar-isp/csisp.c    |   46 +-
.../media/platform/renesas/rcar-isp/risp-core.h    |  170 ++++
drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
include/media/rppx1.h                              |   33 +
include/uapi/linux/media/dreamchip/rppx1-config.h  |  779 +++++++++++++++
include/uapi/linux/videodev2.h                     |    4 +
48 files changed, 6198 insertions(+), 7 deletions(-)
[PATCH v7 00/18] media: Add support for R-Car ISP using Dreamchip RPPX1 ISP
Posted by Jai Luthra 6 days, 6 hours ago
Hello,

This series adds support for two different devices that together enable
ISP support on Renesas R-Car Gen4 ISP processing. The first driver added
is for Dreamchip RPPX1 ISP, this device purely deals with image
processing algorithms, statistics and image conversion; but have no DMA
engines. The second driver is for the R-Car ISP CORE, this device
deals with DMA to/from the RPPX1 ISP and provides a V4L2 user-space
interface for the ISP.

The R-Car ISP driver uses the RPPX1 framework to drive the ISP and
together the two devices provide a functional ISP. For detailed
description of the RPPX1 see patch 3/18, and for details about the
R-Car ISP see commit message in patch 4/18.

All functional blocks present on the RPPX1 are not yet added to the
driver, but most are.

The RPPX1 ISP is similar in design to the RkISP1 already supported
upstream. The primary difference is around pipeline logic, and higher
precision configuration and statistic values supported by various
blocks. Along with that, there are some new features or minor
differences here and there.

Thus, this revision defines a completely new uAPI and buffer formats
from RkISP1 for RPPX1. See patches 1/18 and 2/18 for more details.

Patch 1/18 adds metadata formats for RPPX1 params and stats

Patch 2/18 adds the uAPI for configuring RPPX1 using V4L2 extensible
parameters

Patch 3/18 adds the foundation for the RPPX1 framework. It deals with
probing all function blocks making sure every blocks version register is
supported and setup a "passthru" pipeline that just debayer RAW images.

Patch 4/18 adds the R-Car ISP CORE DMA parts and integrates with the
RPPX1 framework.

Patches 5/18 to 18/18 extend the RPPX1 framework with the logic to
drive the different ISP modules.

For testing this series with the new uAPI, you can use this WIP
libcamera branch, which has mostly copied over the RkISP IPA and thus
still tuned with lower precision values but shifted to match the new
uAPI:
https://git.ideasonboard.com/renesas-v4h-isp/libcamera/commits/branch/jluthra/rppx1

Future revisions will add support for extensible statistics once the
design is finalized, currently WIP here:
https://lore.kernel.org/all/20260123080938.3367348-2-antoine.bouyer@nxp.com/

Changes in v7:
- Add new uAPI, parameter and statistics formats for RPPX1, no longer
  reusing RkISP1
- For each module:
    - Switch to RPPX1 uAPI
    - Support native precision for params and stats
    - Where module can support different precision for params depending
      upon the instantiation in hardware, use the biggest value for uAPI
      and scale it down in driver after reading the relevant hardware
      register
- EXM: Add [SQUASH] patch that supports changing the measurement point
  for AE stats, allows configuring the coefficients, and RGB input mode
- HIST: Add [SQUASH] patch that supports changing the measurement point
  for Histogram statistics
- LSC: Add [SQUASH] patch for describing full lens grid instead of only
  one quadrant
- Add support for Sensor (Gamma) Linearization module
- Link to v6: https://lore.kernel.org/all/20260314215944.3674865-1-niklas.soderlund+renesas@ragnatech.se/

Signed-off-by: Jai Luthra <jai.luthra+renesas@ideasonboard.com>
---
Jai Luthra (6):
      media: Add RPP_X1_PARAMS and RPP_X1_STATS meta formats
      media: uapi: Add extensible param and stats blocks for RPPX1
      [SQUASH] media: rppx1: exm: Expose coefficients, RGB mode and channel selection
      [SQUASH] media: rppx1: hist: Expose channel selection
      [SQUASH] media: rppx1: lsc: Make full lens grid programmable
      media: rppx1: Add support for Sensor (Gamma) Linearization

Niklas Söderlund (12):
      media: rppx1: Add framework to support Dreamchip RPPX1 ISP
      media: rcar-isp: Add support for ISPCORE
      media: rppx1: Add support for AWB measurement parameters and statistics
      media: rppx1: Add support for AWB gain settings
      media: rppx1: Add support for Auto Exposure Measurement
      media: rppx1: Add support for Histogram Measurement
      media: rppx1: Add support for Black Level Subtraction
      media: rppx1: Add support for Color Correction Matrix
      media: rppx1: Add support for Lens Shade Correction
      media: rppx1: Add support for Gamma Correction
      media: rppx1: Add support for Bayer Demosaicing
      media: rppx1: Add support for Bilateral Denoising

 MAINTAINERS                                        |    7 +
 drivers/media/platform/Kconfig                     |    1 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/dreamchip/Kconfig           |    3 +
 drivers/media/platform/dreamchip/Makefile          |    6 +
 drivers/media/platform/dreamchip/rppx1/Kconfig     |   12 +
 drivers/media/platform/dreamchip/rppx1/Makefile    |   33 +
 .../media/platform/dreamchip/rppx1/rpp_module.c    |   40 +
 .../media/platform/dreamchip/rppx1/rpp_module.h    |  155 +++
 .../media/platform/dreamchip/rppx1/rpp_params.c    |  122 +++
 drivers/media/platform/dreamchip/rppx1/rpp_stats.c |   30 +
 drivers/media/platform/dreamchip/rppx1/rppx1.c     |  338 +++++++
 drivers/media/platform/dreamchip/rppx1/rppx1.h     |   99 ++
 drivers/media/platform/dreamchip/rppx1/rppx1_acq.c |  147 +++
 .../media/platform/dreamchip/rppx1/rppx1_awbg.c    |   62 ++
 drivers/media/platform/dreamchip/rppx1/rppx1_bd.c  |  202 ++++
 .../media/platform/dreamchip/rppx1/rppx1_bdrgb.c   |   80 ++
 drivers/media/platform/dreamchip/rppx1/rppx1_bls.c |  169 ++++
 drivers/media/platform/dreamchip/rppx1/rppx1_cac.c |   29 +
 .../media/platform/dreamchip/rppx1/rppx1_ccor.c    |  173 ++++
 drivers/media/platform/dreamchip/rppx1/rppx1_db.c  |  126 +++
 .../media/platform/dreamchip/rppx1/rppx1_dpcc.c    |   76 ++
 drivers/media/platform/dreamchip/rppx1/rppx1_exm.c |  126 +++
 drivers/media/platform/dreamchip/rppx1/rppx1_ga.c  |   83 ++
 .../media/platform/dreamchip/rppx1/rppx1_hist.c    |  249 +++++
 .../media/platform/dreamchip/rppx1/rppx1_hist256.c |   46 +
 drivers/media/platform/dreamchip/rppx1/rppx1_is.c  |   42 +
 drivers/media/platform/dreamchip/rppx1/rppx1_lin.c |   91 ++
 drivers/media/platform/dreamchip/rppx1/rppx1_lsc.c |  187 ++++
 drivers/media/platform/dreamchip/rppx1/rppx1_ltm.c |   48 +
 .../media/platform/dreamchip/rppx1/rppx1_ltmmeas.c |   41 +
 .../media/platform/dreamchip/rppx1/rppx1_outif.c   |   45 +
 .../media/platform/dreamchip/rppx1/rppx1_outregs.c |   75 ++
 .../media/platform/dreamchip/rppx1/rppx1_rmap.c    |   64 ++
 .../platform/dreamchip/rppx1/rppx1_rmapmeas.c      |   47 +
 .../media/platform/dreamchip/rppx1/rppx1_shrp.c    |   64 ++
 .../media/platform/dreamchip/rppx1/rppx1_wbmeas.c  |  179 ++++
 .../media/platform/dreamchip/rppx1/rppx1_xyz2luv.c |   26 +
 drivers/media/platform/renesas/rcar-isp/Kconfig    |    2 +
 drivers/media/platform/renesas/rcar-isp/Makefile   |    2 +-
 drivers/media/platform/renesas/rcar-isp/core-io.c  | 1017 ++++++++++++++++++++
 drivers/media/platform/renesas/rcar-isp/core.c     |  826 ++++++++++++++++
 drivers/media/platform/renesas/rcar-isp/csisp.c    |   46 +-
 .../media/platform/renesas/rcar-isp/risp-core.h    |  170 ++++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/media/rppx1.h                              |   33 +
 include/uapi/linux/media/dreamchip/rppx1-config.h  |  779 +++++++++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 48 files changed, 6198 insertions(+), 7 deletions(-)
---
base-commit: 591cd656a1bf5ea94a222af5ef2ee76df029c1d2
change-id: 20260410-rppx1-912a0fc12599

Best regards,
-- 
Jai Luthra <jai.luthra+renesas@ideasonboard.com>