[PATCH 6/9] dma-buf/dma-fence: Allow wait_any_timeout without default_wait

Jason Ekstrand jason at jlekstrand.net
Tue Aug 8 22:46:06 UTC 2017


dma_fence_wait_any_timeout only relies on two things to work correctly:

 1) The SIGNALED flag to be set upon fence signal
 2) The callback list to get called upon fence signal

Both of these are part of the core dma-fence API so it should work fine
even with a non-default wait function.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 drivers/dma-buf/dma-fence.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 57da14c..1218692 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -501,11 +501,6 @@ dma_fence_wait_any_timeout(struct dma_fence **fences, uint32_t count,
 	for (i = 0; i < count; ++i) {
 		struct dma_fence *fence = fences[i];
 
-		if (fence->ops->wait != dma_fence_default_wait) {
-			ret = -EINVAL;
-			goto fence_rm_cb;
-		}
-
 		cb[i].task = current;
 		if (dma_fence_add_callback(fence, &cb[i].base,
 					   dma_fence_default_wait_cb)) {
-- 
2.5.0.400.gff86faf



More information about the dri-devel mailing list