]> Git Repo - linux.git/commitdiff
drm/amd/display: Remove ASSERT if significance is zero in math_ceil2
authorRodrigo Siqueira <[email protected]>
Thu, 4 Jul 2024 17:54:34 +0000 (11:54 -0600)
committerAlex Deucher <[email protected]>
Wed, 24 Jul 2024 21:30:23 +0000 (17:30 -0400)
In the DML math_ceil2 function, there is one ASSERT if the significance
is equal to zero. However, significance might be equal to zero
sometimes, and this is not an issue for a ceil function, but the current
ASSERT will trigger warnings in those cases. This commit removes the
ASSERT if the significance is equal to zero to avoid unnecessary noise.

Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Reviewed-by: Chaitanya Dhere <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Aurabindo Pillai <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 332315885d3ccc6d8fe99700f3c2e4c24aa65ab7)

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.c

index defe13436a2c36d7c831eafc7f1dad553964a782..e73579f1a88e502d400f2537a3904d3dadbee852 100644 (file)
@@ -64,8 +64,6 @@ double math_ceil(const double arg)
 
 double math_ceil2(const double arg, const double significance)
 {
-       ASSERT(significance != 0);
-
        return ((int)(arg / significance + 0.99999)) * significance;
 }
 
This page took 0.071309 seconds and 4 git commands to generate.