dma-buf/sw_sync: force signal all unsignaled fences on dying timeline
authorDominik Behr <dbehr@chromium.org>
Thu, 7 Sep 2017 19:02:46 +0000 (16:02 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.com>
Fri, 8 Sep 2017 18:30:02 +0000 (15:30 -0300)
commitea4d5a270b57fa8d4871f372ca9b97b7697fdfda
treefc905ce9eea4475550091de843a32df09a23db29
parent5663077a56804890506c913b3ca9fee78764f8b3
dma-buf/sw_sync: force signal all unsignaled fences on dying timeline

To avoid hanging userspace components that might have been waiting on the
active fences of the destroyed timeline we need to signal with error all
remaining fences on such timeline.

This restore the default behaviour of the Android sw_sync framework, which
Android still relies on. It was broken on the dma fence conversion a few
years ago and never fixed.

v2: Do not bother with cleanup do the list (Chris Wilson)

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170907190246.16425-2-gustavo@padovan.org
drivers/dma-buf/sw_sync.c