drm/amd/display: Fix MPCC 1DLUT programming
authorIlya Bakoulin <ilya.bakoulin@amd.com>
Tue, 7 Nov 2023 20:07:56 +0000 (15:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 22:58:36 +0000 (17:58 -0500)
[Why]
Wrong function is used to translate LUT values to HW format, leading to
visible artifacting in some cases.

[How]
Use the correct cm3_helper function.

Cc: stable@vger.kernel.org # 6.1+
Reviewed-by: Krunoslav Kovac <krunoslav.kovac@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Ilya Bakoulin <ilya.bakoulin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c

index 6a65af8c36b904fdb1cb3308a149174925c3b404..5f7f474ef51c9a4104731fa6743a1ad553175005 100644 (file)
@@ -487,8 +487,7 @@ bool dcn32_set_mcm_luts(
                if (plane_state->blend_tf->type == TF_TYPE_HWPWL)
                        lut_params = &plane_state->blend_tf->pwl;
                else if (plane_state->blend_tf->type == TF_TYPE_DISTRIBUTED_POINTS) {
-                       cm_helper_translate_curve_to_hw_format(plane_state->ctx,
-                                       plane_state->blend_tf,
+                       cm3_helper_translate_curve_to_hw_format(plane_state->blend_tf,
                                        &dpp_base->regamma_params, false);
                        lut_params = &dpp_base->regamma_params;
                }
@@ -503,8 +502,7 @@ bool dcn32_set_mcm_luts(
                else if (plane_state->in_shaper_func->type == TF_TYPE_DISTRIBUTED_POINTS) {
                        // TODO: dpp_base replace
                        ASSERT(false);
-                       cm_helper_translate_curve_to_hw_format(plane_state->ctx,
-                                       plane_state->in_shaper_func,
+                       cm3_helper_translate_curve_to_hw_format(plane_state->in_shaper_func,
                                        &dpp_base->shaper_params, true);
                        lut_params = &dpp_base->shaper_params;
                }