Re: [PATCH] drm: Don't complain too much about struct_mutex.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 17, 2017 at 11:35 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> 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.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux