diff options
author | Christian König <christian.koenig@amd.com> | 2023-06-13 11:09:20 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2023-07-03 14:47:06 +0300 |
commit | f781f661e8c99b0cb34129f2e374234d61864e77 (patch) | |
tree | 4987d8931077df26a0768eb2086da83acb6cf046 /drivers/dma-buf/dma-fence.c | |
parent | 1c519980aced3da1fae37c1339cf43b24eccdee7 (diff) | |
download | linux-f781f661e8c99b0cb34129f2e374234d61864e77.tar.xz |
dma-buf: keep the signaling time of merged fences v3
Some Android CTS is testing if the signaling time keeps consistent
during merges.
v2: use the current time if the fence is still in the signaling path and
the timestamp not yet available.
v3: improve comment, fix one more case to use the correct timestamp
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230630120041.109216-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/dma-buf/dma-fence.c')
-rw-r--r-- | drivers/dma-buf/dma-fence.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index f177c56269bb..ad076f208760 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -150,10 +150,11 @@ EXPORT_SYMBOL(dma_fence_get_stub); /** * dma_fence_allocate_private_stub - return a private, signaled fence + * @timestamp: timestamp when the fence was signaled * * Return a newly allocated and signaled stub fence. */ -struct dma_fence *dma_fence_allocate_private_stub(void) +struct dma_fence *dma_fence_allocate_private_stub(ktime_t timestamp) { struct dma_fence *fence; @@ -169,7 +170,7 @@ struct dma_fence *dma_fence_allocate_private_stub(void) set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &fence->flags); - dma_fence_signal(fence); + dma_fence_signal_timestamp(fence, timestamp); return fence; } |