Re: [PATCH v2 0/3] dma-fence: Properly order timestamps

From: Philipp Stanner

Date: Tue Dec 01 2026 - 09:46:22 EST


On Tue, 2026-12-01 at 15:36 +0100, Danilo Krummrich wrote:
> On Tue Dec 1, 2026 at 10:17 AM CET, Philipp Stanner wrote:
> >   - Avoid "hotfix" rhetoric. (Danilo)
>
> This wasn't about terminology. I'm questioning why this is needed as a late
> cycle fix.
>
> You pointed out that this gap already exists for a very long time and we don't
> have any reports for this causing issues in practice.

Yes, I have understood that already.

This series is about: this is a problem, so let's merge into into drm-
misc-fixes, some time in the near to mid future.

This is not intended as a "late cycle fix", just as a fix.

> Additionally, you mention below that you work on a proper solution that you will
> post soon.
>
> So, why do we need this as a quick late cycle fix? Why can't we just go with
> your proper fix? What does the proper fix look like?

https://lore.kernel.org/dri-devel/20261127101812.2706432-2-phasta@xxxxxxxxxx/


> Now, of course the regression potential of this series is surveyable, but given
> that you say it is temporary and you send a proper fix soon, it seems
> unnecessary.


It's small and easy to backport.

The "proper solution", linked above, once again might not be so easy to
roll out, because (surprise /s):

- fence lock and fence context lock are shared, for example in
sync_file.
- Some parties call dma_fence_timestamp() from a fence callback,
thereby deadlocking because the fence callbacks are called with the
lock held. I guess these we *might* be able to port to just
ktime_get().
- Users have ossified the API, most notably i915. It could be that
removal of the TIMESTAMP bit would have to be reverted should i915
regress.


So same story as always. The toughest nut to crack for a cleaner
solution would be sync_file, which doesn't use inline_lock right now,
therefore is condemned to a manual test_bit().

I currently am inclined to think that dma_fence_timestamp() should work
with manual barriers for now, then the broken users be ported, and then
one day dma_fence_timestamp() can be locked. Maybe together with the
signaled-bit, depending on how our discussions there unfold.


Clear now?

P.