STRUCT DRM_I915_GEM_VM_UNBIND(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_i915_gem_vm_unbind(9) πŸ’–

okay bestie, welcome to the Kernel API Manual corner where we talk about the struct that tells the GPU "unbind this VA range, please and thank you." It's giving cleanup-crew energy, no cap. 🧹✨

✨ NAME ✨

struct drm_i915_gem_vm_unbind β€” VA to object mapping to unbind. πŸ’…

🌸 SYNOPSIS 🌸

struct drm_i915_gem_vm_unbind {
    __u32 vm_id;
    __u32 rsvd;
    __u64 start;
    __u64 length;
    __u64 flags;
    struct drm_i915_gem_timeline_fence fence;
    __u64 extensions;
 };

🫢 Members 🫢

  • vm_id β€” the VM (address space) id to bind. yes, the manual says bind, and we're keeping it exactly like that. 🫑
  • rsvd β€” reserved, MBZ. πŸ’€
  • start β€” virtual address start to unbind. πŸ“
  • length β€” length of mapping to unbind. πŸ“
  • flags β€” currently reserved, MBZ. note that fence carries its own flags.
  • fence β€” timeline fence for unbind completion signaling. 🚦 timeline fence is of format struct drm_i915_gem_timeline_fence. it is an out fence, hence using I915_TIMELINE_FENCE_WAIT flag is invalid, and an error will be returned. if I915_TIMELINE_FENCE_SIGNAL flag is not set, then out fence is not requested and unbinding is completed synchronously.
  • extensions β€” zero-terminated chain of extensions. for future extensions. see struct i915_user_extension.

πŸ’œ Description πŸ’œ

this structure is passed to the VM_UNBIND ioctl and specifies the GPU virtual address (VA) range that should be unbound from the device page table of the specified address space (VM). VM_UNBIND will force unbind the specified range from device page table without waiting for any GPU job to complete. it is UMDs responsibility to ensure the mapping is no longer in use before calling VM_UNBIND. 🫢

bestie, the manual is literally saying it's UMDs responsibility to make sure the mapping is no longer in use before calling VM_UNBIND. do not skip that part. 🚨

if the specified mapping is not found, the ioctl will simply return without any error. ✨

VM_BIND/UNBIND ioctl calls executed on different CPU threads concurrently are not ordered. furthermore, parts of the VM_UNBIND operation can be done asynchronously, if valid fence is specified.

πŸ¦‹ SEE ALSO πŸ¦‹


that's the whole vibe, bestie. this page is from ./Documentation/gpu/rfc, dated October 2026 β€” go off, kernel docs. πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from