]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: fix v tap calculation for non-adaptive scaling in SPL
authorSamson Tam <Samson.Tam@amd.com>
Wed, 20 Nov 2024 06:05:58 +0000 (01:05 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Dec 2024 15:26:49 +0000 (10:26 -0500)
[Why & How]
v and h tap calculations slightly different
Use h tap calculation for both v and h tap

Reviewed-by: Navid Assadian <navid.assadian@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/spl/dc_spl.c

index c92312fec7a9b33fcdb4ac75215816584172f48e..72d55e9a4fd7cf4fccfe868028ead889a281dd28 100644 (file)
@@ -899,8 +899,8 @@ static void spl_get_taps_non_adaptive_scaler(
 
        if (in_taps->v_taps == 0) {
                if (spl_fixpt_ceil(spl_scratch->scl_data.ratios.vert) > 1)
-                       spl_scratch->scl_data.taps.v_taps = spl_min(spl_fixpt_ceil(spl_fixpt_mul_int(
-                               spl_scratch->scl_data.ratios.vert, 2)), 8);
+                       spl_scratch->scl_data.taps.v_taps = spl_min(2 * spl_fixpt_ceil(
+                               spl_scratch->scl_data.ratios.vert), 8);
                else
                        spl_scratch->scl_data.taps.v_taps = 4;
        } else
@@ -908,8 +908,8 @@ static void spl_get_taps_non_adaptive_scaler(
 
        if (in_taps->v_taps_c == 0) {
                if (spl_fixpt_ceil(spl_scratch->scl_data.ratios.vert_c) > 1)
-                       spl_scratch->scl_data.taps.v_taps_c = spl_min(spl_fixpt_ceil(spl_fixpt_mul_int(
-                               spl_scratch->scl_data.ratios.vert_c, 2)), 8);
+                       spl_scratch->scl_data.taps.v_taps_c = spl_min(2 * spl_fixpt_ceil(
+                               spl_scratch->scl_data.ratios.vert_c), 8);
                else
                        spl_scratch->scl_data.taps.v_taps_c = 4;
        } else