drm/amd/display: remove unused _calculate_degamma_curve function
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>
This commit is contained in:
parent
62f9286fc2
commit
9a13ff8f52
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user