STRUCT DRM_PAGEMAP(9)
β¨ 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β thestruct drm_pagemap_ops. that's it, that's the field π«refβ the reference count. classicstruct krefbehaviour, keep it alive bestie π«Άdrmβ thestruct drmdevice that owns the device-private memory πpagemapβ a pointer to the underlyingdev_pagemap. the real one underneath all the extra β¨dev_holdβ a pointer to astruct drm_pagemap_dev_hold, and it's there for device referencing πcacheβ a back-pointer to thestruct drm_pagemap_cachethat's used for thisstruct drm_pagemap. heads up: it may beNULLif 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:
drm_interconnect_protocol(9)struct drm_pagemap_addr(9)drm_pagemap_addr_encode(9)struct drm_pagemap_ops(9)struct drm_pagemap_devmem_ops(9)drm_pagemap_get(9)drm_pagemap_get_unless_zero(9)struct drm_pagemap_devmem(9)struct drm_pagemap_migrate_details(9)drm_pagemap_page_zone_device_data(9)
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
- 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