drm/amd/display: Add below the range support for FreeSync
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 5 Dec 2018 17:08:56 +0000 (12:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Dec 2018 22:39:42 +0000 (17:39 -0500)
commit180db303ff466a3887c841e805568b92233e2d0e
tree5051068334f6c4c47c26b4773be43957440f344d
parent8cd61c313d8b5a813a38b615796ea50563f3afae
drm/amd/display: Add below the range support for FreeSync

[Why]
When the flip-rate is below the minimum supported variable refresh rate
range for the monitor the front porch wait will timeout and be
frequently misaligned resulting in stuttering and/or flickering.

The FreeSync module can still maintain a smooth and flicker free
image when the monitor has a refresh rate range such that the maximum
refresh > 2 * minimum refresh by utilizing low framerate compensation,
"below the range".

[How]
Hook up the pre-flip and post-flip handlers from the FreeSync module.
These adjust the minimum/maximum vrr range to duplicate frames
when appropriate by tracking flip timestamps.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h