Skip to content

dma-fence: Fix timestamp memory ordering

Philipp Stanner dri-devel linux-media lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dma-buf/dma-fence: Ensure correct ordering in dma_fence_timestamp()include/linux/dma-fence.h+9 -52 replies
2/3dma-buf: dma-fence: Add dma_fence_overwrite_timestamp()drivers/dma-buf/dma-fence.c include/linux/dma-fence.h+29 -02 replies
3/3drm/sched: Fix memory ordering with dma_fence_overwrite_timestamp()drivers/gpu/drm/scheduler/sched_main.c+23 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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/[email protected]/
[2] https://lore.kernel.org/dri-devel/[email protected]/

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

Signature · 1 line
2.56.0