Skip to content

Commit 0ab925d

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amd/display: Only allow VRR when vrefresh is within supported range
[Why] Black screens or artifacting can occur when enabling FreeSync outside of the supported range of the monitor. This can happen since the supported range isn't always the min/max vrefresh range available for the monitor. [How] There was previously a fix that prevented this from happening in the low range but it didn't cover the upper range. Expand the condition to include both. Cc: Sun peng Li <Sunpeng.Li@amd.com> Cc: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 7246438 commit 0ab925d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5429,9 +5429,11 @@ static void get_freesync_config_for_crtc(
54295429
struct amdgpu_dm_connector *aconnector =
54305430
to_amdgpu_dm_connector(new_con_state->base.connector);
54315431
struct drm_display_mode *mode = &new_crtc_state->base.mode;
5432+
int vrefresh = drm_mode_vrefresh(mode);
54325433

54335434
new_crtc_state->vrr_supported = new_con_state->freesync_capable &&
5434-
aconnector->min_vfreq <= drm_mode_vrefresh(mode);
5435+
vrefresh >= aconnector->min_vfreq &&
5436+
vrefresh <= aconnector->max_vfreq;
54355437

54365438
if (new_crtc_state->vrr_supported) {
54375439
new_crtc_state->stream->ignore_msa_timing_param = true;

0 commit comments

Comments
 (0)