Message ID | 1463496038-8242-1-git-send-email-michal.winiarski@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, May 17, 2016 at 04:40:38PM +0200, Micha? Winiarski wrote: > This allows us to avoid the situation where worker is increasing the GPU > frequency after we've switched to idle. > > v2: Do not access ->mm.busy under ->irq_lock > v3: Really do not access ->mm.busy under ->irq_lock This is backwards. The rps worker should not be running when the device is idle. The code tries to do that currently but fails, so I think this as papering over the bug. Fixing this means we can remove the DISABLE_RPM_WAKEREF_ASSERTS. The patch I've previously sent does https://cgit.freedesktop.org/~ickle/linux-2.6/commit/?h=tasklet&id=1c0ace26e80188e53a18977e5ef90ab8a801027c -Chris
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index f0d9414..03af766 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -1089,6 +1089,9 @@ static void gen6_pm_rps_work(struct work_struct *work) int new_delay, adj, min, max; u32 pm_iir; + if (!dev_priv->mm.busy) + return; + spin_lock_irq(&dev_priv->irq_lock); /* Speed up work cancelation during disabling rps interrupts. */ if (!dev_priv->rps.interrupts_enabled) {
This allows us to avoid the situation where worker is increasing the GPU frequency after we've switched to idle. v2: Do not access ->mm.busy under ->irq_lock v3: Really do not access ->mm.busy under ->irq_lock References: https://bugs.freedesktop.org/show_bug.cgi?id=89728 Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Micha? Winiarski <michal.winiarski@intel.com> --- drivers/gpu/drm/i915/i915_irq.c | 3 +++ 1 file changed, 3 insertions(+)