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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

References:
A reference to the v1 cover letter, with some background on the CMM is
available here:
https://lkml.org/lkml/2019/6/6/583
v2:
https://lore.kernel.org/linux-renesas-soc/20190706140746.29132-10-jacopo+renesas@xxxxxxxxxx/
v3:
https://lore.kernel.org/linux-renesas-soc/20190825135154.11488-1-jacopo+renesas@xxxxxxxxxx/

Change log:

*Bindings/DT:
- 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

*CMM/DU:
- 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

Testing:
I have tested by injecting a color inversion LUT table at test program
initialization:
https://jmondi.org/cgit/kmsxx/commit/?h=gamma_lut&id=3c6af4db165e5b3dc8996f0a288746c35dbb1cb9
And by changing the CMM content to switch between a color inversion table
and a linear table every 50 frames:
https://jmondi.org/cgit/kmsxx/commit/?h=gamma_lut&id=fe178a43861da7c8e79618e2a13fa0f19dbcd03d

Pretty happy with the result, which seems to be consistent across system
suspend/resume.

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

Thanks
  j

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

--
2.23.0




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux