From: Anthony Koo Date: Fri, 6 Apr 2018 16:12:06 +0000 (-0400) Subject: drm/amd/display: fix LFC tearing at top of screen X-Git-Tag: v4.20-rc1~21^2~27^2~268 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=9410a3776bbf1e172cfdb9f8b771a5ce64081a51;p=uclinux-h8%2Flinux.git drm/amd/display: fix LFC tearing at top of screen Tearing occurred because new VTOTAL MIN/MAX was being programmed too early. The flip can happen within the VUPDATE high region, and the new min/max would take effect immediately. But this means that frame is not variable anymore, and tearing would occur when the flip actually happens. The fixed insert duration should be programmed on the first VUPDATE interrupt instead. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index abd5c9374eb3..daad60ec1ce3 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -371,12 +371,6 @@ static void apply_below_the_range(struct core_freesync *core_freesync, inserted_frame_duration_in_us; in_out_vrr->btr.frames_to_insert = frames_to_insert; in_out_vrr->btr.frame_counter = frames_to_insert; - - in_out_vrr->adjust.v_total_min = - calc_v_total_from_duration(stream, in_out_vrr, - in_out_vrr->btr.inserted_duration_in_us); - in_out_vrr->adjust.v_total_max = - in_out_vrr->adjust.v_total_min; } }