drm_syncobj_find_fence(9)
β¨ drm_syncobj_find_fence(9) β¨
okay bestie, welcome to the Kernel API Manual π this one's a lil helper function from the DRM world and honestly? she's giving convenience queen. let's get into it π
πΈ NAME πΈ
drm_syncobj_find_fence β lookup and reference the fence in a sync object π¦
π SYNOPSIS π
int drm_syncobj_find_fence (struct drm_file *file_private , u32 handle ,
u64 point , u64 flags , struct dma_fence **fence );
like, that's the whole vibe right there β¨
π§ ARGUMENTS π§
file_privateβ the drm file private pointer, aka the lil context thing you hand over πhandleβ the sync object handle to look up. this is the one you're hunting for, iykyk πpointβ the timeline point β³flagsβDRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMITor not. that's literally the choice, no cap π«Άfenceβ the out parameter for the fence, where the good stuff lands π₯
π₯ DESCRIPTION π₯
so basically this is just a convenience function that combines drm_syncobj_find and drm_syncobj_fence_get β like a two-for-one combo meal, obsessed π
it returns 0 on success, or a negative error value on failure π and here's the important bit, bestie: on success, fence contains a reference to the fence, and you must release it by calling dma_fence_put. don't leave her hanging, that's a leak and it's not cute π
π SEE ALSO π
go read these too, they're all in the same friend group fr fr π
- Kernel file
./drivers/gpu/drm/drm_syncobj.cOverview(9) drm_syncobj_find(9)drm_syncobj_add_point(9)drm_syncobj_replace_fence(9)drm_syncobj_assign_null_handle(9)drm_syncobj_free(9)drm_syncobj_create(9)drm_syncobj_get_handle(9)drm_syncobj_get_fd(9)drm_syncobj_open(9)drm_syncobj_release(9)drm_timeout_abs_to_jiffies(9)
reminder bestie: that fence reference from a successful call? dma_fence_put it. always. π
and that's the whole page, mwah π sign-off time: this lil masterpiece lives in ./drivers/gpu/drm, dated October 2026, and it's literally iconic for it πβ¨π¦
π¦ 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