Skip to content

Commit bc04292

Browse files
Austin Zhengalexdeucher
authored andcommitted
drm/amd/display: Update SPL Taps Required For Integer Scaling
Number of taps is incorrectly being set when integer scaling is enabled. Taps required when src_rect != dst_rect previously not considered. Perform the calculations when integer scaling is enabled. Set taps to 1 if the scaling ratio is 1:1. Reviewed-by: Samson Tam <[email protected]> Signed-off-by: Austin Zheng <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0d5fd22 commit bc04292

File tree

1 file changed

+11
-4
lines changed
  • drivers/gpu/drm/amd/display/dc/spl

1 file changed

+11
-4
lines changed

drivers/gpu/drm/amd/display/dc/spl/dc_spl.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,16 @@ static void spl_get_taps_non_adaptive_scaler(
910910
spl_scratch->scl_data.taps.h_taps_c = in_taps->h_taps_c - 1;
911911
else
912912
spl_scratch->scl_data.taps.h_taps_c = in_taps->h_taps_c;
913+
914+
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz))
915+
spl_scratch->scl_data.taps.h_taps = 1;
916+
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert))
917+
spl_scratch->scl_data.taps.v_taps = 1;
918+
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz_c))
919+
spl_scratch->scl_data.taps.h_taps_c = 1;
920+
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert_c))
921+
spl_scratch->scl_data.taps.v_taps_c = 1;
922+
913923
}
914924

915925
/* Calculate optimal number of taps */
@@ -936,10 +946,7 @@ static bool spl_get_optimal_number_of_taps(
936946

937947
/* Disable adaptive scaler and sharpener when integer scaling is enabled */
938948
if (spl_in->scaling_quality.integer_scaling) {
939-
spl_scratch->scl_data.taps.h_taps = 1;
940-
spl_scratch->scl_data.taps.v_taps = 1;
941-
spl_scratch->scl_data.taps.v_taps_c = 1;
942-
spl_scratch->scl_data.taps.h_taps_c = 1;
949+
spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps);
943950
*enable_easf_v = false;
944951
*enable_easf_h = false;
945952
*enable_isharp = false;

0 commit comments

Comments
 (0)