dma_resv_replace_fences(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dma_resv_replace_fences(9) β€” like, the whole glow-up

okay so bestie, welcome to the Kernel API Manual entry for dma_resv_replace_fences(9) β€” yes the function name is literally the same as the page name, that's just how kernel docs roll, iykyk πŸŽ€


✨ NAME ✨

dma_resv_replace_fences β€” swap out fences inside the dma_resv obj, no big deal πŸ’…


🌸 SYNOPSIS 🌸

void dma_resv_replace_fences (struct dma_resv *obj , uint64_t context ,
       struct dma_fence *replacement , enum dma_resv_usage usage );

like, she returns void, she takes four things, she does the thing. periodt. πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • obj β€” the reservation object. the main character of this whole situation fr.
  • context β€” the context of the fences you wanna replace. like, which ones are getting swapped out πŸ‘€
  • replacement β€” the new fence to use instead. the understudy. the glow-up. the swap πŸ’–
  • usage β€” how the new fence is used β€” go peep enum dma_resv_usage for the deets.

πŸ”₯ DESCRIPTION πŸ”₯

so what she does: she replaces fences that have a specified context with a new fence. simple, clean, iconic. ✨

⚠️ but bestie, listen β€” this is only valid if the operation represented by the original fence no longer has access to the resources represented by the dma_resv object when the new fence completes. read that twice. no cap. 😭

and an example (the manpage says "And example", which, mood, we're keeping it) for using this is replacing a preemption fence with a page table update fence which makes the resource inaccessible. see? the old one loses access, the new one takes over. main character energy πŸ”₯πŸ‘‘


🫢 SEE ALSO 🫢

like, the whole reservation-object friend group, honestly. go say hi 🌈


and that's the page!! this lil slice of docs lives in ./drivers/dma-buf and it's stamped October 2026, page name dma_resv_replace_fences(9). mwah, slay, bye bestie πŸ’œπŸ“πŸŽ€

πŸ“¦ where this page comes from