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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)