vmw_execbuf_copy_fence_user(9)
π vmw_execbuf_copy_fence_user(9) β Kernel API Manual β¨
okay so bestie, this one lives in the Kernel API Manual and it's basically the little messenger that hands fence info back to userspace. tiny function, big "please don't let this copy fail" energy. let's get into it π«Ά
β¨ NAME β¨
vmw_execbuf_copy_fence_user β copy fence object information to userspace. like, literally that's the whole job π
πΈ SYNOPSIS πΈ
int vmw_execbuf_copy_fence_user (struct vmw_private *dev_priv , struct
vmw_fpriv *vmw_fp , int ret , struct drm_vmw_fence_rep __user
*user_fence_rep , struct vmw_fence_obj *fence , uint32_t fence_handle ,
int32_t out_fence_fd );
seven params, no cap. she's thorough π₯
π ARGUMENTS π
dev_privβ pointer to avmw_privatestruct. the main character of the vmwgfx universe tbh πvmw_fpβ pointer to thestruct vmw_fprivthat represents the calling file. so we know who is asking πretβ the return value from fence object creation. yeah, we're passing a return value in. it's giving "receipts" π§Ύuser_fence_repβ the userspace address of astruct drm_vmw_fence_rep, and that's where the info gets copied to. destination unlocked π¬fenceβ pointer to thefencobject. yes, the page really spells itfenc, not me, I would never π (it means the fence object)fence_handleβ the userspace fence handle. that's the little id userspace holds onto π«out_fence_fdβ the exported file descriptor for the fence. and it's-1if it's not used, so don't come for her when it's negative π
π¦ DESCRIPTION π¦
so, the whole point: this function copies fence information to userspace. that's it, that's the vibe check β
now the messy part, and I need you to stay with me: if copying fails, the userspace struct drm_vmw_fence_rep::error member is hopefully left untouched β and if userspace preloaded it with an -EFAULT, the error will hopefully be detected. yes, "hopefully" twice. she said it, not me, the manpage is being honest about the coping mechanism π
also, if copying fails, userspace is gonna be unable to signal the fence object, so we wait for it immediately and then unreference the userspace reference. lowkey the graceful-exit arc of this function π
heads up: those are the documented behaviours, "hopefully" included, fr fr. I'm not adding lore.
π SEE ALSO π
the kernel file is ./drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c β that's the neighborhood bestie π‘
and then, and I'm not kidding, the whole friend group:
struct vmw_relocation(9)enum vmw_resource_relocation_type(9)struct vmw_resource_relocation(9)struct vmw_ctx_validation_info(9)struct vmw_cmd_entry(9)vmw_ptr_diff(9)vmw_execbuf_bindings_commit(9)vmw_bind_dx_query_mob(9)vmw_cmd_ctx_first_setup(9)vmw_execbuf_res_size(9)vmw_execbuf_rcache_update(9)vmw_execbuf_res_val_add(9)vmw_view_res_val_add(9)vmw_view_id_val_add(9)vmw_resource_context_res_add(9)vmw_resource_relocation_add(9)vmw_resource_relocations_free(9)vmw_resource_relocations_apply(9)vmw_resources_reserve(9)vmw_cmd_res_check(9)vmw_rebind_all_dx_query(9)vmw_rebind_contexts(9)vmw_view_bindings_add(9)vmw_cmd_cid_check(9)vmw_execbuf_info_from_res(9)vmw_query_bo_switch_prepare(9)vmw_query_bo_switch_commit(9)vmw_translate_mob_ptr(9)vmw_translate_guest_ptr(9)vmw_cmd_dx_define_query(9)vmw_cmd_dx_bind_query(9)vmw_cmd_begin_gb_query(9)vmw_cmd_begin_query(9)vmw_cmd_end_gb_query(9)vmw_cmd_end_query(9)vmw_cmd_wait_gb_query(9)vmw_cmd_wait_query(9)vmw_cmd_res_switch_backup(9)vmw_cmd_switch_backup(9)vmw_cmd_bind_gb_surface(9)vmw_cmd_update_gb_image(9)vmw_cmd_update_gb_surface(9)vmw_cmd_readback_gb_image(9)vmw_cmd_readback_gb_surface(9)vmw_cmd_invalidate_gb_image(9)vmw_cmd_invalidate_gb_surface(9)vmw_cmd_shader_define(9)vmw_cmd_shader_destroy(9)vmw_cmd_set_shader(9)vmw_cmd_set_shader_const(9)vmw_cmd_bind_gb_shader(9)vmw_cmd_dx_set_single_constant_buffer(9)vmw_cmd_dx_set_constant_buffer_offset(9)vmw_cmd_dx_set_shader_res(9)vmw_cmd_dx_set_shader(9)vmw_cmd_dx_set_vertex_buffers(9)vmw_cmd_dx_set_index_buffer(9)vmw_cmd_dx_set_rendertargets(9)vmw_cmd_dx_clear_rendertarget_view(9)vmw_cmd_dx_clear_depthstencil_view(9)vmw_cmd_dx_set_so_targets(9)vmw_cmd_dx_check_subresource(9)vmw_cmd_dx_view_remove(9)vmw_cmd_dx_define_shader(9)vmw_cmd_dx_destroy_shader(9)vmw_cmd_dx_bind_shader(9)vmw_cmd_dx_genmips(9)vmw_cmd_dx_transfer_from_buffer(9)vmw_cmd_intra_surface_copy(9)vmw_execbuf_submit_fifo(9)vmw_execbuf_submit_cmdbuf(9)vmw_execbuf_cmdbuf(9)vmw_execbuf_unpin_panic(9)__vmw_execbuf_release_pinned_bo(9)vmw_execbuf_release_pinned_bo(9)
that's the whole group chat, everyone showed up, nobody left on read π
and that's the page!! mwah π this little number comes from ./drivers/gpu/drm/vmwgfx, dated October 2026, and she answers to vmw_execbuf_copy_fence_user(9) β go say hi, she's iconic, 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