drm: atmel-hlcdc: prefer a lower pixel-clock than requested
[linux-2.6-microblaze.git] / drivers / gpu / drm / atmel-hlcdc / atmel_hlcdc_crtc.c
index 721fa88..1098513 100644 (file)
@@ -121,8 +121,8 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c)
                int div_low = prate / mode_rate;
 
                if (div_low >= 2 &&
-                   ((prate / div_low - mode_rate) <
-                    10 * (mode_rate - prate / div)))
+                   (10 * (prate / div_low - mode_rate) <
+                    (mode_rate - prate / div)))
                        /*
                         * At least 10 times better when using a higher
                         * frequency than requested, instead of a lower.