Commit 1649bbe0 authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher

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: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: default avatarEric Bernstein <Eric.Bernstein@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 562c805f
...@@ -86,9 +86,9 @@ static inline double dml_round(double a) ...@@ -86,9 +86,9 @@ static inline double dml_round(double a)
return floor; 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) static inline double dml_pow(double a, int exp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment