Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Add support for BT.709 and BT.2020 TFs

This adds support for the BT.709/BT.2020 transfer functions
on all current 1D curve plane colorops, i.e., on DEGAM, SHAPER,
and BLND blocks.

With this change the following IGT subtests pass:
kms_colorop --run plane-XR30-XR30-bt2020_inv_oetf
kms_colorop --run plane-XR30-XR30-bt2020_oetf

Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Link: https://patch.msgid.link/20251115000237.3561250-35-alex.hung@amd.com

authored by

Harry Wentland and committed by
Simon Ser
ec891d8b a355b3d6

+9 -3
+3
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
··· 678 678 case DRM_COLOROP_1D_CURVE_PQ_125_EOTF: 679 679 case DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF: 680 680 return TRANSFER_FUNCTION_PQ; 681 + case DRM_COLOROP_1D_CURVE_BT2020_INV_OETF: 682 + case DRM_COLOROP_1D_CURVE_BT2020_OETF: 683 + return TRANSFER_FUNCTION_BT709; 681 684 default: 682 685 return TRANSFER_FUNCTION_LINEAR; 683 686 }
+6 -3
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c
··· 33 33 34 34 const u64 amdgpu_dm_supported_degam_tfs = 35 35 BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) | 36 - BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF); 36 + BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) | 37 + BIT(DRM_COLOROP_1D_CURVE_BT2020_INV_OETF); 37 38 38 39 const u64 amdgpu_dm_supported_shaper_tfs = 39 40 BIT(DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF) | 40 - BIT(DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF); 41 + BIT(DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF) | 42 + BIT(DRM_COLOROP_1D_CURVE_BT2020_OETF); 41 43 42 44 const u64 amdgpu_dm_supported_blnd_tfs = 43 45 BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) | 44 - BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF); 46 + BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) | 47 + BIT(DRM_COLOROP_1D_CURVE_BT2020_INV_OETF); 45 48 46 49 #define MAX_COLOR_PIPELINE_OPS 10 47 50