Skip to content

Commit 33c9957

Browse files
Ivan Lipskialexdeucher
authored andcommitted
drm/amd/display: Allow VRR params change if unsynced with the stream
[Why] When changing resolution (e.g., 4K → FHD) in mirror/clone mode with certain monitors, the monitor blanks and loses connection due to an early exit in vrr_settings_require_update(). The function only checks if VRR state, fixed refresh target, or min/max refresh rate range has changed. During mode changes, if the calculated min/max refresh values remain the same even though the stream's v_total changed, the function returns early without updating vrr_params.adjust.v_total_min/max, leaving the monitor's VRR timing parameters unsynced with the new mode, causing it to blank out. [How] Explicitly adjust VRR parameters to the stream's nominal v_total when VRR is supported, but inactive. Fixes: 6d31602 ("drm/amd/display: more liberal vmin/vmax update for freesync") Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 607df82)
1 parent 6623c5f commit 33c9957

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • drivers/gpu/drm/amd/display/modules/freesync

drivers/gpu/drm/amd/display/modules/freesync/freesync.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,17 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
12601260
update_v_total_for_static_ramp(
12611261
core_freesync, stream, in_out_vrr);
12621262
}
1263+
1264+
/*
1265+
* If VRR is inactive, set vtotal min and max to nominal vtotal
1266+
*/
1267+
if (in_out_vrr->state == VRR_STATE_INACTIVE) {
1268+
in_out_vrr->adjust.v_total_min =
1269+
mod_freesync_calc_v_total_from_refresh(stream,
1270+
in_out_vrr->max_refresh_in_uhz);
1271+
in_out_vrr->adjust.v_total_max = in_out_vrr->adjust.v_total_min;
1272+
return;
1273+
}
12631274
}
12641275

12651276
unsigned long long mod_freesync_calc_nominal_field_rate(

0 commit comments

Comments
 (0)