Skip to content

Commit aec0f26

Browse files
melissawenalexdeucher
authored andcommitted
drm/amd/display: dcn20: remove an unused function
The dpp2_get_optimal_number_of_taps function is never used. Removing just for code cleaning up. Signed-off-by: Melissa Wen <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2f11c7c commit aec0f26

File tree

1 file changed

+0
-78
lines changed

1 file changed

+0
-78
lines changed

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -369,84 +369,6 @@ void dpp2_set_cursor_attributes(
369369
}
370370
}
371371

372-
#define IDENTITY_RATIO(ratio) (dc_fixpt_u3d19(ratio) == (1 << 19))
373-
374-
bool dpp2_get_optimal_number_of_taps(
375-
struct dpp *dpp,
376-
struct scaler_data *scl_data,
377-
const struct scaling_taps *in_taps)
378-
{
379-
/* Some ASICs does not support FP16 scaling, so we reject modes require this*/
380-
if (scl_data->viewport.width != scl_data->h_active &&
381-
scl_data->viewport.height != scl_data->v_active &&
382-
dpp->caps->dscl_data_proc_format == DSCL_DATA_PRCESSING_FIXED_FORMAT &&
383-
scl_data->format == PIXEL_FORMAT_FP16)
384-
return false;
385-
386-
if (scl_data->viewport.width > scl_data->h_active &&
387-
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
388-
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
389-
return false;
390-
391-
/* TODO: add lb check */
392-
393-
/* No support for programming ratio of 8, drop to 7.99999.. */
394-
if (scl_data->ratios.horz.value == (8ll << 32))
395-
scl_data->ratios.horz.value--;
396-
if (scl_data->ratios.vert.value == (8ll << 32))
397-
scl_data->ratios.vert.value--;
398-
if (scl_data->ratios.horz_c.value == (8ll << 32))
399-
scl_data->ratios.horz_c.value--;
400-
if (scl_data->ratios.vert_c.value == (8ll << 32))
401-
scl_data->ratios.vert_c.value--;
402-
403-
/* Set default taps if none are provided */
404-
if (in_taps->h_taps == 0) {
405-
if (dc_fixpt_ceil(scl_data->ratios.horz) > 4)
406-
scl_data->taps.h_taps = 8;
407-
else
408-
scl_data->taps.h_taps = 4;
409-
} else
410-
scl_data->taps.h_taps = in_taps->h_taps;
411-
if (in_taps->v_taps == 0) {
412-
if (dc_fixpt_ceil(scl_data->ratios.vert) > 4)
413-
scl_data->taps.v_taps = 8;
414-
else
415-
scl_data->taps.v_taps = 4;
416-
} else
417-
scl_data->taps.v_taps = in_taps->v_taps;
418-
if (in_taps->v_taps_c == 0) {
419-
if (dc_fixpt_ceil(scl_data->ratios.vert_c) > 4)
420-
scl_data->taps.v_taps_c = 4;
421-
else
422-
scl_data->taps.v_taps_c = 2;
423-
} else
424-
scl_data->taps.v_taps_c = in_taps->v_taps_c;
425-
if (in_taps->h_taps_c == 0) {
426-
if (dc_fixpt_ceil(scl_data->ratios.horz_c) > 4)
427-
scl_data->taps.h_taps_c = 4;
428-
else
429-
scl_data->taps.h_taps_c = 2;
430-
} else if ((in_taps->h_taps_c % 2) != 0 && in_taps->h_taps_c != 1)
431-
/* Only 1 and even h_taps_c are supported by hw */
432-
scl_data->taps.h_taps_c = in_taps->h_taps_c - 1;
433-
else
434-
scl_data->taps.h_taps_c = in_taps->h_taps_c;
435-
436-
if (!dpp->ctx->dc->debug.always_scale) {
437-
if (IDENTITY_RATIO(scl_data->ratios.horz))
438-
scl_data->taps.h_taps = 1;
439-
if (IDENTITY_RATIO(scl_data->ratios.vert))
440-
scl_data->taps.v_taps = 1;
441-
if (IDENTITY_RATIO(scl_data->ratios.horz_c))
442-
scl_data->taps.h_taps_c = 1;
443-
if (IDENTITY_RATIO(scl_data->ratios.vert_c))
444-
scl_data->taps.v_taps_c = 1;
445-
}
446-
447-
return true;
448-
}
449-
450372
void oppn20_dummy_program_regamma_pwl(
451373
struct dpp *dpp,
452374
const struct pwl_params *params,

0 commit comments

Comments
 (0)