Commit 6ffa6799 authored by Aurabindo Pillai's avatar Aurabindo Pillai Committed by Alex Deucher

drm/amd/display: set ignore msa parameter only if freesync is enabled

[Why&How]

ignore_msa_timing_param is used by SubVP logic to determine if SubVP
+ DRR is possible. Linux does not support freesync on multi display
config, which results in incorrect assumption of VRR support if we
set this parameter when VRR is supported, but not enabled.
Signed-off-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: default avatarRodrigo Siqueira <rodrigo.siqueira@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0e8cf83a
...@@ -8806,15 +8806,22 @@ static void get_freesync_config_for_crtc( ...@@ -8806,15 +8806,22 @@ static void get_freesync_config_for_crtc(
struct drm_display_mode *mode = &new_crtc_state->base.mode; struct drm_display_mode *mode = &new_crtc_state->base.mode;
int vrefresh = drm_mode_vrefresh(mode); int vrefresh = drm_mode_vrefresh(mode);
bool fs_vid_mode = false; bool fs_vid_mode = false;
bool drr_active = false;
new_crtc_state->vrr_supported = new_con_state->freesync_capable && new_crtc_state->vrr_supported = new_con_state->freesync_capable &&
vrefresh >= aconnector->min_vfreq && vrefresh >= aconnector->min_vfreq &&
vrefresh <= aconnector->max_vfreq; vrefresh <= aconnector->max_vfreq;
if (new_crtc_state->vrr_supported) { drr_active = new_crtc_state->vrr_supported &&
new_crtc_state->freesync_config.state != VRR_STATE_DISABLED &&
new_crtc_state->freesync_config.state != VRR_STATE_INACTIVE &&
new_crtc_state->freesync_config.state != VRR_STATE_UNSUPPORTED;
if (drr_active)
new_crtc_state->stream->ignore_msa_timing_param = true; new_crtc_state->stream->ignore_msa_timing_param = true;
fs_vid_mode = new_crtc_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED;
if (new_crtc_state->vrr_supported) {
fs_vid_mode = new_crtc_state->freesync_config.state == VRR_STATE_ACTIVE_FIXED;
config.min_refresh_in_uhz = aconnector->min_vfreq * 1000000; config.min_refresh_in_uhz = aconnector->min_vfreq * 1000000;
config.max_refresh_in_uhz = aconnector->max_vfreq * 1000000; config.max_refresh_in_uhz = aconnector->max_vfreq * 1000000;
config.vsif_supported = true; config.vsif_supported = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment