STRUCT DRM_MM(9)
πΈ struct drm_mm(9) πΈ
okay so bestie, welcome to the Kernel API Manual page for struct drm_mm(9) β yes the whole vibe is DRM allocator energy and we're gonna get into it π
β¨ NAME β¨
struct drm_mm β literally the DRM allocator, no cap π
π¦ SYNOPSIS π¦
struct drm_mm {
void (*color_adjust)(const struct drm_mm_node *node, unsigned long
color, u64 *start, u64 *end);
};
π Members π
color_adjustβ bestie this one is optional, okay? it's a driver callback that lets you slap even more restrictions on a hole π³οΈ. so thenodeargument points at the node containing the hole from which the block would be allocated (peepdrm_mm_hole_followsand friends for that whole situation π). the other arguments are the size of the block to be allocated. and then the driver can adjuststartandendas needed to, like, insert guard pages or whatever it's giving π‘οΈβ¨
π Description π
so this is the DRM range allocator, and it comes with a few special functions and features that are highkey geared towards managing GPU memory π₯. and here's the important part, bestie: except for the color_adjust callback, the structure is entirely opaque β do NOT go poking around inside it, you should only access it through the provided functions and macros, periodt π
ββοΈ. the slay part is that this structure can be embedded into larger driver structures, so it's giving main character energy that fits into your bigger vibe π
π§ SEE ALSO π§
Kernel file ./include/drm/drm_mm.h plus the whole friend group:
enum drm_mm_insert_mode(9)struct drm_mm_node(9)struct drm_mm_scan(9)drm_mm_node_allocated(9)drm_mm_initialized(9)drm_mm_hole_follows(9)drm_mm_hole_node_start(9)drm_mm_hole_node_end(9)drm_mm_nodes(9)drm_mm_for_each_node(9)drm_mm_for_each_node_safe(9)drm_mm_for_each_hole(9)drm_mm_insert_node_generic(9)drm_mm_insert_node(9)drm_mm_clean(9)drm_mm_for_each_node_in_range(9)drm_mm_scan_init(9)
π reminder bestie: don't touch the opaque insides, only use the functions and macros, ily π«Ά
and that's the whole page!! this one lives in ./include/drm and the version vibes are October 2026 β go forth and allocate responsibly, mwah ππβ
π¦ 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