mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
b83ce9cb4a
When a fence signals there is a very small race window where the timestamp
isn't updated yet. sync_file solves this by busy waiting for the
timestamp to appear, but on other ocassions didn't handled this
correctly.
Provide a dma_fence_timestamp() helper function for this and use it in
all appropriate cases.
Another alternative would be to grab the spinlock when that happens.
v2 by teddy: add a wait parameter to wait for the timestamp to show up, in case
the accurate timestamp is needed and/or the timestamp is not based on
ktime (e.g. hw timestamp)
v3 chk: drop the parameter again for unified handling
Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes:
|
||
---|---|---|
.. | ||
heaps | ||
dma-buf-sysfs-stats.c | ||
dma-buf-sysfs-stats.h | ||
dma-buf.c | ||
dma-fence-array.c | ||
dma-fence-chain.c | ||
dma-fence-unwrap.c | ||
dma-fence.c | ||
dma-heap.c | ||
dma-resv.c | ||
Kconfig | ||
Makefile | ||
selftest.c | ||
selftest.h | ||
selftests.h | ||
st-dma-fence-chain.c | ||
st-dma-fence-unwrap.c | ||
st-dma-fence.c | ||
st-dma-resv.c | ||
sw_sync.c | ||
sync_debug.c | ||
sync_debug.h | ||
sync_file.c | ||
sync_trace.h | ||
udmabuf.c |