]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: simplify dml log2 function
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Mon, 11 May 2020 14:33:58 +0000 (10:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2020 18:00:50 +0000 (14:00 -0400)
commitd4c35d4c5a42eb45483cb3fe9d47299c129f2e2c
treee62c7f849343c5b57687a525b22e1fb6409574c3
parent9514bd1a6d14a1b90749384864ffa945cce4a6bf
drm/amd/display: simplify dml log2 function

Current implementation is slightly inaccurate and will often
result in truncation/floor operation decrementing an exact
integer output by 1.

Only rounded down output is ever expected, just extract the fp
exponent for this to increase performance and avoid any
truncation issues.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h