summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-07-26 03:35:00 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-07-26 03:35:00 +0000
commitda148d4b14890c37d8e15563c55795f565f04761 (patch)
tree472207f82a37cc00f243a64edc960cc76b64847d /sys
parentc8c2a5694a70d01dc4cb35df3efd6c76dcd1de0a (diff)
drm/amd/display: Add refresh rate range check
From Tom Chung 531e7852fb62bfc6a15cc1df85f62720f704d537 in linux-6.6.y/6.6.42 74ad26b36d303ac233eccadc5c3a8d7ee4709f31 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 4aeaaa58fb9..43cd301ef02 100644
--- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10766,9 +10766,11 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
if (is_dp_capable_without_timing_msa(adev->dm.dc,
amdgpu_dm_connector)) {
if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ) {
- freesync_capable = true;
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;
} else {
edid_check_required = edid->version > 1 ||
(edid->version == 1 &&