STRUCT DRM_MM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 the node argument points at the node containing the hole from which the block would be allocated (peep drm_mm_hole_follows and friends for that whole situation πŸ‘€). the other arguments are the size of the block to be allocated. and then the driver can adjust start and end as 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:


πŸ’€ 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