[Intel-gfx] [PATCH] drm: Don't complain too much about struct_mutex.
Peter Zijlstra
peterz at infradead.org
Mon Jul 17 16:21:04 UTC 2017
On Mon, Jul 17, 2017 at 05:06:42PM +0200, Daniel Vetter wrote:
> On Mon, Jul 17, 2017 at 11:35 AM, Peter Zijlstra <peterz at infradead.org> wrote:
> > On Sat, Jul 15, 2017 at 11:53:28AM +0200, Daniel Vetter wrote:
> >> A more complete solution would be to do the mutex_init in the drm core
> >> only for legacy drivers, plus add it to each modern driver that still
> >> needs it, which would also give each its own lockdep key. Trying to do
> >> that dynamically doesn't work, because lockdep requires it's keys to
> >> be statically allocated.
> >
> > Would something like the below work? Its not pretty, but would give each
> > user of drm_dev_init() its own key.
>
> We're very close to getting rid of struct_mutex, neither nouveau.ko
> nor i915.ko use it, and only about 4 drivers really still need it (out
> of about 30+). I think the minimal patch is enough, and then not
> initializing the mutex to prevent more users croping up again in the
> future.
Whatever you want of course. I was just going by that one paragraphy I
quoted :-)
More information about the Intel-gfx
mailing list