Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Melissa Wen and committed by
Alex Deucher
9a13ff8f 62f9286f

-89
-86
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
··· 2217 2217 rgb_user_alloc_fail: 2218 2218 return ret; 2219 2219 } 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 - }
-3
drivers/gpu/drm/amd/display/modules/color/color_gamma.h
··· 115 115 struct dc_transfer_func *output_tf, 116 116 const struct dc_gamma *ramp, bool mapUserRamp); 117 117 118 - bool mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans, 119 - struct dc_transfer_func_distributed_points *points); 120 - 121 118 bool calculate_user_regamma_coeff(struct dc_transfer_func *output_tf, 122 119 const struct regamma_lut *regamma, 123 120 struct calculate_buffer *cal_buffer,