提交 c686122c 编写于 作者: V Ville Syrjälä 提交者: Daniel Vetter

drm/i915: Don't underflow bestppm

We do 'bestppm - 10' in vlv_find_best_dpll() but never check whether
that might underflow. Add such a check.
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 69e4f900
......@@ -708,7 +708,7 @@ vlv_find_best_dpll(const intel_limit_t *limit, struct drm_crtc *crtc,
bestppm = 0;
flag = 1;
}
if (ppm < bestppm - 10) {
if (bestppm >= 10 && ppm < bestppm - 10) {
bestppm = ppm;
flag = 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册