[Intel-gfx] [RFC 07/12] dma-fence-array: Propagate wait status to contained fences

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Mar 7 10:48:19 UTC 2023


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

As signaling is enabled on the container fence we need to propagate any
external waiting status to individual fences in order to enable owning
drivers see it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/dma-buf/dma-fence-array.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c
index 5c8a7084577b..e732adc230d1 100644
--- a/drivers/dma-buf/dma-fence-array.c
+++ b/drivers/dma-buf/dma-fence-array.c
@@ -84,8 +84,9 @@ static bool dma_fence_array_enable_signaling(struct dma_fence *fence)
 		 * insufficient).
 		 */
 		dma_fence_get(&array->base);
-		if (dma_fence_add_callback(array->fences[i], &cb[i].cb,
-					   dma_fence_array_cb_func)) {
+		if (__dma_fence_add_callback(array->fences[i], &cb[i].cb,
+					     dma_fence_array_cb_func,
+					     fence->waitcount > 0)) {
 			int error = array->fences[i]->error;
 
 			dma_fence_array_set_pending_error(array, error);
-- 
2.37.2



More information about the Intel-gfx mailing list