[PATCH v3 00/14] drm: rcar-du: Add Color Management Module (CMM)

Jacopo Mondi jacopo+renesas at jmondi.org
Sun Aug 25 13:51:40 UTC 2019


Hello,
  this is the third iteration of CMM support series.

A reference to the v1 cover letter, with some background on the CMM is
available here:
https://lkml.org/lkml/2019/6/6/583

The series is now based on the v5.3-rc4-based renesas-devel-2019-08-21 branch
of Geert's tree, which already contains the CMM clock enablement patches that
were part of v2 and which I have now dropped.

Notable changes in the iteratoin are:
- Added per-SoC compatible strings as requested by Geert: updated bindings and
  DTS patches accordingly and dropped R-b tags from there.
- Rework of CMM driver:
  - Use the DRM provided functions to extract and scale to HW precision the LUT
    table entries as suggested by Uli.
  - Re-worked the suspend/resume logic as suggested by Laurent:
    - remove resume/suspend handlers from CMM driver
    - handle re-enablement of CMM at DU resume time
  - Use pm-runtime to handle clock enable/disable of CMM.
- Integration with DU:
  - enforce suspend/resume ordering by creating a device_link between
    DU (consumer) and CMM (supplier): DU suspends before and resume after CMM
  - Force re-enablement of CMM by forcing the color_mgmt_changed flag of a
    CRTC state which had the CMM in use at DU resume time.

Compared to v2 system suspend/resume has been more thoughtfully tested by
running an application program which uses the CMM, suspending and resuming
the system and making sure the DU and the CMM are still operational.

Tested on M3-[W|N] with HDMI output.

The test application used to verify the LUT operations is available at:
https://jmondi.org/cgit/kmsxx/
where a color-inversion 1D-LUT table is applied.

The testing provides good results when running in 'flip' mode, where colors seem
actually inverted. I'm less certain about the 'non-flip' static image mode as
it seems red/green/yellow colors get all reduced to a shade of black. Other
opinions and testing with more realistic use-cases are of course very welcome.

Thanks
   j

Jacopo Mondi (14):
  dt-bindings: display: renesas,cmm: Add R-Car CMM documentation
  dt-bindings: display, renesas,du: Document cmms property
  arm64: dts: renesas: r8a7796: Add CMM units
  arm64: dts: renesas: r8a7795: Add CMM units
  arm64: dts: renesas: r8a77965: Add CMM units
  arm64: dts: renesas: r8a77990: Add CMM units
  arm64: dts: renesas: r8a77995: Add CMM units
  drm: rcar-du: Add support for CMM
  drm: rcar-du: Claim CMM support for Gen3 SoCs
  drm: rcar-du: kms: Collect 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
  drm: rcar-du: Force CMM enablement when resuming

 .../bindings/display/renesas,cmm.txt          |  33 +++
 .../bindings/display/renesas,du.txt           |   5 +
 arch/arm64/boot/dts/renesas/r8a7795.dtsi      |  36 ++-
 arch/arm64/boot/dts/renesas/r8a7796.dtsi      |  25 ++
 arch/arm64/boot/dts/renesas/r8a77965.dtsi     |  25 ++
 arch/arm64/boot/dts/renesas/r8a77990.dtsi     |  20 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi     |  20 +-
 drivers/gpu/drm/rcar-du/Kconfig               |   7 +
 drivers/gpu/drm/rcar-du/Makefile              |   1 +
 drivers/gpu/drm/rcar-du/rcar_cmm.c            | 262 ++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_cmm.h            |  38 +++
 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         |  33 ++-
 drivers/gpu/drm/rcar-du/rcar_du_drv.h         |   4 +
 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         |  98 +++++++
 drivers/gpu/drm/rcar-du/rcar_du_regs.h        |   5 +
 19 files changed, 634 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/renesas,cmm.txt
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_cmm.c
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_cmm.h

--
2.22.0



More information about the dri-devel mailing list