1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00
Christian König b83ce9cb4a dma-buf: add dma_fence_timestamp helper
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: 1774baa64f93 ("drm/scheduler: Change scheduled fence track v2")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20230929104725.2358-1-christian.koenig@amd.com
2023-10-05 11:05:58 +02:00
..
2023-09-01 09:53:54 -07:00
2023-09-04 13:47:59 -07:00
2023-09-07 16:07:35 -07:00
2023-09-03 10:20:57 -07:00
2023-08-31 15:36:41 -07:00
2023-09-02 11:10:50 -07:00
2023-09-01 15:58:21 -07:00
2023-09-01 09:43:18 -07:00
2023-09-01 00:29:34 +02:00
2023-09-04 11:26:29 -07:00
2023-09-01 16:54:25 -07:00
2023-09-02 15:17:33 -07:00
2023-09-01 16:34:25 -07:00