]> git.baikalelectronics.ru Git - kernel.git/commit
dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 29 Aug 2016 18:16:13 +0000 (19:16 +0100)
committerSumit Semwal <sumit.semwal@linaro.org>
Tue, 13 Sep 2016 14:39:49 +0000 (20:09 +0530)
commit7857feb713022c28ebd295a5ef221ab2acf00e31
tree2afcc2ba082109305f86932c6c3751870fe6804a
parentaf5dc173d82bf25db673d4c366cf3be6f1123299
dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)

If we being polled with a timeout of zero, a nonblocking busy query,
we don't need to install any fence callbacks as we will not be waiting.
As we only install the callback once, the overhead comes from the atomic
bit test that also causes serialisation between threads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20160829181613.30722-1-chris@chris-wilson.co.uk
drivers/dma-buf/sync_file.c