Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/21] Introduce support for CRTC (post-blend) color pipeline
@ 2025-12-23 18:01 Ariel D'Alessandro
  2025-12-23 18:01 ` [PATCH v3 01/21] drm/crtc: Add color pipeline to CRTC state Ariel D'Alessandro
                   ` (20 more replies)
  0 siblings, 21 replies; 25+ messages in thread
From: Ariel D'Alessandro @ 2025-12-23 18:01 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Chun-Kuang Hu, Philipp Zabel, Matthias Brugger,
	AngeloGioacchino Del Regno, Louis Chauvet, Haneen Mohammed,
	Melissa Wen
  Cc: dri-devel, linux-kernel, linux-mediatek, linux-arm-kernel, kernel,
	Nícolas F. R. A. Prado, Ariel D'Alessandro,
	Harry Wentland

This series is based on "Color Pipeline API w/ VKMS" [1]. It reuses the
same concept of a color pipeline API but for the post-blend stage
instead of pre-blend, by attaching the COLOR_PIPELINE property to the
CRTC rather than a plane.

The patches in the series first implement the necessary changes in the
DRM core to allow for CRTC (post-blend) color pipelines and expose it 
through the uAPI, and then implement support in both the MediaTek KMS
driver and in VKMS.

This series has been tested with IGT, with the latest revision of patch
series "Support post-blend color pipeline API" [2] applied, on top of
VKMS, as well as with Weston, with a WIP branch [3], on a MT8195-Tomato
Chromebook and a MT8188 Genio 700 EVK, where both gamma LUT and CTM
color transformations have been simultaneously configured in hardware
through the API and validated (test commits for weston at [4]).

[1] https://lore.kernel.org/all/20251115000237.3561250-1-alex.hung@amd.com/
[2] https://lore.kernel.org/igt-dev/20250912-post-blend-colorops-v1-0-83fc62420cba@collabora.com/T/#t
[3] https://gitlab.collabora.com/nfraprado/weston/-/tree/post-blend-colorops?ref_type=heads
[4] https://gitlab.collabora.com/nfraprado/weston/-/tree/post-blend-color-pipeline-lut-ctm-test?ref_type=tags

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Co-developed-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
---
Changes in v3:
- Aligned terminology between plane (pre-blend) and crtc (post-blend)
  color pipeline (Harry Wentland). Replaced all naming s/post-blend/crtc
- Reworked cleanup in vkms_initialize_post_blend_color_pipeline (Louis
  Chauvet).
- Added check on CLIENT_CAP while setting COLOR_PIPELINE property (Louis
  Chauvet).
- Moved common color_pipeline property initialization code to
  drivers/gpu/drm/drm_property.c
- Added missing support for CRTC (post-blend) color pipeline
  configuration in VKMS.
- Added missing return value checks in mtk_crtc_create()
- Added drm_color_lut_to_lut32() and made use of it in mtk_disp_gamma.c
- Added drm_color_ctm_to_ctm_3x4() and made use of it in mtk_disp_ccorr.c
- Split plane and crtc fields descriptions in struct drm_colorop
- Link to v2: https://lore.kernel.org/r/20250917-mtk-post-blend-color-pipeline-v2-0-ac4471b44758@collabora.com

Changes in v2:
- Split core DRM changes for post-blend color pipelines from single
  commit into smaller changes
- Added post-blend color pipeline support in VKMS
- Introduced driver cap, and made client cap depend on it (daniels)
- Made deprecated color props (GAMMA_LUT, DEGAMMA_LUT, CTM) available as
  read-only when post-blend color pipelines are enabled (daniels)
- Created colorop_modeset_lock/unlock to commonize locking pattern for
  colorops (louis.chauvet)
- Added helper for post-blend 1D curve colorop creation
- Link to v1: https://lore.kernel.org/r/20250822-mtk-post-blend-color-pipeline-v1-0-a9446d4aca82@collabora.com

---
Ariel D'Alessandro (2):
      drm: Add helper to extract a 3x4 matrix from any CTM matrix dimensions
      drm: Add helper to extract a LUT entry from either 16-bit or 32-bit LUT

Nícolas F. R. A. Prado (19):
      drm/crtc: Add color pipeline to CRTC state
      drm/colorop: Allow parenting colorop to CRTC
      drm: Factor out common color_pipeline property initialization code
      drm/crtc: Add COLOR_PIPELINE property
      drm: Introduce DRM_CAP_CRTC_COLOR_PIPELINE
      drm: Introduce DRM_CLIENT_CAP_CRTC_COLOR_PIPELINE
      drm/atomic: Pass crtc_color_pipeline client cap to atomic check
      drm/atomic: Print the color pipeline as part of the CRTC state print
      drm/colorop: Factor out common paths from colorops helpers
      drm/colorop: Introduce colorop helpers for crtc
      drm/crtc: Track crtc color pipeline client cap in drm_crtc_state
      drm/mediatek: Support CRTC colorops for gamma and ctm
      drm/mediatek: ccorr: Support CRTC color pipeline API
      drm/mediatek: gamma: Support CRTC color pipeline API
      drm/mediatek: Set CRTC color pipeline driver cap
      drm/vkms: Rename existing color pipeline helpers to contain "plane"
      drm/vkms: Prepare pre_blend_color_transform() for CRTC color pipelines
      drm/vkms: Introduce support for post-blend color pipeline
      drm/vkms: Set CRTC color pipeline driver cap

 drivers/gpu/drm/drm_atomic.c                  |   9 +-
 drivers/gpu/drm/drm_atomic_uapi.c             |  71 +++++++-
 drivers/gpu/drm/drm_colorop.c                 | 242 +++++++++++++++++++++-----
 drivers/gpu/drm/drm_connector.c               |   1 +
 drivers/gpu/drm/drm_crtc.c                    |  31 ++++
 drivers/gpu/drm/drm_crtc_internal.h           |   1 +
 drivers/gpu/drm/drm_ioctl.c                   |  12 ++
 drivers/gpu/drm/drm_mode_object.c             |   9 +
 drivers/gpu/drm/drm_plane.c                   |  35 +---
 drivers/gpu/drm/drm_property.c                |  44 +++++
 drivers/gpu/drm/mediatek/mtk_crtc.c           | 222 ++++++++++++++++++++++-
 drivers/gpu/drm/mediatek/mtk_ddp_comp.c       |   6 +-
 drivers/gpu/drm/mediatek/mtk_ddp_comp.h       |   2 +
 drivers/gpu/drm/mediatek/mtk_disp_ccorr.c     |  88 ++++++++--
 drivers/gpu/drm/mediatek/mtk_disp_drv.h       |   6 +-
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c     |  68 ++++++--
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        |   3 +-
 drivers/gpu/drm/vkms/tests/vkms_config_test.c |  70 +++++---
 drivers/gpu/drm/vkms/vkms_colorop.c           | 110 +++++++++++-
 drivers/gpu/drm/vkms/vkms_composer.c          |  13 +-
 drivers/gpu/drm/vkms/vkms_config.c            |   5 +-
 drivers/gpu/drm/vkms/vkms_config.h            |  29 ++-
 drivers/gpu/drm/vkms/vkms_crtc.c              |   6 +-
 drivers/gpu/drm/vkms/vkms_drv.c               |  10 +-
 drivers/gpu/drm/vkms/vkms_drv.h               |   8 +-
 drivers/gpu/drm/vkms/vkms_output.c            |   3 +-
 drivers/gpu/drm/vkms/vkms_plane.c             |   2 +-
 include/drm/drm_atomic.h                      |  20 +++
 include/drm/drm_atomic_uapi.h                 |   2 +
 include/drm/drm_color_mgmt.h                  |  61 +++++++
 include/drm/drm_colorop.h                     |  25 ++-
 include/drm/drm_crtc.h                        |  27 +++
 include/drm/drm_drv.h                         |   6 +
 include/drm/drm_file.h                        |   7 +
 include/drm/drm_property.h                    |   5 +
 include/uapi/drm/drm.h                        |  25 +++
 36 files changed, 1109 insertions(+), 175 deletions(-)
---
base-commit: b96bcfba104c65db41378a04f5ccac186f79578f
change-id: 20250730-mtk-post-blend-color-pipeline-498e1a9cc53e

Best regards,
-- 
Ariel D'Alessandro <ariel.dalessandro@collabora.com>



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

end of thread, other threads:[~2026-07-08 17:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23 18:01 [PATCH v3 00/21] Introduce support for CRTC (post-blend) color pipeline Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 01/21] drm/crtc: Add color pipeline to CRTC state Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 02/21] drm/colorop: Allow parenting colorop to CRTC Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 03/21] drm: Factor out common color_pipeline property initialization code Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 04/21] drm/crtc: Add COLOR_PIPELINE property Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 05/21] drm: Introduce DRM_CAP_CRTC_COLOR_PIPELINE Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 06/21] drm: Introduce DRM_CLIENT_CAP_CRTC_COLOR_PIPELINE Ariel D'Alessandro
2026-07-08  7:28   ` Robert Mader
2025-12-23 18:01 ` [PATCH v3 07/21] drm/atomic: Pass crtc_color_pipeline client cap to atomic check Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 08/21] drm/atomic: Print the color pipeline as part of the CRTC state print Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 09/21] drm/colorop: Factor out common paths from colorops helpers Ariel D'Alessandro
2025-12-25  6:26   ` kernel test robot
2025-12-23 18:01 ` [PATCH v3 10/21] drm/colorop: Introduce colorop helpers for crtc Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 11/21] drm/crtc: Track crtc color pipeline client cap in drm_crtc_state Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 12/21] drm/mediatek: Support CRTC colorops for gamma and ctm Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 13/21] drm: Add helper to extract a 3x4 matrix from any CTM matrix dimensions Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 14/21] drm/mediatek: ccorr: Support CRTC color pipeline API Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 15/21] drm: Add helper to extract a LUT entry from either 16-bit or 32-bit LUT Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 16/21] drm/mediatek: gamma: Support CRTC color pipeline API Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 17/21] drm/mediatek: Set CRTC color pipeline driver cap Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 18/21] drm/vkms: Rename existing color pipeline helpers to contain "plane" Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 19/21] drm/vkms: Prepare pre_blend_color_transform() for CRTC color pipelines Ariel D'Alessandro
2025-12-23 18:01 ` [PATCH v3 20/21] drm/vkms: Introduce support for post-blend color pipeline Ariel D'Alessandro
2026-07-08 17:35   ` Robert Mader
2025-12-23 18:01 ` [PATCH v3 21/21] drm/vkms: Set CRTC color pipeline driver cap Ariel D'Alessandro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox