linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	 Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	 Philipp Zabel <p.zabel@pengutronix.de>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: "Alex Hung" <alex.hung@amd.com>,
	wayland-devel@lists.freedesktop.org, harry.wentland@amd.com,
	leo.liu@amd.com, ville.syrjala@linux.intel.com,
	pekka.paalanen@collabora.com, contact@emersion.fr,
	mwen@igalia.com, jadahl@redhat.com, sebastian.wick@redhat.com,
	shashank.sharma@amd.com, agoins@nvidia.com, joshua@froggi.es,
	mdaenzer@redhat.com, aleixpol@kde.org, xaver.hugl@gmail.com,
	victoria@system76.com, uma.shankar@intel.com,
	quic_naseer@quicinc.com, quic_cbraga@quicinc.com,
	quic_abhinavk@quicinc.com, marcan@marcan.st, Liviu.Dudau@arm.com,
	sashamcintosh@google.com, chaitanya.kumar.borah@intel.com,
	louis.chauvet@bootlin.com, mcanal@igalia.com,
	kernel@collabora.com, daniels@collabora.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
	"Simona Vetter" <simona.vetter@ffwll.ch>
Subject: [PATCH RFC 0/5] Introduce support for post-blend color pipeline
Date: Fri, 22 Aug 2025 14:36:10 -0400	[thread overview]
Message-ID: <20250822-mtk-post-blend-color-pipeline-v1-0-a9446d4aca82@collabora.com> (raw)

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.

Patch 1 implements the necessary changes in the DRM core to make this
happen. The remaining patches implement support for this API in the
MediaTek DRM driver in particular.

This series has been tested on the MT8195-Tomato Chromebook with a WIP
Weston branch [2]. Both gamma LUT and CTM color transformations have
been simultaneously configured in hardware through the API and validated
(test commits in weston [3] and the kernel [4]).

This is a very early implementation but I'd like to get feedback from
the community before moving forward. For instance one notable thing
missing it to add init helpers for the post-blend case for the remaining
colorop types, as only 3x1d LUT and 3x4 Matrix were needed for gamma LUT
and CTM use cases.

[1] https://lore.kernel.org/all/20250815035047.3319284-1-alex.hung@amd.com/
[2] https://gitlab.collabora.com/nfraprado/weston/-/tree/post-blend-colorops?ref_type=heads
[3] https://gitlab.collabora.com/nfraprado/weston/-/commits/post-blend-color-pipeline-lut-ctm-test?ref_type=tags
[4] https://gitlab.collabora.com/nfraprado/linux/-/commits/post-blend-color-pipeline-ctm-lut-test?ref_type=tags

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Nícolas F. R. A. Prado (5):
      drm: Support post-blend color pipeline API
      drm/colorop: Export drm_colorop_cleanup() so drivers can extend it
      drm/mediatek: Support post-blend colorops for gamma and ctm
      drm/mediatek: ccorr: Support post-blend color pipeline API
      drm/mediatek: gamma: Support post-blend color pipeline API

 drivers/gpu/drm/drm_atomic.c              |  32 ++++-
 drivers/gpu/drm/drm_atomic_uapi.c         |  50 ++++++-
 drivers/gpu/drm/drm_colorop.c             | 147 +++++++++++++++++----
 drivers/gpu/drm/drm_connector.c           |   1 +
 drivers/gpu/drm/drm_crtc.c                |  77 +++++++++++
 drivers/gpu/drm/drm_crtc_internal.h       |   6 +
 drivers/gpu/drm/drm_ioctl.c               |   7 +
 drivers/gpu/drm/drm_mode_object.c         |  20 +++
 drivers/gpu/drm/drm_plane.c               |  36 +----
 drivers/gpu/drm/mediatek/mtk_crtc.c       | 211 +++++++++++++++++++++++++++++-
 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 | 100 ++++++++++++--
 drivers/gpu/drm/mediatek/mtk_disp_drv.h   |   6 +-
 drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 107 ++++++++++++---
 include/drm/drm_atomic.h                  |  20 +++
 include/drm/drm_atomic_uapi.h             |   2 +
 include/drm/drm_colorop.h                 |  17 ++-
 include/drm/drm_crtc.h                    |  19 +++
 include/drm/drm_file.h                    |   7 +
 include/uapi/drm/drm.h                    |  16 +++
 21 files changed, 781 insertions(+), 108 deletions(-)
---
base-commit: d152eee7ae3b72e2ce70064a7ad9764f7ba8641d
change-id: 20250730-mtk-post-blend-color-pipeline-498e1a9cc53e

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


             reply	other threads:[~2025-08-22 18:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 18:36 Nícolas F. R. A. Prado [this message]
2025-08-22 18:36 ` [PATCH RFC 1/5] drm: Support post-blend color pipeline API Nícolas F. R. A. Prado
2025-08-25 13:34   ` Daniel Stone
2025-08-25 18:45     ` Xaver Hugl
2025-08-26 12:25       ` Daniel Stone
2025-09-03 18:42         ` Nícolas F. R. A. Prado
2025-08-27 11:17   ` Sebastian Wick
2025-08-27 11:32     ` Daniel Stone
2025-08-22 18:36 ` [PATCH RFC 2/5] drm/colorop: Export drm_colorop_cleanup() so drivers can extend it Nícolas F. R. A. Prado
2025-08-22 18:36 ` [PATCH RFC 3/5] drm/mediatek: Support post-blend colorops for gamma and ctm Nícolas F. R. A. Prado
2025-08-22 18:36 ` [PATCH RFC 4/5] drm/mediatek: ccorr: Support post-blend color pipeline API Nícolas F. R. A. Prado
2025-08-22 18:36 ` [PATCH RFC 5/5] drm/mediatek: gamma: " Nícolas F. R. A. Prado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250822-mtk-post-blend-color-pipeline-v1-0-a9446d4aca82@collabora.com \
    --to=nfraprado@collabora.com \
    --cc=Liviu.Dudau@arm.com \
    --cc=agoins@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aleixpol@kde.org \
    --cc=alex.hung@amd.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=contact@emersion.fr \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jadahl@redhat.com \
    --cc=joshua@froggi.es \
    --cc=kernel@collabora.com \
    --cc=leo.liu@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marcan@marcan.st \
    --cc=matthias.bgg@gmail.com \
    --cc=mcanal@igalia.com \
    --cc=mdaenzer@redhat.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pekka.paalanen@collabora.com \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_cbraga@quicinc.com \
    --cc=quic_naseer@quicinc.com \
    --cc=sashamcintosh@google.com \
    --cc=sebastian.wick@redhat.com \
    --cc=shashank.sharma@amd.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=uma.shankar@intel.com \
    --cc=victoria@system76.com \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wayland-devel@lists.freedesktop.org \
    --cc=xaver.hugl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).