[PATCH v4 0/9 drm: rcar-du: Add Color Management Module (CMM)

Jacopo Mondi jacopo+renesas at jmondi.org
Fri Sep 6 13:54:27 UTC 2019

[ Ugh, sorry for the double sending, but I forgot --cc-cover to git-send
  email and the series has not been delivered to the mailing lists.
  Sorry about that. ]

Hello, new iteration of CMM support, with quite a few changes compared to

A reference to the v1 cover letter, with some background on the CMM is
available here:

Change log:

- Rebased on renesas-devel-2019-09-03-v5.3-rc7
- Bindings converted to yaml: thanks Laurent for help
- s/'cmms'/'renesas,cmms'/ in DU bindings as suggested by Rob
- s/cmm-<soctype>/<soctype>-cmm/ as suggested by Geert
- squashed CMM addition for Gen3 SoCs in a single path at the end of
  the series

- Only accept fully populated LUT tables, remove the 'size' from the CMM
  configuration structure as suggested by Laurent
- Simplify CMM configuration logic: only rely on color_mgmt_changed flag and
  unconditionally provide a populated LUT table to the cmm_setup() function
- Protect against probing order inversion (DU is operation while CMM still has
  not been probed) by adding rcar_cmm_init() operation as it is done for VSP as
  suggested by Laurent
- Add CMM function stubs to fix compilation erros when CONFIG_DRM_RCAR_CMM is
  not selected
- Minors in the CMM driver as suggested by Laurent
  - Remove per-soc strings
  - Make comments style consistent (not using /** anywhere in the .c file,
    unify comment style)
  - s/rcar_cmm_load()/rcar_cmm_write()/
  - Squash cmm configuration and suspend/resume support in rcar_du_kms.c

I have tested by injecting a color inversion LUT table at test program
And by changing the CMM content to switch between a color inversion table
and a linear table every 50 frames:

Pretty happy with the result, which seems to be consistent across system

Testing with real world use cases might be beneficial. Rajesh are you still
interested in giving this series a spin?


Jacopo Mondi (9):
  dt-bindings: display: renesas,cmm: Add R-Car CMM documentation
  dt-bindings: display, renesas,du: Document cmms property
  drm: rcar-du: Add support for CMM
  drm: rcar-du: Claim CMM support for Gen3 SoCs
  drm: rcar-du: kms: Initialize CMM instances
  drm: rcar-du: crtc: Enable and disable CMMs
  drm: rcar-du: crtc: Register GAMMA_LUT properties
  drm: rcar-du: kms: Update CMM in atomic commit tail
  arm64: dts: renesas: Add CMM units to Gen3 SoCs

 .../bindings/display/renesas,cmm.yaml         |  64 +++++
 .../bindings/display/renesas,du.txt           |   5 +
 arch/arm64/boot/dts/renesas/r8a7795.dtsi      |  40 ++-
 arch/arm64/boot/dts/renesas/r8a7796.dtsi      |  28 ++
 arch/arm64/boot/dts/renesas/r8a77965.dtsi     |  28 ++
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |  22 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     |  22 +-
 drivers/gpu/drm/rcar-du/Kconfig               |   7 +
 drivers/gpu/drm/rcar-du/Makefile              |   1 +
 drivers/gpu/drm/rcar-du/rcar_cmm.c            | 251 ++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_cmm.h            |  61 +++++
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c        |  17 ++
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h        |   2 +
 drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  32 ++-
 drivers/gpu/drm/rcar-du/rcar_du_drv.h         |   3 +
 drivers/gpu/drm/rcar-du/rcar_du_group.c       |   8 +
 drivers/gpu/drm/rcar-du/rcar_du_group.h       |   2 +
 drivers/gpu/drm/rcar-du/rcar_du_kms.c         | 106 ++++++++
 drivers/gpu/drm/rcar-du/rcar_du_regs.h        |   5 +
 19 files changed, 697 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/renesas,cmm.yaml
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_cmm.c
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_cmm.h


More information about the dri-devel mailing list