[PATCH 09/16] drm/amd/display: Update SPL Taps Required For Integer Scaling
Hamza Mahfooz
hamza.mahfooz at amd.com
Tue Nov 5 20:22:10 UTC 2024
From: Austin Zheng <Austin.Zheng at amd.com>
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 at amd.com>
Signed-off-by: Austin Zheng <Austin.Zheng at amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz at amd.com>
---
drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c
index a29a9f131e04..614276200aa0 100644
--- a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c
+++ b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c
@@ -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;
--
2.46.1
More information about the amd-gfx
mailing list