[Intel-gfx] [PATCH 08/46] drm/i915: Mark up debugfs with rpm wakeref tracking

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 9 11:49:06 UTC 2019


Quoting Mika Kuoppala (2019-01-09 10:20:26)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > @@ -1735,29 +1743,30 @@ static int i915_emon_status(struct seq_file *m, void *unused)
> >       struct drm_i915_private *dev_priv = node_to_i915(m->private);
> >       struct drm_device *dev = &dev_priv->drm;
> >       unsigned long temp, chipset, gfx;
> > +     intel_wakeref_t wakeref;
> >       int ret;
> >  
> >       if (!IS_GEN(dev_priv, 5))
> >               return -ENODEV;
> >  
> > -     intel_runtime_pm_get(dev_priv);
> > -
> >       ret = mutex_lock_interruptible(&dev->struct_mutex);
> >       if (ret)
> >               return ret;
> >  
> > +     wakeref = intel_runtime_pm_get(dev_priv);
> > +
> >       temp = i915_mch_val(dev_priv);
> >       chipset = i915_chipset_val(dev_priv);
> >       gfx = i915_gfx_val(dev_priv);
> >       mutex_unlock(&dev->struct_mutex);
> >  
> > +     intel_runtime_pm_put(dev_priv, wakeref);
> > +
> 
> I am a little surprised if this was the only callsite
> for tighter scoping in this file.

It's a recent regression. (Despite a patch to fix it correctly... Bitter,
moi?)
-Chris


More information about the Intel-gfx mailing list