Skip to content

Commit 9a13ff8

Browse files
melissawenalexdeucher
authored andcommitted
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>
1 parent 62f9286 commit 9a13ff8

2 files changed

Lines changed: 0 additions & 89 deletions

File tree

drivers/gpu/drm/amd/display/modules/color/color_gamma.c

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,89 +2217,3 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
22172217
rgb_user_alloc_fail:
22182218
return ret;
22192219
}
2220-
2221-
bool mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans,
2222-
struct dc_transfer_func_distributed_points *points)
2223-
{
2224-
uint32_t i;
2225-
bool ret = false;
2226-
struct pwl_float_data_ex *rgb_degamma = NULL;
2227-
2228-
if (trans == TRANSFER_FUNCTION_UNITY ||
2229-
trans == TRANSFER_FUNCTION_LINEAR) {
2230-
2231-
for (i = 0; i <= MAX_HW_POINTS ; i++) {
2232-
points->red[i] = coordinates_x[i].x;
2233-
points->green[i] = coordinates_x[i].x;
2234-
points->blue[i] = coordinates_x[i].x;
2235-
}
2236-
ret = true;
2237-
} else if (trans == TRANSFER_FUNCTION_PQ) {
2238-
rgb_degamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
2239-
sizeof(*rgb_degamma),
2240-
GFP_KERNEL);
2241-
if (!rgb_degamma)
2242-
goto rgb_degamma_alloc_fail;
2243-
2244-
2245-
build_de_pq(rgb_degamma,
2246-
MAX_HW_POINTS,
2247-
coordinates_x);
2248-
for (i = 0; i <= MAX_HW_POINTS ; i++) {
2249-
points->red[i] = rgb_degamma[i].r;
2250-
points->green[i] = rgb_degamma[i].g;
2251-
points->blue[i] = rgb_degamma[i].b;
2252-
}
2253-
ret = true;
2254-
2255-
kvfree(rgb_degamma);
2256-
} else if (trans == TRANSFER_FUNCTION_SRGB ||
2257-
trans == TRANSFER_FUNCTION_BT709 ||
2258-
trans == TRANSFER_FUNCTION_GAMMA22 ||
2259-
trans == TRANSFER_FUNCTION_GAMMA24 ||
2260-
trans == TRANSFER_FUNCTION_GAMMA26) {
2261-
rgb_degamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
2262-
sizeof(*rgb_degamma),
2263-
GFP_KERNEL);
2264-
if (!rgb_degamma)
2265-
goto rgb_degamma_alloc_fail;
2266-
2267-
build_degamma(rgb_degamma,
2268-
MAX_HW_POINTS,
2269-
coordinates_x,
2270-
trans);
2271-
for (i = 0; i <= MAX_HW_POINTS ; i++) {
2272-
points->red[i] = rgb_degamma[i].r;
2273-
points->green[i] = rgb_degamma[i].g;
2274-
points->blue[i] = rgb_degamma[i].b;
2275-
}
2276-
ret = true;
2277-
2278-
kvfree(rgb_degamma);
2279-
} else if (trans == TRANSFER_FUNCTION_HLG) {
2280-
rgb_degamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
2281-
sizeof(*rgb_degamma),
2282-
GFP_KERNEL);
2283-
if (!rgb_degamma)
2284-
goto rgb_degamma_alloc_fail;
2285-
2286-
build_hlg_degamma(rgb_degamma,
2287-
MAX_HW_POINTS,
2288-
coordinates_x,
2289-
80, 1000);
2290-
for (i = 0; i <= MAX_HW_POINTS ; i++) {
2291-
points->red[i] = rgb_degamma[i].r;
2292-
points->green[i] = rgb_degamma[i].g;
2293-
points->blue[i] = rgb_degamma[i].b;
2294-
}
2295-
ret = true;
2296-
kvfree(rgb_degamma);
2297-
}
2298-
points->end_exponent = 0;
2299-
points->x_point_at_y1_red = 1;
2300-
points->x_point_at_y1_green = 1;
2301-
points->x_point_at_y1_blue = 1;
2302-
2303-
rgb_degamma_alloc_fail:
2304-
return ret;
2305-
}

drivers/gpu/drm/amd/display/modules/color/color_gamma.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
115115
struct dc_transfer_func *output_tf,
116116
const struct dc_gamma *ramp, bool mapUserRamp);
117117

118-
bool mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans,
119-
struct dc_transfer_func_distributed_points *points);
120-
121118
bool calculate_user_regamma_coeff(struct dc_transfer_func *output_tf,
122119
const struct regamma_lut *regamma,
123120
struct calculate_buffer *cal_buffer,

0 commit comments

Comments
 (0)