dma_fence_init64(9)
π dma_fence_init64(9) β kernel API manual, but make it make sense π
okay so bestie, welcome to the dma_fence_init64 page. this is kernel API manual territory, it's giving "you're in the driver layer now" energy, but I promise we're gonna get through it together π«Ά
β¨ NAME β¨
dma_fence_init64 β initialize a custom fence with 64-bit seqno support. periodt, that's the whole bit π
πΈ SYNOPSIS πΈ
void dma_fence_init64 (struct dma_fence *fence , const struct
dma_fence_ops *ops , spinlock_t *lock , u64 context , u64 seqno );
like, yeah, five args, no cap. read on π
π ARGUMENTS π
fenceβ the fence you're initializing, bestie. this is the main character πopsβ thedma_fence_opsthat say what operations happen on this fence. it's giving instruction manual πlockβ an optional irqsafe spinlock to use for locking this fence. optional!! don't come for me πcontextβ the execution context this fence is run on π§seqnoβ a linear increasing sequence number for this context. it goes up, it doesn't go down, it's literally so consistent π
π¦ DESCRIPTION π¦
so what does this actually do? it initializes an allocated fence. and here's the tea: the caller doesn't have to keep its refcount after committing with this fence β lowkey freeing. BUT. it will need to hold a refcount again if dma_fence_ops.enable_signaling gets called. so don't get too comfy π
context and seqno are there for easy comparison between fences, which means you can check which fence is later by simply using dma_fence_later. literally so convenient, ate π₯
new users MUST NOT use external locks. like, not a suggestion, that's a MUST NOT. go read the documentation in dma_fence_init to understand the motives behind the legacy use cases β that's where the lore lives π
π SEE ALSO π
okay this list is long but I respect the hustle. go read these, iykyk:
- Kernel file
./drivers/dma-buf/dma-fence.c - DMA fences overview(9)
- fence cross-driver contract(9)
dma_fence_get_stub(9)dma_fence_allocate_private_stub(9)dma_fence_context_alloc(9)- fence signalling annotation(9)
dma_fence_begin_signalling(9)dma_fence_end_signalling(9)dma_fence_signal_timestamp_locked(9)dma_fence_signal_timestamp(9)dma_fence_signal_locked(9)dma_fence_check_and_signal_locked(9)dma_fence_check_and_signal(9)dma_fence_signal(9)dma_fence_wait_timeout(9)dma_fence_release(9)dma_fence_free(9)dma_fence_enable_signaling(9)dma_fence_add_callback(9)dma_fence_get_status(9)dma_fence_remove_callback(9)dma_fence_default_wait(9)dma_fence_wait_any_timeout(9)- deadline hints(9)
dma_fence_set_deadline(9)dma_fence_describe(9)dma_fence_init(9)dma_fence_driver_name(9)dma_fence_timeline_name(9)
β¨ and that's the whole page, bestie β¨ this one lives over in ./drivers/dma-buf, dated October 2026 β go forth and init your fences responsibly, mwah ππ
π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms