[PATCH 0/3] dma-fence: Fix timestamp memory ordering

From: Philipp Stanner

Date: Thu Nov 19 2026 - 08:19:46 EST


Based on misc-fixes

The memory ordering for obtaining a fences timestamp seems to be broken.
Moreover, there is no canonical way for users to obtain the timestamp,
as proven by the broken ordering in drm_sched.

See also my patch for the signaled flag [1].

@Tvrtko, would you mind basing your patch [2] on this series? That way
we'd solve both bugs.


[1] https://lore.kernel.org/dri-devel/20261119104030.2381685-3-phasta@xxxxxxxxxx/
[2] https://lore.kernel.org/dri-devel/20261117094324.8256-1-tvrtko.ursulin@xxxxxxxxxx/

Philipp Stanner (3):
dma-buf/dma-fence: Ensure correct ordering in dma_fence_timestamp()
dma-buf: dma-fence: Add dma_fence_overwrite_timestamp()
drm/sched: Fix memory ordering with dma_fence_overwrite_timestamp()

drivers/dma-buf/dma-fence.c | 28 ++++++++++++++++++++++++++
drivers/gpu/drm/scheduler/sched_main.c | 28 +++++++++++++++++++++-----
include/linux/dma-fence.h | 15 +++++++++-----
3 files changed, 61 insertions(+), 10 deletions(-)


base-commit: 7488ee210542b918b9c5749a29fd1502c49a0665
--
2.56.0