Star64_linux/drivers/gpu/drm/amd/display/modules
Bayan Zabihiyan a463b26303 drm/amd/display: Fix frames_to_insert math
[Why]
The math on deciding on how many
"frames to insert" sometimes sent us over the max refresh rate.
Also integer overflow can occur if we have high refresh rates.

[How]
Instead of clipping the  frame duration such that it doesn’t go below the min,
just remove a frame from the number of frames to insert. +
Use unsigned long long for intermediate calculations to prevent
integer overflow.

Signed-off-by: Bayan Zabihiyan <bayan.zabihiyan@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-08-15 10:53:12 -05:00
..
color drm/amd/display: Optimize gamma calculations 2019-07-18 14:27:25 -05:00
freesync drm/amd/display: Fix frames_to_insert math 2019-08-15 10:53:12 -05:00
inc drm/amd/display: add missing mod_vmid destructor 2019-06-22 09:34:14 -05:00
info_packet drm/amd/display: Use VCP for extended colorimetry 2019-05-24 12:21:00 -05:00
power drm/amd/display: Add missing newline at end of file 2019-06-17 11:02:03 -05:00
stats drm/amd/display: remove redundant null pointer check before kfree 2018-09-26 21:09:12 -05:00
vmid drm/amd/display: add missing mod_vmid destructor 2019-06-22 09:34:14 -05:00