Skip to content

Commit 68e05b9

Browse files
committed
drm/amd/display: handle range offsets in VRR ranges
Need to check the offset bits for values greater than 255. v2: also update amdgpu_dm_connector values. Suggested-by: Mano Ségransan <[email protected]> Tested-by: Mano Ségransan <[email protected]> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3203 Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 10740e4 commit 68e05b9

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11303,14 +11303,23 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
1130311303
if (range->flags != 1)
1130411304
continue;
1130511305

11306-
amdgpu_dm_connector->min_vfreq = range->min_vfreq;
11307-
amdgpu_dm_connector->max_vfreq = range->max_vfreq;
11308-
amdgpu_dm_connector->pixel_clock_mhz =
11309-
range->pixel_clock_mhz * 10;
11310-
1131111306
connector->display_info.monitor_range.min_vfreq = range->min_vfreq;
1131211307
connector->display_info.monitor_range.max_vfreq = range->max_vfreq;
1131311308

11309+
if (edid->revision >= 4) {
11310+
if (data->pad2 & DRM_EDID_RANGE_OFFSET_MIN_VFREQ)
11311+
connector->display_info.monitor_range.min_vfreq += 255;
11312+
if (data->pad2 & DRM_EDID_RANGE_OFFSET_MAX_VFREQ)
11313+
connector->display_info.monitor_range.max_vfreq += 255;
11314+
}
11315+
11316+
amdgpu_dm_connector->min_vfreq =
11317+
connector->display_info.monitor_range.min_vfreq;
11318+
amdgpu_dm_connector->max_vfreq =
11319+
connector->display_info.monitor_range.max_vfreq;
11320+
amdgpu_dm_connector->pixel_clock_mhz =
11321+
range->pixel_clock_mhz * 10;
11322+
1131411323
break;
1131511324
}
1131611325

0 commit comments

Comments
 (0)