Commit ec891d8b authored by Harry Wentland's avatar Harry Wentland Committed by Simon Ser
Browse files

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: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
Link: https://patch.msgid.link/20251115000237.3561250-35-alex.hung@amd.com
parent a355b3d6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -678,6 +678,9 @@ amdgpu_colorop_tf_to_dc_tf(enum drm_colorop_curve_1d_type tf)
	case DRM_COLOROP_1D_CURVE_PQ_125_EOTF:
	case DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF:
		return TRANSFER_FUNCTION_PQ;
	case DRM_COLOROP_1D_CURVE_BT2020_INV_OETF:
	case DRM_COLOROP_1D_CURVE_BT2020_OETF:
		return TRANSFER_FUNCTION_BT709;
	default:
		return TRANSFER_FUNCTION_LINEAR;
	}
+6 −3
Original line number Diff line number Diff line
@@ -33,15 +33,18 @@

const u64 amdgpu_dm_supported_degam_tfs =
	BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) |
	BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF);
	BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) |
	BIT(DRM_COLOROP_1D_CURVE_BT2020_INV_OETF);

const u64 amdgpu_dm_supported_shaper_tfs =
	BIT(DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF) |
	BIT(DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF);
	BIT(DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF) |
	BIT(DRM_COLOROP_1D_CURVE_BT2020_OETF);

const u64 amdgpu_dm_supported_blnd_tfs =
	BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) |
	BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF);
	BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) |
	BIT(DRM_COLOROP_1D_CURVE_BT2020_INV_OETF);

#define MAX_COLOR_PIPELINE_OPS 10