i915_deps_add_dependency(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ i915_deps_add_dependency(9) πŸ’œ

okay bestie, welcome to the Kernel API Manual β€” this one's all about i915_deps_add_dependency, and honestly it's giving "small function, big responsibilities." Let's get into it ✨


🌸 NAME 🌸

i915_deps_add_dependency β€” literally just: add a fence to the dependency collection. That's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int i915_deps_add_dependency (struct i915_deps *deps , struct dma_fence
*fence , const struct ttm_operation_ctx *ctx );

no cap, that's the signature, copy it exactly please πŸ’…


✨ ARGUMENTS ✨

  • deps β€” pointer to the i915_deps structure that the fence is gonna get added to. this is the collection, the little fence home 🏠
  • fence β€” the fence to add. yes. that one. 🫢
  • ctx β€” pointer to a struct ttm_operation_ctx, and it tells us how waits are supposed to be performed if waiting happens. so like, the vibe-setting struct for waiting 😌

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea β˜• β€” this function adds a fence to the dependency collection, and it takes a reference on it. very demure, very reference-counted.

now the interesting part, the plot twist if you will 😭:

  • If the fence context is not zero and there was a later fence from the same fence context already added, then the fence is not added to the dependency collection. it just… doesn't make the cut. πŸ™ˆ
  • If the fence context is not zero and there was an earlier fence already added, then the fence will replace the older fence from the same context, and the reference on the earlier fence will be dropped. out with the old, in with the new πŸ’…
  • If there's a failure to allocate memory to accommodate the new fence to be added, the new fence will instead be waited for, and an error may be returned β€” depending on the value of ctx, or if there was a fence error. 😭
  • If an error was returned, the dependency collection will be finalized and all fence references dropped. full cleanup mode, no leftovers ✨
fr fr, read the allocation-failure bit twice β€” the wait-instead-of-add behaviour is the whole personality of this branch πŸ’€

🌈 RETURN 🌈

  • 0 if success πŸŽ‰
  • Negative error code on error πŸ˜”

⭐ SEE ALSO ⭐

iykyk β€” go read the whole little family, they're iconic πŸ‘‘


and that's the page bestie!! 🫢 brought to you by ./drivers/gpu/drm/i915, dated October 2026 β€” stan the kernel docs, periodt πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from