Skip to content

Commit af54167

Browse files
melissawenalexdeucher
authored andcommitted
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>
1 parent 6ff387e commit af54167

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,7 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
18831883
struct pwl_float_data_ex *curve = NULL;
18841884
struct gamma_pixel *axis_x = NULL;
18851885
struct pixel_gamma_point *coeff = NULL;
1886-
enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB;
1886+
enum dc_transfer_func_predefined tf;
18871887
uint32_t i;
18881888
bool ret = false;
18891889

@@ -2125,7 +2125,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
21252125
struct pwl_float_data_ex *rgb_regamma = NULL;
21262126
struct gamma_pixel *axis_x = NULL;
21272127
struct pixel_gamma_point *coeff = NULL;
2128-
enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB;
2128+
enum dc_transfer_func_predefined tf;
21292129
bool do_clamping = true;
21302130
bool ret = false;
21312131

0 commit comments

Comments
 (0)