drm_pagemap_...he_if_active(9)
π NAME π
Okay bestie, so this whole page is about drm_pagemap_get_from_cache_if_active β like, the actual page title is drm_pagemap_get_from_cache_if_active(9) and it lives in the Kernel API Manual, section 9 (that's the kernel-functions girlies, iykyk). And what does it do? It's your quick little lookup for drm_pagemaps that are, y'know, active. That's the whole vibe. β¨
π¦ SYNOPSIS π¦
struct drm_pagemap * drm_pagemap_get_from_cache_if_active (struct
drm_pagemap_cache *cache );
Like, it hands you back a struct drm_pagemap * and it only wants one thing: a cache. That's it. Low maintenance icon behavior. π
πΈ DESCRIPTION πΈ
So this is the function you reach for when you wanna look up a drm_pagemap that is already active β meaning its refcount is > 0. Not 0. Not negative (obvs). Strictly greater than zero. No cap.
Basically: if it's already popping off, this function will find it for you. If it's not active, don't @ it, because it won't come back with anything. π
π ARGUMENTS π
cacheβ the cache you're looking up from. That's the one. The only one. She's the source of truth for this whole operation. π
β RETURN β
- A pointer to the cache's
drm_pagemapif it's active β slay, you got her. π NULLotherwise β like, the pagemap isn't active, so there's literally nothing to return. π
π SEE ALSO π
The kernel file that this all lives in is ./drivers/gpu/drm/drm_pagemap_util.c, and honestly the whole friend group is here, so let's do the roll call fr fr:
struct drm_pagemap_cache(9)struct drm_pagemap_shrinker(9)drm_pagemap_cache_create_devm(9)Cache lookup(9)drm_pagemap_cache_lock_lookup(9)drm_pagemap_cache_unlock_lookup(9)drm_pagemap_get_from_cache(9)drm_pagemap_cache_set_pagemap(9)drm_pagemap_shrinker_might_lock(9)drm_pagemap_shrinker_add(9)drm_pagemap_shrinker_create_devm(9)struct drm_pagemap_owner(9)drm_pagemap_release_owner(9)interconnect_fn(9)drm_pagemap_acquire_owner(9)
Go read them. All of them. Main character research arc. π§
Quick vibe check before you go: this page is filed under ./drivers/gpu/drm, dated October 2026, and yes those are the source and date from the footer of the original β so when you cite this at 2am in the group chat, you're being accurate. 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