drm_pagemap..._create_devm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_pagemap_cache_create_devm β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual, and today's main character is drm_pagemap_cache_create_devm(9) πŸ’…


🌸 NAME 🌸

drm_pagemap_cache_create_devm β€” literally just creates a drm_pagemap_cache, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_pagemap_cache * drm_pagemap_cache_create_devm (struct
       drm_pagemap_shrinker *shrinker );

πŸ’œ ARGUMENTS πŸ’œ

  • shrinker β€” a pointer to a struct drm_pagemap_shrinker. that's it, that's the input 🫢

✨ DESCRIPTION ✨

so what this does is create a device-managed drm_pagemap cache πŸ‘‘ and the "device-managed" part is the slay here: the cache gets automatically destroyed on struct device removal, no manual cleanup era required. and at that exact moment, any inactive drm_pagemap's get destroyed too. periodt. πŸ’€

bestie note: it's the inactive ones that get destroyed at that point β€” the manpage says it like that and we're not changing it. πŸ™ˆ

πŸŽ€ RETURN πŸŽ€

  • returns a pointer to a struct drm_pagemap_cache on success πŸ’–
  • returns an error pointer on failure 😭

🌈 SEE ALSO 🌈

like, read the whole friend group, iykyk 🧚


aaand that's the page, bestie πŸ“ this lil gem lives in ./drivers/gpu/drm, dated October 2026, and it's page drm_pagemap..._create_devm(9) of the Kernel API Manual β€” go off, go read the source, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from