[Intel-gfx] [PATCH v2 1/4] drm/i915/guc: Fix lockdep due to log relay channel handling under struct_mutex

Chris Wilson chris at chris-wilson.co.uk
Tue Jan 23 16:48:17 UTC 2018


Quoting Michal Wajdeczko (2018-01-23 16:44:33)
> On Tue, 23 Jan 2018 16:42:17 +0100, Sagar Arun Kamble  
> > @@ -605,7 +681,11 @@ int i915_guc_log_control(struct drm_i915_private  
> > *dev_priv, u64 control_val)
> >               }
> >               /* GuC logging is currently the only user of Guc2Host interrupts */
> > +             mutex_lock(&dev_priv->drm.struct_mutex);
> > +             intel_runtime_pm_get(dev_priv);
> >               gen9_enable_guc_interrupts(dev_priv);
> > +             intel_runtime_pm_put(dev_priv);
> > +             mutex_unlock(&dev_priv->drm.struct_mutex);
> 
> Maybe pm_get/lock/xxx/unlock/pm_put would be better order ?

There's no strong reason to prefer one nesting or the other. So pick a
pattern for guc_interrupts and stick to it :)
-Chris


More information about the Intel-gfx mailing list