[PATCH 2/3] drm/i915: WARN if RPS adjustment is more than range

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 13 18:00:42 UTC 2017


On Fri, Jan 13, 2017 at 05:43:47PM +0000, Kamble, Sagar A wrote:
> Hi Chris,
> 
> Details of the issue with GuC and trace that shows the adjustment overflow to negative values is given below. 
> Even when Host RPS has requested RP0, Up Threshold Interrupts are coming due to kernel bug.

Who's kernel bug? When we hit min/max we apply the interrupt mask to
pmintrmsk.

Are we happy with say:

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 9d98d646342d..7425e3a94854 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1170,6 +1170,8 @@ static void gen6_pm_rps_work(struct work_struct *work)
                        adj *= 2;
                else /* CHV needs even encode values */
                        adj = IS_CHERRYVIEW(dev_priv) ? 2 : 1;
+               if (new_delay >= dev_priv->rps.max_freq_softlimit)
+                       adj = 0;
                /*
                 * For better performance, jump directly
                 * to RPe if we're below it.
@@ -1191,6 +1193,8 @@ static void gen6_pm_rps_work(struct work_struct *work)
                        adj *= 2;
                else /* CHV needs even encode values */
                        adj = IS_CHERRYVIEW(dev_priv) ? -2 : -1;
+               if (new_delay <= dev_priv->rps.min_freq_softlimit)
+                       adj = 0;
        } else { /* unknown event */
                adj = 0;
        }

so that we completely prevent RPS from jumping the shark?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx-trybot mailing list