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

drm/amd/display: unset initial value for tf since it's never used

In mod_color_calculate_{degamma/regamma}_params(), a tf variable is
initialized as TRANSFER_FUNCTION_SRGB but tf is only used after tf =
input->tf, therefore, better to just remove this initial value and avoid
misleading interpretations.

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
af54167d 6ff387e8

+2 -2
+2 -2
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
··· 1883 1883 struct pwl_float_data_ex *curve = NULL; 1884 1884 struct gamma_pixel *axis_x = NULL; 1885 1885 struct pixel_gamma_point *coeff = NULL; 1886 - enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB; 1886 + enum dc_transfer_func_predefined tf; 1887 1887 uint32_t i; 1888 1888 bool ret = false; 1889 1889 ··· 2125 2125 struct pwl_float_data_ex *rgb_regamma = NULL; 2126 2126 struct gamma_pixel *axis_x = NULL; 2127 2127 struct pixel_gamma_point *coeff = NULL; 2128 - enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB; 2128 + enum dc_transfer_func_predefined tf; 2129 2129 bool do_clamping = true; 2130 2130 bool ret = false; 2131 2131