drm_pagemap_zdd_alloc(9)
π drm_pagemap_zdd_alloc(9)
okay so bestie, welcome to the Kernel API Manual β this is the page for drm_pagemap_zdd_alloc(9) and it's honestly giving "tiny function, big responsibilities" energy β¨
πΈ NAME πΈ
drm_pagemap_zdd_alloc β allocate a zdd structure. that's it. that's the whole name section. short king π«Ά
β¨ SYNOPSIS β¨
struct drm_pagemap_zdd * drm_pagemap_zdd_alloc (struct drm_pagemap
*dpagemap );
like literally just hand it a dpagemap and it gives you back a struct drm_pagemap_zdd * β iconic behavior ngl π
π ARGUMENTS π
dpagemapβ pointer to the underlyingstruct drm_pagemap. that's the one and only thing you're passing in, bestie, so don't overthink it π¦
π DESCRIPTION π
so what this function actually does: it allocates and initializes a brand-new zdd structure π₯
like, it's not just handing you raw memory and dipping β no ma'am. it sets up the reference count and initializes the destroy work. main character energy fr fr π
think of it as the glow-up phase where the struct gets its whole personality installed before it goes out into the world π
β RETURN β
- on success? you get a pointer to the allocated zdd. slay π
- on failure? you get
ERR_PTR. and before you ask β yes, that means it does not returnNULLfor failure, so please check it properly with the right macros, okay? i'm not gonna let you get caught out like that π
π₯ SEE ALSO π₯
the whole friend group, in order, no cap:
- Kernel file
./drivers/gpu/drm/drm_pagemap.cβOverview(9),Migration(9) struct drm_pagemap_zdd(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)struct drm_pagemap_dev_hold(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)
and that's the whole page, bestie π this lil section lives down in ./drivers/gpu/drm, dated October 2026 β so go forth, allocate your zdds, and remember to put them back when you're done π§ββοΈπΈ
π¦ 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