From: Dmytro Laktyushkin <Dmytro.Laktyushkin@xxxxxxx> Change-Id: I9d88231521821e01f79dc7aa942659ba240d1eac Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin at amd.com> Reviewed-by: Tony Cheng <Tony.Cheng at amd.com> Acked-by: Harry Wentland <Harry.Wentland at amd.com> --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index c5330f3cc1de..05a086c7b31a 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -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; } -- 2.11.0