Thanks a lot!
I added the patches to my kernel branch at
https://gitlab.com/rmader/linux/-/tree/testing-post-blend-2026-11-20 [1]
and tested it with my Weston test branch for the post-blend pipeline
(https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/2157). I
can confirm it works on AMD for SDR video playback - below is some DRM
debug output confirming the Gamma 2.4 -> Gamma 2.2 Inverse use we'd
expect. The kernel and Weston branches further add and use gamma 2.4 on
VKMS, successfully comparing the output to the GL renderer.
Thus the the whole series is:
Tested-by: Robert Mader <[email protected]>
Best regards,
Robert
[atomic] drmModeAtomicCommit
[repaint] Using plane-only state composition
[repaint] paint node 0:4-2-1 on primary plane 224
[repaint] paint node 0:4-1-1 using renderer composition
[repaint] paint node 0:comp-3-1 using renderer composition
[repaint] paint node 0:2-1-1 using renderer composition
[repaint] paint node 0:2-2-1 using renderer composition
[atomic] applying output 0 (eDP-1) state
[CRTC:411] MODE_ID (24) -> [email protected] (0x248)
[CRTC:411] ACTIVE (23) -> 1 (0x1)
[COLOROP:412] BYPASS (414) -> 1 (0x1)
[COLOROP:417] BYPASS (419) -> 0 (0x0)
[COLOROP:417] CURVE_1D_TYPE (421) -> Gamma 2.2 Inverse (0x7)
[COLOROP:422] BYPASS (424) -> 1 (0x1)
[CRTC:411] COLOR_PIPELINE (429) -> 412 (0x19c)
[CRTC:411] VRR_ENABLED (25) -> 0 (0x0)
[CONN:503] CRTC_ID (21) -> 411 (0x19b)
[CONN:503] Content Protection (508) -> Undesired (0x0)
[CONN:503] HDCP Content Type (509) -> HDCP Type0 (0x0)
[CONN:503] HDR_OUTPUT_METADATA (8) -> 0 (0x0)
[CONN:503] max bpc (504) -> 16 (0x10)
[CONN:503] Colorspace (505) -> Default (0x0)
[CONN:503] underscan (38) -> off (0x0)
[CONN:503] underscan hborder (39) -> 0 (0x0)
[CONN:503] underscan vborder (40) -> 0 (0x0)
[CONN:503] color format (507) -> AUTO (0x0)
[PLANE:224 pri] FB_ID (18) -> 586 (0x24a)
[PLANE:224 pri] CRTC_ID (21) -> 411 (0x19b)
[PLANE:224 pri] SRC_X (10) -> 0.00 (0x0)
[PLANE:224 pri] SRC_Y (11) -> 0.00 (0x0)
[PLANE:224 pri] SRC_W (12) -> 3840.00 (0xf000000)
[PLANE:224 pri] SRC_H (13) -> 2160.00 (0x8700000)
[PLANE:224 pri] CRTC_X (14) -> 0 (0x0)
[PLANE:224 pri] CRTC_Y (15) -> 60 (0x3c)
[PLANE:224 pri] CRTC_W (16) -> 1920 (0x780)
[PLANE:224 pri] CRTC_H (17) -> 1080 (0x438)
[PLANE:224 pri] FB_DAMAGE_CLIPS (22) -> 0 (0x0)
[COLOROP:232] BYPASS (234) -> 0 (0x0)
[COLOROP:232] FIXED_MATRIX_TYPE (236) -> YCbCr 709 Limited
to RGB (0x3)
[COLOROP:237] BYPASS (239) -> 0 (0x0)
[COLOROP:237] CURVE_1D_TYPE (241) -> Gamma 2.4 (0x8)
[COLOROP:242] BYPASS (244) -> 1 (0x1)
[COLOROP:247] BYPASS (249) -> 1 (0x1)
[COLOROP:252] BYPASS (254) -> 1 (0x1)
[COLOROP:257] BYPASS (259) -> 1 (0x1)
[COLOROP:264] BYPASS (266) -> 1 (0x1)
[COLOROP:271] BYPASS (273) -> 1 (0x1)
[COLOROP:276] BYPASS (278) -> 1 (0x1)
[PLANE:224 pri] COLOR_PIPELINE (283) -> 232 (0xe8)
[PLANE:224] FORMAT: NV12 MODIFIER:
AMD_GFX11,64KB_R_X,PIPE_XOR_BITS=2,PACKERS=2 (0x200000010401b04)
[PLANE:224 pri] rotation (231) -> 1 (0x1)
[PLANE:224 pri] pixel blend mode (227) -> None (0x2)
1: A heavily rebased version of Melissas branch from
https://gitlab.freedesktop.org/mwen/drm-misc/-/commits/gamescope_pipeline_w_colorop
On 19.11.26 20:51, Harry Wentland wrote:
Mutter needs a pure 2.4 power curve. The color pipeline only has 2.2.
This series adds 2.4, and 2.6 for completeness.
Tested on Navi 48.
IGT patches for the Gamma 2.4 and 2.6 tests are on the igt-dev mailing
list.
Changes in v2:
- Put gamma 2.4 and 2.6 on the wide curve in
cm_helper_translate_curve_to_hw_format() as well (Sashiko).
Harry Wentland (4):
drm/colorop: Define Gamma 2.4 and 2.6 and its Inverse
drm/amd/display: Use the wide curve for gamma 2.4 and 2.6
drm/amd/display: Add support for 2.4 and 2.6 Gamma and its Inverse
drm/amd/display: Add KUnit cases for gamma 2.4 and 2.6 colorops
.../amd/display/amdgpu_dm/amdgpu_dm_color.c | 6 +++
.../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 12 +++--
.../amdgpu_dm/tests/amdgpu_dm_color_test.c | 18 +++++++
.../amdgpu_dm/tests/amdgpu_dm_colorop_test.c | 54 +++++++++++++++++--
.../amd/display/dc/dcn10/dcn10_cm_common.c | 4 +-
.../amd/display/dc/dcn30/dcn30_cm_common.c | 2 +
drivers/gpu/drm/drm_colorop.c | 4 ++
include/drm/drm_colorop.h | 39 ++++++++++++++
8 files changed, 132 insertions(+), 7 deletions(-)
--
Robert Mader
Consultant Software Developer
Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718