Skip to contentSkip to conversation

drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found

PATCH Superseded Mario Limonciello 2 participants 2 messages Mar 5, 2024 – Mar 8, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found

The monitor shipped with the Framework 16 supports VRR [1], but it's not being advertised.

This is because the detailed timing block doesn't contain EDID_DETAIL_MONITOR_RANGE which amdgpu looks for to find min and max frequencies. This check however is superfluous for this case because update_display_info() calls drm_get_monitor_range() to get these ranges already.

So if the DRM_EDID_FEATURE_CONTINUOUS_FREQ EDID feature is found then turn on freesync without extra checks.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -3
index 5b7293da5453..38186d669a85 100644
@@ -11238,9 +11238,12 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 		bool edid_check_required = false;
 
 		if (edid) {
-			edid_check_required = is_dp_capable_without_timing_msa(
-						adev->dm.dc,
-						amdgpu_dm_connector);
+			if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ)
+				freesync_capable = true;
+			else
+				edid_check_required = is_dp_capable_without_timing_msa(
+							adev->dm.dc,
+							amdgpu_dm_connector);
 		}
 
 		if (edid_check_required == true && (edid->version > 1 ||
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 26 lines · Mario Limonciello

The monitor shipped with the Framework 16 supports VRR [1], but it's not being advertised.

This is because the detailed timing block doesn't contain EDID_DETAIL_MONITOR_RANGE which amdgpu looks for to find min and max frequencies. This check however is superfluous for this case because update_display_info() calls drm_get_monitor_range() to get these ranges already.

So if the DRM_EDID_FEATURE_CONTINUOUS_FREQ EDID feature is found then turn on freesync without extra checks.

---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++---
  1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 5b7293da5453..38186d669a85 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, · line 11242

Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -3
@@ -11238,9 +11238,12 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
  		bool edid_check_required = false;
 
  		if (edid) {
-			edid_check_required = is_dp_capable_without_timing_msa(
-						adev->dm.dc,
-						amdgpu_dm_connector);
+			if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ)
+				freesync_capable = true;

We still need to check that the DP RX is capable of being driven without MSA, i.e., we should do

freesync_capable = is_dp_capable_without_timing_msa(...)

Harry

Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
+			else
+				edid_check_required = is_dp_capable_without_timing_msa(
+							adev->dm.dc,
+							amdgpu_dm_connector);
  		}
 
  		if (edid_check_required == true && (edid->version > 1 ||