]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: unset initial value for tf since it's never used
authorMelissa Wen <mwen@igalia.com>
Tue, 14 Feb 2023 12:14:04 +0000 (11:14 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Feb 2023 03:24:20 +0000 (22:24 -0500)
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>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c

index fdb20dfc70c9878e4a5e83ad5b915cc9f8b5ca00..6e606b11286a0bf678d3cf36efbfe806169506a1 100644 (file)
@@ -1883,7 +1883,7 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
        struct pwl_float_data_ex *curve = NULL;
        struct gamma_pixel *axis_x = NULL;
        struct pixel_gamma_point *coeff = NULL;
-       enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB;
+       enum dc_transfer_func_predefined tf;
        uint32_t i;
        bool ret = false;
 
@@ -2125,7 +2125,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
        struct pwl_float_data_ex *rgb_regamma = NULL;
        struct gamma_pixel *axis_x = NULL;
        struct pixel_gamma_point *coeff = NULL;
-       enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB;
+       enum dc_transfer_func_predefined tf;
        bool do_clamping = true;
        bool ret = false;