diff options
| author | Christian König <christian.koenig@amd.com> | 2025-12-19 11:41:54 +0100 |
|---|---|---|
| committer | Christian König <christian.koenig@amd.com> | 2026-02-05 11:02:56 +0100 |
| commit | 2bcbc706dfa02ae50118173a6f6d8a12e735480c (patch) | |
| tree | 9fcaf1eaca2d7a94cb3001e085bb5e5d26358c01 /drivers/dma-buf | |
| parent | 2bebc88d5e37ddcb5ea5039a39f39527662b27f0 (diff) | |
dma-buf: add dma_fence_was_initialized function v2
Some driver use fence->ops to test if a fence was initialized or not.
The problem is that this utilizes internal behavior of the dma_fence
implementation.
So better abstract that into a function.
v2: use a flag instead of testing fence->ops, rename the function, move
to the beginning of the patch set.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://lore.kernel.org/r/20260120105655.7134-2-christian.koenig@amd.com
Diffstat (limited to 'drivers/dma-buf')
| -rw-r--r-- | drivers/dma-buf/dma-fence.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 21c5c30b4f34..c9a036b0d592 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -1054,7 +1054,7 @@ __dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, fence->lock = lock; fence->context = context; fence->seqno = seqno; - fence->flags = flags; + fence->flags = flags | BIT(DMA_FENCE_FLAG_INITIALIZED_BIT); fence->error = 0; trace_dma_fence_init(fence); |
