STRUCT DRM_PAGEMAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct drm_pagemap(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this is the page for struct drm_pagemap, and it's literally extra info that rides along with a struct dev_pagemap β€” specifically the whole device p2p handshaking situation 🀝 no cap, that's the entire vibe.


πŸŽ€ SYNOPSIS πŸŽ€

struct drm_pagemap {
    const struct drm_pagemap_ops *ops;
    struct kref ref;
    struct drm_device *drm;
    struct dev_pagemap *pagemap;
    struct drm_pagemap_dev_hold *dev_hold;
    struct drm_pagemap_cache *cache;
    struct list_head shrink_link;
 };

like, that's the whole struct, and yes every field matters, so let's get into it πŸ‘‡


🌸 Members 🌸

  • ops β€” the struct drm_pagemap_ops. that's it, that's the field πŸ’«
  • ref β€” the reference count. classic struct kref behaviour, keep it alive bestie 🫢
  • drm β€” the struct drm device that owns the device-private memory πŸ‘‘
  • pagemap β€” a pointer to the underlying dev_pagemap. the real one underneath all the extra ✨
  • dev_hold β€” a pointer to a struct drm_pagemap_dev_hold, and it's there for device referencing πŸ“Ž
  • cache β€” a back-pointer to the struct drm_pagemap_cache that's used for this struct drm_pagemap. heads up: it may be NULL if no cache is used πŸ™ˆ
  • shrink_link β€” a link into the shrinker's list of drm_pagemaps. important caveat: it's only used if you're also using a pagemap cache, so if you got no cache, this link is just sitting there πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file ./include/drm/drm_pagemap.h enum, plus this whole squad of cross-references β€” go read them, they're iconic:


and that's the page, bestie πŸ“ this one lives in ./include/drm and it's dated October 2026 β€” mwah, slay, go read the source, periodt πŸ’–πŸ§š

πŸ“¦ where this page comes from