drm/i915: Don't accidentally increase the frequency in handling DOWN rps
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Feb 2017 15:03:47 +0000 (15:03 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 14 Feb 2017 22:35:39 +0000 (22:35 +0000)
If we receive a DOWN_TIMEOUT rps interrupt, we respond by reducing the
GPU clocks significantly. Before we do, double check that the frequency
we pick is actually a decrease.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170210150348.22146-2-chris@chris-wilson.co.uk
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
drivers/gpu/drm/i915/i915_irq.c

index 27c13193f7a289454409ee178b1cd812b50fd3f9..86cca37a4e4f38dba167b47f0f8b471ff7663d2d 100644 (file)
@@ -1186,7 +1186,7 @@ static void gen6_pm_rps_work(struct work_struct *work)
        } else if (pm_iir & GEN6_PM_RP_DOWN_TIMEOUT) {
                if (dev_priv->rps.cur_freq > dev_priv->rps.efficient_freq)
                        new_delay = dev_priv->rps.efficient_freq;
-               else
+               else if (dev_priv->rps.cur_freq > dev_priv->rps.min_freq_softlimit)
                        new_delay = dev_priv->rps.min_freq_softlimit;
                adj = 0;
        } else if (pm_iir & GEN6_PM_RP_DOWN_THRESHOLD) {