i915_deps_add_dependency(9)
π 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 thei915_depsstructure 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 astruct 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 π
0if success π- Negative error code on error π
β SEE ALSO β
- Kernel file
./drivers/gpu/drm/i915/i915_deps.c - Set of utilities to dynamically collect dependencies into a(9)
i915_deps_init(9)i915_deps_fini(9)i915_deps_sync(9)i915_deps_add_resv(9)
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
- 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