drm_gem_dma_resv_wait(9)
π drm_gem_dma_resv_wait(9) β the Kernel API Manual page you didn't know you needed
okay so bestie, welcome to the drm_gem_dma_resv_wait(9) glow-up page, straight out of the Kernel API Manual. this one's a cute little kernel function and honestly? it's giving "wait at the club velvet rope but for GPU fences" π
β¨ NAME β¨
drm_gem_dma_resv_wait β literally just: wait on a GEM object's reservation's objects' shared and/or exclusive fences π
yes that's a lot of possessives. it's a reservation, that reservation has objects, those objects have fences, and we're waiting on them. iconic nesting, no notes π
πΈ SYNOPSIS πΈ
long drm_gem_dma_resv_wait (struct drm_file *filep , u32 handle , bool
wait_all , unsigned long timeout );
she takes four args and returns a long. that's the whole vibe check π₯
π¦ ARGUMENTS π¦
filepβ the DRM file private date. (yes, the original says "date" β we do not fix the manpage, we respect the manpage π it means the private data, bestie.)handleβ the userspace handle. that's the lil ID number userspace uses to point at its GEM object πwait_allβ if it's true, you wait on all the fences. if it's false, you wait on just the exclusive fence. pick your fighter β¨timeoutβ timeout value in jiffies, or zero to return immediately. zero is the "i'm just checking, not committing" energy π
π RETURN π
here's the receipts on what she hands back:
-ERESTARTSYSif interrupted π0if the wait timed out π- greater than
0on success π slay
fr fr, clock that 0 β a zero here means timed out, not "yay done". do not get played by the return value bestie π«Ά
π SEE ALSO π
the whole kernel file ./drivers/gpu/drm/drm_gem.c is the mothership, and here's the entire extended friend group of drm_gem_* besties β every single one, no cap:
drm_gem_huge_mnt_create(9), drm_gem_init(9), drm_gem_object_init(9), drm_gem_private_object_init(9), drm_gem_private_object_fini(9), drm_gem_object_handle_get_if_exists_unlocked(9), drm_gem_object_handle_free(9), drm_gem_object_handle_put_unlocked(9), drm_gem_handle_delete(9), drm_gem_dumb_map_offset(9), drm_gem_handle_create_tail(9), drm_gem_handle_create(9), drm_gem_free_mmap_offset(9), drm_gem_create_mmap_offset_size(9), drm_gem_create_mmap_offset(9), drm_gem_get_pages(9), drm_gem_put_pages(9), drm_gem_objects_lookup(9), drm_gem_object_lookup(9), drm_gem_open(9), drm_gem_release(9), drm_gem_object_release(9), drm_gem_object_free(9), drm_gem_vm_open(9), drm_gem_vm_close(9), drm_gem_mmap_obj(9), drm_gem_get_unmapped_area(9), drm_gem_mmap(9), drm_gem_lock_reservations(9), drm_gem_lru_init(9), drm_gem_lru_remove(9), drm_gem_lru_move_tail_locked(9), drm_gem_lru_move_tail(9), drm_gem_lru_scan(9), drm_gem_evict_locked(9)
like, that's a group chat with 35 members and every single one is on read π but they're all valid, go say hi π§
and that's the page!! tysm for reading, mwah π
β xoxo, your local kernel bestie, signing off from ./drivers/gpu/drm πΈ dated October 2026, page drm_gem_dma_resv_wait(9), 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