Message ID | 20190418035122.15791-4-mario.kleiner.de@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] drm/amd/display: Add some debug output for VRR BTR. | expand |
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index e56543c36eba..a965ab5466dc 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -350,7 +350,7 @@ static void apply_below_the_range(struct core_freesync *core_freesync, in_out_vrr->btr.frame_counter = 0; in_out_vrr->btr.btr_active = false; } - } else if (last_render_time_in_us > max_render_time_in_us) { + } else if (last_render_time_in_us + BTR_EXIT_MARGIN > max_render_time_in_us) { /* Enter Below the Range */ in_out_vrr->btr.btr_active = true; }
Use a 2 msecs switching headroom not only for slightly delayed exiting of BTR mode, but now also for entering it a bit before the max frame duration is exceeded. With slowly changing time delay between successive flips or with a bit of jitter in arrival of flips, this adapts vblank early and prevents missed vblanks at the border between non-BTR and BTR. Testing on DCE-8, DCE-11 and DCN-1.0 shows that this more often avoids skipped frames when moving across the BTR boundary, especially on DCE-8 and DCE-11 with the followup commit for dealing with pre-DCE-12 hw. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)