dma-buf/sw-sync: Use an rbtree to sort fences in the timeline
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 29 Jun 2017 21:12:53 +0000 (22:12 +0100)
committerGustavo Padovan <gustavo.padovan@collabora.com>
Thu, 29 Jun 2017 21:54:07 +0000 (18:54 -0300)
commitf1e8c67123cf171e2b0357e885e426328b241d7d
tree0b5b3e4c46496558bc2f20c2bf91a9f994d569a4
parentd3862e44daa7a0c94d2f6193502a8c49379acfce
dma-buf/sw-sync: Use an rbtree to sort fences in the timeline

Reduce the list iteration when incrementing the timeline by storing the
fences in increasing order.

v2: Prevent spinlock recursion on free during create
v3: Fixup rebase conflict inside comments that escaped the compiler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170629211253.22766-1-chris@chris-wilson.co.uk
drivers/dma-buf/sw_sync.c
drivers/dma-buf/sync_debug.h