From: Kaier Hsueg Date: Thu, 4 Dec 2025 16:33:59 +0000 (+0800) Subject: drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd3fece04db80c8877361bf4c9f59521ce457be0;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Fix P010, NV12, YUY2 scale down by four times failure [WHY] When performing 4:1 downscaling with subsampled formats, the SPL remainder distribution logic (+1) overrides the upper layer’s aligned width, resulting in odd segment widths and causing hang. The upper layer alignment ensures the width is sufficient and even, so SPL should not modify it further. [HOW] In dc_spl.c within calculate_mpc_slice_in_timing_active, add an extra condition: Skip the remainder distribution (+1) when use_recout_width_aligned is true.This change respects the upper layer’s alignment decision, prevents odd widths, and is a minimal, safe fix. Reviewed-by: Joshua Aberback Signed-off-by: Kaier Hsueh Signed-off-by: Chenyu Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c index f506ab70a3078..d8aebaff7c3fb 100644 --- a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c +++ b/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c @@ -226,7 +226,8 @@ static struct spl_rect calculate_mpc_slice_in_timing_active( /* extra pixels in the division remainder need to go to pipes after * the extra pixel index minus one(epimo) defined here as: */ - if (mpc_slice_idx > epimo && spl_in->basic_in.custom_width == 0) { + if ((use_recout_width_aligned == false) && + mpc_slice_idx > epimo && spl_in->basic_in.custom_width == 0) { mpc_rec.x += mpc_slice_idx - epimo - 1; mpc_rec.width += 1; }