Skip to content

Commit ec891d8

Browse files
Harry Wentlandemersion
authored andcommitted
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
1 parent a355b3d commit ec891d8

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,9 @@ amdgpu_colorop_tf_to_dc_tf(enum drm_colorop_curve_1d_type tf)
678678
case DRM_COLOROP_1D_CURVE_PQ_125_EOTF:
679679
case DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF:
680680
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;
681684
default:
682685
return TRANSFER_FUNCTION_LINEAR;
683686
}

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@
3333

3434
const u64 amdgpu_dm_supported_degam_tfs =
3535
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);
3738

3839
const u64 amdgpu_dm_supported_shaper_tfs =
3940
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);
4143

4244
const u64 amdgpu_dm_supported_blnd_tfs =
4345
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);
4548

4649
#define MAX_COLOR_PIPELINE_OPS 10
4750

0 commit comments

Comments
 (0)