Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c686122c authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter
Browse files

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 69e4f900
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
					}