drm/amd/display: fix dml log2 function

This change removes internal rounding in dml_log2 function.

Dml_log2 is expected to return a float output. In case an int is needed
dml will floor the output on it's own.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Dmytro Laktyushkin 2020-05-01 15:43:09 -04:00 committed by Alex Deucher
parent 562c805f83
commit 1649bbe01b
1 changed files with 2 additions and 2 deletions

View File

@ -86,9 +86,9 @@ static inline double dml_round(double a)
return floor;
}
static inline int dml_log2(double x)
static inline double dml_log2(double x)
{
return dml_round((double)dcn_bw_log(x, 2));
return (double) dcn_bw_log(x, 2);
}
static inline double dml_pow(double a, int exp)