ENUM DRM_GEM_OBJECT_STATUS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum drm_gem_object_status(9) ✨

okay so hiiii, welcome to the Kernel API Manual, bestie 🫢 this page is all about enum drm_gem_object_status(9), and it's basically a little bitmask of object state for fdinfo reporting. iconic behavior only, no cap. πŸ’…

🌸 NAME 🌸

enum drm_gem_object_status β€” bitmask of object state for fdinfo reporting. periodt. ✨

🌈 SYNOPSIS 🌈

enum drm_gem_object_status {
    DRM_GEM_OBJECT_RESIDENT ,
    DRM_GEM_OBJECT_PURGEABLE ,
    DRM_GEM_OBJECT_ACTIVE

};

🧸 Constants 🧸

  • DRM_GEM_OBJECT_RESIDENT β€” object is resident in memory (ie. not unpinned). πŸ’–
  • DRM_GEM_OBJECT_PURGEABLE β€” object marked as purgeable by userspace. 🫧
  • DRM_GEM_OBJECT_ACTIVE β€” object is currently used by an active submission. πŸ”₯

πŸ’– Description πŸ’–

so this is the bitmask of status used for fdinfo memory stats β€” peek at drm_gem_object_funcs.status and drm_show_fdinfo if you want the full receipts. πŸ‘‘

here's the tea: an object can report DRM_GEM_OBJECT_PURGEABLE and still be active or not resident, and in that case drm_show_fdinfo will not account for it as purgeable. so drivers do not need to check whether the buffer is idle and resident before returning this bit β€” meaning userspace can mark a buffer as purgeable even while it is still busy on the GPU. it will not get reported in the puregeable stats until it becomes idle. the status gem object func does not need to consider this. periodt. πŸ’€βœ¨

πŸ”— SEE ALSO πŸ”—

this cutie comes from source ./include/drm, dated October 2026, and it's the enum drm_gem_object_status(9) page β€” byeeeeee πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from