Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 821c6559 authored by Hugo Hu's avatar Hugo Hu Committed by Alex Deucher
Browse files

drm/amd/display: Don't use ROM for output TF if GAMMA_CS_TFM_1D



We can’t use hardcoded SRGB ROM for output TF if we have GAMMA_CS_TFM_1D
(unless we know 1D LUT is identity), so we never want to return here early.
We apply the LUT part of ColorTransform3x4 only in apply_lut_1d() which is
called near the end of that function.

Signed-off-by: default avatarHugo Hu <hugo.hu@amd.com>
Reviewed-by: default avatarKrunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dc88b4a6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1569,7 +1569,8 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
			output_tf->tf == TRANSFER_FUNCTION_SRGB) {
		if (ramp == NULL)
			return true;
		if (ramp->is_identity || (!mapUserRamp && ramp->type == GAMMA_RGB_256))
		if ((ramp->is_identity && ramp->type != GAMMA_CS_TFM_1D) ||
				(!mapUserRamp && ramp->type == GAMMA_RGB_256))
			return true;
	}