linux-stable/drivers/gpu/drm/scheduler
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: 1774baa64f ("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
..
Makefile
gpu_scheduler_trace.h drm/sched: use __string in tracepoints 2022-04-26 15:11:00 -04:00
sched_entity.c Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
sched_fence.c Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
sched_main.c dma-buf: add dma_fence_timestamp helper 2023-10-05 11:05:58 +02:00