linux/drivers/gpu/drm/amd/display/modules
Anthony Koo 575da8db31 drm/amd/display: Fix LFC multiplier changing erratically
[Why]
1. There is a calculation that is using frame_time_in_us instead of
last_render_time_in_us to calculate whether choosing an LFC multiplier
would cause the inserted frame duration to be outside of range.

2. We do not handle unsigned integer subtraction correctly and it underflows
to a really large value, which causes some logic errors.

[How]
1. Fix logic to calculate 'within range' using last_render_time_in_us
2. Split out delta_from_mid_point_delta_in_us calculation to ensure
we don't underflow and wrap around

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-08-10 17:26:52 -04:00
..
color drm/amd/display: fix compilation error on allmodconfig 2020-07-01 01:59:24 -04:00
freesync drm/amd/display: Fix LFC multiplier changing erratically 2020-08-10 17:26:52 -04:00
hdcp drm/amd/display: fix typo 2020-04-09 10:43:16 -04:00
inc drm/amd/display: Fix incorrect rounding for 10Hz refresh range 2020-07-02 12:02:54 -04:00
info_packet drm/amd/display: move location of dmub_srv.h file 2020-05-05 13:12:33 -04:00
power drm/amd: add missing fill of the array`s first element 2020-07-01 01:59:21 -04:00
vmid drm/amd/display: correct rn NUM_VMID 2020-05-21 12:48:43 -04:00