public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Plane Color Pipeline support for MediaTek
@ 2025-12-23 19:44 Nícolas F. R. A. Prado
  2025-12-23 19:44 ` [PATCH 01/11] drm/mediatek: Introduce DDP plane_colorops_init() hook Nícolas F. R. A. Prado
                   ` (11 more replies)
  0 siblings, 12 replies; 45+ messages in thread
From: Nícolas F. R. A. Prado @ 2025-12-23 19:44 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Chun-Kuang Hu, Philipp Zabel, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: dri-devel, linux-kernel, linux-mediatek, linux-arm-kernel,
	daniels, ariel.dalessandro, kernel, Nícolas F. R. A. Prado

This series implements a plane color pipeline for MediaTek platforms,
specifically for MT8195-compatible SoCs.

The pipeline is composed of the following blocks:

Inverse Gamma -> RGB to RGB Color Space Conversion (R2R CSC) -> Gamma
(1D Curve)       (3x3 Matrix)                                   (1D Curve) 

The curves supported by Inverse Gamma are:
* scRGB
* BT.709

The curves supported by Gamma are:
* scRGB
* BT.709
* BT.2020
* HLG

Given the lack of support for writeback connectors on the MediaTek KMS
driver, combined with limited hardware documentation, I haven't been
able to verify the correctness of each curve, only that they were
visually sane (gamma curves made the image on the display brighter,
while inverse gamma made it darker).

This series depends on "drm: Color pipeline teardown and follow-up
fixes/improvements" [1].

This series was tested on the MT8195-Tomato Chromebook.

Regarding the support of color operations in OVL for different SoCs:
* it's not supported by MT8183, and presumably also not by older
  generations
* On MT8192 it's supported by ovl0 and ovl_2l0, but not ovl_2l2 (despite
  the same compatible as ovl_2l0).

For this series I'm only enabling it on MT8195 since that's the one
where I can readily test.

[1] https://lore.kernel.org/all/20251219065614.190834-1-chaitanya.kumar.borah@intel.com/#t

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Nícolas F. R. A. Prado (11):
      drm/mediatek: Introduce DDP plane_colorops_init() hook
      drm/mediatek: Initialize colorops when creating plane
      drm/mediatek: ovl: Add supports_plane_colorops flag
      drm/mediatek: ovl: Enable per-plane color operations on MT8195
      drm/mediatek: ovl: Implement support for Inverse Gamma
      drm/mediatek: Add plane_colorops_init() DDP hook for OVL
      drm/colorop: Introduce HLG EOTF
      drm/mediatek: ovl: Implement support for Gamma
      drm/colorop: Introduce 3x3 Matrix
      drm/mediatek: ovl: Enable support for R2R Color Space Conversion
      drm/mediatek: Check 3x3 Matrix colorop has DATA set

 drivers/gpu/drm/drm_atomic.c            |   1 +
 drivers/gpu/drm/drm_atomic_uapi.c       |   3 +
 drivers/gpu/drm/drm_colorop.c           |  22 +++
 drivers/gpu/drm/mediatek/mtk_crtc.c     |  36 +++-
 drivers/gpu/drm/mediatek/mtk_ddp_comp.c |   1 +
 drivers/gpu/drm/mediatek/mtk_ddp_comp.h |   2 +
 drivers/gpu/drm/mediatek/mtk_disp_drv.h |   1 +
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 287 ++++++++++++++++++++++++++++++++
 include/drm/drm_colorop.h               |  13 ++
 include/uapi/drm/drm_mode.h             |  16 ++
 10 files changed, 381 insertions(+), 1 deletion(-)
---
base-commit: 1783cdadb70e74a30dfee250f8c2dc13b4e61128
change-id: 20251219-mtk-ovl-pre-blend-colorops-95b7b2883d95

Best regards,
-- 
Nícolas F. R. A. Prado <nfraprado@collabora.com>


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

end of thread, other threads:[~2026-03-18 13:19 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23 19:44 [PATCH 00/11] Plane Color Pipeline support for MediaTek Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 01/11] drm/mediatek: Introduce DDP plane_colorops_init() hook Nícolas F. R. A. Prado
2026-02-06 10:07   ` AngeloGioacchino Del Regno
2026-02-06 14:13     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 02/11] drm/mediatek: Initialize colorops when creating plane Nícolas F. R. A. Prado
2026-02-06 10:07   ` AngeloGioacchino Del Regno
2025-12-23 19:44 ` [PATCH 03/11] drm/mediatek: ovl: Add supports_plane_colorops flag Nícolas F. R. A. Prado
2025-12-24  2:17   ` Macpaul Lin (林智斌)
2026-02-06 10:07   ` AngeloGioacchino Del Regno
2026-02-06 14:10     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 04/11] drm/mediatek: ovl: Enable per-plane color operations on MT8195 Nícolas F. R. A. Prado
2025-12-24  2:19   ` Macpaul Lin (林智斌)
2026-02-06 10:07   ` AngeloGioacchino Del Regno
2026-02-06 14:11     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 05/11] drm/mediatek: ovl: Implement support for Inverse Gamma Nícolas F. R. A. Prado
2026-02-25  8:54   ` CK Hu (胡俊光)
2026-02-25  9:40     ` CK Hu (胡俊光)
2025-12-23 19:44 ` [PATCH 06/11] drm/mediatek: Add plane_colorops_init() DDP hook for OVL Nícolas F. R. A. Prado
2025-12-24  2:20   ` Macpaul Lin (林智斌)
2026-02-25  8:58   ` CK Hu (胡俊光)
2025-12-23 19:44 ` [PATCH 07/11] drm/colorop: Introduce HLG EOTF Nícolas F. R. A. Prado
2025-12-24  2:21   ` Macpaul Lin (林智斌)
2026-02-06  8:51   ` Pekka Paalanen
2026-02-06 14:02     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 08/11] drm/mediatek: ovl: Implement support for Gamma Nícolas F. R. A. Prado
2026-03-03  6:53   ` CK Hu (胡俊光)
2026-03-18 13:04     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 09/11] drm/colorop: Introduce 3x3 Matrix Nícolas F. R. A. Prado
2026-02-06  9:27   ` Pekka Paalanen
2026-02-06 14:05     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 10/11] drm/mediatek: ovl: Enable support for R2R Color Space Conversion Nícolas F. R. A. Prado
2026-03-03  7:16   ` CK Hu (胡俊光)
2026-03-18 13:18     ` Nícolas F. R. A. Prado
2025-12-23 19:44 ` [PATCH 11/11] drm/mediatek: Check 3x3 Matrix colorop has DATA set Nícolas F. R. A. Prado
2026-03-03  7:21   ` CK Hu (胡俊光)
2025-12-29 18:53 ` [PATCH 00/11] Plane Color Pipeline support for MediaTek Shengyu Qu
2026-01-01 12:37   ` Shengyu Qu
2026-01-02 18:40     ` Harry Wentland
2026-02-06  9:09       ` Pekka Paalanen
2026-02-06 13:28         ` Nícolas F. R. A. Prado
2026-02-26  6:24           ` CK Hu (胡俊光)
2026-02-26 10:26             ` AngeloGioacchino Del Regno
2026-02-26 10:51               ` AngeloGioacchino Del Regno
2026-03-18 12:43                 ` Nícolas F. R. A. Prado
2026-01-07 20:01   ` Xaver Hugl

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