STRUCT DRM_GPUVA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct drm_gpuva(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this is the page for struct drm_gpuva, and it's literally the blueprint for tracking a GPU VA mapping. buckle up πŸ’…


🌸 NAME 🌸

struct drm_gpuva β€” the structure that tracks a GPU VA mapping πŸŽ€


✨ SYNOPSIS ✨

struct drm_gpuva {
    struct drm_gpuvm *vm;
    struct drm_gpuvm_bo *vm_bo;
    enum drm_gpuva_flags flags;
    struct {
      u64 addr;
      u64 range;
    } va;
    struct {
      u64 offset;
      struct drm_gem_object *obj;
      struct list_head entry;
    } gem;
    struct {
      struct rb_node node;
      struct list_head entry;
      u64 __subtree_last;
    } rb;
 };

🫢 Members 🫢

the top-level fields

  • vm β€” the drm_gpuvm this object is associated with. it's giving "who's your parent" energy πŸ‘‘
  • vm_bo β€” the drm_gpuvm_bo abstraction for the mapped drm_gem_object
  • flags β€” the drm_gpuva_flags for this mapping 🚩
  • va β€” structure containing the address and range of the drm_gpuva
    • va.addr β€” the start address πŸ“

the gem struct

  • gem β€” structure containing the drm_gem_object and its offset
    • gem.offset β€” the offset within the drm_gem_object
    • gem.obj β€” the mapped drm_gem_object 🧚
    • gem.entry β€” the list_head to attach this object to a drm_gpuvm_bo

the rb struct

  • rb β€” structure containing data to store drm_gpuvas in a rb-tree 🌈
    • rb.node β€” the rb-tree node
    • rb.entry β€” The list_head to additionally connect drm_gpuvas in the same order they appear in the interval tree. This is useful to keep iterating drm_gpuvas from a start node found through the rb-tree while doing modifications on the rb-tree itself. no cap, this one's the MVP for mutation-safe loops πŸ”₯
    • rb.__subtree_last β€” needed by the interval tree, holding last-in-subtree

πŸ’– Description πŸ’–

This structure represents a GPU VA mapping and is associated with a drm_gpuvm.

Typically, this structure is embedded in bigger driver structures. like, it's not out here living its own main character life β€” it's a supporting icon inside your driver's structs πŸŽ€


🌟 SEE ALSO 🌟

Kernel file ./include/drm/drm_gpuvm.h β€” and honestly the whole friend group:


this page lives in ./include/drm, and it's dated October 2026 β€” the manual name on the tin is struct drm_gpuva(9), and that's the whole vibe check. periodt πŸ’…πŸ’–
πŸ“¦ where this page comes from