summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/modules/freesync
diff options
context:
space:
mode:
authorAric Cyr <aric.cyr@amd.com>2020-09-22 21:37:06 -0400
committerAlex Deucher <alexander.deucher@amd.com>2020-10-05 15:17:05 -0400
commit5dff371a7351a7e9cbb06bca9e532db16594c053 (patch)
treea6fdc615e4836cda178a03421bb7c09bd49d568a /drivers/gpu/drm/amd/display/modules/freesync
parent9b42868c3fd44fb1e910a9af361b5d470e2354c7 (diff)
downloadlinux-stable-5dff371a7351a7e9cbb06bca9e532db16594c053.tar.gz
linux-stable-5dff371a7351a7e9cbb06bca9e532db16594c053.tar.bz2
linux-stable-5dff371a7351a7e9cbb06bca9e532db16594c053.zip
drm/amd/display: FreeSync not active near lower bound of non-LFC monitor range
[Why] On narrow range monitors without LFC, a margin prevents good utilization of the available range. [How] Decrease the margin for exiting fixed mode and fix the frame counter to reset if a non-consecutive render is found. Signed-off-by: Aric Cyr <aric.cyr@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Eryk Brol <eryk.brol@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/freesync')
-rw-r--r--drivers/gpu/drm/amd/display/modules/freesync/freesync.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
index f76d31451dcb..52c3cb6b439a 100644
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
@@ -42,10 +42,10 @@
/* Threshold to change BTR multiplier (to avoid frequent changes) */
#define BTR_DRIFT_MARGIN 2000
/* Threshold to exit fixed refresh rate */
-#define FIXED_REFRESH_EXIT_MARGIN_IN_HZ 4
+#define FIXED_REFRESH_EXIT_MARGIN_IN_HZ 1
/* Number of consecutive frames to check before entering/exiting fixed refresh */
#define FIXED_REFRESH_ENTER_FRAME_COUNT 5
-#define FIXED_REFRESH_EXIT_FRAME_COUNT 5
+#define FIXED_REFRESH_EXIT_FRAME_COUNT 10
struct core_freesync {
struct mod_freesync public;
@@ -420,7 +420,8 @@ static void apply_fixed_refresh(struct core_freesync *core_freesync,
in_out_vrr->fixed.target_refresh_in_uhz = 0;
update = true;
}
- }
+ } else
+ in_out_vrr->fixed.frame_counter = 0;
} else if (last_render_time_in_us > max_render_time_in_us) {
/* Enter Fixed Refresh mode */
if (!in_out_vrr->fixed.fixed_active) {
@@ -434,7 +435,8 @@ static void apply_fixed_refresh(struct core_freesync *core_freesync,
in_out_vrr->max_refresh_in_uhz;
update = true;
}
- }
+ } else
+ in_out_vrr->fixed.frame_counter = 0;
}
if (update) {