drm/i915: Make the rps new_delay comparison more readable
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 25 Jun 2013 16:21:05 +0000 (19:21 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 1 Jul 2013 09:14:48 +0000 (11:14 +0200)
Eliminate the weird inverted logic from the rps new_delay comparison.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c

index 611da3a74479e3be428e874f1eff4d98c9ac292d..62f8b2d8809c8b0fd7384e840eb0f54e11bdeb05 100644 (file)
@@ -707,8 +707,8 @@ static void gen6_pm_rps_work(struct work_struct *work)
        /* sysfs frequency interfaces may have snuck in while servicing the
         * interrupt
         */
-       if (!(new_delay > dev_priv->rps.max_delay ||
-             new_delay < dev_priv->rps.min_delay)) {
+       if (new_delay >= dev_priv->rps.min_delay &&
+           new_delay <= dev_priv->rps.max_delay) {
                if (IS_VALLEYVIEW(dev_priv->dev))
                        valleyview_set_rps(dev_priv->dev, new_delay);
                else