]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: dcn20: remove an unused function
authorMelissa Wen <melissa.srw@gmail.com>
Mon, 2 Mar 2020 21:40:29 +0000 (18:40 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Mar 2020 17:50:39 +0000 (13:50 -0400)
The dpp2_get_optimal_number_of_taps function is never used. Removing
just for code cleaning up.

Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c

index 13e057d7ee93da28efd01a55cbcea1873801e09b..42bba7c9548b0a0d2ae0814394876a85ec0fbd2d 100644 (file)
@@ -369,84 +369,6 @@ void dpp2_set_cursor_attributes(
        }
 }
 
-#define IDENTITY_RATIO(ratio) (dc_fixpt_u3d19(ratio) == (1 << 19))
-
-bool dpp2_get_optimal_number_of_taps(
-               struct dpp *dpp,
-               struct scaler_data *scl_data,
-               const struct scaling_taps *in_taps)
-{
-       /* Some ASICs does not support  FP16 scaling, so we reject modes require this*/
-       if (scl_data->viewport.width  != scl_data->h_active &&
-               scl_data->viewport.height != scl_data->v_active &&
-               dpp->caps->dscl_data_proc_format == DSCL_DATA_PRCESSING_FIXED_FORMAT &&
-               scl_data->format == PIXEL_FORMAT_FP16)
-               return false;
-
-       if (scl_data->viewport.width > scl_data->h_active &&
-               dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
-               scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
-               return false;
-
-       /* TODO: add lb check */
-
-       /* No support for programming ratio of 8, drop to 7.99999.. */
-       if (scl_data->ratios.horz.value == (8ll << 32))
-               scl_data->ratios.horz.value--;
-       if (scl_data->ratios.vert.value == (8ll << 32))
-               scl_data->ratios.vert.value--;
-       if (scl_data->ratios.horz_c.value == (8ll << 32))
-               scl_data->ratios.horz_c.value--;
-       if (scl_data->ratios.vert_c.value == (8ll << 32))
-               scl_data->ratios.vert_c.value--;
-
-       /* Set default taps if none are provided */
-       if (in_taps->h_taps == 0) {
-               if (dc_fixpt_ceil(scl_data->ratios.horz) > 4)
-                       scl_data->taps.h_taps = 8;
-               else
-                       scl_data->taps.h_taps = 4;
-       } else
-               scl_data->taps.h_taps = in_taps->h_taps;
-       if (in_taps->v_taps == 0) {
-               if (dc_fixpt_ceil(scl_data->ratios.vert) > 4)
-                       scl_data->taps.v_taps = 8;
-               else
-                       scl_data->taps.v_taps = 4;
-       } else
-               scl_data->taps.v_taps = in_taps->v_taps;
-       if (in_taps->v_taps_c == 0) {
-               if (dc_fixpt_ceil(scl_data->ratios.vert_c) > 4)
-                       scl_data->taps.v_taps_c = 4;
-               else
-                       scl_data->taps.v_taps_c = 2;
-       } else
-               scl_data->taps.v_taps_c = in_taps->v_taps_c;
-       if (in_taps->h_taps_c == 0) {
-               if (dc_fixpt_ceil(scl_data->ratios.horz_c) > 4)
-                       scl_data->taps.h_taps_c = 4;
-               else
-                       scl_data->taps.h_taps_c = 2;
-       } else if ((in_taps->h_taps_c % 2) != 0 && in_taps->h_taps_c != 1)
-               /* Only 1 and even h_taps_c are supported by hw */
-               scl_data->taps.h_taps_c = in_taps->h_taps_c - 1;
-       else
-               scl_data->taps.h_taps_c = in_taps->h_taps_c;
-
-       if (!dpp->ctx->dc->debug.always_scale) {
-               if (IDENTITY_RATIO(scl_data->ratios.horz))
-                       scl_data->taps.h_taps = 1;
-               if (IDENTITY_RATIO(scl_data->ratios.vert))
-                       scl_data->taps.v_taps = 1;
-               if (IDENTITY_RATIO(scl_data->ratios.horz_c))
-                       scl_data->taps.h_taps_c = 1;
-               if (IDENTITY_RATIO(scl_data->ratios.vert_c))
-                       scl_data->taps.v_taps_c = 1;
-       }
-
-       return true;
-}
-
 void oppn20_dummy_program_regamma_pwl(
                struct dpp *dpp,
                const struct pwl_params *params,