]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: Clear state after exiting fixed active VRR state
authorAmanda Liu <amanda.liu@amd.com>
Fri, 6 Dec 2019 20:12:30 +0000 (15:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:38:06 +0000 (08:38 +0100)
[ Upstream commit 6f8f76444baf405bacb0591d97549a71a9aaa1ac ]

[why]
Upon exiting a fixed active VRR state, the state isn't cleared. This
leads to the variable VRR range to be calculated incorrectly.

[how]
Set fixed active state to false when updating vrr params

Signed-off-by: Amanda Liu <amanda.liu@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/modules/freesync/freesync.c

index 5437b50e9f90d1c6ee27fe966b9c42771ecd4023..d9ea4ae690af6280ef684196e1ff128d194f66b6 100644 (file)
@@ -807,6 +807,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
                        2 * in_out_vrr->min_refresh_in_uhz)
                in_out_vrr->btr.btr_enabled = false;
 
+       in_out_vrr->fixed.fixed_active = false;
        in_out_vrr->btr.btr_active = false;
        in_out_vrr->btr.inserted_duration_in_us = 0;
        in_out_vrr->btr.frames_to_insert = 0;
@@ -826,6 +827,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
                in_out_vrr->adjust.v_total_max = stream->timing.v_total;
        } else if (in_out_vrr->state == VRR_STATE_ACTIVE_VARIABLE &&
                        refresh_range >= MIN_REFRESH_RANGE_IN_US) {
+
                in_out_vrr->adjust.v_total_min =
                        calc_v_total_from_refresh(stream,
                                in_out_vrr->max_refresh_in_uhz);