All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/13] Add DRM_COLOROP_3D_LUT_DMA for fast-loading 3D LUT
@ 2026-11-03 21:37 Harry Wentland
  2026-11-03 21:37 ` [PATCH v1 01/13] drm/colorop: Add DRM_COLOROP_3D_LUT_DMA Harry Wentland
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Harry Wentland @ 2026-11-03 21:37 UTC (permalink / raw)
  To: dri-devel, amd-gfx; +Cc: Harry Wentland, Melissa Wen, Autumn Ashton, Xaver Hugl

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.

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


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

end of thread, other threads:[~2026-11-03 22:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v1 00/13] Add DRM_COLOROP_3D_LUT_DMA for fast-loading 3D LUT Ville Syrjälä

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.