Bug 111506 - [amdgpu] VRR/Freesync below the range (LFC) flickering (5700 XT)
Summary: [amdgpu] VRR/Freesync below the range (LFC) flickering (5700 XT)
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: not set not set
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-28 08:26 UTC by Andrew Sheldon
Modified: 2019-11-19 09:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Andrew Sheldon 2019-08-28 08:26:53 UTC
I'm getting heavy flickering when dropping below the minimum refresh rate (default of 40-92, but I also tested 35-92) with Freesync enabled.

It seems to be LFC related as the higher the minimum, the earlier the flickering kicks in (so it's not a case of the monitor not being able to handle it at the low end).

I can workaround the problem by changing block of code in freesync.c:

if (in_out_vrr->max_refresh_in_uhz <
	    (2 * in_out_vrr->min_refresh_in_uhz))
		in_out_vrr->btr.btr_enabled = false;

with:

if (in_out_vrr->max_refresh_in_uhz <
	    (3 * in_out_vrr->min_refresh_in_uhz))
		in_out_vrr->btr.btr_enabled = false;

effectively forcing LFC to only kick in at ~30fps or lower. 

It's possibly a regression as I don't remember the issue occurring with Vega or Polaris and 5.2 kernel. It's also possible that it's the monitor itself at fault, and maybe LFC wasn't kicking in properly in older kernels/hardware, effectively hiding the problem. I will try to get around to testing with Vega and an older kernel in the future.


System:
MSI 5700 XT
amd-staging-drm-next
Mesa git
Comment 1 Andrew Sheldon 2019-08-28 08:42:35 UTC
I should note that it doesn't flicker at all with the modification I suggested. Presumably, LFC is in fact kicking in at 30fps and below, so assuming that's the case, it's not really LFC in general that is the problem, just LFC when just below the minimum. 

One possibility is that LFC is somehow generating frames at a rate above the maximum refresh rate for framerates above 30 and below the minimum (35), since the range is fairly narrow. Maybe it's tripling rather than doubling the framerate?
Comment 2 Andrew Sheldon 2019-10-10 05:43:54 UTC
Looks to be fixed by commit 109b3e3e13507ad0908ff00bc7eb759ed41b88be

drm/amd/display: Improve LFC behaviour

It now smoothly transitions between LFC and VRR without flickering.
Comment 3 Martin Peres 2019-11-19 09:50:46 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/897.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.