]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Cast int to float before division
authorSung Lee <sung.lee@amd.com>
Mon, 30 Mar 2020 21:16:23 +0000 (17:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Apr 2020 22:11:47 +0000 (18:11 -0400)
commitd3f3734ed2878066b743fe0a55b4434f22f1670c
tree5707c5f743948241e0cba0b68cb7cac7103fb536
parent0f6aafa45b296d5a84a8e6dfefb2037ed08e3c1e
drm/amd/display: Cast int to float before division

[Why]:
Some inputs to dml_ceil have it dividied by int which causes a
truncation. This loss of precision means the ceil function becomes
redundant and does not round up.

[How]:
Cast parameter to float before division.

Signed-off-by: Sung Lee <sung.lee@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c