The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] dma-fence: Remove TIMESTAMP bit
@ 2026-11-27 10:18 Philipp Stanner
  2026-11-27 10:18 ` [RFC PATCH 1/8] dma-buf: dma-fence: Hot-fix timestamp misordering Philipp Stanner
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Philipp Stanner @ 2026-11-27 10:18 UTC (permalink / raw)
  To: Sumit Semwal, Christian König, Philipp Stanner, Alex Deucher,
	David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
	Rodrigo Vivi, Tvrtko Ursulin, Matthew Brost, Danilo Krummrich,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Mario Limonciello (AMD), Ruslan Vagner, Gustavo Padovan,
	Chris Wilson
  Cc: linux-media, dri-devel, linux-kernel, amd-gfx, intel-gfx

The timestamp bit is annoying and dangerous because it makes memory
ordering difficult. It's only accessor function, dma_fence_timestamp(),
is unnecessarily complicated.

The current state is largely UB. Most notably, since there is no memory
ordering, people might accidentally read a list head for a timestamp,
generating total bogus output.

I have previously proposed backporting a hot fix for the ordering [1].
Tvrtko recently dived into fixing drm_sched [2].

My hope would be that the full drm_sched fix could be set on top of this
series.

The first two patches could be backported into misc-fixes, and the rest
enter into misc-next? I'm not entirely sure what the best strategy is.

Pls review,
P.

[1] https://lore.kernel.org/dri-devel/20261126172046.2473303-2-phasta@kernel.org/
[2] https://lore.kernel.org/dri-devel/20261126154200.71180-1-tvrtko.ursulin@igalia.com/

Philipp Stanner (8):
  dma-buf: dma-fence: Hot-fix timestamp misordering
  drm/sched: Hot-fix timestamp misordering
  dma-buf: dma-fence: Ensure ordering with locks for timestamps
  dma-buf: dma-fence: Improve dma_fence_timestamp()
  drm/amdgpu: Stop using dma_fence internals
  dma-buf: sync_debug: don't use TIMESTAMP bit
  drm/i915: Remove TIMESTAMP bit
  dma-buf: dma-fence: Remove TIMESTAMP bit

 drivers/dma-buf/dma-fence-unwrap.c          | 20 ++++++++++-----
 drivers/dma-buf/dma-fence.c                 |  2 --
 drivers/dma-buf/sync_debug.c                |  8 +++---
 drivers/dma-buf/sync_file.c                 |  8 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c     | 11 ++++----
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c |  1 -
 drivers/gpu/drm/scheduler/sched_entity.c    |  4 +--
 drivers/gpu/drm/scheduler/sched_main.c      | 26 +++++++++++++++----
 include/linux/dma-fence.h                   | 28 +++++++++++++--------
 9 files changed, 68 insertions(+), 40 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-27 10:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 10:18 [RFC PATCH 0/8] dma-fence: Remove TIMESTAMP bit Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 1/8] dma-buf: dma-fence: Hot-fix timestamp misordering Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 2/8] drm/sched: " Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 3/8] dma-buf: dma-fence: Ensure ordering with locks for timestamps Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 4/8] dma-buf: dma-fence: Improve dma_fence_timestamp() Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 5/8] drm/amdgpu: Stop using dma_fence internals Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 6/8] dma-buf: sync_debug: don't use TIMESTAMP bit Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 7/8] drm/i915: Remove " Philipp Stanner
2026-11-27 10:18 ` [RFC PATCH 8/8] dma-buf: dma-fence: " Philipp Stanner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox