Commit b4981403 authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher
Browse files

drm/amd/display: Fix gamma 2.2 colorop TFs

Use GAMMA22 for degamma/blend and GAMMA22_INV for shaper so
curves match the color pipeline.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5016


Tested-by: default avatarXaver Hugl <xaver.hugl@kde.org>
Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d8f9f42e)
parent f338e773
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -37,19 +37,19 @@ 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_BT2020_INV_OETF) |
	BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV);
	BIT(DRM_COLOROP_1D_CURVE_GAMMA22);

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_BT2020_OETF) |
	BIT(DRM_COLOROP_1D_CURVE_GAMMA22);
	BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV);

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_BT2020_INV_OETF) |
	BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV);
	BIT(DRM_COLOROP_1D_CURVE_GAMMA22);

#define MAX_COLOR_PIPELINE_OPS 10