Chris Wilson
03e4e0a9e0
dma-buf/fence: Fix lock inversion within dma-fence-array
Ages ago Rob Clark noted,
"Currently with fence-array, we have a potential deadlock situation. If
we fence_add_callback() on an array-fence, the array-fence's lock is
acquired first, and in it's ->enable_signaling() callback, it will install
cbs on it's array-member fences, so the array-member's lock is acquired
second.
But in the signal path, the array-member's lock is acquired first, and
the array-fence's lock acquired second."
Rob proposed either extensive changes to dma-fence to unnest the
fence-array signaling, or to defer the signaling onto a workqueue. This
is a more refined version of the later, that should keep the latency
of the fence signaling to a minimum by using an irq-work, which is
executed asap.
Reported-by: Rob Clark <robdclark@gmail.com>
Suggested-by: Rob Clark <robdclark@gmail.com>
References: 1476635975-21981-1-git-send-email-robdclark@gmail.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171114162719.30958-1-chris@chris-wilson.co.uk
2017-11-21 22:37:05 +05:30
..
2017-10-24 15:20:45 +02:00
2017-07-17 15:53:00 +01:00
2017-09-18 17:05:07 +02:00
2017-07-22 11:59:23 +02:00
2017-08-31 18:57:30 +02:00
2017-08-28 18:02:46 +02:00
2017-10-24 15:20:45 +02:00
2017-08-03 17:48:49 -07:00
2017-09-17 08:20:02 -07:00
2017-09-01 11:59:17 +02:00
2017-09-10 21:19:06 -07:00
2017-11-21 22:37:05 +05:30
2017-09-06 17:27:25 -07:00
2017-10-13 16:18:32 -07:00
2017-09-18 17:16:47 +02:00
2017-10-11 21:15:44 +02:00
2017-08-28 17:49:22 +02:00