[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230308155322.344664-3-robdclark@gmail.com>
Date: Wed, 8 Mar 2023 07:52:53 -0800
From: Rob Clark <robdclark@...il.com>
To: dri-devel@...ts.freedesktop.org
Cc: freedreno@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
Luben Tuikov <luben.tuikov@....com>,
Christian König
<ckoenig.leichtzumerken@...il.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Matt Turner <mattst88@...il.com>,
Bas Nieuwenhuizen <bas@...nieuwenhuizen.nl>,
Rob Clark <robdclark@...omium.org>,
Christian König <christian.koenig@....com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Gustavo Padovan <gustavo@...ovan.org>,
linux-media@...r.kernel.org (open list:SYNC FILE FRAMEWORK),
linaro-mm-sig@...ts.linaro.org (moderated list:DMA BUFFER SHARING
FRAMEWORK), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v10 02/15] dma-buf/fence-array: Add fence deadline support
From: Rob Clark <robdclark@...omium.org>
Propagate the deadline to all the fences in the array.
Signed-off-by: Rob Clark <robdclark@...omium.org>
Reviewed-by: Christian König <christian.koenig@....com>
---
drivers/dma-buf/dma-fence-array.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c
index 5c8a7084577b..9b3ce8948351 100644
--- a/drivers/dma-buf/dma-fence-array.c
+++ b/drivers/dma-buf/dma-fence-array.c
@@ -123,12 +123,23 @@ static void dma_fence_array_release(struct dma_fence *fence)
dma_fence_free(fence);
}
+static void dma_fence_array_set_deadline(struct dma_fence *fence,
+ ktime_t deadline)
+{
+ struct dma_fence_array *array = to_dma_fence_array(fence);
+ unsigned i;
+
+ for (i = 0; i < array->num_fences; ++i)
+ dma_fence_set_deadline(array->fences[i], deadline);
+}
+
const struct dma_fence_ops dma_fence_array_ops = {
.get_driver_name = dma_fence_array_get_driver_name,
.get_timeline_name = dma_fence_array_get_timeline_name,
.enable_signaling = dma_fence_array_enable_signaling,
.signaled = dma_fence_array_signaled,
.release = dma_fence_array_release,
+ .set_deadline = dma_fence_array_set_deadline,
};
EXPORT_SYMBOL(dma_fence_array_ops);
--
2.39.2
Powered by blists - more mailing lists