ENUM DRM_GEM_OBJECT_STATUS(9)
β¨ 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 π
- Kernel file:
./include/drm/drm_gem.h struct drm_gem_object_funcs(9)struct drm_gem_lru(9)struct drm_gem_object(9)DRM_GEM_FOPS(9)DEFINE_DRM_GEM_FOPS(9)drm_gem_get_huge_mnt(9)drm_gem_object_get(9)drm_gem_object_put(9)drm_gem_object_is_shared_for_memory_stats(9)drm_gem_is_imported(9)drm_gem_gpuva_init(9)drm_gem_for_each_gpuvm_bo(9)drm_gem_for_each_gpuvm_bo_safe(9)
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
- 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