]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Fix unit test failure
authorSamson Tam <Samson.Tam@amd.com>
Tue, 7 Jan 2025 19:17:15 +0000 (14:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Feb 2025 16:44:02 +0000 (11:44 -0500)
commit259eacbfcf66c52384bf4e194fd34939b6007265
tree38d1a61554c25bdba3657bb595ad5c160ce64c3d
parent0d3004647631aedb713251525a99784661574767
drm/amd/display: Fix unit test failure

[Why]
Some of unit tests use large scaling ratio such that when we
 calculate optimal number of taps, max_taps is negative.
 Then in recent change, we changed max_taps to uint instead
 of int so now max_taps wraps and is positive.  This change
 changed the behaviour from returning back false to return
 true and breaks unit test check

[How]
Add check to prevent max_taps from wrapping and set to 0
 instead

Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Reviewed-by: Alvin Lee <alvin.lee2@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/sspl/dc_spl.c