drm/amd/display: remove unused _calculate_degamma_curve function
authorMelissa Wen <mwen@igalia.com>
Tue, 14 Feb 2023 12:14:06 +0000 (11:14 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Feb 2023 03:24:26 +0000 (22:24 -0500)
We don't use this function anywhere, therefore, remove it.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
drivers/gpu/drm/amd/display/modules/color/color_gamma.h

index 6e606b11286a0bf678d3cf36efbfe806169506a1..67a062af3ab03e7ae4711db138bdfbe0a57d7082 100644 (file)
@@ -2217,89 +2217,3 @@ axis_x_alloc_fail:
 rgb_user_alloc_fail:
        return ret;
 }
-
-bool  mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans,
-                               struct dc_transfer_func_distributed_points *points)
-{
-       uint32_t i;
-       bool ret = false;
-       struct pwl_float_data_ex *rgb_degamma = NULL;
-
-       if (trans == TRANSFER_FUNCTION_UNITY ||
-               trans == TRANSFER_FUNCTION_LINEAR) {
-
-               for (i = 0; i <= MAX_HW_POINTS ; i++) {
-                       points->red[i]    = coordinates_x[i].x;
-                       points->green[i]  = coordinates_x[i].x;
-                       points->blue[i]   = coordinates_x[i].x;
-               }
-               ret = true;
-       } else if (trans == TRANSFER_FUNCTION_PQ) {
-               rgb_degamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
-                                      sizeof(*rgb_degamma),
-                                      GFP_KERNEL);
-               if (!rgb_degamma)
-                       goto rgb_degamma_alloc_fail;
-
-
-               build_de_pq(rgb_degamma,
-                               MAX_HW_POINTS,
-                               coordinates_x);
-               for (i = 0; i <= MAX_HW_POINTS ; i++) {
-                       points->red[i]    = rgb_degamma[i].r;
-                       points->green[i]  = rgb_degamma[i].g;
-                       points->blue[i]   = rgb_degamma[i].b;
-               }
-               ret = true;
-
-               kvfree(rgb_degamma);
-       } else if (trans == TRANSFER_FUNCTION_SRGB ||
-               trans == TRANSFER_FUNCTION_BT709 ||
-               trans == TRANSFER_FUNCTION_GAMMA22 ||
-               trans == TRANSFER_FUNCTION_GAMMA24 ||
-               trans == TRANSFER_FUNCTION_GAMMA26) {
-               rgb_degamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
-                                      sizeof(*rgb_degamma),
-                                      GFP_KERNEL);
-               if (!rgb_degamma)
-                       goto rgb_degamma_alloc_fail;
-
-               build_degamma(rgb_degamma,
-                               MAX_HW_POINTS,
-                               coordinates_x,
-                               trans);
-               for (i = 0; i <= MAX_HW_POINTS ; i++) {
-                       points->red[i]    = rgb_degamma[i].r;
-                       points->green[i]  = rgb_degamma[i].g;
-                       points->blue[i]   = rgb_degamma[i].b;
-               }
-               ret = true;
-
-               kvfree(rgb_degamma);
-       } else if (trans == TRANSFER_FUNCTION_HLG) {
-               rgb_degamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
-                                      sizeof(*rgb_degamma),
-                                      GFP_KERNEL);
-               if (!rgb_degamma)
-                       goto rgb_degamma_alloc_fail;
-
-               build_hlg_degamma(rgb_degamma,
-                               MAX_HW_POINTS,
-                               coordinates_x,
-                               80, 1000);
-               for (i = 0; i <= MAX_HW_POINTS ; i++) {
-                       points->red[i]    = rgb_degamma[i].r;
-                       points->green[i]  = rgb_degamma[i].g;
-                       points->blue[i]   = rgb_degamma[i].b;
-               }
-               ret = true;
-               kvfree(rgb_degamma);
-       }
-       points->end_exponent = 0;
-       points->x_point_at_y1_red = 1;
-       points->x_point_at_y1_green = 1;
-       points->x_point_at_y1_blue = 1;
-
-rgb_degamma_alloc_fail:
-       return ret;
-}
index 2893abf482084492f8cbcd50b4ad0cb1238cf463..ee5c466613de7b0c7a8d35959b8a7b535a808332 100644 (file)
@@ -115,9 +115,6 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
                struct dc_transfer_func *output_tf,
                const struct dc_gamma *ramp, bool mapUserRamp);
 
-bool mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans,
-                               struct dc_transfer_func_distributed_points *points);
-
 bool calculate_user_regamma_coeff(struct dc_transfer_func *output_tf,
                const struct regamma_lut *regamma,
                struct calculate_buffer *cal_buffer,