drm/amd/display: restore invalid MSA timing check for freesync
Subsystems (3)
PATCH 1/1 drm/amd/display: restore invalid MSA timing check for freesync
This restores the original behavior that gets min/max freq from EDID and only set DP/eDP connector as freesync capable if "sink device is capable of rendering incoming video stream without MSA timing parameters", i.e., allow_invalid_MSA_timing_params is true. The condition was mistakenly removed by 0159f88a99c9 ("drm/amd/display: remove redundant freesync parser for DP").
---
Mario, Alex,
I can't reproduce the reported issue on my side, but reporters mentioned this fixes their black screen issue. I examined the code around it and overall restoring this condition in this way seems right.
For the future, we can consider using drm_dp_sink_can_do_video_without_timing_msa instead.
Anyway, from my tests, what I can say is that things seem stable and I didn't noticed any changes.
Can you verify how it goes on the CI?
Thanks,
Melissa
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -4
@@ -12381,10 +12381,14 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (edid && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) { - amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; - amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; -if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) - freesync_capable = true; +if (amdgpu_dm_connector->dc_link && + amdgpu_dm_connector->dc_link->dpcd_caps.allow_invalid_MSA_timing_param) { + amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; + amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; +if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; + } +parse_amd_vsdb (amdgpu_dm_connector, edid, &vsdb_info);if (vsdb_info.replay_mode) {
Signature · 1 line
2.45.2
Quoted 7 lines · Melissa Wen
This restores the original behavior that gets min/max freq from EDID and only set DP/eDP connector as freesync capable if "sink device is capable of rendering incoming video stream without MSA timing parameters", i.e.,
allow_invalid_MSA_timing_paramsis true. The condition was mistakenly removed by0159f88a99c9("drm/amd/display: remove redundant freesync parser for DP").
Quoted 5 lines
CC Mario Limonciello <[email protected]>CC Alex Hung <[email protected]>Fixes 0159f88a99c9 ("drm/amd/display: remove redundant freesync parser for DP")Signed-off-by Melissa Wen <[email protected]>
Yeah, we need to check IGNORE_MSA_TIMING_PARAM before allowing Freesync / adaptive sync.
Thanks for the fix.
Harry
Quoted 48 lines
---
Mario, Alex,
I can't reproduce the reported issue on my side, but reporters mentioned this fixes their black screen issue. I examined the code around it and overall restoring this condition in this way seems right.
For the future, we can consider using
drm_dp_sink_can_do_video_without_timing_msainstead.Anyway, from my tests, what I can say is that things seem stable and I didn't noticed any changes.
Can you verify how it goes on the CI?
Thanks,
Melissa
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8
-4@@ -12381,10 +12381,14 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (edid && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) { - amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; - amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; -if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) - freesync_capable = true; +if (amdgpu_dm_connector->dc_link && + amdgpu_dm_connector->dc_link->dpcd_caps.allow_invalid_MSA_timing_param) { + amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; + amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; +if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; + } +parse_amd_vsdb (amdgpu_dm_connector, edid, &vsdb_info);if (vsdb_info.replay_mode) {
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 75 lines · Harry Wentland
Quoted 7 lines · Melissa Wen
This restores the original behavior that gets min/max freq from EDID and only set DP/eDP connector as freesync capable if "sink device is capable of rendering incoming video stream without MSA timing parameters", i.e.,
allow_invalid_MSA_timing_paramsis true. The condition was mistakenly removed by0159f88a99c9("drm/amd/display: remove redundant freesync parser for DP").Quoted 5 lines
CC Mario Limonciello <[email protected]>CC Alex Hung <[email protected]>Fixes 0159f88a99c9 ("drm/amd/display: remove redundant freesync parser for DP")Signed-off-by Melissa Wen <[email protected]>Yeah, we need to check
IGNORE_MSA_TIMING_PARAMbefore allowing Freesync / adaptive sync.Thanks for the fix.
Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 48 lines
---
Mario, Alex,
I can't reproduce the reported issue on my side, but reporters mentioned this fixes their black screen issue. I examined the code around it and overall restoring this condition in this way seems right.
For the future, we can consider using
drm_dp_sink_can_do_video_without_timing_msainstead.Anyway, from my tests, what I can say is that things seem stable and I didn't noticed any changes.
Can you verify how it goes on the CI?
Thanks,
Melissa
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8
-4@@ -12381,10 +12381,14 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,if (edid && (sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT || sink->sink_signal ==SIGNAL_TYPE_EDP )) { - amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; - amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; -if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) - freesync_capable = true; +if (amdgpu_dm_connector->dc_link && + amdgpu_dm_connector->dc_link->dpcd_caps.allow_invalid_MSA_timing_param) { + amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq; + amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq; +if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 ) + freesync_capable = true; + } +parse_amd_vsdb (amdgpu_dm_connector, edid, &vsdb_info);if (vsdb_info.replay_mode) {