]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Set chroma taps to 1 if luma taps are 1
authorHarry Wentland <harry.wentland@amd.com>
Fri, 16 Jan 2026 14:39:05 +0000 (09:39 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Mar 2026 14:53:32 +0000 (10:53 -0400)
When luma is unscaled we also want chroma to be pixel-perfect.
When luma taps are > 1 the result will be a blurred luma plane,
even when the image isn't scaled.

This makes IGT tests for CSC colorop pass.

Assisted-by: Claude: claude-sonnet-4.5
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c

index ce91e5d289567e0e07600720c577a14463090e59..0e70ffc784b19cfe7e0a8e7e50d00a5f469f9d10 100644 (file)
@@ -172,10 +172,14 @@ bool dpp1_get_optimal_number_of_taps(
                scl_data->taps.h_taps_c = in_taps->h_taps_c;
 
        if (!dpp->ctx->dc->debug.always_scale) {
-               if (IDENTITY_RATIO(scl_data->ratios.horz))
+               if (IDENTITY_RATIO(scl_data->ratios.horz)) {
                        scl_data->taps.h_taps = 1;
-               if (IDENTITY_RATIO(scl_data->ratios.vert))
+                       scl_data->taps.h_taps_c = 1;
+               }
+               if (IDENTITY_RATIO(scl_data->ratios.vert)) {
                        scl_data->taps.v_taps = 1;
+                       scl_data->taps.v_taps_c = 1;
+               }
                if (IDENTITY_RATIO(scl_data->ratios.horz_c))
                        scl_data->taps.h_taps_c = 1;
                if (IDENTITY_RATIO(scl_data->ratios.vert_c))
index c7923531da83da4dae9f2bc366e5368fd784f266..8a146968ee1563c8eb9a3683ccfa5822e1f7a9fe 100644 (file)
@@ -524,10 +524,14 @@ bool dpp3_get_optimal_number_of_taps(
                scl_data->taps.v_taps_c = max_taps_c;
 
        if (!dpp->ctx->dc->debug.always_scale) {
-               if (IDENTITY_RATIO(scl_data->ratios.horz))
+               if (IDENTITY_RATIO(scl_data->ratios.horz)) {
                        scl_data->taps.h_taps = 1;
-               if (IDENTITY_RATIO(scl_data->ratios.vert))
+                       scl_data->taps.h_taps_c = 1;
+               }
+               if (IDENTITY_RATIO(scl_data->ratios.vert)) {
                        scl_data->taps.v_taps = 1;
+                       scl_data->taps.v_taps_c = 1;
+               }
                if (IDENTITY_RATIO(scl_data->ratios.horz_c))
                        scl_data->taps.h_taps_c = 1;
                if (IDENTITY_RATIO(scl_data->ratios.vert_c))