Commit ac5c2947 authored by Dmytro Laktyushkin's avatar Dmytro Laktyushkin Committed by Alex Deucher

drm/amd/display: prevent assert on error of 1 in calc_freesync_range

Signed-off-by: default avatarDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3273d3bf
......@@ -422,12 +422,14 @@ static void calc_freesync_range(struct core_freesync *core_freesync,
/* In case of 4k free sync monitor, vmin or vmax cannot be less than vtotal */
if (state->freesync_range.vmin < vtotal) {
ASSERT(false);
/* Error of 1 is permissible */
ASSERT((state->freesync_range.vmin + 1) >= vtotal);
state->freesync_range.vmin = vtotal;
}
if (state->freesync_range.vmax < vtotal) {
ASSERT(false);
/* Error of 1 is permissible */
ASSERT((state->freesync_range.vmax + 1) >= vtotal);
state->freesync_range.vmax = vtotal;
}
......
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