mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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 <samson.tam@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0d5fd22b63
commit
bc04292838
|
|
@ -910,6 +910,16 @@ static void spl_get_taps_non_adaptive_scaler(
|
|||
spl_scratch->scl_data.taps.h_taps_c = in_taps->h_taps_c - 1;
|
||||
else
|
||||
spl_scratch->scl_data.taps.h_taps_c = in_taps->h_taps_c;
|
||||
|
||||
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz))
|
||||
spl_scratch->scl_data.taps.h_taps = 1;
|
||||
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert))
|
||||
spl_scratch->scl_data.taps.v_taps = 1;
|
||||
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz_c))
|
||||
spl_scratch->scl_data.taps.h_taps_c = 1;
|
||||
if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert_c))
|
||||
spl_scratch->scl_data.taps.v_taps_c = 1;
|
||||
|
||||
}
|
||||
|
||||
/* Calculate optimal number of taps */
|
||||
|
|
@ -936,10 +946,7 @@ static bool spl_get_optimal_number_of_taps(
|
|||
|
||||
/* Disable adaptive scaler and sharpener when integer scaling is enabled */
|
||||
if (spl_in->scaling_quality.integer_scaling) {
|
||||
spl_scratch->scl_data.taps.h_taps = 1;
|
||||
spl_scratch->scl_data.taps.v_taps = 1;
|
||||
spl_scratch->scl_data.taps.v_taps_c = 1;
|
||||
spl_scratch->scl_data.taps.h_taps_c = 1;
|
||||
spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps);
|
||||
*enable_easf_v = false;
|
||||
*enable_easf_h = false;
|
||||
*enable_isharp = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user