linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/14] drm: rcar-du: Add Color Management Module (CMM)
@ 2019-08-25 13:51 Jacopo Mondi
  2019-08-25 13:51 ` [PATCH v3 01/14] dt-bindings: display: renesas,cmm: Add R-Car CMM documentation Jacopo Mondi
                   ` (13 more replies)
  0 siblings, 14 replies; 54+ messages in thread
From: Jacopo Mondi @ 2019-08-25 13:51 UTC (permalink / raw)
  To: laurent.pinchart, kieran.bingham+renesas, geert, horms, uli,
	airlied, daniel
  Cc: Jacopo Mondi, koji.matsuoka.xm, muroya, VenkataRajesh.Kalakodima,
	Harsha.ManjulaMallikarjun, linux-renesas-soc, dri-devel,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2019-09-05 13:39 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25 13:51 [PATCH v3 00/14] drm: rcar-du: Add Color Management Module (CMM) Jacopo Mondi
2019-08-25 13:51 ` [PATCH v3 01/14] dt-bindings: display: renesas,cmm: Add R-Car CMM documentation Jacopo Mondi
2019-08-26  7:34   ` Geert Uytterhoeven
2019-08-26  7:59     ` Jacopo Mondi
2019-08-26  8:38       ` Geert Uytterhoeven
2019-08-26 10:15       ` Laurent Pinchart
2019-08-30 18:01         ` Jacopo Mondi
2019-09-05 11:50           ` Laurent Pinchart
2019-09-05 12:05             ` Geert Uytterhoeven
2019-09-05 12:20               ` Laurent Pinchart
2019-09-05 13:28                 ` Jacopo Mondi
2019-08-25 13:51 ` [PATCH v3 02/14] dt-bindings: display, renesas,du: Document cmms property Jacopo Mondi
2019-08-27 20:29   ` Rob Herring
2019-08-28  7:32     ` Geert Uytterhoeven
2019-08-28  8:28       ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 03/14] arm64: dts: renesas: r8a7796: Add CMM units Jacopo Mondi
2019-08-26  7:28   ` Geert Uytterhoeven
2019-08-26  8:00     ` Jacopo Mondi
2019-08-26 22:43   ` Laurent Pinchart
2019-08-27  9:55     ` Jacopo Mondi
2019-08-27 10:12       ` Geert Uytterhoeven
2019-08-25 13:51 ` [PATCH v3 04/14] arm64: dts: renesas: r8a7795: " Jacopo Mondi
2019-08-26 22:45   ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 05/14] arm64: dts: renesas: r8a77965: " Jacopo Mondi
2019-08-26 22:45   ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 06/14] arm64: dts: renesas: r8a77990: " Jacopo Mondi
2019-08-26 22:47   ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 07/14] arm64: dts: renesas: r8a77995: " Jacopo Mondi
2019-08-26 22:47   ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 08/14] drm: rcar-du: Add support for CMM Jacopo Mondi
2019-08-26  7:31   ` Geert Uytterhoeven
2019-08-26  8:02     ` Jacopo Mondi
2019-08-27  0:24   ` Laurent Pinchart
2019-08-27 14:56     ` Jacopo Mondi
2019-08-27 15:48       ` Jacopo Mondi
2019-08-27 16:34       ` Laurent Pinchart
2019-09-05  9:57         ` Jacopo Mondi
2019-09-05 11:17           ` Laurent Pinchart
2019-09-05 13:14             ` Jacopo Mondi
2019-09-05 13:39               ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 09/14] drm: rcar-du: Claim CMM support for Gen3 SoCs Jacopo Mondi
2019-08-25 13:51 ` [PATCH v3 10/14] drm: rcar-du: kms: Collect CMM instances Jacopo Mondi
2019-08-26 23:51   ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 11/14] drm: rcar-du: crtc: Enable and disable CMMs Jacopo Mondi
2019-08-25 13:51 ` [PATCH v3 12/14] drm: rcar-du: crtc: Register GAMMA_LUT properties Jacopo Mondi
2019-08-25 13:51 ` [PATCH v3 13/14] drm: rcar-du: kms: Update CMM in atomic commit tail Jacopo Mondi
2019-08-27  0:00   ` Laurent Pinchart
2019-08-27  0:19     ` Laurent Pinchart
2019-08-27 14:44       ` Jacopo Mondi
2019-08-27 16:38         ` Laurent Pinchart
2019-08-25 13:51 ` [PATCH v3 14/14] drm: rcar-du: Force CMM enablement when resuming Jacopo Mondi
2019-08-27  0:05   ` Laurent Pinchart
2019-09-05 10:58     ` Jacopo Mondi
2019-09-05 11:25       ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).