summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/basics
diff options
context:
space:
mode:
authorVitaly Prosyak2017-11-24 22:52:33 +0100
committerAlex Deucher2017-12-14 16:57:36 +0100
commit508f60e36a4288beb920b921924742c2b3e12a0d (patch)
tree63859abb0e577ee17b7ca2c723d4b023d345e676 /drivers/gpu/drm/amd/display/dc/basics
parentdrm/amd/display: OPTC cleanup/implementation (diff)
downloadkernel-qcow2-linux-508f60e36a4288beb920b921924742c2b3e12a0d.tar.gz
kernel-qcow2-linux-508f60e36a4288beb920b921924742c2b3e12a0d.tar.xz
kernel-qcow2-linux-508f60e36a4288beb920b921924742c2b3e12a0d.zip
drm/amd/display: Correct fixed point calculation.
When convert from fixed31_32 to other fixed point format use math operation round instead of floor. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Roman Li <Roman.Li@amd.com> Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics')
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/conversion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.c b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
index 23c9a0ec0181..310964915a83 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.c
@@ -46,7 +46,7 @@ uint16_t fixed_point_to_int_frac(
arg));
if (d <= (uint16_t)(1 << integer_bits) - (1 / (uint16_t)divisor))
- numerator = (uint16_t)dal_fixed31_32_floor(
+ numerator = (uint16_t)dal_fixed31_32_round(
dal_fixed31_32_mul_int(
arg,
divisor));