From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
Melissa Wen <mwen@igalia.com>, Autumn Ashton <misyl@froggi.es>,
Xaver Hugl <xaver.hugl@gmail.com>
Subject: Re: [PATCH v1 00/13] Add DRM_COLOROP_3D_LUT_DMA for fast-loading 3D LUT
Date: Wed, 4 Nov 2026 00:45:34 +0200 [thread overview]
Message-ID: <aupkDmY1HUlS27HT@intel.com> (raw)
In-Reply-To: <20261103213756.618024-1-harry.wentland@amd.com>
On Tue, Nov 03, 2026 at 04:37:43PM -0500, Harry Wentland wrote:
> Loading a DRM_COLOROP_3D_LUT on AMD HW takes a long time because the
> driver has to load the entire 3D LUT via register writes.
>
> Starting with DCN 4 the HW has the ability to load a 3D LUT via DMA,
> which only requires an address update for programming the 3D LUT.
>
> I propose exposing a new DRM_COLOROP_3D_LUT_DMA type to support this DMA
> 3D LUT loading mechanism. Users of the DRM_COLOROP_3D_LUT_DMA will parse
> the supported formats via the LUT_3D_FORMATS blob property, select the
> desired format via LUT_3D_FORMAT property, and pass the 3D LUT buffer as
> a drm_framebuffer via FB_ID on the colorop.
A framebuffer? That sounds like a very weird thing to use
for non-pixel data.
Why don't you just copy the LUT from the blob into a BO in the kernel
and DMA it from there? That's kinda how everything now works on Intel
hardware. Sure, it's not 100% optimal because of the extra copy, but
at least it avoids userspace having to care about it so much.
>
> For details see the patches and/or posted branches.
>
> In addition to the patches posted here the 3d-fl-fixes kernel branch
> contains a number of fixes that will be merged via the usual amdgpu
> display process. It also contains a patch to enable support on Navi 4
> (DCN 4.0.1), which won't be upstreamed since that generation requires a
> userspace workaround. The 3d-fl-workaround IGT branch exists solely for
> that purpose. Nonetheless, Navi 4 can serve as an enablement vehicle for
> anyone who wants to see the new interface working.
>
> The kwin branch makes use of a pipeline with DRM_COLOROP_3D_LUT_DMA if
> such a pipeline is discovered before a pipeline with a
> DRM_COLOROP_3D_LUT.
>
> ### Branches
>
> kernel: https://gitlab.freedesktop.org/hwentland/linux/-/commits/3d-fl
> kernel w/ fixes: https://gitlab.freedesktop.org/hwentland/linux/-/commits/3d-fl-fixes
> IGT: https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/tree/3d-fl
> IGT Navi 4 w/a: https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/tree/3d-fl-workaround
> kwin: https://invent.kde.org/hwentlan/kwin/-/commits/3d-fl
>
> Cc: Melissa Wen <mwen@igalia.com>
> Cc: Autumn Ashton <misyl@froggi.es>
> Cc: Xaver Hugl <xaver.hugl@gmail.com>
>
> Harry Wentland (13):
> drm/colorop: Add DRM_COLOROP_3D_LUT_DMA
> drm/colorop: add DRM_COLOROP_3D_LUT_DMA object and state
> drm/atomic: wire up DMA 3D LUT colorop properties
> drm/atomic: validate DMA 3D LUT colorop framebuffer
> drm/atomic: add colorop prepare_fb and cleanup_fb helper hooks
> drm/tests: test colorop prepare_fb and cleanup_fb helpers
> drm/amd/display: advertise a DMA 3D LUT color pipeline
> drm/amd/display: pin the DMA 3D LUT framebuffer
> drm/amd/display: program the DMA 3D LUT colorop
> drm/amd/display: add 3D LUT DMA pitch alignment cap
> drm/amd/display: derive the DMA 3D LUT pitch from DC caps
> drm/amd/display: reject direct 3D LUT loading mode changes
> drm/amd/display: add KUnit tests for the DMA 3D LUT colorop
>
> drivers/gpu/drm/amd/display/Kconfig | 13 +
> .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 68 ++-
> .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 131 +++++-
> .../amd/display/amdgpu_dm/amdgpu_dm_colorop.h | 8 +-
> .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 71 +++-
> .../amdgpu_dm/tests/amdgpu_dm_colorop_test.c | 286 ++++++++++++-
> .../amdgpu_dm/tests/amdgpu_dm_plane_test.c | 65 +++
> drivers/gpu/drm/amd/display/dc/dc.h | 2 +
> .../dc/resource/dcn42/dcn42_resource.c | 2 +
> .../dc/resource/dcn42b/dcn42b_resource.c | 2 +
> drivers/gpu/drm/drm_atomic.c | 66 +++
> drivers/gpu/drm/drm_atomic_helper.c | 93 ++++
> drivers/gpu/drm/drm_atomic_uapi.c | 28 ++
> drivers/gpu/drm/drm_colorop.c | 96 +++++
> drivers/gpu/drm/drm_framebuffer.c | 45 +-
> drivers/gpu/drm/drm_gem_atomic_helper.c | 81 ++++
> drivers/gpu/drm/tests/Makefile | 1 +
> .../gpu/drm/tests/drm_colorop_helper_test.c | 397 ++++++++++++++++++
> include/drm/drm_atomic.h | 20 +
> include/drm/drm_colorop.h | 71 ++++
> include/drm/drm_gem_atomic_helper.h | 11 +
> include/drm/drm_modeset_helper_vtables.h | 62 +++
> include/uapi/drm/drm.h | 7 +-
> include/uapi/drm/drm_mode.h | 79 ++++
> 24 files changed, 1672 insertions(+), 33 deletions(-)
> create mode 100644 drivers/gpu/drm/tests/drm_colorop_helper_test.c
>
> --
> 2.56.0
--
Ville Syrjälä
Intel
prev parent reply other threads:[~2026-11-03 22:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:37 [PATCH v1 00/13] Add DRM_COLOROP_3D_LUT_DMA for fast-loading 3D LUT Harry Wentland
2026-11-03 21:37 ` [PATCH v1 01/13] drm/colorop: Add DRM_COLOROP_3D_LUT_DMA Harry Wentland
2026-11-03 21:37 ` [PATCH v1 02/13] drm/colorop: add DRM_COLOROP_3D_LUT_DMA object and state Harry Wentland
2026-11-03 21:37 ` [PATCH v1 03/13] drm/atomic: wire up DMA 3D LUT colorop properties Harry Wentland
2026-11-03 21:37 ` [PATCH v1 04/13] drm/atomic: validate DMA 3D LUT colorop framebuffer Harry Wentland
2026-11-03 21:37 ` [PATCH v1 05/13] drm/atomic: add colorop prepare_fb and cleanup_fb helper hooks Harry Wentland
2026-11-03 21:37 ` [PATCH v1 06/13] drm/tests: test colorop prepare_fb and cleanup_fb helpers Harry Wentland
2026-11-03 21:37 ` [PATCH v1 07/13] drm/amd/display: advertise a DMA 3D LUT color pipeline Harry Wentland
2026-11-03 21:37 ` [PATCH v1 08/13] drm/amd/display: pin the DMA 3D LUT framebuffer Harry Wentland
2026-11-03 21:37 ` [PATCH v1 09/13] drm/amd/display: program the DMA 3D LUT colorop Harry Wentland
2026-11-03 21:37 ` [PATCH v1 10/13] drm/amd/display: add 3D LUT DMA pitch alignment cap Harry Wentland
2026-11-03 21:37 ` [PATCH v1 11/13] drm/amd/display: derive the DMA 3D LUT pitch from DC caps Harry Wentland
2026-11-03 21:37 ` [PATCH v1 12/13] drm/amd/display: reject direct 3D LUT loading mode changes Harry Wentland
2026-11-03 21:37 ` [PATCH v1 13/13] drm/amd/display: add KUnit tests for the DMA 3D LUT colorop Harry Wentland
2026-11-03 22:45 ` Ville Syrjälä [this message]
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=aupkDmY1HUlS27HT@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=misyl@froggi.es \
--cc=mwen@igalia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.