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-09-13 11:04:14 -07:00
2017-09-25 10:58:22 +02:00
2017-10-13 16:30:58 +01:00
2017-10-26 00:47:27 -07:00
2017-10-04 10:22:55 +02:00
2017-09-29 13:36:06 +02:00
2017-10-19 22:13:40 -04:00
2017-09-22 16:16:41 -10:00
2017-10-03 17:54:25 -07:00
2017-10-03 17:54:25 -07:00
2017-09-25 08:56:05 -06:00
2017-10-09 15:18:04 +02:00
2017-10-13 16:18:33 -07:00
2017-09-14 17:37:26 -07:00
2017-09-25 22:11:44 +02:00
2017-09-14 13:43:16 -07:00
2017-10-03 08:57:07 -07:00
2017-11-21 22:37:05 +05:30
2017-11-09 20:32:53 +02:00
2017-10-20 13:01:29 +01:00
2017-10-03 17:54:26 -07:00
2017-09-13 18:53:16 -07:00
2017-10-20 14:19:51 +02:00
2017-10-04 11:25:09 +02:00
2017-10-28 19:17:21 +09:00
2017-10-19 16:54:49 -07:00
2017-09-27 17:02:45 +02:00
2017-10-13 16:31:05 +01:00
2017-10-13 16:18:33 -07:00
2017-10-18 09:12:40 +01:00
2017-10-12 15:01:30 +02:00
2017-10-19 22:13:40 -04:00
2017-10-03 17:54:23 -07:00
2017-10-03 17:54:24 -07:00
2017-10-03 17:54:25 -07:00
2017-10-21 21:46:39 -04:00
2017-09-14 17:37:26 -07:00
2017-10-16 21:02:54 +01:00
2017-10-04 10:53:54 +02:00
2017-09-25 12:42:11 -06:00
2017-09-25 08:56:05 -06:00
2017-09-19 12:20:44 -05:00
2017-10-13 16:18:32 -07:00
2017-09-25 11:08:20 -05:00
2017-10-24 15:20:45 +02:00
2017-10-19 22:26:11 -04:00
2017-10-19 22:26:11 -04:00
2017-10-04 11:46:32 +01:00
2017-11-13 14:50:49 -05:00
2017-09-29 11:02:57 +02:00
2017-10-29 18:03:24 +09:00
2017-09-14 17:37:26 -07:00
2017-09-14 17:37:26 -07:00
2017-10-07 10:11:40 +01:00
2017-09-14 11:41:06 +02:00
2017-10-19 22:26:11 -04:00
2017-10-23 13:59:21 +02:00
2017-09-17 19:45:32 +02:00
2017-10-13 16:18:33 -07:00
2017-09-14 17:37:26 -07:00
2017-09-28 16:30:36 +02:00
2017-09-20 14:10:29 -07:00
2017-09-14 09:56:18 -07:00