]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit0b1f04d8876bd1397d3c2c837c3ea4cc77773698
tree5707c5f743948241e0cba0b68cb7cac7103fb536
parentf2cd2e5d861245dbf40e9b919e4734123164d8f4
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