提交 ac5c2947 编写于 作者: D Dmytro Laktyushkin 提交者: Alex Deucher

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

Signed-off-by: NDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: NTony Cheng <Tony.Cheng@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册