[Intel-gfx] [PATCH v8 09/13] drm/i915: add a new perf configuration execbuf parameter
Chris Wilson
chris at chris-wilson.co.uk
Tue Jul 9 13:13:02 UTC 2019
Quoting Chris Wilson (2019-07-09 14:10:52)
> Quoting Lionel Landwerlin (2019-07-09 13:53:38)
> > On 09/07/2019 15:33, Lionel Landwerlin wrote:
> > >
> > > +static int eb_oa_config(struct i915_execbuffer *eb)
> > > +{
> > > + int ret;
> > > +
> > > + if (!eb->oa_config)
> > > + return 0;
> > > +
> > > + ret = i915_mutex_lock_interruptible(&eb->i915->drm);
> > > + if (ret)
> > > + return ret;
> >
> > This is assuming the lock is dropped from the calling function.
> >
> > It's not at the moment, but I expect you'll be doing that soon?
>
> Hence why I'm checking everything that has an implicit struct_mutex :)
If struct_mutex is your chosen lock here (for oa_config) mark as
required with
lockdep_assert_held(&eb->i915->drm.struct_mutex); /* oa_config */
but I do implore you to invest a private mutex :)
-Chris
More information about the Intel-gfx
mailing list