STRUCT DRM_PAGEMAP_DEV_HOLD(9)
πΈ NAME πΈ
struct drm_pagemap_dev_hold β bestie, it's the lil' helper struct to aid in drm_device release π
(yes, that's the whole name, and yes we're in the Kernel API Manual, section 9, so buckle up π)
β¨ SYNOPSIS β¨
struct drm_pagemap_dev_hold {
struct llist_node link;
struct drm_device *drm;
};
π«Ά MEMBERS π«Ά
linkβ your girl's ticket intodrm_pagemap_unhold_list, where reference releases get deferred for later. it's giving "wait your turn, bestie" πdrmβ thedrmdevice we're gonna put. that's the whole job. iconic, honestly β¨
π DESCRIPTION π
okay so here's the lore π β when a struct drm_pagemap gets released, we also need to release the reference it's holding on the drm device. no cap, that's mandatory.
but here's the plot twist π β that release typically needs to happen separately from a system-wide workqueue. like, different vibe, different lane. so every single time a struct drm_pagemap is initialized (or re-initialized, if it's cached π), we allocate a separate drm_pagemap_dev_hold item. and from that item we put the drm device and the associated module. literally that's it, that's the whole struct's main character arc π
lowkey elegant. highkey necessary. periodt π
π¦ SEE ALSO π¦
- Kernel file
./drivers/gpu/drm/drm_pagemap.c Overview(9)Migration(9)struct drm_pagemap_zdd(9)drm_pagemap_zdd_alloc(9)drm_pagemap_zdd_get(9)drm_pagemap_zdd_destroy(9)drm_pagemap_zdd_put(9)drm_pagemap_migration_unlock_put_folio(9)drm_pagemap_migration_unlock_put_pages(9)drm_pagemap_get_devmem_page(9)drm_pagemap_migrate_map_device_private_pages(9)struct drm_pagemap_iova_state(9)drm_pagemap_migrate_map_system_pages(9)drm_pagemap_migrate_populate_src_pages(9)drm_pagemap_migrate_unmap_pages(9)struct migrate_range_loc(9)drm_pagemap_cpages(9)drm_pagemap_migrate_to_devmem(9)drm_pagemap_migrate_populate_ram_pfn(9)drm_pagemap_reinit(9)drm_pagemap_init(9)drm_pagemap_put(9)drm_pagemap_page_get_flags(9)drm_pagemap_page_set_flags(9)drm_pagemap_retire_migrated_pages(9)drm_pagemap_skip_retired_pages(9)drm_pagemap_evict_to_ram(9)__drm_pagemap_migrate_to_ram(9)drm_pagemap_folio_free(9)drm_pagemap_migrate_to_ram(9)drm_pagemap_pagemap_ops_get(9)drm_pagemap_devmem_init(9)drm_pagemap_page_to_dpagemap(9)drm_pagemap_populate_mm(9)
aaaand that's the whole page, bestie π§π one last lil' vibe check before you go: this one lives in ./drivers/gpu/drm, it's dated October 2026, and it's filed under struct drm_pagemap_dev_hold(9) β slay, go read the source, iykyk π₯π
π¦ 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